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

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