From c0f49acd7a32af1409d54cbf4e74a2b7391e5aa5 Mon Sep 17 00:00:00 2001 From: Christos Spirotis Date: Wed, 2 Jun 2021 15:35:09 +0100 Subject: [PATCH] SMB-354 fix for problem with address decoding in som_ctrl block --- generic_ip/som_ctrl/1/src/som_ctrl_1.vhd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/generic_ip/som_ctrl/1/src/som_ctrl_1.vhd b/generic_ip/som_ctrl/1/src/som_ctrl_1.vhd index 9eb1356..d5125d8 100644 --- a/generic_ip/som_ctrl/1/src/som_ctrl_1.vhd +++ b/generic_ip/som_ctrl/1/src/som_ctrl_1.vhd @@ -66,6 +66,7 @@ architecture rtl of som_ctrl_1 is constant CSR_IP_ID : std_logic_vector(31 downto 0) := x"0000FF0F"; constant CSR_IP_VER : std_logic_vector(31 downto 0) := x"00000101"; + signal ctrl_write, ctrl_read : std_logic; signal swim_write, swim_read, swim_read_d : std_logic; signal avs_read_d : std_logic; signal mon_pt_pin_rewire : std_logic; @@ -146,6 +147,9 @@ begin swim_write <= '1' when avs_write = '1' and avs_address(5) = '1' else '0'; swim_read <= '1' when avs_read = '1' and avs_address(5) = '1' else '0'; + ctrl_write <= '1' when avs_write = '1' and avs_address(5) = '0' else '0'; + ctrl_read <= '1' when avs_read = '1' and avs_address(5) = '0' else '0'; + avs_addr <= avs_address(3 downto 0); pCTRL_STATUS : process(reset_n, clk) @@ -175,7 +179,7 @@ begin som_led <= (others => '0'); elsif(clk = '1' and clk'event) then -- CTRL registers - if(avs_write = '1') then + if(ctrl_write = '1') then case avs_addr is when CSR_HOST_PWR_ADDR => host_pwr_en <= avs_writedata(0); @@ -203,7 +207,7 @@ begin end if; -- Read Ctrl & Status registers - if(avs_read = '1') then + if(ctrl_read = '1') then case avs_addr is when CSR_IP_ID_ADDR => avs_readdata_i <= CSR_IP_ID;