1999-08-15 03:23:56 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 1999 Stephen Williams (steve@icarus.com)
|
|
|
|
|
*
|
|
|
|
|
* This source code is free software; you can redistribute it
|
|
|
|
|
* and/or modify it in source code form under the terms of the GNU
|
|
|
|
|
* General Public License as published by the Free Software
|
|
|
|
|
* Foundation; either version 2 of the License, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
|
*/
|
2002-08-12 03:34:58 +02:00
|
|
|
#ifdef HAVE_CVS_IDENT
|
2007-04-10 00:49:33 +02:00
|
|
|
#ident "$Id: sys_finish.c,v 1.11 2007/04/09 22:49:33 steve Exp $"
|
1999-08-15 03:23:56 +02:00
|
|
|
#endif
|
|
|
|
|
|
2004-01-21 02:22:51 +01:00
|
|
|
# include "vpi_config.h"
|
2001-07-25 05:10:48 +02:00
|
|
|
|
1999-08-15 03:23:56 +02:00
|
|
|
# include "vpi_user.h"
|
2003-02-21 04:24:03 +01:00
|
|
|
# include <string.h>
|
1999-08-15 03:23:56 +02:00
|
|
|
|
2007-04-10 00:49:33 +02:00
|
|
|
static PLI_INT32 sys_finish_calltf(PLI_BYTE8*name)
|
1999-08-15 03:23:56 +02:00
|
|
|
{
|
2007-04-10 00:49:33 +02:00
|
|
|
if (strcmp((char*)name,"$stop") == 0) {
|
2007-07-20 00:04:33 +02:00
|
|
|
vpi_control(vpiStop, 0);
|
2003-02-21 04:24:03 +01:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2007-07-20 00:04:33 +02:00
|
|
|
vpi_control(vpiFinish, 0);
|
1999-08-15 03:23:56 +02:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void sys_finish_register()
|
|
|
|
|
{
|
|
|
|
|
s_vpi_systf_data tf_data;
|
|
|
|
|
|
|
|
|
|
tf_data.type = vpiSysTask;
|
|
|
|
|
tf_data.tfname = "$finish";
|
|
|
|
|
tf_data.calltf = sys_finish_calltf;
|
|
|
|
|
tf_data.compiletf = 0;
|
|
|
|
|
tf_data.sizetf = 0;
|
2007-04-10 00:49:33 +02:00
|
|
|
tf_data.user_data = (PLI_BYTE8*)"$finish";
|
1999-08-15 03:23:56 +02:00
|
|
|
vpi_register_systf(&tf_data);
|
2001-01-01 20:33:44 +01:00
|
|
|
|
|
|
|
|
tf_data.type = vpiSysTask;
|
|
|
|
|
tf_data.tfname = "$stop";
|
|
|
|
|
tf_data.calltf = sys_finish_calltf;
|
|
|
|
|
tf_data.compiletf = 0;
|
|
|
|
|
tf_data.sizetf = 0;
|
2007-04-10 00:49:33 +02:00
|
|
|
tf_data.user_data = (PLI_BYTE8*)"$stop";
|
2001-01-01 20:33:44 +01:00
|
|
|
vpi_register_systf(&tf_data);
|
1999-08-15 03:23:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* $Log: sys_finish.c,v $
|
2007-04-10 00:49:33 +02:00
|
|
|
* Revision 1.11 2007/04/09 22:49:33 steve
|
|
|
|
|
* More strict use of PLI_BYTE8 type.
|
|
|
|
|
*
|
2006-10-30 23:45:36 +01:00
|
|
|
* Revision 1.10 2006/10/30 22:45:37 steve
|
|
|
|
|
* Updates for Cygwin portability (pr1585922)
|
|
|
|
|
*
|
2004-01-21 02:22:51 +01:00
|
|
|
* Revision 1.9 2004/01/21 01:22:53 steve
|
|
|
|
|
* Give the vip directory its own configure and vpi_config.h
|
|
|
|
|
*
|
2003-02-21 04:24:03 +01:00
|
|
|
* Revision 1.8 2003/02/21 03:24:03 steve
|
|
|
|
|
* Make the $stop system task really vpiStop.
|
|
|
|
|
*
|
2002-08-12 03:34:58 +02:00
|
|
|
* Revision 1.7 2002/08/12 01:35:04 steve
|
|
|
|
|
* conditional ident string using autoconfig.
|
|
|
|
|
*
|
2001-07-25 05:10:48 +02:00
|
|
|
* Revision 1.6 2001/07/25 03:10:50 steve
|
|
|
|
|
* Create a config.h.in file to hold all the config
|
|
|
|
|
* junk, and support gcc 3.0. (Stephan Boettcher)
|
|
|
|
|
*
|
2001-01-01 20:33:44 +01:00
|
|
|
* Revision 1.5 2001/01/01 19:33:44 steve
|
|
|
|
|
* Add $stop that does a finish.
|
|
|
|
|
*
|
2000-02-23 03:56:53 +01:00
|
|
|
* Revision 1.4 2000/02/23 02:56:56 steve
|
|
|
|
|
* Macintosh compilers do not support ident.
|
|
|
|
|
*
|
1999-08-28 04:10:44 +02:00
|
|
|
* Revision 1.3 1999/08/28 02:10:44 steve
|
|
|
|
|
* Call the right vpiFinish code.
|
|
|
|
|
*
|
1999-08-19 04:51:03 +02:00
|
|
|
* Revision 1.2 1999/08/19 02:51:03 steve
|
|
|
|
|
* Add vpi_sim_control
|
|
|
|
|
*
|
1999-08-15 03:23:56 +02:00
|
|
|
* Revision 1.1 1999/08/15 01:23:56 steve
|
|
|
|
|
* Convert vvm to implement system tasks with vpi.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|