Ok, thank you. I'm getting an error, indicating, that Artiq is trying run @kernel("core_2") -decoraded kernels on the first core..
Simple test:
from artiq.experiment import *
class coretest(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("core_2")
def run(self):
print('Reset core')
self.run_core()
print('Reset core_2')
self.run_core_2()
@kernel("core")
def run_core(self):
self.core.reset()
@kernel("core_2")
def run_core_2(self):
self.core_2.reset()
Running gives:
Reset core
Reset core_2
<artiq>/coredevice/core.py:190:1: fatal: this function runs on a different core device 'core'
def reset(self):
^
core2_test.py:21:1: note: called from this function
def run_core_2(self):
^
core2_test.py:22:9-22:26: note: while inferring a type for an attribute 'reset' of a host object
self.core_2.reset()
Second core is defined in device_db after the definitions for the first core as:
device_db.update({
"core_2": {
"type": "local",
"module": "artiq.coredevice.core",
"class": "Core",
"arguments": {"host": core_addr_2, "ref_period": 1e-09}
},
})
How about the device definitions for the second core? Do I just add them after the core_2 -definitions like this:
device_db["led0_2"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x00001a}
}
First core already has "led0", so the name needs to be different? How do I define the core the device is connected to?