Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Transferring a block of data

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?

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- 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!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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