Various Tutorial Issues

Applications, development tools, FPGA, C, WEB
Post Reply
solution
Posts: 1
Joined: Fri Nov 08, 2019 4:29 pm

Various Tutorial Issues

Post by solution » Fri Nov 08, 2019 4:45 pm

Hi, so I've been playing around trying to figure out all the workings of a Red Pitaya STEMlab board by doing the tutorials in the Jupyter workbook it came with. I've noticed some bizarre problems with the tutorials, and I can't figure out why nobody has asked these questions. Maybe I'm too new at Python to know something, or maybe I just don't know what to search, but in any case I can't figure these issues out:

1) In the analog_input tutorial the command: singleInput = FPGA.analog_in() does not work, ever. I have found another post on this forum about this, and apparently the fix is to mess with something in the mercury.py file itself, but if that's the case that everyone has to do this to make the tutorial work, maybe someone should fix it and send a patch. Cause this code cannot be run, and it makes the tutorial useless unless you already know how to do this stuff.

2) There is an issue with the generator tutorials. These can be done, but if you for some "crazy reason" want to do more than one tutorial in a single red pitaya session, they don't work. It isn't on my end, because I can do these tutorials by doing one tutorial then hard resetting my red pitaya, then doing the next tutorial and so on. Something about the fpga.gen command gets in the way if that command has already been made in a different workbook. The error your get is called "BlockingIOError". What's going on here, and is there an easier work around than resetting the pitaya all the time?
Requested overlay is already loaded.
---------------------------------------------------------------------------
BlockingIOError Traceback (most recent call last)
/home/jupyter/RedPitaya/redpitaya/drv/uio.py in __init__(self, uio)
61 try:
---> 62 fcntl.flock(self.uio_dev, fcntl.LOCK_EX | fcntl.LOCK_NB)
63 except IOError as e:

BlockingIOError: [Errno 11] Resource temporarily unavailable

During handling of the above exception, another exception occurred:

BlockingIOError Traceback (most recent call last)
<ipython-input-1-81fbfa201709> in <module>()
3
4 # create generator instance
----> 5 gen0 = fpga.gen(0)

/home/jupyter/RedPitaya/redpitaya/overlay/mercury.py in __init__(self, index)
108 def __init__(self, index: int):
109 if index in range(mercury._MNG):
--> 110 super().__init__(index=index)
111 self.sync_src = mercury.sync_src['gen'+str(index)]
112 else:

/home/jupyter/RedPitaya/redpitaya/drv/gen.py in __init__(self, index, uio)
50
51 # call parent class init to open UIO device and mmap maps
---> 52 super().__init__(uio)
53
54 # map regset

/home/jupyter/RedPitaya/redpitaya/drv/uio.py in __init__(self, uio)
62 fcntl.flock(self.uio_dev, fcntl.LOCK_EX | fcntl.LOCK_NB)
63 except IOError as e:
---> 64 raise IOError(e.errno, "Locking {}: {}".format(self.uio_path, e.strerror))
65
66 # UDEV device

BlockingIOError: [Errno 11] Locking /dev/uio/gen0: Resource temporarily unavailable
3) Documentation thought: The generator tutorials cause no perceivable change to someone going through them, they don't even print out a "success" message. So really I have no idea after completing the tutorials what actually happened. Could these tutorials be integrated with other tutorials so the person using them could see the waveform they just generated?

User avatar
redpitaya
Site Admin
Posts: 883
Joined: Wed Mar 26, 2014 7:04 pm

Re: Various Tutorial Issues

Post by redpitaya » Mon May 18, 2020 9:10 am

Regarding the presentation of progress:
it is normal behavior of Jupyter, when the script is executed, it's marked with [*]. When the script is completed, you can see a number [9], for example.

If there is an error, it will be displayed as an output.
If nothing happens, then it means that everything is fine.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: Google [Bot] and 24 guests