Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Does anyone know how to read one line at a time fron a file, in verilog?
readmemh reads the whole file, but i just want to read one line at a time.
Any idea?
$fgets(line,fd);
will read line by line from the file descriptor "fd", and stores in the reg vector "line".
one thing is that, you should be careful in declaring the width of the reg_vector "line".
such, that the width should be more enough to store the line....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.