badger/tests/tap-vpi.c
/*
 * VPI (a.k.a. PLI 2) routines for connection to the Universal tun/tap
 * port to/from a Verilog program.
 *
 * $tap_io(out_octet, out_valid, in_octet, in_valid)
 *   in_octet is data received from the tap Ethernet port, sent
 *      to the Verilog program.
 *   out_octet provided by the Verilog program, will be sent to
 *      the tap Ethernet port, once out_valid is low for a cycle.
 *
 * Written according to standards, but so far only tested on
 * Linux with Icarus Verilog.
 */




Written according to standards, but so far only tested on
Linux with Icarus Verilog.
Written according to standards but so far only tested on Linux with Icarus Verilog .
static PLI_INT32 tap_io_compiletf(char*cd)
{
	vpiHandle sys = vpi_handle(vpiSysTfCall, 0);
	vpiHandle argv = vpi_iterate(vpiArgument, sys);
	vpiHandle arg;
	int i;
	(void) cd;  
	for (i=0; i<4; i++) {
		arg = vpi_scan(argv);
		assert(arg);
	}
	return 0;
}
static PLI_INT32 tap_io_compiletf ( char * cd ) { vpiHandle sys = vpi_handle ( vpiSysTfCall , 0 ) ; vpiHandle argv = vpi_iterate ( vpiArgument , sys ) ; vpiHandle arg ; int i ; ( void ) cd ; for ( i = 0 ; i < 4 ; i ++ ) { arg = vpi_scan ( argv ) ; assert ( arg ) ; } return 0 ; }
VPI (a.k.a.
VPI ( a . k . a .
/* parameter is unused */ /* Need four arguments */