Chris Spear's PLI and Verilog 2001

R

Robert Au

Guest
I am using Modelsim 6.0 which already built in the verilog 2001 file io
support. However, due to some limitation on verilog 2001, I wish to use
Chris Spear's file io PLI instead.

I have a question about the name conflict between file io system task
in verilog 2001 and chris spear's pli. For example, when i call
$fgets() in my testbench, which one will the simulator use (verilog
2001 system task or chris spear's pli)?

Thanks in advance

Robert
 
Robert Au wrote:
I am using Modelsim 6.0 which already built in the verilog 2001 file
io
support. However, due to some limitation on verilog 2001, I wish to
use
Chris Spear's file io PLI instead.
I am curious what functionality Chris Spear's PLI supports that the
Verilog-2001 file I/O extensions don't. Could you elaborate?

I have a question about the name conflict between file io system task
in verilog 2001 and chris spear's pli. For example, when i call
$fgets() in my testbench, which one will the simulator use (verilog
2001 system task or chris spear's pli)?
User-defined system tasks are supposed to override built-in tasks
of the same name.
 
I found that $eof is not supported by verilog2001.
I have try some workaround to make use of verilog 2001 system function
to emulate $eof, but cannot succeed.

For more details, you can simply visit chris spear pli page.
He listed out the difference between his pli and verilog 2001 fileio
system function.

Thanks
 
I found that $eof is not supported by verilog2001.
I have try some workaround to make use of verilog 2001 system function
to emulate $eof, but cannot succeed.

For more details, you can simply visit chris spear pli page.
He listed out the difference between his pli and verilog 2001 fileio
system function.

Thanks
 
Agreed. The $feof function got left out somehow. It is being
added in Verilog-2005. It was implemented in NC-Verilog
at the same time as the other file I/O routines, as an obvious
extension. You might want to push your vendor to support it.
The specification is available in the draft LRM, and it matches
the C feof() function.

You should be able to work around it by calling $fgetc,
checking the result for EOF, and calling $ungetc to
put the byte back if it wasn't EOF.
 
sharp@cadence.com wrote:
Agreed. The $feof function got left out somehow. It is being
added in Verilog-2005. It was implemented in NC-Verilog
at the same time as the other file I/O routines, as an obvious
extension. You might want to push your vendor to support it.
The specification is available in the draft LRM, and it matches
the C feof() function.
I've been unable to follow the 1364-2005 track for a while due
to day job constraints. Is there a summary of 2005 differences
(or an accessible draft) that someone like me can get at?

--
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
 

Welcome to EDABoard.com

Sponsor

Back
Top