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.

help me with fwrite and fopen commands in Verilog

Status
Not open for further replies.

deqingTK

Newbie level 3
Joined
Dec 26, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,315
fwrite and fopen

I have been trying on the verilog HDL code to make a notepad print the following.

1 2 3 4 5
1 2 3 4 5


The number in the file, which end at 5 as mention above, must be able to modify easily as the counter may need to count from 1 to 32.

I tried alot of times, and i only get a blank .txt notepad file.

I am still new to verilog, and the fwrite and fopen command. I hope someone kindly answer my question.

Thanks alot =)
 

Re: fwrite and fopen

Which simulator are you using? If you are running a Windows-based Verilog simulator (such as Modelsim/PE), then remember to execute $fclose() at the end of your Verilog program. Otherwise, the operating-system (Windows) won't update/release the open-textfile until you quit the simulator.
 

Re: fwrite and fopen

Yup, i am using modelsim for Windows. After i close the simulator, its still blank, so i think theres something wrong with my program. Is there any sample or example codes i can refer to?
 

fwrite and fopen

maybe you can paste your verilog code and we help to analyse it
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top