Newbie needs help. DE0-Nano, USB blaster, Cyclone IV, and serial flash

Open source ARM Debugger

Moderator: phalanx

Post Reply
nathanieltagg
Posts: 1
Joined: Wed Dec 13, 2017 2:32 pm

Newbie needs help. DE0-Nano, USB blaster, Cyclone IV, and serial flash

Post by nathanieltagg » Wed Dec 13, 2017 2:53 pm

I'm a complete beginner at this stuff: my background is particle physics, not EE, so I'm having a hard time trying to figure out how openocd and JTAG work with my kit.

I'm using a Cyclone IV DE0-Nano developer's kit. I can program it directly from Quartus, but in my application I have the device connected to a Raspberry PI by USB cable to the USB blaster. (I also am communicating between the Pi and the FPGA using SLI to move application data.)

I can program the device via the PI/OpenOCD as the following:
- Design the synthesis in Quartus
- In the Programmer, Save the project as an .svf file
- Copy the SVF file to the raspberry pi over the network
- Program onto the USB blaster on the devkit with
sudo openocd -f /usr/share/openocd/scripts/interface/altera-usb-blaster.cfg -c "init; svf myfile.svf; exit"

It's slow and cantankerous, but it works (with lots of warnings and errors). To be honest, I have no idea what this command is really doing, but yay!

Now, to the next bits:
Goal 1: The development kit has a serial flash loader, which configures the FPGA on power-up. I'd like to store my design in this way, and upload it via the Raspberry PI.
Goal 2: I'd like to be able to reset the FPGA from the Raspberry Pi.
Goal 3: I'd like to be able to do all these steps more quickly, if possible? SVF looks like a text-file format, so it's probably not very efficient.
Goal 4: I'd like to understand all of this.

The problem is that reading on anything seems to be fractal alphabet soup, and any searches on openocd have no common referents to the searches on the DE0-Nano, and there's a lot of confusion in the mix about people who are running a CPU on the FPGA and uploading elf binaries to it, which is a step beyond what I'm doing. I have only a vague idea what JTAG is, and no clue how I would go about exploring how it works in my sandbox.

Any advice or help would be appreciated.

Post Reply