Forum Discussion

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

Reading a text file in verilog

Hello friends... i am also having a problem in programming FPGA....i want to read the pixel values of an image and i created a file with "hex" values of pixel using MAT lab and now i want to read that file and use those values in my verilog program...please help me in solving this issue...i am using altera's quartus ii software and DE2 kit.....

Regards,

Gupta.

3 Replies

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

    Hello...thanks for your reply...i had already seen the link that you had sent to me....but it was showing errors in quartus ii when i try to run the sample programs available in this link...is there any different syntax to run the program in quartus ii???

    regards,

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

    Unfortunately, you didn't tell what you exactly want to achieve.

    According to Quartus doc, only $readmemb and $readmemh are supported for memory initialisation. See specifying the initial contents of inferred memories in verilog hdl designs.

    Hex files can be most easily used as memory initialisation files with Ram MegaFunction.