m.d.sync += src2_l.r.eq(self.go_read_i)
# FU "Forward Progress" (read out horizontally)
- m.d.comb += self.dest_rsel_o.eq(dest_l.qn & self.go_write_i)
- m.d.comb += self.src1_rsel_o.eq(src1_l.qn & self.go_read_i)
- m.d.comb += self.src2_rsel_o.eq(src2_l.qn & self.go_read_i)
-
- # Register File Select (read out vertically)
m.d.comb += self.dest_fwd_o.eq(dest_l.qn & self.dest_i)
m.d.comb += self.src1_fwd_o.eq(src1_l.qn & self.src1_i)
m.d.comb += self.src2_fwd_o.eq(src2_l.qn & self.src2_i)
+ # Register File Select (read out vertically)
+ m.d.comb += self.dest_rsel_o.eq(dest_l.qn & self.go_write_i)
+ m.d.comb += self.src1_rsel_o.eq(src1_l.qn & self.go_read_i)
+ m.d.comb += self.src2_rsel_o.eq(src2_l.qn & self.go_read_i)
+
return m
def __iter__(self):
--- /dev/null
+from nmigen import Elaboratable, Module, Signal
+
+
+class FUReadWritePending(Elaboratable):
+ def __init__(self, reg_count):
+ self.reg_count = reg_count
+ self.dest_fwd_i = Signal(fu_count, reset_less=True)
+ self.src1_fwd_i = Signal(fu_count, reset_less=True)
+ self.src2_fwd_i = Signal(fu_count, reset_less=True)
+
+ self.wr_pend_o = Signal(reset_less=True)
+ self.rd_pend_o = Signal(reset_less=True)
+
+ def elaboratable(self, platform):
+ m = Module()
+ srces = Cat(self.src1_fwd_i, self.src2_fwd_i)
+ m.d.comb += self.wr_pend_o.eq(self.dest_fwd_i.bool())
+ m.d.comb += self.rd_pend_o.eq(srces.bool()
+ return m
+
-from nmigen import Elaboratable, Module, Array, Signal
+from nmigen import Elaboratable, Module, Signal
+
class RegReservation(Elaboratable):
def __init__(self, fu_count):