You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blaming the code that is doing this and looking at what the SFC would do in this situation seems to indicate that this is there for SFC compatibility. The LowerCHIRRTL has specific (old) comments about how enable inference works and that nodes are treated specially. This is also a very, very old SFC issue where this was always the behavior (see: chipsalliance/firrtl#727 (comment)).
Just for completeness, compiling the above with SFC 1.5.6 produces a memory whose read is not enabled:
Making this SFC-bug (or feature?) compatible made sense at the time. However, it doesn't make sense now.
What I would like to see is the promote cmem and smem to first-class FIRRTL specification features. Using the port/access features from #1561 would avoid the scoping problems of the original cmem/smem design where the port declarations were accessible outside their defining scopes.
Consider the following FIRRTL:
Compile this with firtool 1.93.1 and you will get:
If you simply add a node to use as the read address instead of the input port, it works. That is, just change the read port to:
Then the emitted Verilog has a memory instantiated as expected.
The text was updated successfully, but these errors were encountered: