From 2a7a2246b3ce4bb44f30b9be6401ae2fa7bd2206 Mon Sep 17 00:00:00 2001 From: Daniel Benusovich Date: Sun, 10 Mar 2019 12:34:13 -0700 Subject: [PATCH] Remove wen term and shift If blocks to remove NOT need --- TLB/src/Cam.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/TLB/src/Cam.py b/TLB/src/Cam.py index de9be90a..3606234b 100644 --- a/TLB/src/Cam.py +++ b/TLB/src/Cam.py @@ -70,24 +70,20 @@ class Cam(): self.decoder.n.eq(0) ] - # XXX change name of write_enable interface to write_enable_n ? - wen = Signal(reset_less=True) - m.d.comb += wen.eq(~self.write_enable) - with m.If(self.enable): # Set the key value for every CamEntry for index in range(self.cam_size): - # Read Operation - with m.If(wen): - m.d.comb += entry_array[index].command.eq(1) - # Write Operation - with m.Else(): + with m.If(self.write_enable): with m.If(self.decoder.o[index]): m.d.comb += entry_array[index].command.eq(2) with m.Else(): - m.d.comb += entry_array[index].command.eq(0) + m.d.comb += entry_array[index].command.eq(0) + + # Read Operation + with m.Else(): + m.d.comb += entry_array[index].command.eq(1) # Send data input to all entries m.d.comb += entry_array[index].data_in.eq(self.data_in) -- 2.30.2