Hi,

I am new to the ARTIQ system. I plugged my Hardware to power and connected SFP0 [Ethernet to a LINKSYS router].

I adjusted the router addresses as

Reason being as mentioned in the documentation IP for the device would be: 192.168.1.75 [But I am unable to ping the device back].

Now I tried to run simple LED program mentioned in the documentation at Getting started guide

I tried running this code with beta version as well as stable version, but the error code is the same [respectively],

WARNING:artiq.coredevice.comm_kernel:Mismatch between gateware (8.0.19b8d28.beta) and software (8.8203.f3f0680.beta) versions
WARNING:artiq.coredevice.comm_kernel:Previous kernel did not cleanly finish
Traceback (most recent call last):
File "/home/apoorav/anaconda3/envs/artiq_8/bin/artiq_run", line 10, in <module>
sys.exit(main())
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/frontend/artiq_run.py", line 224, in main
return run(with_file=True)
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/frontend/artiq_run.py", line 210, in run
raise exn
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/frontend/artiq_run.py", line 203, in run
exp_inst.run()
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/language/core.py", line 54, in run_on_core
return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/coredevice/core.py", line 140, in run
self._run_compiled(kernel_library, embedding_map, symbolizer, demangler)
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/coredevice/core.py", line 130, in _run_compiled
self.comm.serve(embedding_map, symbolizer, demangler)
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/coredevice/comm_kernel.py", line 712, in serve
self._read_header()
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/coredevice/comm_kernel.py", line 249, in _read_header
sync_byte = self._read(1)[0]
File "/home/apoorav/anaconda3/envs/artiq_8/lib/python3.10/site-packages/artiq/coredevice/comm_kernel.py", line 237, in _read
raise ConnectionResetError("Core device connection closed unexpectedly")
ConnectionResetError: Core device connection closed unexpectedly

---------------------------------

WARNING:artiq.coredevice.comm_kernel:Mismatch between gateware (8.0.19b8d28.beta) and software (7.8123.3038639) versions
WARNING:artiq.coredevice.comm_kernel:Previous kernel did not cleanly finish
Traceback (most recent call last):
File "/home/apoorav/anaconda3/envs/artiq/bin/artiq_run", line 10, in <module>
sys.exit(main())
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/frontend/artiq_run.py", line 224, in main
return run(with_file=True)
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/frontend/artiq_run.py", line 210, in run
raise exn
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/frontend/artiq_run.py", line 203, in run
exp_inst.run()
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/language/core.py", line 54, in run_on_core
return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/coredevice/core.py", line 140, in run
self._run_compiled(kernel_library, embedding_map, symbolizer, demangler)
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/coredevice/core.py", line 130, in _run_compiled
self.comm.serve(embedding_map, symbolizer, demangler)
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/coredevice/comm_kernel.py", line 706, in serve
self._read_header()
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/coredevice/comm_kernel.py", line 249, in _read_header
sync_byte = self._read(1)[0]
File "/home/apoorav/anaconda3/envs/artiq/lib/python3.10/site-packages/artiq/coredevice/comm_kernel.py", line 237, in _read
raise ConnectionResetError("Core device connection closed unexpectedly")

I suspect there is an issue with device_db.py as well as Gateware/Software version. I tried to download a version supported by the Gateware, but it is hard to find. Please suggest me some solution.

I am adding device_db.py which I'm using and some supporting photos. Please let me know if I connected the SFP connector properly.

Thanks in advance.


Sometimes, red LED [ERR] glows over Fastino.

`core_addr = "192.168.1.75"

device_db = {
"core": {
"type": "local",
"module": "artiq.coredevice.core",
"class": "Core",
"arguments": {"host": core_addr, "ref_period": 1/(8*150e6)}
},
"core_log": {
"type": "controller",
"host": "::1",
"port": 1068,
"command": "aqctl_corelog -p {port} --bind {bind} " + core_addr
},
"core_moninj": {
"type": "controller",
"host": "::1",
"port_proxy": 1383,
"port": 1384,
"command": "aqctl_moninj_proxy --port-proxy {port_proxy} --port-control {port} --bind {bind} " + core_addr
},
"core_cache": {
"type": "local",
"module": "artiq.coredevice.cache",
"class": "CoreCache"
},
"core_dma": {
"type": "local",
"module": "artiq.coredevice.dma",
"class": "CoreDMA"
},
}

for i in range(4):
device_db["led" + str(i)] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": i},
}

for i in range(2):
device_db["ttl" + str(i)] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 4 + i},
}

device_db.update(
fmcdio_dirctl_clk={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 6}
},
fmcdio_dirctl_ser={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 7}
},
fmcdio_dirctl_latch={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 8}
},
fmcdio_dirctl={
"type": "local",
"module": "artiq.coredevice.shiftreg",
"class": "ShiftReg",
"arguments": {"clk": "fmcdio_dirctl_clk",
"ser": "fmcdio_dirctl_ser",
"latch": "fmcdio_dirctl_latch"}
}
)

device_db.update(
spi_urukul0={
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 17}
},
ttl_urukul0_io_update={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 18}
},
ttl_urukul0_sw0={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 19}
},
ttl_urukul0_sw1={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 20}
},
ttl_urukul0_sw2={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 21}
},
ttl_urukul0_sw3={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 22}
},
urukul0_cpld={
"type": "local",
"module": "artiq.coredevice.urukul",
"class": "CPLD",
"arguments": {
"spi_device": "spi_urukul0",
"io_update_device": "ttl_urukul0_io_update",
"refclk": 125e6,
"clk_sel": 0
}
}
)

for i in range(4):
device_db["urukul0_ch" + str(i)] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"chip_select": 4 + i,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw" + str(i)
}
}

device_db["spi_zotino0"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 23}
}
device_db["ttl_zotino0_ldac"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 24}
}
device_db["ttl_zotino0_clr"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 25}
}
device_db["zotino0"] = {
"type": "local",
"module": "artiq.coredevice.zotino",
"class": "Zotino",
"arguments": {
"spi_device": "spi_zotino0",
"ldac_device": "ttl_zotino0_ldac",
"clr_device": "ttl_zotino0_clr"
}
}`

  1. Please check the core device log using artiq_coremgmt, which should contain information about why the connection was dropped.
  2. If you are unable to ping, there may be some problems with your network.
  3. You are using the wrong device database and nothing will work until you replace it; you should have the correct one on the USB stick that came with your device.

I found the pendrive in the package and used the same device_db.py [Done]
I am able to ping my device by adjusting my router [Done]
I tried to run "artiq_coremgmt" and got the result:

I tried to resolve the issue by using the documentation below:

I am still able to ping the device but when tried I tried previous command: "artiq_coremgmt --device-db device_db.py log" gives really wiered result.

I think I messed up something 🙁
Please guide me through this

Please remove the startup and/or idle kernels, which have nothing to do with the problem.

What code are you trying to run?

I was trying to run simple LED on/off code to check if I am able to program the system.

Can you please guide me on how to remove idle.elf from the flash storage? I am worried if I will mess it up again.

Using command:

artiq_coremgmt config erase

I am able to erase flash storage. It seems idle file loaded is removed now. Then I cleared logs to see the log result clearly and here's the result.

But I am not able to figure out what the issue now.

I am just trying to run led on/off code as shown below:

from artiq.experiment import *
class LED(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("led0")

@kernel
def run(self):
self.core.reset()
self.led0.on()

I am using same device_db.py which was on pendrive.

Now, another issue arose:

I am unable to ping the device back. Although I am able to see it on the network. SFP0 LED is glowing.

I am not sure but may be I used "artiq_coremgmt config erase" might have caused the problem.

PS: I am also working on the issue. But I have also one doubt that if I erase flash would that affect the connection as it is happening with me? Is there any way I can restore everything to default?

If I understand it correctly, you erased the flash storage and could then execute the LED experiment with the error, correct? Did you try the fix mentioned in the forum post I linked and if so, did it work? What other steps have you taken in-between your last two posts (i. e. power-cycled the Kasli, executed experiments, flashed the firmware)? It can also be very helpful, if you can see the output on the serial monitor (USB connection) with a terminal program such as PuTTY. If there are any errors on the ARTIQ device, you can also see them there and sometimes get more info. On power-cycle you should see the Misoc logo, then the serial connection is set up correctly.

    If I understand it correctly, you erased the flash storage and could then execute the LED experiment with the error, correct?

    Yes.

    Long story short, earlier I was able to ping the Kasli but as soon as erased the flash and power-cycled (turned on-off) I was not able to reconnect back to the board.

    Did you try the fix mentioned in the forum post I linked and if so, did it work?

    Yes, I tried but as soon I corrected the code. I lost the connection.

    What other steps have you taken in-between your last two posts (i. e. power-cycled the Kasli, executed experiments, flashed the firmware)?

    I have just tried to execute the led code (which didn't work). I tried to solve the kernel issue, where I think I messed up the flash memory and tried to solve it by clearing flash. Then I power-cycled the system. After that I was not able to connect to the system.

    Now I'll try to to see log from USB. Report them asap.

    Thanks for the prompt reply sb10q

      apoorav_singh After that I was not able to connect to the system.

      Most likely the erase command deleted the IP address setting and it is now the Kasli hardware default, 192.168.1.70.

      Thanks steine01 Solution you recommended worked! 🙂

      I was able to note-down the new IP from the USB communication port after a power cycle.

      But just to add, IP was 192.168.1.86 , Hope it is not an anomaly.

      But the Red light [ERR] on Fastino DAC is still on. Is it normal?

      Thanks.

        apoorav_singh But the Red light [ERR] on Fastino DAC is still on. Is it normal?

        Just initialize Fastino in a kernel, and it should turn off.

        apoorav_singh But just to add, IP was 192.168.1.86 , Hope it is not an anomaly.

        I see you're actually running ARTIQ-8 firmware - the default is DHCP there so this looks normal.