The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 4th, 2024, 1:25pm
Pages: 1
Send Topic Print
how to read and write in same file in verilogA (Read 3136 times)
Badri
New Member
*
Offline



Posts: 1
Bangalore, India
how to read and write in same file in verilogA
Feb 23rd, 2006, 3:11am
 
I want to perform multiple read and write  operations on the same file in verilogA. How can I achieve this?

Regards
Badri
Back to top
 
 
View Profile bszanwar2000@yahoo.co.in   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: how to read and write in same file in verilogA
Reply #1 - Feb 24th, 2006, 6:15am
 
Are you not able to $open and $close the file multiple times?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Marq Kole
Junior Member
**
Offline



Posts: 11
Eindhoven, The Netherlands
Re: how to read and write in same file in verilogA
Reply #2 - Mar 20th, 2006, 2:36am
 
Maybe this is too obvious, but you have to be able to open a file with 'r+' or 'a+' mode (read-update, or append-update) to be able to read and write the same file. That is only possible if your tool is Verilog 1394-2001 compliant. The 1995 standard, on which Verilog-AMS 2.2 is based, only supports writing, except for loading memory data from a file.

Even if the digital part of your simulator correctly supports the Verilog 2001 syntax, the analog part may not if that is provided by another vendor.

Essentially, it depends on what you are trying to achieve.
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.