From: Luke Kenneth Casson Leighton Date: Tue, 16 Nov 2021 10:29:37 +0000 (+0000) Subject: starting to get write-clear of hazard vectors operating X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0c7d8e8d544039123148f137d6e3c3eddc6c392;p=soc.git starting to get write-clear of hazard vectors operating --- diff --git a/src/soc/simple/core.py b/src/soc/simple/core.py index 6a8f3e81..45e30c61 100644 --- a/src/soc/simple/core.py +++ b/src/soc/simple/core.py @@ -486,6 +486,9 @@ class NonProductionCore(ControlBase): print(regfile, regs.rf.keys()) rfile = regs.rf[regfile.lower()] wport = rfile.w_ports[rpidx] + if self.make_hazard_vecs: + wv = regs.wv[regfile.lower()] + wvport = wv.w_ports[rpidx] # write-vector (bit-level hazard ctrl) fspecs = fspec if not isinstance(fspecs, list): @@ -507,6 +510,8 @@ class NonProductionCore(ControlBase): wsigs = [] wens = [] + wvsigs = [] + wvens = [] addrs = [] for i, fspec in enumerate(fspecs): # connect up the FU req/go signals and the reg-read to the FU @@ -553,11 +558,17 @@ class NonProductionCore(ControlBase): # now connect up the bitvector write hazard if not self.make_hazard_vecs: continue - wv = regs.wv[regfile.lower()] - wvport = wv.w_ports[rpidx] - comb += wvport.i_data.eq(1) # always enable, for now print ("write vector", regfile, wvport) - #if rfile.unary: + wname = "wvaddr_en_%s_%s_%d" % (funame, regname, idx) + wvaddr_en = Signal(len(wvport.wen), name=wname) + if rfile.unary: + comb += wvaddr_en.eq(addr_en) + wvens.append(wvaddr_en) + else: + with m.If(wp): + comb += wvaddr_en.eq(1<