Update the files to use vpi_control vs vpi_sim_control.
vpi_sim_control is no longer part of the standard, so update the code to use the standard function (vpi_control).
This commit is contained in:
parent
58cb5a668b
commit
e546a9d5c8
|
|
@ -29,13 +29,13 @@
|
|||
*/
|
||||
int tf_dofinish(void)
|
||||
{
|
||||
vpi_sim_control(vpiFinish, 0);
|
||||
vpi_control(vpiFinish, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int tf_dostop(void)
|
||||
{
|
||||
vpi_sim_control(vpiStop, 0);
|
||||
vpi_control(vpiStop, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,14 +41,14 @@ static PLI_INT32 sys_fopen_compiletf(PLI_BYTE8*name)
|
|||
|
||||
if (argv == 0) {
|
||||
vpi_printf("%s: file name argument missing.\n", name);
|
||||
vpi_sim_control(vpiFinish, -1);
|
||||
vpi_control(vpiFinish, -1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
item = vpi_scan(argv);
|
||||
if (item == 0) {
|
||||
vpi_printf("%s: file name argument missing.\n", name);
|
||||
vpi_sim_control(vpiFinish, -1);
|
||||
vpi_control(vpiFinish, -1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -62,12 +62,12 @@ static PLI_INT32 sys_fopen_compiletf(PLI_BYTE8*name)
|
|||
|
||||
if (! is_constant(item)) {
|
||||
vpi_printf("ERROR: %s mode argument must be a constant\n", name);
|
||||
vpi_sim_control(vpiFinish, -1);
|
||||
vpi_control(vpiFinish, -1);
|
||||
}
|
||||
|
||||
if (vpi_get(vpiConstType, item) != vpiStringConst) {
|
||||
vpi_printf("ERROR: %s mode argument must be a string.\n", name);
|
||||
vpi_sim_control(vpiFinish, -1);
|
||||
vpi_control(vpiFinish, -1);
|
||||
}
|
||||
|
||||
item = vpi_scan(argv);
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@
|
|||
static PLI_INT32 sys_finish_calltf(PLI_BYTE8*name)
|
||||
{
|
||||
if (strcmp((char*)name,"$stop") == 0) {
|
||||
vpi_sim_control(vpiStop, 0);
|
||||
vpi_control(vpiStop, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
vpi_sim_control(vpiFinish, 0);
|
||||
vpi_control(vpiFinish, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static PLI_INT32 sys_test_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
|
||||
if (argv == 0) {
|
||||
vpi_printf("ERROR: $test$plusargs requires one argument\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ static PLI_INT32 sys_test_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
if (vpi_get(vpiConstType, arg) != vpiStringConst) {
|
||||
vpi_printf("ERROR: Argument of $test$plusargs "
|
||||
" must be a constant string.\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
|
@ -62,7 +62,7 @@ static PLI_INT32 sys_test_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
default:
|
||||
vpi_printf("ERROR: Argument of $test$plusargs "
|
||||
" must be a constant string.\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ static PLI_INT32 sys_test_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
arg = vpi_scan(argv);
|
||||
if (arg != 0) {
|
||||
vpi_printf("ERROR: too many arguments to $test$plusargs\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -134,7 +134,7 @@ static PLI_INT32 sys_value_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
|
||||
if (argv == 0) {
|
||||
vpi_printf("ERROR: $value$plusargs requires two arguments\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ static PLI_INT32 sys_value_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
if (vpi_get(vpiConstType, arg) != vpiStringConst) {
|
||||
vpi_printf("ERROR: First argument of $value$plusargs "
|
||||
" must be a constant string.\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
|
@ -154,7 +154,7 @@ static PLI_INT32 sys_value_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
default:
|
||||
vpi_printf("ERROR: First argument of $value$plusargs "
|
||||
" must be a constant string.\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ static PLI_INT32 sys_value_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
if (cp == 0) {
|
||||
vpi_printf("ERROR: Invalid argument format string"
|
||||
": %s\n", fmt);
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -187,14 +187,14 @@ static PLI_INT32 sys_value_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
default:
|
||||
vpi_printf("ERROR: Invalid argument format string"
|
||||
": %s\n", fmt);
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*cp != 0) {
|
||||
vpi_printf("ERROR: Trailing junk after value format"
|
||||
": %s\n", fmt);
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -202,7 +202,7 @@ static PLI_INT32 sys_value_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
arg = vpi_scan(argv);
|
||||
if (argv == 0) {
|
||||
vpi_printf("ERROR: $value$plusargs requires two arguments\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -215,14 +215,14 @@ static PLI_INT32 sys_value_plusargs_compiletf(PLI_BYTE8*xx)
|
|||
default:
|
||||
vpi_printf("ERROR: value field doesn\'t match format: %s\n",
|
||||
value.value.str);
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
arg = vpi_scan(argv);
|
||||
if (arg != 0) {
|
||||
vpi_printf("ERROR: too many arguments to $value$plusargs\n");
|
||||
vpi_sim_control(vpiFinish, 1);
|
||||
vpi_control(vpiFinish, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -305,8 +305,8 @@ extern PLI_INT32 vpi_remove_cb(vpiHandle ref);
|
|||
* This function allows a vpi application to control the simulation
|
||||
* engine. The operation parameter specifies the function to
|
||||
* perform. The remaining parameters (if any) are interpreted by the
|
||||
* operation. The vpi_sim_control definition was added to P1364-2000
|
||||
* 14 July 1999. See PLI Task Force ID: PTF-161
|
||||
* operation. The vpi_sim_control definition (now named vpi_control)
|
||||
* was added to P1364-2000 14 July 1999. See PLI Task Force ID: PTF-161
|
||||
*
|
||||
* vpiFinish - perform the $finish operation, as soon as the user
|
||||
* function returns. This operation takes a single
|
||||
|
|
|
|||
Loading…
Reference in New Issue