1 """ConfigureableLoadStoreUnit
3 allows the type of LoadStoreUnit to be run-time selectable
6 from soc
.experiment
.lsmem
import TestMemLoadStoreUnit
7 from soc
.bus
.test
.test_minerva
import TestSRAMBareLoadStoreUnit
10 class ConfigLoadStoreUnit
:
11 def __init__(self
, pspec
):
12 lsidict
= {'testmem': TestMemLoadStoreUnit
,
13 'test_bare_wb': TestSRAMBareLoadStoreUnit
,
14 #'test_cache_wb': TestCacheLoadStoreUnit
16 lsikls
= lsidict
[pspec
.ldst_ifacetype
]
17 self
.lsi
= lsikls(addr_wid
=pspec
.addr_wid
, # address range
18 mask_wid
=pspec
.mask_wid
, # cache line range
19 data_wid
=pspec
.reg_wid
) # data bus width