barstools icon indicating copy to clipboard operation
barstools copied to clipboard

MacroCompiler fails to compile if depth < min. depth in SRAM compiler library

Open harrisonliew opened this issue 5 years ago • 1 comments

While compile to SRAMs for some technology, I believe I encountered a bug. Here is the test case:

  • My technology has min. depth of 512 for single-port memories
  • I am running MacroCompiler with -n <my conf file> -l <my sram-compiler.json> -u (output options omitted)
  • If I have single-port mems whose depth is <512, the resulting firrtl does not have any compiled memory extmodules for those mems
  • If I manually change the depth to >=512 in the conf file, it compiles properly

I'm unsure if this also affects >1-port memories because my technology has much smaller min depth for register files.

Possibly related to #44 and #47?

harrisonliew avatar Mar 05 '20 20:03 harrisonliew

In person discussion notes: Yes this is a reasonable constraint that we probably haven't encountered before because most compilers support a more reasonable minimum size such that anything smaller should be in flops anyways. We should add support for using the larger size and wasting the bits. In addition we should add the ability for the compiler to upgrade the number of ports, and tie them off to obtain different sizes. This would also require an update to the cost model such that the number of ports is reflected. This would allow a 32x128 single port request to be mapped to either the minimum size single port library, for example 32x512, or at a cost of 1.X times per memory a smaller dual port library, for example 32x128. 

colinschmidt avatar Mar 06 '20 16:03 colinschmidt