on-internet
← Community

Reading binary values stored in text file

Stack Overflow ·

I am working on project in which I have to read 5-bit binary values from a text file. I have to read each 5-bit binary number and then assign them to 5 different 1-bit registers one by one. Moreover, I can't use $readmemb because my text file is so huge (almost 2MB), and I think $readmemb can't deal with such a huge file because its not working in my case. How can I use $fopen and $fread` functions to solve my problem because I have not worked on file handling in Verilog until now? Can anyone provide an example similar to my problem?

Comments

Sign in or sign up to comment and upvote.

No comments yet.