]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
Seperate address for second injection DAC register
authorTobias Weber <webert@kph.uni-mainz.de>
Mon, 13 Oct 2014 15:58:26 +0000 (16:58 +0100)
committerTobias Weber <webert@kph.uni-mainz.de>
Mon, 13 Oct 2014 15:58:26 +0000 (16:58 +0100)
mupix/sources/spi_if.vhd

index d3c00d9add547ef321aad20ce34f06e14ef1f974..e3058fb25bbcf4fa32c9e470e88a331827e93a6d 100644 (file)
@@ -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';