From: Luke Kenneth Casson Leighton Date: Fri, 12 Apr 2019 04:52:27 +0000 (+0100) Subject: add temporary buf_full to UnbufferedPipeline X-Git-Tag: ls180-24jan2020~1242 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19add9b7a4efc6029b2148bc46328f9b0e9c89b1;p=ieee754fpu.git add temporary buf_full to UnbufferedPipeline --- diff --git a/src/add/singlepipe.py b/src/add/singlepipe.py index 95ca82a4..82ad7062 100644 --- a/src/add/singlepipe.py +++ b/src/add/singlepipe.py @@ -906,13 +906,15 @@ class UnbufferedPipeline(ControlBase): # some temporaries p_i_valid = Signal(reset_less=True) pv = Signal(reset_less=True) + buf_full = Signal(reset_less=True) m.d.comb += p_i_valid.eq(self.p.i_valid_test) m.d.comb += pv.eq(self.p.i_valid & self.p.o_ready) + m.d.comb += buf_full.eq(~self.n.i_ready_test & data_valid) m.d.comb += self.n.o_valid.eq(data_valid) m.d.comb += self.p._o_ready.eq(~data_valid | self.n.i_ready_test) - m.d.sync += data_valid.eq(p_i_valid | \ - (~self.n.i_ready_test & data_valid)) + m.d.sync += data_valid.eq(p_i_valid | buf_full) + with m.If(pv): m.d.sync += eq(r_data, self.stage.process(self.p.i_data)) m.d.comb += eq(self.n.o_data, r_data) @@ -949,6 +951,36 @@ class UnbufferedPipeline2(ControlBase): A temporary (buffered) copy of a valid output This is HELD if the output is not ready. It is updated SYNCHRONOUSLY. + + Inputs Temp Output + ------- - ----- + P P N N ~NiR& N P + i o i o NoV o o + V R R V V R + + ------- - - - + 0 0 0 0 0 0 1 + 0 0 0 1 1 1 0 + 0 0 1 0 0 0 1 + 0 0 1 1 0 0 1 + ------- - - - + 0 1 0 0 0 0 1 + 0 1 0 1 1 1 0 + 0 1 1 0 0 0 1 + 0 1 1 1 0 0 1 + ------- - - - + 1 0 0 0 0 1 1 + 1 0 0 1 1 1 0 + 1 0 1 0 0 1 1 + 1 0 1 1 0 1 1 + ------- - - - + 1 1 0 0 0 1 1 + 1 1 0 1 1 1 0 + 1 1 1 0 0 1 1 + 1 1 1 1 0 1 1 + ------- - - - + + Note: PoR is *NOT* involved in the above decision-making. """ def elaborate(self, platform):