+""" Mitch Alsup 6600-style LD/ST Memory Scoreboard Matrix (sparse vector)
+
+6600 LD/ST Dependency Table Matrix inputs / outputs
+---------------------------------------------------
+
+Relevant comments (p45-46):
+
+* If there are no WAR dependencies on a Load instruction with a computed
+ address it can assert Bank_Addressable and Translate_Addressable.
+
+* If there are no RAW dependencies on a Store instruction with both a
+ write permission and store data present it can assert Bank_Addressable
+
+Relevant bugreports:
+* http://bugs.libre-riscv.org/show_bug.cgi?id=81
+
+"""
+
from nmigen.compat.sim import run_simulation
from nmigen.cli import verilog, rtlil
from nmigen import Module, Signal, Elaboratable, Array, Cat, Const
from ldst_dep_cell import LDSTDepCell
-"""
-
- 6600 LD/ST Dependency Table Matrix inputs / outputs
- ---------------------------------------------------
-
-"""
class LDSTDepMatrix(Elaboratable):
""" implements 11.4.12 mitch alsup LD/ST Dependency Matrix, p46
sh_l = []
for fu in range(self.n_ldst):
dc = dm[fu]
- # OR the load-hold-store / store-hold-load cell outputs in...
- _lhs = lhs
- _shl = shl
- lhs = Signal(reset_less=True)
- shl = Signal(reset_less=True)
- m.d.comb += [lhs.eq(_lhs | dc.ld_hold_st_o),
- shl.eq(_shl | dc.st_hold_ld_o)
+ # connect up the load/hold/store cell in/out (starts as a const)
+ m.d.comb += [dc.ld_hold_st_i.eq(lhs),
+ dc.st_hold_ld_i.eq(shl)
]
+ lhs = dc.ld_hold_st_o
+ shl = dc.st_hold_ld_o
# accumulate load-hold-store / store-hold-load bits
lhs_l.append(lhs)
shl_l.append(shl)
return m
def __iter__(self):
- yield self.load_i
+ yield self.load_i
yield self.stor_i
yield self.issue_i
yield self.load_hit_i