Command line interaction via DPI: follow-up

  • Thread starter Jonathan Bromley
  • Start date
J

Jonathan Bromley

Guest
hi all,

A couple of weeks ago I asked for advice on getting
a SystemVerilog DPI function to read keyboard input
from the user; in one simulator, I couldn't get my
prompt text to appear on the same line as user input.

That vendor responded very promptly to my query,
pointing out that their user interface - whether
GUI or command-line - "owns" the stdin and stdout
channels, and they provide a specialised PLI call
for getting user input from stdin. I tried that
and it worked perfectly.

Unfortunately, as far as I'm aware there is no
standardised PLI call for doing this - it's vendor
specific. It may well be that the other vendors
also provide such functions; I haven't yet checked.

So it's back to conditional compilation for me :-(
and, perhaps, a prod to the appropriate IEEE committees
to consider providing a standardised get-from-stdin
function, mirroring vpi_printf(), in future versions
of [System]Verilog.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

Welcome to EDABoard.com

Sponsor

Back
Top