Commit 4af0927e authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

reg_map_gen: submodule update

parent 310c306a
Pipeline #5790 passed with stages
in 12 minutes and 25 seconds
Subproject commit 1f02df14b17d36da110e1e8ca30b34923a24046b
Subproject commit 24f6fe411be6ed81ce4ab27d2dfeadaca425d999
......@@ -136,7 +136,7 @@ architecture rtl of data_mux is
-- Data after saturation. Saturated data return all zeroes when address overflow
-- and read beyond last address of register block occurs.
signal saturated_data : std_logic_vector(data_out_width - 1 downto 0);
signal saturated_data : std_logic_vector(data_out_width - 1 downto 0);
-- Data output from data mux (after masking and saturation)
signal masked_data : std_logic_vector(data_out_width - 1 downto 0);
......@@ -150,10 +150,6 @@ architecture rtl of data_mux is
-- Saturated value of internal index.
signal index_sat : natural range 0 to INDEX_MAX;
-- Signals that input address is has overflown the dimension of read array and
-- that zeroes should be returned
signal address_overflow : std_logic;
begin
......@@ -162,12 +158,7 @@ begin
---------------------------------------------------------------------------
index <= to_integer(unsigned(data_selector));
---------------------------------------------------------------------------
-- Signal overflow of address beyond the dimension of read data.
---------------------------------------------------------------------------
address_overflow <= '0' when (index <= INDEX_MAX) else
'1';
---------------------------------------------------------------------------
-- Data selector saturation, we need to saturate data selector in case
-- we don't have 2^N inputs. Address conversion of n bit vector to index
......@@ -175,8 +166,7 @@ begin
-- modulo is not effective, modulo by non 2^N number results in extra
-- shitty logic...
---------------------------------------------------------------------------
index_sat <= index when (address_overflow = '0')
else
index_sat <= index when (index <= INDEX_MAX) else
INDEX_MAX;
......@@ -192,7 +182,7 @@ begin
-- Data saturation
---------------------------------------------------------------------------
data_saturation_gen : for i in 0 to data_out_width - 1 generate
saturated_data(i) <= sel_data(i) when (address_overflow = '0')
saturated_data(i) <= sel_data(i) when (index <= INDEX_MAX)
else
'0';
end generate data_saturation_gen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment