Continue to Site

Welcome to EDAboard.com

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.

[SOLVED] Veriloga $fopen command

Status
Not open for further replies.

kavitha_rapolu

Junior Member level 3
Joined
Jan 4, 2008
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,460
Hi,

Where does the file get stored in when we use $fopen("%C:r.dat") in Veriloga ?

I can't find the file after running the simulation.
 

you should use like this

The $fopen Function
Use the $fopen function to open a specified file. The $fopen function reuses channels associated with any files that are closed.
Example:
integer myChanDesc ;
myChanDesc = $fopen ( "myfile" ) ;

See this example 2.

Example:
The following code fragment illustrates how to open and write
simultaneously to two open files:
integer mcd1 ;
integer mcd2 ;
integer mcd ;
@(initial_step) begin
mcd1 = $fopen("file1.dat") ;
mcd2 = $fopen("file2.dat") ;
end
.
.
.
mcd = mcd1 | mcd2 ; // Bitwise OR combines two channels
$fstrobe(mcd, "This is written to both files") ;
The file, file1.dat, can also be named %C:r.dat, to track the name of the netlist file from which it is run.
 

Thank you. So after running the code , in which directory do you find the file
file1.dat?

In my case, I ran my code and after that I dont find my file1.dat in the results directory.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top