From: Tobias Weber Date: Mon, 13 Oct 2014 15:58:26 +0000 (+0100) Subject: Seperate address for second injection DAC register X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=b42e579658559018a641329b086aa27dbf63ff5c;p=trb3.git Seperate address for second injection DAC register --- diff --git a/mupix/sources/spi_if.vhd b/mupix/sources/spi_if.vhd index d3c00d9..e3058fb 100644 --- a/mupix/sources/spi_if.vhd +++ b/mupix/sources/spi_if.vhd @@ -44,8 +44,8 @@ architecture rtl of spi_if is signal ckdiv : unsigned(5 downto 0); signal injection2_reg : std_logic_vector(15 downto 0) := (others => '0'); - signal injection1_reg : std_logic_vector(15 downto 0); - signal threshold_reg : std_logic_vector(15 downto 0); + signal injection1_reg : std_logic_vector(15 downto 0) := (others => '0'); + signal threshold_reg : std_logic_vector(15 downto 0) := (others => '0'); signal wren : std_logic; @@ -142,7 +142,10 @@ begin SLV_DATA_OUT <= x"0000" & threshold_reg; SLV_ACK_OUT <= '1'; when x"0041" => - SLV_DATA_OUT <= injection2_reg & injection1_reg; + SLV_DATA_OUT <= x"0000" & injection1_reg; + SLV_ACK_OUT <= '1'; + when x"0042" => + SLV_DATA_OUT <= x"0000" & injection2_reg; SLV_ACK_OUT <= '1'; when others => SLV_UNKNOWN_ADDR_OUT <= '1'; @@ -156,7 +159,10 @@ begin SLV_ACK_OUT <= '1'; wren <= '1'; when x"0041" => - injection2_reg <= SLV_DATA_IN(31 downto 16); + injection1_reg <= SLV_DATA_IN(15 downto 0); + SLV_ACK_OUT <= '1'; + wren <= '1'; + when x"0042" => injection1_reg <= SLV_DATA_IN(15 downto 0); SLV_ACK_OUT <= '1'; wren <= '1';