"""
def __init__(self, n_ldst):
self.n_ldst = n_ldst # X and Y (FUs)
- self.load_i = Signal(n_ldst, reset_less=True) # load pending in
- self.stor_i = Signal(n_ldst, reset_less=True) # store pending in
+ self.ld_pend_i = Signal(n_ldst, reset_less=True) # load pending in
+ self.st_pend_i = Signal(n_ldst, reset_less=True) # store pending in
self.issue_i = Signal(n_ldst, reset_less=True) # Issue in
+ self.go_die_i = Signal(n_ldst, reset_less=True) # Die/Reset in
self.load_hit_i = Signal(n_ldst, reset_less=True) # load hit in
self.stwd_hit_i = Signal(n_ldst, reset_less=True) # store w/data hit in
# ---
lhs_l = []
shl_l = []
- load_l = []
- stor_l = []
issue_l = []
+ go_die_l = []
lh_l = []
sh_l = []
for fu in range(self.n_ldst):
lhs_l.append(dc.ld_hold_st_o)
shl_l.append(dc.st_hold_ld_o)
# accumulate inputs (for Cat'ing later) - TODO: must be a better way
- load_l.append(dc.load_h_i)
- stor_l.append(dc.stor_h_i)
issue_l.append(dc.issue_i)
+ go_die_l.append(dc.go_die_i)
# load-hit and store-with-data-hit go in vertically (top)
m.d.comb += [dc.load_hit_i.eq(self.load_hit_i),
- dc.stwd_hit_i.eq(self.stwd_hit_i)
+ dc.stwd_hit_i.eq(self.stwd_hit_i),
+ dc.load_v_i.eq(self.ld_pend_i),
+ dc.stor_v_i.eq(self.st_pend_i),
]
# connect cell inputs using Cat(*list_of_stuff)
- m.d.comb += [Cat(*load_l).eq(self.load_i),
- Cat(*stor_l).eq(self.stor_i),
- Cat(*issue_l).eq(self.issue_i),
+ m.d.comb += [Cat(*issue_l).eq(self.issue_i),
+ Cat(*go_die_l).eq(self.go_die_i),
]
# connect the load-hold-store / store-hold-load OR-accumulated outputs
m.d.comb += self.ld_hold_st_o.eq(Cat(*lhs_l))
# the load/store input also needs to be connected to "top" (vertically)
for fu in range(self.n_ldst):
- load_v_l = []
- stor_v_l = []
+ load_h_l = []
+ stor_h_l = []
for fux in range(self.n_ldst):
dc = dm[fux]
- load_v_l.append(dc.load_v_i[fu])
- stor_v_l.append(dc.stor_v_i[fu])
- m.d.comb += [Cat(*load_v_l).eq(self.load_i),
- Cat(*stor_v_l).eq(self.stor_i),
+ load_h_l.append(dc.load_h_i)
+ stor_h_l.append(dc.stor_h_i)
+ m.d.comb += [Cat(*load_h_l).eq(self.ld_pend_i),
+ Cat(*stor_h_l).eq(self.st_pend_i),
]
return m
def __iter__(self):
- yield self.load_i
- yield self.stor_i
+ yield self.ld_pend_i
+ yield self.st_pend_i
yield self.issue_i
+ yield self.go_die_i
yield self.load_hit_i
yield self.stwd_hit_i
yield self.ld_hold_st_o