code-morph which redirects lsmem unit test through new ConfigLoadStoreUnit
[soc.git] / src / soc / config / loadstore.py
1 """ConfigureableLoadStoreUnit
2
3 allows the type of LoadStoreUnit to be run-time selectable
4
5 """
6 from soc.experiment.lsmem import TestMemLoadStoreUnit
7 from soc.bus.test.test_minerva import TestSRAMBareLoadStoreUnit
8
9
10 class ConfigLoadStoreUnit:
11 def __init__(self, pspec):
12 lsidict = {'testmem': TestMemLoadStoreUnit,
13 'test_bare_wb': TestSRAMBareLoadStoreUnit,
14 #'test_cache_wb': TestCacheLoadStoreUnit
15 }
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
20