From fe9ceed7f2dfc35383abf8c8326c894c4f9f77ea Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 9 Jun 2020 18:53:35 +0100 Subject: [PATCH] rename truncaddr to splitaddr, return LSBs and MSBs --- src/soc/experiment/l0_cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/soc/experiment/l0_cache.py b/src/soc/experiment/l0_cache.py index 919d39be..b0c9ca82 100644 --- a/src/soc/experiment/l0_cache.py +++ b/src/soc/experiment/l0_cache.py @@ -330,10 +330,10 @@ class L0CacheBuffer(Elaboratable): def addrbits(self): return log2_int(self.mem.regwid//8) - def truncaddr(self, addr): - """truncates the address to the top bits of the memory granularity + def splitaddr(self, addr): + """split the address into top and bottom bits of the memory granularity """ - return addr[self.addrbits:] + return addr[:self.addrbits], addr[self.addrbits:] def elaborate(self, platform): m = Module() -- 2.30.2