From: Cole Poirier Date: Fri, 21 Aug 2020 02:46:37 +0000 (-0700) Subject: Merge branch 'master' of git.libre-soc.org:soc X-Git-Tag: semi_working_ecp5~288 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cc55357cbaac182afb337fc7a9c2080502e963a;p=soc.git Merge branch 'master' of git.libre-soc.org:soc --- 1cc55357cbaac182afb337fc7a9c2080502e963a diff --cc src/soc/experiment/dcache.py index 7cb73e34,4635b32b..89b5207b --- a/src/soc/experiment/dcache.py +++ b/src/soc/experiment/dcache.py @@@ -993,16 -874,13 +993,20 @@@ class Dcache(Elaboratable) # j := way * TLB_PTE_BITS; # ptes(j + TLB_PTE_BITS - 1 downto j) := newpte; # end; -# + def write_tlb_pte(way=TLBWay(), ptes=TLBWayPtes(), + newpte=TLBPte()): + + j = Signal() + + j = way * TLB_PTE_BITS + return ptes[j:j + TLB_PTE_BITS] = newpte + # begin # + """these, because they are constants, can actually be done *as* + python asserts: + assert LINE_SIZE % ROWSIZE == 0, "line size not ...." + """ # assert LINE_SIZE mod ROW_SIZE = 0 # report "LINE_SIZE not multiple of ROW_SIZE" severity FAILURE; # assert ispow2(LINE_SIZE)