forked from M-Labs/nac3
1
0
Fork 0

nac3artiq: add simple KernelInvariant CPython wrapper

This commit is contained in:
Sebastien Bourdeauducq 2021-10-08 23:46:46 +08:00
parent 3b10172810
commit 5749141efb
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import nac3artiq
import device_db
__all__ = ["extern", "kernel", "portable", "Core", "TTLOut"]
__all__ = ["KernelInvariant", "extern", "kernel", "portable", "Core", "TTLOut"]
nac3 = nac3artiq.NAC3(device_db.device_db["core"]["arguments"]["target"])
@ -16,6 +16,10 @@ allow_module_registration = True
registered_ids = set()
def KernelInvariant(t):
return t
def register_module_of(obj):
global registered_ids
assert allow_module_registration