Fix spurious outstanding assert
authorAnton Blanchard <anton@linux.ibm.com>
Sun, 15 Sep 2019 08:59:24 +0000 (18:59 +1000)
committerAnton Blanchard <anton@ozlabs.org>
Sun, 15 Sep 2019 08:59:24 +0000 (18:59 +1000)
Check it in the sequential process, not the combinatorial one.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
decode2.vhdl

index e70405ae139a044b0f4c9925110df42faf600172..15dae5df56760903f06c4bd6f6050bc37f34cb96 100644 (file)
@@ -188,6 +188,8 @@ begin
        decode2_0: process(clk)
        begin
                if rising_edge(clk) then
+                       assert r_int.outstanding <= 1 report "Outstanding bad " & integer'image(r_int.outstanding) severity failure;
+
                        if rin.e.valid = '1' or rin.l.valid = '1' or rin.m.valid = '1' then
                                report "execute " & to_hstring(rin.e.nia);
                        end if;
@@ -385,8 +387,6 @@ begin
                        v_int.outstanding := v_int.outstanding + 1;
                end if;
 
-               assert r_int.outstanding <= 1 report "Outstanding bad " & integer'image(r_int.outstanding) severity failure;
-
                if rst = '1' then
                        v_int.state := IDLE;
                        v_int.outstanding := 0;