Hi Harrison,
Thanks for pointing that out. It helps a lot!
And I'm actually having some problems when implementing sram_compiler with chipyard. For some reasons, Chipyard cannot compile the given memory blocks.
Here's the error:
barstools.macros.MacroCompilerException: Target memory data_arrays_0_ext could not be compiled and strict mode is activated - aborting
Since it's not really descriptive, so I tried to add some println()'s in the function
groupMatchesMask to print memMask and libMask. And here is the output respectively:
[info] List(MacroPort(PolarizedPort(RW0_addr,ActiveHigh),Some(PolarizedPort(RW0_clk,PositiveEdge)),Some(PolarizedPort(RW0_wmode,ActiveHigh)),None,Some(PolarizedPort(RW0_en,ActiveHigh)),Some(PolarizedPort(RW0_rdata,ActiveHigh)),Some(PolarizedPort(RW0_wdata,ActiveHigh)),Some(PolarizedPort(RW0_wmask,ActiveHigh)),Some(8),Some(32),Some(4096)))
[info] List(MacroPort(PolarizedPort(AW,ActiveHigh),Some(PolarizedPort(CLK,PositiveEdge)),Some(PolarizedPort(RDWEN,ActiveLow)),None,Some(PolarizedPort(CEN,ActiveLow)),Some(PolarizedPort(Q,ActiveHigh)),Some(PolarizedPort(D,ActiveHigh)),None,None,None,None))
I'm not sure why my last 4 items from the sram compiler are "None".
And when I used sram-cache.json instead, the flow runs perfectly fine. The only differences between the two .json files are the data types of the width and depth attributes.
I've included the full terminal output, sram-compiler.json and the generated top.mem.conf. I hope you could have a look into this.
Best,
Giang