From: Daniel Benusovich Date: Sun, 10 Mar 2019 19:34:13 +0000 (-0700) Subject: Remove wen term and shift If blocks to remove NOT need X-Git-Tag: div_pipeline~2316 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a7a2246b3ce4bb44f30b9be6401ae2fa7bd2206;p=soc.git Remove wen term and shift If blocks to remove NOT need --- 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)