Forum Discussion

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

Help in VHDl code

Please can any one review this code for me function of code " data taken from text file and stored in memory with random address created by using LFSR ,then i make some modification on this data and write it again to its location in the memory and I need to write the final contents of memory to another text file"problem " data which written to the text file completely different from that expected"is that problem in code syntax or may be in simulation process ?

code ,

http://www.alteraforum.com/forum/attachment.php?attachmentid=10780&stc=1&d=1435248115

2 Replies

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

    wow, your code is quite difficult to read. It would be nice if you'd clean it up when you ask for some support.

    It seems you read lines in from a file and put then into an integer array: Integer is often default a 32-bit signed value. You then cast the integer value into an unsigned 8-bit bit-vector. Could it be that something already goes wrong with the type conversion?

    The code is missing the implementation of LFSR and Embedding_Module.

    Also: "endoffile" and "linenumber" seem unused.