sort out address match global nomatch signal
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 19 Jun 2019 05:47:01 +0000 (06:47 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 19 Jun 2019 05:47:01 +0000 (06:47 +0100)
src/experiment/score6600.py
src/scoreboard/addr_match.py

index 8a4efae92003432cbba23848c71376319b7a58d4..2d668578e5e2ca210530159e3494a6f30ae3c6fe 100644 (file)
@@ -1146,7 +1146,7 @@ def scoreboard_sim(dut, alusim):
             instrs = create_random_ops(dut, 15, True, 4)
 
         if True: # LD/ST test (with immediate)
-            instrs.append( (1, 2, 2, 0x30, 1, 1, (0, 0)) )
+            instrs.append( (1, 2, 0, 0x20, 1, 1, (0, 0)) )
             #instrs.append( (1, 2, 7, 0x10, 1, 1, (0, 0)) )
 
         if False:
index 6c4f6832276956a00ccf66afd11993a71aed553d..9d8e08e4542bd6338442101f2ed0a1c380a9284e 100644 (file)
@@ -74,15 +74,15 @@ class PartialAddrMatch(Elaboratable):
         # is there a clash, yes/no
         matchgrp = []
         for i in range(self.n_adr):
-            nomatch = []
+            match = []
             for j in range(self.n_adr):
                 if i == j:
-                    nomatch.append(Const(1)) # don't match against self!
+                    match.append(Const(0)) # don't match against self!
                 else:
-                    nomatch.append(addrs_r[i] != addrs_r[j])
-            matchgrp.append((~Cat(*nomatch)).bool()) # true if all matches fail
-            comb += self.addr_nomatch_o[i].eq(Cat(*nomatch) & l.q)
-        comb += self.addr_nomatch_o.eq((~Cat(*matchgrp)) & l.q)
+                    match.append(addrs_r[i] == addrs_r[j])
+            comb += self.addr_nomatch_a_o[i].eq(~Cat(*match) & l.q)
+            matchgrp.append(self.addr_nomatch_a_o[i] == l.q)
+        comb += self.addr_nomatch_o.eq(Cat(*matchgrp) & l.q)
             
         return m