FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5968 Discussions

Transferring a block of data

Altera_Forum
Honored Contributor II
1,197 Views

I am using DE2 and new to this board (and FPGA). I would like to make DE2 transfer a block of data (in a file) to my test chip thru the expansion headers. I try using readmemh but this failed to compile. The example of the file I have is below 

 

@0000 

33 

44 

55 

@0050 

54 

76 

34 

 

Can anyone please help?
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
488 Views

please help anyone?

0 Kudos
Altera_Forum
Honored Contributor II
488 Views

The easiest thing would be to add uart in sopc-system and write a windows program that communicates with the serial port.  

 

If your file always looks the same you can add it into a ram-bank as a hex file. 

 

//Ola
0 Kudos
Altera_Forum
Honored Contributor II
488 Views

 

--- Quote Start ---  

 

If your file always looks the same you can add it into a ram-bank as a hex file. 

 

--- Quote End ---  

 

How do I do this? I have the hex file, but how do I load it to the ram-bank? Using the Control panel? Can I use the control panel and my logic FPGA at the same time? Reason I ask is because you need to load a .sof file in order to use the control panel. 

 

The file is an assembly program. 

 

Thanks a lot!
0 Kudos
Altera_Forum
Honored Contributor II
488 Views

You can use the Mega Wizard to create a ram bank, in that wizard you can specifiy the contents of the memory at start up as a hex or mif file.  

 

You can also use the SOPC Builder directly, select On-Chip Memory (Ram or Rom) under "Memories and Memory Controllers -> On-Chip" on the left hand side. In the parameter setting box you have the same option at the bottom. 

 

Best Regards, 

Ola Bångdahl
0 Kudos
Reply