From: Luke Kenneth Casson Leighton Date: Wed, 13 Mar 2019 03:10:44 +0000 (+0000) Subject: clean up code X-Git-Tag: ls180-24jan2020~1685 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9432c1a8a962879685df5b4810ccf97db439c1a9;p=ieee754fpu.git clean up code --- diff --git a/src/add/example_buf_pipe.py b/src/add/example_buf_pipe.py index 73b26420..c3072f86 100644 --- a/src/add/example_buf_pipe.py +++ b/src/add/example_buf_pipe.py @@ -76,14 +76,13 @@ class BufPipe: # (i_n_busy) and (o_n_stb) both true: with m.Elif(i_p_stb_o_p_busyn): - # If next stage *is* busy, and not stalled yet, accept requested - # input and store in temporary + # If next stage *is* busy, and not stalled yet, accept input m.d.sync += self.o_p_busy.eq(self.i_p_stb & self.o_n_stb) - #with m.If(~self.o_n_stb): - #m.d.sync += self.r_data.eq(self.i_data) with m.If(o_p_busyn): # not stalled - m.d.sync += self.r_data.eq(self.process(self.i_data)) + # turns out that from all of the above conditions, just + # always put result into buffer if not busy + m.d.sync += self.r_data.eq(result) return m