Closed lorenzschmid closed 2 months ago
Maybe worth adding a test ?
Maybe worth adding a test ?
I agree but think that this should be done a bit more thoroughly than only compare to golden files. Hence, I opened #45 to tackle it at a later moment.
Bug introduced in #43:
If there is a register containing a single field and both share the same name, both of their
c_name
s will be equal. Hence, when the default separator_
is selected,pr_name()
will return the same name for the register as well as for the field. Printing the address for the register and the field will therefore lead to the same constant printed twice.E.g.
will lead to the following VHDL constant generation (
ADDR_REG_SET_FOO_BAR
declared twice):Since before #43, the address constant was only printed for the register (but not for the field), the constant was previously printed only once.
This fix blocks the printing of the constant if a field and its register share the same
c_name
.