I have a question about using a loop function with parallel. If I use a loop function, the output time sequence is incorrect. How to solve this problem? Please see the code and results:
from artiq.experiment import *
chnlist = ['ttl0', 'ttl1', 'ttl2']
class test(EnvExperiment):
def build(self):
self.setattr_device('core')
for ele in chnlist:
self.setattr_device(ele)
self.ttls = [self.get_device(f'{ele}') for ele in chnlist]
@kernel
def run(self):
self.core.reset()
for ele in self.ttls:
ele.output()
delay(1000 * us)
with parallel:
for ele in self.ttls:
ele.pulse(100 * us)
# self.ttl0.pulse(100 * us)
# self.ttl1.pulse(100 * us)
# self.ttl2.pulse(100 * us)
delay(100 * us)
if I use a loop function, the output is

if I donot use the loop function, the time sequence is correct
