register 0 is always 0
Stefan Schuermans

Stefan Schuermans commited on 2012-01-26 20:42:09
Showing 1 changed files, with 2 additions and 2 deletions.

... ...
@@ -39,9 +39,9 @@ BEGIN
39 39
     p_write: PROCESS(rst, clk)
40 40
     BEGIN
41 41
         IF rst = '1' THEN
42
-            -- r_regs <= (OTHERS => X"00000000");
42
+            r_regs <= (OTHERS => '0');
43 43
         ELSIF rising_edge(clk) THEN
44
-            IF i_wr_en = '1' THEN
44
+            IF i_wr_en = '1' AND i_wr_no /= (OTHERS => '0') THEN
45 45
                 r_regs(no2idx(i_wr_no)) <= i_wr_data;
46 46
             END IF;
47 47
         END IF;
48 48