Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Contributor
nrclark
Posts: 28
Registered: ‎09-15-2008
0
Accepted Solution

Problem using $fscanf in ISIM

Hi all,

 

I'm having some trouble using $fscanf in a design I'm working on. Specifically, ISim refuses to simulate my design! :(

 

When I try to run the attached test file, Isim returns "ERROR:Simulator:671", which claims that "This system task is not supported" in reference to my fscanf system call.

 

Xilinx's ISim help file specifically says that fscanf is supported:

http://www.xilinx.com/itp/xilinx10/isehelp/ism_r_verlang_system_tasks.htm

 

So why doesn't it work for me? :(

 

 

 

 

Xilinx Employee
duthv
Posts: 608
Registered: ‎09-14-2007
0

Re: Problem using $fscanf in ISIM

[ Edited ]

Hi,

 

I tried the attached code in 11.1 and it does work correctly. Although there is still a warning that seems to be 

innocuous, I am looking into this with engineering why we have a warning.

 

 

Thanks

Duth

 

Message Edited by duthv on 03-26-2009 12:49 PM
Contributor
nrclark
Posts: 28
Registered: ‎09-15-2008
0

Re: Problem using $fscanf in ISIM

[ Edited ]

Hi Duth,

 

Unfortunately, we're using 10.1 at my shop. What can I do do make this kind of thing work in ISim 10? ISim 10's own documentation (as linked in my first post) says that I ought to be able to use $fscanf. Is there some kind of patch or include file that I don't have?

 

-Nick

 

 

 

Message Edited by nrclark on 03-26-2009 11:42 AM
Xilinx Employee
duthv
Posts: 608
Registered: ‎09-14-2007
0

Re: Problem using $fscanf in ISIM

Let me look into this. Can you send me the input.txt file as well? Let me see if we can find a solution for 10.1

 

Thanks

Duth

 

 

Contributor
nrclark
Posts: 28
Registered: ‎09-15-2008
0

Re: Problem using $fscanf in ISIM

Sure thing! Thanks for diving into this.

 

-Nick

Xilinx Employee
duthv
Posts: 608
Registered: ‎09-14-2007
0

Re: Problem using $fscanf in ISIM

Hi Nick,

 

Unfortunately it is not a simple fix. I confirmed with 11.1 that your design files work fine.

 

We should have 11.1 available by end of April. If you do need something earlier, I would request that you open a case with Tech Support and request for a patch, so they can see if a patch can be provided.

 

Thanks

Duth

 

Visitor
niall99
Posts: 3
Registered: ‎04-23-2009

Re: Problem using $fscanf in ISIM

While trying to track down my own problems with the lack of $feof I started getting code which used to work with $fscanf to give the "not supported" error. It turned out that while the editor won't recognize it, as long as the return value is assigned it works for me. ie

 

$fscanf(file,"%d\n",count);                   // fails

tmp = $fscanf(file,"%d\n",count);         // works

 

... maybe that will work for you ?

Contributor
nrclark
Posts: 28
Registered: ‎09-15-2008
0

Re: Problem using $fscanf in ISIM

Well I'll be a son of a..

 

That worked perfectly. Thanks for the tip, niall99!

 

 

Xilinx Employee
duthv
Posts: 608
Registered: ‎09-14-2007

Re: Problem using $fscanf in ISIM

Hi Nick,

 

Meant to get back to you on this. As you saw from Niall, this is not a simulator bug. This is a usage issue of how fscanf was used.

 

You need to have it used in a mechanism of x=func() for fscanf and we have also fixed the error message to be clearer on why it was erroring out.

 

Thanks

Duth

 

Contributor
nrclark
Posts: 28
Registered: ‎09-15-2008
0

Re: Problem using $fscanf in ISIM

Thanks for pushing to get that fix to the reported error message. Any chance it could come down the wire in a 10.1 update?