esynr3z / corsair

Control and Status Register map generator for HDL projects
https://corsair.readthedocs.io
MIT License
97 stars 35 forks source link

Fixed an error that occurred in the HDL (Verilog/VHDL) templates when bit fields are defined such that it results in a 1 bit wide 'reserved' field at position MSB. #44

Closed malsheimer closed 1 year ago

malsheimer commented 1 year ago

Fixed an error that occurred in the HDL (Verilog/VHDL) templates when bit fields are defined such that it results in a 1 bit wide 'reserved' field at position MSB.

Example:

--------------------------------------------------------------------------------
-- CSR:
-- [0x4] - DATA - Data register
--------------------------------------------------------------------------------
csr_data_rdata(29 downto 0) <= (others => '0');

FIXED:

--------------------------------------------------------------------------------
-- CSR:
-- [0x4] - DATA - Data register
--------------------------------------------------------------------------------
csr_data_rdata(29 downto 0) <= (others => '0');
csr_data_rdata(31) <= '0';
ttobsen commented 1 year ago

We are also facing this problem. Would be nice if this could be approved asap. :smiling_face_with_tear:

esynr3z commented 1 year ago

Thank you for this fix a lot!