forked from M-Labs/artiq
testbench.embedding: use dmgr to get core and export it.
This commit is contained in:
parent
2bfc72fba9
commit
8527e306c3
@ -12,15 +12,16 @@ def main():
|
||||
else:
|
||||
compile_only = False
|
||||
|
||||
ddb_path = os.path.join(os.path.dirname(sys.argv[1]), "device_db.pyon")
|
||||
dmgr = DeviceManager(DeviceDB(ddb_path))
|
||||
|
||||
with open(sys.argv[1]) as f:
|
||||
testcase_code = compile(f.read(), f.name, "exec")
|
||||
testcase_vars = {'__name__': 'testbench'}
|
||||
testcase_vars = {'__name__': 'testbench', 'dmgr': dmgr}
|
||||
exec(testcase_code, testcase_vars)
|
||||
|
||||
ddb_path = os.path.join(os.path.dirname(sys.argv[1]), "device_db.pyon")
|
||||
|
||||
try:
|
||||
core = DeviceManager(DeviceDB(ddb_path)).get("core")
|
||||
core = dmgr.get("core")
|
||||
if compile_only:
|
||||
core.compile(testcase_vars["entrypoint"], (), {})
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user