PYNQ: PYTHON PRODUCTIVITY FOR ZYNQ

Caution Ahead! The Ultra96 is NOT a desktop!

So, more than once I’ve gone too far and had to start all over again.

Most recently I thought, “I’ll just add scipy and all will be wonderful”. Except I ran into a “no more memory exception error”. Crap. and then I run df and see that there really is nothing left. It will be easier to just flash a new SD card image than try to undo this disaster!

What would be really great is an Arduino kind of environment. No matter that an Ultra96 and an ATMega are at opposite ends of the universe. You know I absolutely had my nose in the stratosphere about Arduinos until I discovered their power. OMG.

Anyway

It might be useful to interface to the Ultra96 as though it were an ATMega! The fact that the Ultra runs Linux and is completely independent of the world around it is irrelevant.

If I can run Jupyter on my desktop and it runs exactly like it does on an Ultra96, then I should run it on the desktop and not the Ultra96 as one “the desktop”, has unlimited resources and the other “the Ultra96”, finite resources. Once it all “runs”, then transfer it over to the Ultra96 and be done with it.

Except for that all important bridge to the hardware! … Haven’t quite worked that one out yet.

Irrespective of it’s incredible power, an Ultra96 is not a desktop. It would be helpful to keep in mind that it is only an Arduino on steroids. I hope that is not to harsh! But there it is. This credit card sized PCB cost me $7.00 and this one $250. Not even relevant.

So, there is a list. Every time you push the run button, all the files in the list are updated. That would be of course the .bit and everything else that follows.

Most importantly. When I do a cold start. It just runs.

I wonder, could this be some sort of .tcl program?

So, the image in my mind is that I run Jupyter. I’ve no idea where it is actually running, it could be running on the ultra or the cloud. It’s just a presence. The design environment never fails. If on occasion I should run into a “Limit exceeded on present resource” error then I’ll know what to do.

I’m not exactly clear on how to do this. Any ideas?

Hi, thanks for contacting us. I should say I am very confused at your post though. Are you trying to compare ultra96 with Arduino? Ultra96 is a MPSoC system, with PL on it, but Arduino is just a micro controller. If you compare them, it is not an apple-to-apple comparison; a MPSoC with aarch64 processor has a linux OS on it, which can do far more than what an Arduino is capable of.

If you choose to run baremetal on top of Ultra96, you are losing a lot of its real power; you lose a lot of nice packages that come with the ubuntu OS as well. What you proposed (using Ultra96 as Arduino) means that the Jupyter notebook is running on your desktop, therefore no Ultra96 is really necessary.

Also, if you disconnect your board from your PC, you cannot do anything then.

The Ultra96 image with a Ubuntu OS is indeed a desktop. You can plug in display port monitor, mouse, and keyboard, and it will behave like a desktop.

The memory issue is common to all the embedded systems. For big applications, cross compilation / qemu / docker / AWS A1 instance might be the correct answer. It is not a problem of PYNQ; it is rather a design methodology that people have been comfortable with for decades. We cannot guarantee the memory is always sufficient; there are always applications that demand more memory. How much is enough? 2GB? 4GB? 10GB? Board price goes up with memory as well.

By the way, you said you had “memory exception error”, which confuses me the most, because DRAM is non-volatile, meaning it gets cleared once you reboot the board. I guess you might mean “disk space”; in that case, getting a bigger SD card (like 32GB) might be a valid solution. df also checks disk space, not memory.

I apologize if I got your concern completely wrong. Good discussion though.

1 Like

Rock:
Thanks for your reply. Sorry, I was a little upset as I had lost the file system on the Ultra96. I accepted my fate and followed your good advice and increased the SD Card to 64 GB. No telling how long the upgrades to python are going to take.

You mentioned a “cross compilation / qemu / docker / AWS A1 instance”, would you mind pointing me to your favorite reference?

Chuck

Cathal

Thanks and Wow! I’ve got some work to do!