2003-02-17 07:39:47 +01:00
|
|
|
/*
|
2009-12-10 21:48:24 +01:00
|
|
|
* Copyright (c) 2003-2009 Stephen Williams (steve@icarus.com)
|
2003-02-17 07:39:47 +01:00
|
|
|
*
|
|
|
|
|
* 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
|
2012-08-29 03:41:23 +02:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2003-02-17 07:39:47 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <acc_user.h>
|
|
|
|
|
#include <vpi_user.h>
|
2003-05-18 02:16:35 +02:00
|
|
|
#include "priv.h"
|
2003-12-17 16:45:07 +01:00
|
|
|
#include <string.h>
|
2003-02-17 07:39:47 +01:00
|
|
|
|
|
|
|
|
int acc_configure(PLI_INT32 config_param, const char*value)
|
|
|
|
|
{
|
|
|
|
|
int rc;
|
|
|
|
|
switch (config_param) {
|
|
|
|
|
case accDevelopmentVersion:
|
|
|
|
|
vpi_printf("Request PLI Development Version %s\n", value);
|
|
|
|
|
rc = 1;
|
2003-05-18 02:16:35 +02:00
|
|
|
|
|
|
|
|
if (pli_trace) {
|
|
|
|
|
fprintf(pli_trace,
|
|
|
|
|
"acc_configure(accDevelopmentVersion, %s)\n",
|
|
|
|
|
value);
|
|
|
|
|
}
|
2003-02-17 07:39:47 +01:00
|
|
|
break;
|
|
|
|
|
|
2003-12-17 16:45:07 +01:00
|
|
|
case accEnableArgs:
|
|
|
|
|
|
|
|
|
|
if (pli_trace) {
|
|
|
|
|
fprintf(pli_trace, "acc_configure(accEnableArgs, %s)\n",
|
|
|
|
|
value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rc = 1;
|
|
|
|
|
if (strcmp(value,"acc_set_scope") == 0) {
|
|
|
|
|
vpi_printf("XXXX acc_configure argument: Sorry: "
|
|
|
|
|
"(accEnableArgs, %s\n", value);
|
|
|
|
|
rc = 0;
|
|
|
|
|
|
|
|
|
|
} else if (strcmp(value,"no_acc_set_scope") == 0) {
|
|
|
|
|
vpi_printf("XXXX acc_configure argument: Sorry: "
|
|
|
|
|
"(accEnableArgs, %s\n", value);
|
|
|
|
|
rc = 0;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
vpi_printf("XXXX acc_configure argument error. "
|
|
|
|
|
"(accEnableArgs, %s(invalid)\n", value);
|
|
|
|
|
rc = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
2003-02-17 07:39:47 +01:00
|
|
|
default:
|
2003-05-18 02:16:35 +02:00
|
|
|
|
|
|
|
|
if (pli_trace) {
|
|
|
|
|
fprintf(pli_trace, "acc_configure(config=%d, %s)\n",
|
2009-12-10 21:48:24 +01:00
|
|
|
(int)config_param, value);
|
2003-05-18 02:16:35 +02:00
|
|
|
}
|
2014-04-07 00:54:05 +02:00
|
|
|
#if 0
|
2009-12-10 21:48:24 +01:00
|
|
|
vpi_printf("XXXX acc_configure(%d, %s)\n", (int)config_param,
|
|
|
|
|
value);
|
2014-04-07 00:54:05 +02:00
|
|
|
#else
|
|
|
|
|
/* Parameter is not necessarily a string. */
|
|
|
|
|
vpi_printf("XXXX acc_configure(%d, ...)\n", (int)config_param);
|
|
|
|
|
#endif
|
2003-02-17 07:39:47 +01:00
|
|
|
rc = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
|
}
|