1
votes

I'm midway through a VHDL class and have been able to play relatively nice with the ISE and Digilent toolchain in Linux... until trying to reflash a PicoBlaze program. For details, I am currently running and targeting,

  • Fedora 21 64-bit (3.19.3-200.fc21.x86_64)
  • Nexys2 development board from Digilent (with a Spartan3)
  • Xilinx ISE 14.7
  • Adept 2.16.1 Runtime
  • Adept 2.2.1 Utilities

I've been able to run ISE and program the Nexys2 bit files with iMPACT just fine so far in Linux, but this current project is to write an assembly program for the PicoBlaze soft core processor, compile and update the memory of the running vector without having to resynthesize any VHDL.

Using the steps from Kris Chaplin's post, I can compile a PSM to HEX and then convert that HEX file to an SVF in dosbox. From here I can use Digilent's Adept tool in Windows to program a top_level.bit file which has the PicoBlaze already synthesized, I could also do this in ISE's iMPACT in Linux. After the design is running, I can use Adept to program the SVF file into the running memory of the design and everything is peachy. However, trying to load the SVF into iMPACT in Linux throws an exception,

EXCEPTION:iMPACT:SVFYacc.c:208:1.10 - Data mismatch.

The only issue I've found online with that error shows that there should be an '@' symbol that needs to be removed, but I haven't seen any '@'s anywhere in the SVF.

I also tried to convert the SVF to XSVF. iMPACT doesn't throw an error loading the XSVF, but programming/executing the XSVF freezes the design instead of running the new program.

Adept doesn't have a comparable GUI in Linux that I've seen, just a cmd line tool 'djtgcfg'. Just like iMPACT, I've been able to program the toplevel.bit file fine with

$ djtgcfg prog -d Nexys2 -i 0 -f ../../toplevel.bit

but attempting to program the svf file with the same call doesn't seem to affect anything. It says it should take a few minutes and immediately reports "Programming succeeded" but I don't see any change on the device.

I'd really like to keep my environment all in Linux if I can, I don't have quite enough room on my laptop to juggle between two VMs.

Is it possible to use use iMPACT to write an SVF file to the Nexus2? Or can/should I be using the Adept utility differently?

Has anyone gotten this to work? Thanks a ton!

2
It's not a direct answer, and I've not tried it myself, but you could implement a write port on the PicoBlaze program memory, and write to it via UART or similar. There is documentation on writing via JTAG or UART, but I can't remember if this was for KCPSM6. Might be useful in any case.scary_jeff

2 Answers

1
votes

There are many better ways to reconfigure the PicoBlaze InstructionROM without resynthesizing:

  • use Xilinx's data2mem tool
    This toll is shipped with ISE and can patch BlockRAM contents in bit-files
    => requires FPGA reprogramming
  • use PicoBlaze's embedded JTAGLoader6 Enable the embedded JTAGLoader6 design in the template file. Use JTAG_Loader_RH_64 binary or JTAG_Loader_Win7_64.exe to upload a hex-file via JTAG into the PicoBlaze ROM.
    => reconfigure ROM at runtime, no FPGA reprogramming needed

The manual from Ken Chapman offers several pages on how to use JTAG_Loader. Additionally, have a look into the PicoBlaze discussions at forums.xilinx.com. There are some discussions regarding bugs and issues around JTAG_Loader and how to solve them.

Also have a look into opbasm from Kevin Thibedeau as an alternative and improved PicoBlaze assembler. It is also shipped with an ROM patch tool.

0
votes

I know it's a little bit late for the original poster, but I suspect I am taking the same class and I believe I have found a solution to upload picoblaze code on linux.

Download the KCPSM3 zip file from Xilinx IP Download, extract the contents and move the executables from the JTAG_loader folder to your working directory.

In dosbox run hex2svfsetup.exe for the nexys2 board select menu options 4 - 0 - 1 - 8 Use the assembler to create the .hex file

In dosbox run hex2svf.exe to create the svf file

Then run svf2xsvf.exe -d -i < input.svf > -o < output.xsvf >

The contrary to the JTAG_Loader_quick_guide.pdf in the initial zip file use impact and open the xsvf file and program using the xsvf file.