Ivan Deras

ZPUino on National Instruments FPGA Board

10 posts in this topic

Hello everyone,

 

I work in a University where we have some FPGA boards from National Instruments (http://www.ni.com/white-paper/8596/en/), which we use for some Digital Design Labs.  I'm very interested in running ZPUino on this boards.  It shouldn't be difficult I think, because they use the same FPGA chip that comes on the Papilio-500K board, but the one on the NI Board is a BGA (Ball Grid Array) chip.  I want to know what do I have to do in order to run ZPUino on this board, I mean beyond the pin mapping.  It would be nice to run some VGA stuff on this board.

 

Please let me know.

 

Regards,

Iván

Share this post


Link to post
Share on other sites

After doing some research I managed to build the Hyperion version of ZPUino for the NI FPGA board.  This is what I did:

 

1. Change the zpuino_top, to map the board connectors 

2. Change the ucf file.

3. Change the clock_gen.vhd based on the clk_gen.vhd from Basys2 folder.  The clock input is 50Mhz ( multiplied by 23 then divided by 12, it generates a clock of ~ 96Mhz)

4. Use the prom_generic_dualport-32.vhd that comes in the Hyperion folder.

 

After all this changes I build the .bit file, the I loaded it to the SPI FLASH of the Board.  But when I tried to upload a file from the Papilio IDE, it doesn't recognized the programmer.  I'm using a external USB to Serial connector.

 

Maybe I'm doing something wrong or missing something.  Please let me know??

 

Regards,

Iván

Share this post


Link to post
Share on other sites

SO finally it works, at least with the upload to RAM (I'll try to upload to Flash later, I'll connect a external flash memory).  So basically the problem was that I chose the wrong speed -5 instead of -4.  The device I'm using is XC3S500E-4FTG256C.  Basically the ZAP IDE recognized the Board as Papilio with Arcade Mega Wing, the sample I tried is the Papilio Quick Start, next I'll tried VGA :-))

 

I'm leaving a picture of my setup, the Arduino you see in the picture it's just the board with serial to USB chip, I removed the uC from the board.

 

Regards,

Iván

post-38545-0-11782200-1424926119_thumb.j

Share this post


Link to post
Share on other sites

Alvaro,

 

The board has a 4Mbit flash, but I'm not sure how to make ZPUino to use it.  I have been checking the bootloader, but still not sure, so I thought I would has been easier to use a external flash (also I was taking into account I haven't had replies on this, until now).  If you can point in the right direction that would be great.  By the way I tested the VGA stuff and it works great (check at the picture :-) I like pictures, ZPUino rocks).

 

 

post-38545-0-40539700-1425105940_thumb.j

Share this post


Link to post
Share on other sites

Regarding the onboard flash memory, as I understand it should be connected to the SPI port on the FPGA so the bootloader can access it after loading the FPGA configuration to store code.  In this board (The NI FPGA Board), the flash is conected to the JTAG port, so I assume the bootloader cannot access it to store code, 'cause is not accesible throught the SPI port, correct if I'm wrong?

 

So if I connect a external SPI flash, what changes do I have to bootloader so it can start writing in the address 0??

 

Regards,

Iván

Share this post


Link to post
Share on other sites

Can you provide a direct link to the board schematic ? I assume that serial flash is only for the FPGA configuration, and it's a Xilinx one (which can "emulate" JTAG for configuration purposes).

 

I am not sure we can use it, and probably is too small, designed just to hold the FPGA bitfile.

 

 

So if I connect a external SPI flash, what changes do I have to bootloader so it can start writing in the address 0??

 

Nothing. Just hook the pins in a similar way Papilio does, by changing the UCF file. That should do it. Since you seem to have PMOD connectors, it should be fairly easy.

 

Here're here to help, of course, in case you run into trouble.

Share this post


Link to post
Share on other sites

Well, I have no access to the schematic of this board, as far as I know the board it's designed to be used with LabView (I don't use LabView).  Personally I think the board is poorly documented, for example to get the UCF file I have to go through forums to find out that it can be found in the LabView folder.  So according to the user manual (http://www.ni.com/pdf/manuals/372809b.pdf), the flash memory is a xcf04s (a Xilinx 4Mbit flash memory) and I use the iMPACT to write the configuration to it using JTAG.

Regarding the external flash, I have a Atmel 45DB021D, so I'll try it and let you know.

 

Thanks for your support.

Iván

Share this post


Link to post
Share on other sites

I tried the external SPI Flash (Atmel 45DB021D), but when I try to upload to flash I get a error message from the Papilio IDE:

 

"Unknown flash type, exiting"

 

I created a sketch to test (writing and reading) the SPI flash and it works, when reading the Flash ID I get: "1F 23".  So the flash is working fine.  By the way I'm using the Papilio IDE 2.3.0.

Share this post


Link to post
Share on other sites

Ok, it's perfecly wired probably. Can we continue this by email ?

 

Send me your address to alvieboy at alvie dot com.

 

Alvie

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now