From e2ef59c86b9dd4940bcc8c28d5b2d4ec61e726d6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 22 Apr 2019 03:40:39 +0100 Subject: [PATCH] same trick with encoder, remove switch, use encoder.o --- TLB/src/SetAssociativeCache.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/TLB/src/SetAssociativeCache.py b/TLB/src/SetAssociativeCache.py index 1bc1e97d..819bc4ac 100644 --- a/TLB/src/SetAssociativeCache.py +++ b/TLB/src/SetAssociativeCache.py @@ -102,11 +102,8 @@ class SetAssociativeCache(): m.next = "FINISHED_READ" # Pull out data from the read port data = 0 - with m.Switch(self.encoder.o): - for i in range(self.way_count): - with m.Case(i): - read_port = self.read_array[i] - data = read_port.data[self.data_start:self.data_end] + read_port = self.read_array[self.encoder.o] + data = read_port.data[self.data_start:self.data_end] m.d.comb += [ self.hit.eq(1), -- 2.30.2