UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor violet_2020
Visitor
864 Views
Registered: ‎04-20-2018

Syntax error when using $fopen!

Jump to solution

Hello! I used Vivado(2017.1) to write some log to the txt, but end up reporting an syntax error when using $fopen.

e.g. 'integer handle1; handle1 = $fopen("E:/Fixed_Data/log.txt");'err_看图王.png

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
1,196 Views
Registered: ‎09-07-2011

Re: Syntax error when using $fopen!

Jump to solution

Pretty sure should be called from a procedural block: task, function, always block , initial, etc

 

or maybe can say :  integer handle = $fopen("....")

2 Replies
Highlighted
Explorer
Explorer
1,197 Views
Registered: ‎09-07-2011

Re: Syntax error when using $fopen!

Jump to solution

Pretty sure should be called from a procedural block: task, function, always block , initial, etc

 

or maybe can say :  integer handle = $fopen("....")

Visitor violet_2020
Visitor
821 Views
Registered: ‎04-20-2018

Re: Syntax error when using $fopen!

Jump to solution

I called it from an initial block and it solved the syntax error!

Thanks a lot! 

0 Kudos