0aea4565772fc177cbb807511220489e13cf5bf1
1 """ConfigureableFetchUnit and ConfigMemoryPortInterface
3 allows the type of FetchUnit to be run-time selectable
5 this allows the same code to be used for both small unit tests
6 as well as larger ones and so on, without needing large amounts
7 of unnecessarily-duplicated code
9 from soc
.experiment
.imem
import TestMemFetchUnit
10 #from soc.bus.test.test_minerva import TestSRAMBareFetchUnit
13 class ConfigFetchUnit
:
14 def __init__(self
, pspec
):
15 fudict
= {'testmem': TestMemFetchUnit
,
16 #'test_bare_wb': TestSRAMBareFetchUnit,
17 #'test_cache_wb': TestCacheFetchUnit
19 fukls
= fudict
[pspec
.imem_ifacetype
]
20 self
.fu
= fukls(addr_wid
=pspec
.addr_wid
, # address range
21 data_wid
=pspec
.reg_wid
) # data bus width