From: Luke Kenneth Casson Leighton Date: Sat, 18 Dec 2021 01:22:06 +0000 (+0000) Subject: tidyup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=efeee21001aaac2f6e470fd0526775599bf2f3af;p=soc.git tidyup --- diff --git a/src/soc/experiment/icache.py b/src/soc/experiment/icache.py index 3a80e430..2e5b33f3 100644 --- a/src/soc/experiment/icache.py +++ b/src/soc/experiment/icache.py @@ -266,11 +266,9 @@ def write_tag(way, tagset, tag): # Simple hash for direct-mapped TLB index def hash_ea(addr): - hsh = addr[TLB_LG_PGSZ:TLB_LG_PGSZ + TLB_BITS] ^ addr[ - TLB_LG_PGSZ + TLB_BITS:TLB_LG_PGSZ + 2 * TLB_BITS - ] ^ addr[ - TLB_LG_PGSZ + 2 * TLB_BITS:TLB_LG_PGSZ + 3 * TLB_BITS - ] + hsh = (addr[TLB_LG_PGSZ:TLB_LG_PGSZ + TLB_BITS] ^ + addr[TLB_LG_PGSZ + TLB_BITS:TLB_LG_PGSZ + 2 * TLB_BITS ] ^ + addr[TLB_LG_PGSZ + 2 * TLB_BITS:TLB_LG_PGSZ + 3 * TLB_BITS]) return hsh