diff --git a/testfiles/bug-const-range/const_range-consts.h b/testfiles/bug-const-range/const_range-consts.h new file mode 100644 index 00000000..6562c4b1 --- /dev/null +++ b/testfiles/bug-const-range/const_range-consts.h @@ -0,0 +1,9 @@ +#define CONST_RANGE_SIZE 20 +#define ADDR_CONST_RANGE_LARGE_VAL_0 0x0UL +#define CONST_RANGE_LARGE_VAL_0_PRESET 0xf38243bbUL +#define ADDR_CONST_RANGE_LARGE_VAL_1 0x4UL +#define CONST_RANGE_LARGE_VAL_1_PRESET 0xfffffff7UL +#define ADDR_CONST_RANGE_SUPER_LARGE_VAL 0x8UL +#define CONST_RANGE_SUPER_LARGE_VAL_PRESET 0x818734fa9b1e0cf4ULL +#define ADDR_CONST_RANGE_SMALL_VAL 0x10UL +#define CONST_RANGE_SMALL_VAL_PRESET 0x1UL diff --git a/testfiles/bug-const-range/const_range-consts.sv b/testfiles/bug-const-range/const_range-consts.sv new file mode 100644 index 00000000..31da4e64 --- /dev/null +++ b/testfiles/bug-const-range/const_range-consts.sv @@ -0,0 +1,11 @@ +package const_range_Consts; + localparam CONST_RANGE_SIZE = 20; + localparam ADDR_CONST_RANGE_LARGE_VAL_0 = 'h0; + localparam CONST_RANGE_LARGE_VAL_0_PRESET = 32'hf38243bb; + localparam ADDR_CONST_RANGE_LARGE_VAL_1 = 'h4; + localparam CONST_RANGE_LARGE_VAL_1_PRESET = 32'hfffffff7; + localparam ADDR_CONST_RANGE_SUPER_LARGE_VAL = 'h8; + localparam CONST_RANGE_SUPER_LARGE_VAL_PRESET = 64'h818734fa9b1e0cf4; + localparam ADDR_CONST_RANGE_SMALL_VAL = 'h10; + localparam CONST_RANGE_SMALL_VAL_PRESET = 32'h1; +endpackage diff --git a/testfiles/bug-const-range/const_range-consts.v b/testfiles/bug-const-range/const_range-consts.v new file mode 100644 index 00000000..69684810 --- /dev/null +++ b/testfiles/bug-const-range/const_range-consts.v @@ -0,0 +1,9 @@ +`define CONST_RANGE_SIZE 20 +`define ADDR_CONST_RANGE_LARGE_VAL_0 'h0 +`define CONST_RANGE_LARGE_VAL_0_PRESET 'hf38243bb +`define ADDR_CONST_RANGE_LARGE_VAL_1 'h4 +`define CONST_RANGE_LARGE_VAL_1_PRESET 'hfffffff7 +`define ADDR_CONST_RANGE_SUPER_LARGE_VAL 'h8 +`define CONST_RANGE_SUPER_LARGE_VAL_PRESET 'h818734fa9b1e0cf4 +`define ADDR_CONST_RANGE_SMALL_VAL 'h10 +`define CONST_RANGE_SMALL_VAL_PRESET 'h1 diff --git a/testfiles/bug-const-range/const_range-consts.vhdl b/testfiles/bug-const-range/const_range-consts.vhdl new file mode 100644 index 00000000..8bb74518 --- /dev/null +++ b/testfiles/bug-const-range/const_range-consts.vhdl @@ -0,0 +1,14 @@ +library ieee; +use ieee.std_logic_1164.all; + +package const_range_Consts is + constant CONST_RANGE_SIZE : Natural := 20; + constant ADDR_CONST_RANGE_LARGE_VAL_0 : Natural := 16#0#; + constant CONST_RANGE_LARGE_VAL_0_PRESET : std_logic_vector(32-1 downto 0) := x"f38243bb"; + constant ADDR_CONST_RANGE_LARGE_VAL_1 : Natural := 16#4#; + constant CONST_RANGE_LARGE_VAL_1_PRESET : std_logic_vector(32-1 downto 0) := x"fffffff7"; + constant ADDR_CONST_RANGE_SUPER_LARGE_VAL : Natural := 16#8#; + constant CONST_RANGE_SUPER_LARGE_VAL_PRESET : std_logic_vector(64-1 downto 0) := x"818734fa9b1e0cf4"; + constant ADDR_CONST_RANGE_SMALL_VAL : Natural := 16#10#; + constant CONST_RANGE_SMALL_VAL_PRESET : std_logic_vector(32-1 downto 0) := x"00000001"; +end package const_range_Consts; diff --git a/testfiles/bug-const-range/const_range-consts.vhdl-ohwr b/testfiles/bug-const-range/const_range-consts.vhdl-ohwr new file mode 100644 index 00000000..07bea03e --- /dev/null +++ b/testfiles/bug-const-range/const_range-consts.vhdl-ohwr @@ -0,0 +1,14 @@ +library ieee; +use ieee.std_logic_1164.all; + +package const_range_consts_pkg is + constant c_CONST_RANGE_SIZE : Natural := 20; + constant c_CONST_RANGE_LARGE_VAL_0_ADDR : Natural := 16#0#; + constant c_CONST_RANGE_LARGE_VAL_0_PRESET : std_logic_vector(32-1 downto 0) := x"f38243bb"; + constant c_CONST_RANGE_LARGE_VAL_1_ADDR : Natural := 16#4#; + constant c_CONST_RANGE_LARGE_VAL_1_PRESET : std_logic_vector(32-1 downto 0) := x"fffffff7"; + constant c_CONST_RANGE_SUPER_LARGE_VAL_ADDR : Natural := 16#8#; + constant c_CONST_RANGE_SUPER_LARGE_VAL_PRESET : std_logic_vector(64-1 downto 0) := x"818734fa9b1e0cf4"; + constant c_CONST_RANGE_SMALL_VAL_ADDR : Natural := 16#10#; + constant c_CONST_RANGE_SMALL_VAL_PRESET : std_logic_vector(32-1 downto 0) := x"00000001"; +end package const_range_consts_pkg; diff --git a/testfiles/bug-const-range/const_range.cheby b/testfiles/bug-const-range/const_range.cheby new file mode 100644 index 00000000..96be1c6d --- /dev/null +++ b/testfiles/bug-const-range/const_range.cheby @@ -0,0 +1,29 @@ +memory-map: + bus: apb-32 + name: const_range + x-hdl: + pipeline: rd-out + bus-error: True + wmask: True + description: 'Register with 32-bit wide preset values.' + children: + - reg: + name: large_val_0 + width: 32 + preset: 0xf38243bb + access: rw + - reg: + name: large_val_1 + width: 32 + preset: 4294967287 + access: rw + - reg: + name: super_large_val + width: 64 + preset: 0x818734fa9b1e0cf4 + access: rw + - reg: + name: small_val + width: 32 + preset: 0x1 + access: rw diff --git a/testfiles/bug-consts/blkpfx-consts.vhdl b/testfiles/bug-consts/blkpfx-consts.vhdl index c137153e..fc29bf27 100644 --- a/testfiles/bug-consts/blkpfx-consts.vhdl +++ b/testfiles/bug-consts/blkpfx-consts.vhdl @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package blkpfx_Consts is constant BLKPFX_SIZE : Natural := 4; constant ADDR_BLKPFX_REG1 : Natural := 16#0#; diff --git a/testfiles/bug-consts/blkpfx-consts.vhdl-ohwr b/testfiles/bug-consts/blkpfx-consts.vhdl-ohwr index 3e63c2a2..e08f8262 100644 --- a/testfiles/bug-consts/blkpfx-consts.vhdl-ohwr +++ b/testfiles/bug-consts/blkpfx-consts.vhdl-ohwr @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package blkpfx_consts_pkg is constant c_BLKPFX_SIZE : Natural := 4; constant c_BLKPFX_REG1_ADDR : Natural := 16#0#; diff --git a/testfiles/demo_all-consts.vhdl b/testfiles/demo_all-consts.vhdl index 553d9698..3c3b5198 100644 --- a/testfiles/demo_all-consts.vhdl +++ b/testfiles/demo_all-consts.vhdl @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package demo_all_Consts is constant DEMO_ALL_SIZE : Natural := 8448; constant ADDR_DEMO_ALL_REG0 : Natural := 16#0#; @@ -5,7 +8,7 @@ package demo_all_Consts is constant DEMO_ALL_REG0_FIELD01_OFFSET : Natural := 4; constant DEMO_ALL_REG0_FIELD02_OFFSET : Natural := 8; constant ADDR_DEMO_ALL_REG1 : Natural := 16#4#; - constant DEMO_ALL_REG1_PRESET : Natural := 16#123#; + constant DEMO_ALL_REG1_PRESET : std_logic_vector(32-1 downto 0) := x"00000123"; constant ADDR_DEMO_ALL_REG2 : Natural := 16#8#; constant DEMO_ALL_REG2_FIELD10_OFFSET : Natural := 0; constant DEMO_ALL_REG2_FIELD11_OFFSET : Natural := 16; diff --git a/testfiles/demo_all-consts.vhdl-ohwr b/testfiles/demo_all-consts.vhdl-ohwr index 94a37da8..ca8f30b5 100644 --- a/testfiles/demo_all-consts.vhdl-ohwr +++ b/testfiles/demo_all-consts.vhdl-ohwr @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package demo_all_consts_pkg is constant c_DEMO_ALL_SIZE : Natural := 8448; constant c_DEMO_ALL_REG0_ADDR : Natural := 16#0#; @@ -5,7 +8,7 @@ package demo_all_consts_pkg is constant c_DEMO_ALL_REG0_FIELD01_OFFSET : Natural := 4; constant c_DEMO_ALL_REG0_FIELD02_OFFSET : Natural := 8; constant c_DEMO_ALL_REG1_ADDR : Natural := 16#4#; - constant c_DEMO_ALL_REG1_PRESET : Natural := 16#123#; + constant c_DEMO_ALL_REG1_PRESET : std_logic_vector(32-1 downto 0) := x"00000123"; constant c_DEMO_ALL_REG2_ADDR : Natural := 16#8#; constant c_DEMO_ALL_REG2_FIELD10_OFFSET : Natural := 0; constant c_DEMO_ALL_REG2_FIELD11_OFFSET : Natural := 16; diff --git a/testfiles/features/mapinfo1-consts.vhdl b/testfiles/features/mapinfo1-consts.vhdl index 31a0bdf6..ca529370 100644 --- a/testfiles/features/mapinfo1-consts.vhdl +++ b/testfiles/features/mapinfo1-consts.vhdl @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package semver1_Consts is constant SEMVER1_SIZE : Natural := 4; constant SEMVER1_MEMMAP_VERSION : Natural := 16#10000#; diff --git a/testfiles/features/mapinfo1-consts.vhdl-ohwr b/testfiles/features/mapinfo1-consts.vhdl-ohwr index 16e07c87..b282a744 100644 --- a/testfiles/features/mapinfo1-consts.vhdl-ohwr +++ b/testfiles/features/mapinfo1-consts.vhdl-ohwr @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package semver1_consts_pkg is constant c_SEMVER1_SIZE : Natural := 4; constant c_SEMVER1_MEMMAP_VERSION : Natural := 16#10000#; diff --git a/testfiles/features/semver1-consts.vhdl b/testfiles/features/semver1-consts.vhdl index ae11d24a..b5f2ab29 100644 --- a/testfiles/features/semver1-consts.vhdl +++ b/testfiles/features/semver1-consts.vhdl @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package semver1_Consts is constant SEMVER1_SIZE : Natural := 4; constant SEMVER1_VERSION : Natural := 16#10000#; diff --git a/testfiles/features/semver1-consts.vhdl-ohwr b/testfiles/features/semver1-consts.vhdl-ohwr index 324c9e55..9375a64f 100644 --- a/testfiles/features/semver1-consts.vhdl-ohwr +++ b/testfiles/features/semver1-consts.vhdl-ohwr @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package semver1_consts_pkg is constant c_SEMVER1_SIZE : Natural := 4; constant c_SEMVER1_VERSION : Natural := 16#10000#; diff --git a/testfiles/issue64/simple_reg1-consts.vhdl b/testfiles/issue64/simple_reg1-consts.vhdl index 62433615..f43c087a 100644 --- a/testfiles/issue64/simple_reg1-consts.vhdl +++ b/testfiles/issue64/simple_reg1-consts.vhdl @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package sreg_map_Consts is constant SREG_SIZE : Natural := 4; constant ADDR_SREG_AREG : Natural := 16#0#; diff --git a/testfiles/issue64/simple_reg1-consts.vhdl-ohwr b/testfiles/issue64/simple_reg1-consts.vhdl-ohwr index db072593..974f642a 100644 --- a/testfiles/issue64/simple_reg1-consts.vhdl-ohwr +++ b/testfiles/issue64/simple_reg1-consts.vhdl-ohwr @@ -1,3 +1,6 @@ +library ieee; +use ieee.std_logic_1164.all; + package sreg_map_consts_pkg is constant c_SREG_SIZE : Natural := 4; constant c_SREG_AREG_ADDR : Natural := 16#0#;