The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 6:36pm
Pages: 1
Send Topic Print
n times fopen read only (Read 1179 times)
RolfK
New Member
*
Offline



Posts: 7
Germany
n times fopen read only
Dec 05th, 2012, 10:31am
 
Dear Experts,

I want to read data from file ($fgets , $scanf).
I have two issues with that:
1) I do not know how much records (lines) are in the file.
Hence I can not declare an array variable before.
2) If I would open the file n times would this really open the file n times returning a new handle ?

How are such things handled in verilog AMS.
I fear, I waste a lot of runtime keeping the file open and not store the content in memory.
Another difficulty is that I can not fix in code which file to read.
This is a parameter or even the next file to read is given by some string in the current open file. You could think of hierarchical file reading.

Any idea ?

Thanks a lot

RolfK
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.