From 9432c1a8a962879685df5b4810ccf97db439c1a9 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 13 Mar 2019 03:10:44 +0000 Subject: [PATCH] clean up code --- src/add/example_buf_pipe.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 -- 2.30.2