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
11 from soc
.minerva
.units
.fetch
import BareFetchUnit
14 class ConfigFetchUnit
:
15 def __init__(self
, pspec
):
16 fudict
= {'testmem': TestMemFetchUnit
,
17 'test_bare_wb': TestSRAMBareFetchUnit
,
18 'bare_wb': BareFetchUnit
,
19 #'test_cache_wb': TestCacheFetchUnit
21 fukls
= fudict
[pspec
.imem_ifacetype
]
22 self
.fu
= fukls(pspec
)