diff --git a/artiq/firmware/ksupport/eh_artiq.rs b/artiq/firmware/ksupport/eh_artiq.rs index 190ee735f..84aff00ca 100644 --- a/artiq/firmware/ksupport/eh_artiq.rs +++ b/artiq/firmware/ksupport/eh_artiq.rs @@ -328,7 +328,7 @@ extern fn stop_fn(_version: c_int, } } -// Must be kept in sync with `artiq.language.embedding_map` +// Must be kept in sync with `nac3artiq::Nac3::new` static EXCEPTION_ID_LOOKUP: [(&str, u32); 22] = [ ("RTIOUnderflow", 0), ("RTIOOverflow", 1), diff --git a/artiq/language/embedding_map.py b/artiq/language/embedding_map.py index 11739e0b1..13da0a8ca 100644 --- a/artiq/language/embedding_map.py +++ b/artiq/language/embedding_map.py @@ -7,42 +7,6 @@ class EmbeddingMap: self.function_map = {} self.attributes_writeback = [] - # Keep this list of exceptions in sync with `EXCEPTION_ID_LOOKUP` in `artiq::firmware::ksupport::eh_artiq` - # The exceptions declared here must be defined in `artiq.coredevice.exceptions` - # Verify synchronization by running the test cases in `artiq.test.coredevice.test_exceptions` - self.preallocate_runtime_exception_names([ - "RTIOUnderflow", - "RTIOOverflow", - "RTIODestinationUnreachable", - "DMAError", - "I2CError", - "CacheError", - "SPIError", - "SubkernelError", - - "0:AssertionError", - "0:AttributeError", - "0:IndexError", - "0:IOError", - "0:KeyError", - "0:NotImplementedError", - "0:OverflowError", - "0:RuntimeError", - "0:TimeoutError", - "0:TypeError", - "0:ValueError", - "0:ZeroDivisionError", - "0:LinAlgError", - "UnwrapNoneError", - ]) - - def preallocate_runtime_exception_names(self, names): - for i, name in enumerate(names): - if ":" not in name: - name = "0:artiq.coredevice.exceptions." + name - exn_id = self.store_str(name) - assert exn_id == i - def store_function(self, key, fun): self.function_map[key] = fun return key