chisel icon indicating copy to clipboard operation
chisel copied to clipboard

Verilog attribute annotations in modules are being lost when dedupping

Open Quarky93 opened this issue 4 years ago • 4 comments

Type of issue: bug report

Other information

If the current behavior is a bug, please provide the steps to reproduce the problem: Here is an example where a Verilog attribute is being emitted correctly if only one module is instantiated and not emitted when there are two duplicate modules. https://scastie.scala-lang.org/Quarky93/SIjXX7lgRj2Q3iS19PA0Cg/22

I believe this also happens for memory initialisation annotations where $readmemh is generated.

What is the current behavior? Verilog attribute is emitted correctly if only one module is instantiated and not emitted when there are duplicate modules after deduplication.

What is the expected behavior? Attribute annotations should be kept after deduplication.

Please tell us about your environment: chisel 3.4.2

Quarky93 avatar Apr 01 '21 02:04 Quarky93

Fixed by https://github.com/chipsalliance/firrtl/pull/2286, to be released in FIRRTL 1.4.4 (Chisel 3.4.4)

jackkoenig avatar Jul 14 '21 20:07 jackkoenig

chipsalliance/firrtl#2286 fixed the issue for memory annotations but not attributes.

jackkoenig avatar Jul 20 '21 19:07 jackkoenig

Is there a planned fix for attributes?

Quarky93 avatar Jan 10 '22 07:01 Quarky93

I think there is still some pending point on memory dedup with initialization annos like described here: https://github.com/chipsalliance/firrtl/issues/2168

There is a workaround tho.

carlosedp avatar Jan 10 '22 18:01 carlosedp