V0.9: back port of SunPro compiler support.
This patch combines all the changes needed to back port support for the SunPro compilers to the stable branch.
This commit is contained in:
parent
22faa019d1
commit
34c34e33cf
|
|
@ -127,6 +127,13 @@ case "${host}" in
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
shared="-bundle -undefined suppress -flat_namespace"
|
shared="-bundle -undefined suppress -flat_namespace"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*-*-solaris*)
|
||||||
|
if test ${using_sunpro_c} = 1
|
||||||
|
then
|
||||||
|
shared="-G"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST(shared)
|
AC_SUBST(shared)
|
||||||
AC_MSG_RESULT($shared)
|
AC_MSG_RESULT($shared)
|
||||||
|
|
@ -153,6 +160,12 @@ case "${host}" in
|
||||||
PICFLAG=+z
|
PICFLAG=+z
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*-*-solaris*)
|
||||||
|
if test ${using_sunpro_c} = 1
|
||||||
|
then
|
||||||
|
PICFLAG=-G
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST(PICFLAG)
|
AC_SUBST(PICFLAG)
|
||||||
AC_MSG_RESULT($PICFLAG)
|
AC_MSG_RESULT($PICFLAG)
|
||||||
|
|
|
||||||
|
|
@ -1217,7 +1217,7 @@ static void macro_start_args()
|
||||||
def_argo[0] = 0;
|
def_argo[0] = 0;
|
||||||
def_argl[0] = 0;
|
def_argl[0] = 0;
|
||||||
def_argc = 1;
|
def_argc = 1;
|
||||||
};
|
}
|
||||||
|
|
||||||
static void macro_add_to_arg(int is_white_space)
|
static void macro_add_to_arg(int is_white_space)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -56,14 +56,11 @@ PLI_INT32 acc_fetch_type(handle obj)
|
||||||
|
|
||||||
case vpiModule:
|
case vpiModule:
|
||||||
return accModule;
|
return accModule;
|
||||||
|
|
||||||
default:
|
|
||||||
vpi_printf("acc_fetch_type: vpiType %d is what accType?\n",
|
|
||||||
(int)vpi_get(vpiType, obj));
|
|
||||||
return accUnknown;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
vpi_printf("acc_fetch_type: vpiType %d is what accType?\n",
|
||||||
|
(int)vpi_get(vpiType, obj));
|
||||||
|
return accUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
PLI_INT32 acc_fetch_fulltype(handle obj)
|
PLI_INT32 acc_fetch_fulltype(handle obj)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -36,11 +36,8 @@ char* acc_fetch_type_str(PLI_INT32 type)
|
||||||
|
|
||||||
case accConstant:
|
case accConstant:
|
||||||
return "accConstant";
|
return "accConstant";
|
||||||
|
|
||||||
default:
|
|
||||||
vpi_printf("XXXX acc_fetch_type_str(%d);\n", (int)type);
|
|
||||||
return "acc_fetch_type_str(unknown)";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
vpi_printf("acc_fetch_type_str: type %d is what accType?\n", (int)type);
|
||||||
|
return "acc_fetch_type_str(unknown)";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
net_scope.cc
10
net_scope.cc
|
|
@ -218,14 +218,14 @@ map<perm_string,NetScope::param_expr_t>::iterator NetScope::find_parameter(perm_
|
||||||
map<perm_string,param_expr_t>::iterator idx;
|
map<perm_string,param_expr_t>::iterator idx;
|
||||||
|
|
||||||
idx = parameters.find(key);
|
idx = parameters.find(key);
|
||||||
if (idx != parameters.end())
|
if (idx != parameters.end()) return idx;
|
||||||
return idx;
|
|
||||||
|
|
||||||
idx = localparams.find(perm_string::literal(key));
|
idx = localparams.find(perm_string::literal(key));
|
||||||
if (idx != localparams.end())
|
if (idx != localparams.end()) return idx;
|
||||||
return idx;
|
|
||||||
|
|
||||||
return (map<perm_string,param_expr_t>::iterator) 0;
|
// To get here the parameter must already exist, so we should
|
||||||
|
// never get here.
|
||||||
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
NetScope::TYPE NetScope::type() const
|
NetScope::TYPE NetScope::type() const
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* VHDL code generation for processes.
|
* VHDL code generation for processes.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Nick Gasson (nick@nickg.me.uk)
|
* Copyright (C) 2008-2010 Nick Gasson (nick@nickg.me.uk)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -83,7 +83,7 @@ static int generate_vhdl_process(vhdl_entity *ent, ivl_process_t proc)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int draw_process(ivl_process_t proc, void *cd)
|
extern "C" int draw_process(ivl_process_t proc, void *cd)
|
||||||
{
|
{
|
||||||
ivl_scope_t scope = ivl_process_scope(proc);
|
ivl_scope_t scope = ivl_process_scope(proc);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* VHDL code generation for scopes.
|
* VHDL code generation for scopes.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Nick Gasson (nick@nickg.me.uk)
|
* Copyright (C) 2008-2010 Nick Gasson (nick@nickg.me.uk)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -921,7 +921,7 @@ static void create_skeleton_entity_for(ivl_scope_t scope, int depth)
|
||||||
* A first pass through the hierarchy: create VHDL entities for
|
* A first pass through the hierarchy: create VHDL entities for
|
||||||
* each unique Verilog module type.
|
* each unique Verilog module type.
|
||||||
*/
|
*/
|
||||||
static int draw_skeleton_scope(ivl_scope_t scope, void *_unused)
|
extern "C" int draw_skeleton_scope(ivl_scope_t scope, void *_unused)
|
||||||
{
|
{
|
||||||
static int depth = 0;
|
static int depth = 0;
|
||||||
|
|
||||||
|
|
@ -949,7 +949,7 @@ static int draw_skeleton_scope(ivl_scope_t scope, void *_unused)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int draw_all_signals(ivl_scope_t scope, void *_parent)
|
extern "C" int draw_all_signals(ivl_scope_t scope, void *_parent)
|
||||||
{
|
{
|
||||||
if (!is_default_scope_instance(scope))
|
if (!is_default_scope_instance(scope))
|
||||||
return 0; // Not interested in this instance
|
return 0; // Not interested in this instance
|
||||||
|
|
@ -981,7 +981,7 @@ static int draw_all_signals(ivl_scope_t scope, void *_parent)
|
||||||
/*
|
/*
|
||||||
* Draw all tasks and functions in the hierarchy.
|
* Draw all tasks and functions in the hierarchy.
|
||||||
*/
|
*/
|
||||||
static int draw_functions(ivl_scope_t scope, void *_parent)
|
extern "C" int draw_functions(ivl_scope_t scope, void *_parent)
|
||||||
{
|
{
|
||||||
if (!is_default_scope_instance(scope))
|
if (!is_default_scope_instance(scope))
|
||||||
return 0; // Not interested in this instance
|
return 0; // Not interested in this instance
|
||||||
|
|
@ -1005,7 +1005,7 @@ static int draw_functions(ivl_scope_t scope, void *_parent)
|
||||||
* This also has the side effect of generating all the necessary
|
* This also has the side effect of generating all the necessary
|
||||||
* nexus code.
|
* nexus code.
|
||||||
*/
|
*/
|
||||||
static int draw_constant_drivers(ivl_scope_t scope, void *_parent)
|
extern "C" int draw_constant_drivers(ivl_scope_t scope, void *_parent)
|
||||||
{
|
{
|
||||||
if (!is_default_scope_instance(scope))
|
if (!is_default_scope_instance(scope))
|
||||||
return 0; // Not interested in this instance
|
return 0; // Not interested in this instance
|
||||||
|
|
@ -1080,7 +1080,7 @@ static int draw_constant_drivers(ivl_scope_t scope, void *_parent)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int draw_all_logic_and_lpm(ivl_scope_t scope, void *_parent)
|
extern "C" int draw_all_logic_and_lpm(ivl_scope_t scope, void *_parent)
|
||||||
{
|
{
|
||||||
if (!is_default_scope_instance(scope))
|
if (!is_default_scope_instance(scope))
|
||||||
return 0; // Not interested in this instance
|
return 0; // Not interested in this instance
|
||||||
|
|
@ -1100,7 +1100,7 @@ static int draw_all_logic_and_lpm(ivl_scope_t scope, void *_parent)
|
||||||
return ivl_scope_children(scope, draw_all_logic_and_lpm, scope);
|
return ivl_scope_children(scope, draw_all_logic_and_lpm, scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int draw_hierarchy(ivl_scope_t scope, void *_parent)
|
extern "C" int draw_hierarchy(ivl_scope_t scope, void *_parent)
|
||||||
{
|
{
|
||||||
if (ivl_scope_type(scope) == IVL_SCT_MODULE && _parent) {
|
if (ivl_scope_type(scope) == IVL_SCT_MODULE && _parent) {
|
||||||
ivl_scope_t parent = static_cast<ivl_scope_t>(_parent);
|
ivl_scope_t parent = static_cast<ivl_scope_t>(_parent);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Support functions for VHDL output.
|
* Support functions for VHDL output.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Nick Gasson (nick@nickg.me.uk)
|
* Copyright (C) 2008-2010 Nick Gasson (nick@nickg.me.uk)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -36,7 +36,7 @@ enum support_function_t {
|
||||||
SF_TERNARY_SIGNED,
|
SF_TERNARY_SIGNED,
|
||||||
SF_LOGIC_TO_INTEGER,
|
SF_LOGIC_TO_INTEGER,
|
||||||
SF_SIGNED_TO_LOGIC,
|
SF_SIGNED_TO_LOGIC,
|
||||||
SF_UNSIGNED_TO_LOGIC,
|
SF_UNSIGNED_TO_LOGIC
|
||||||
};
|
};
|
||||||
|
|
||||||
class support_function : public vhdl_function {
|
class support_function : public vhdl_function {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* VHDL abstract syntax elements.
|
* VHDL abstract syntax elements.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Nick Gasson (nick@nickg.me.uk)
|
* Copyright (C) 2008-2010 Nick Gasson (nick@nickg.me.uk)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -96,7 +96,7 @@ enum vhdl_binop_t {
|
||||||
VHDL_BINOP_DIV,
|
VHDL_BINOP_DIV,
|
||||||
VHDL_BINOP_MOD,
|
VHDL_BINOP_MOD,
|
||||||
VHDL_BINOP_POWER,
|
VHDL_BINOP_POWER,
|
||||||
VHDL_BINOP_SRA,
|
VHDL_BINOP_SRA
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -123,7 +123,7 @@ private:
|
||||||
|
|
||||||
enum vhdl_unaryop_t {
|
enum vhdl_unaryop_t {
|
||||||
VHDL_UNARYOP_NOT,
|
VHDL_UNARYOP_NOT,
|
||||||
VHDL_UNARYOP_NEG,
|
VHDL_UNARYOP_NEG
|
||||||
};
|
};
|
||||||
|
|
||||||
class vhdl_unaryop_expr : public vhdl_expr {
|
class vhdl_unaryop_expr : public vhdl_expr {
|
||||||
|
|
@ -206,7 +206,7 @@ enum time_unit_t {
|
||||||
TIME_UNIT_PS,
|
TIME_UNIT_PS,
|
||||||
TIME_UNIT_NS,
|
TIME_UNIT_NS,
|
||||||
TIME_UNIT_US,
|
TIME_UNIT_US,
|
||||||
TIME_UNIT_MS,
|
TIME_UNIT_MS
|
||||||
};
|
};
|
||||||
|
|
||||||
class vhdl_const_time : public vhdl_expr {
|
class vhdl_const_time : public vhdl_expr {
|
||||||
|
|
@ -397,7 +397,7 @@ enum vhdl_wait_type_t {
|
||||||
VHDL_WAIT_FOR, // Wait for a constant amount of time
|
VHDL_WAIT_FOR, // Wait for a constant amount of time
|
||||||
VHDL_WAIT_FOR0, // Special wait for zero time
|
VHDL_WAIT_FOR0, // Special wait for zero time
|
||||||
VHDL_WAIT_UNTIL, // Wait on an expression
|
VHDL_WAIT_UNTIL, // Wait on an expression
|
||||||
VHDL_WAIT_ON, // Wait on a sensitivity list
|
VHDL_WAIT_ON // Wait on a sensitivity list
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -657,7 +657,7 @@ enum vhdl_port_mode_t {
|
||||||
VHDL_PORT_IN,
|
VHDL_PORT_IN,
|
||||||
VHDL_PORT_OUT,
|
VHDL_PORT_OUT,
|
||||||
VHDL_PORT_INOUT,
|
VHDL_PORT_INOUT,
|
||||||
VHDL_PORT_BUFFER,
|
VHDL_PORT_BUFFER
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ void error(const char *fmt, ...);
|
||||||
void debug_msg(const char *fmt, ...);
|
void debug_msg(const char *fmt, ...);
|
||||||
|
|
||||||
int draw_scope(ivl_scope_t scope, void *_parent);
|
int draw_scope(ivl_scope_t scope, void *_parent);
|
||||||
int draw_process(ivl_process_t net, void *cd);
|
extern "C" int draw_process(ivl_process_t net, void *cd);
|
||||||
int draw_stmt(vhdl_procedural *proc, stmt_container *container,
|
int draw_stmt(vhdl_procedural *proc, stmt_container *container,
|
||||||
ivl_statement_t stmt, bool is_last = false);
|
ivl_statement_t stmt, bool is_last = false);
|
||||||
int draw_lpm(vhdl_arch *arch, ivl_lpm_t lpm);
|
int draw_lpm(vhdl_arch *arch, ivl_lpm_t lpm);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* VHDL variable and signal types.
|
* VHDL variable and signal types.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Nick Gasson (nick@nickg.me.uk)
|
* Copyright (C) 2008-2010 Nick Gasson (nick@nickg.me.uk)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -34,7 +34,7 @@ enum vhdl_type_name_t {
|
||||||
VHDL_TYPE_SIGNED,
|
VHDL_TYPE_SIGNED,
|
||||||
VHDL_TYPE_UNSIGNED,
|
VHDL_TYPE_UNSIGNED,
|
||||||
VHDL_TYPE_TIME,
|
VHDL_TYPE_TIME,
|
||||||
VHDL_TYPE_ARRAY,
|
VHDL_TYPE_ARRAY
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -583,19 +583,11 @@ static int show_stmt_assign(ivl_statement_t net)
|
||||||
lval = ivl_stmt_lval(net, 0);
|
lval = ivl_stmt_lval(net, 0);
|
||||||
|
|
||||||
sig = ivl_lval_sig(lval);
|
sig = ivl_lval_sig(lval);
|
||||||
if (sig) switch (ivl_signal_data_type(sig)) {
|
if (sig && (ivl_signal_data_type(sig) == IVL_VT_REAL)) {
|
||||||
|
|
||||||
case IVL_VT_REAL:
|
|
||||||
return show_stmt_assign_sig_real(net);
|
return show_stmt_assign_sig_real(net);
|
||||||
|
|
||||||
default:
|
|
||||||
return show_stmt_assign_vector(net);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return show_stmt_assign_vector(net);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return show_stmt_assign_vector(net);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1998-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -514,14 +514,13 @@ string verinum::as_string() const
|
||||||
|
|
||||||
if (char_val == '"' || char_val == '\\') {
|
if (char_val == '"' || char_val == '\\') {
|
||||||
char tmp[5];
|
char tmp[5];
|
||||||
snprintf(tmp, sizeof tmp, "\\\%03o", char_val);
|
snprintf(tmp, sizeof tmp, "\\%03o", char_val);
|
||||||
res = res + tmp;
|
res = res + tmp;
|
||||||
} else if (char_val == ' ' || isgraph(char_val)) {
|
} else if (char_val == ' ' || isgraph(char_val)) {
|
||||||
res = res + char_val;
|
res = res + char_val;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
char tmp[5];
|
char tmp[5];
|
||||||
snprintf(tmp, sizeof tmp, "\\\%03o", char_val);
|
snprintf(tmp, sizeof tmp, "\\%03o", char_val);
|
||||||
res = res + tmp;
|
res = res + tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2008-2009 Cary R. (cygcary@yahoo.com)
|
* Copyright (C) 2008-2010 Cary R. (cygcary@yahoo.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <vpi_user.h>
|
#include "vpi_user.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This routine returns 1 if the argument supports has a numeric value,
|
* This routine returns 1 if the argument supports has a numeric value,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2009 Michael Ruff (mruff at chiaro.com)
|
* Copyright (c) 2003-2010 Michael Ruff (mruff at chiaro.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -17,8 +17,6 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_config.h"
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com)
|
||||||
* Copyright (c) 2000 Stephan Boettcher <stephan@nevis.columbia.edu>
|
* Copyright (c) 2000 Stephan Boettcher <stephan@nevis.columbia.edu>
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_config.h"
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -17,9 +17,6 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_config.h"
|
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2008 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -17,8 +17,6 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpi_config.h"
|
|
||||||
#include "vpi_user.h"
|
|
||||||
#include "sys_priv.h"
|
#include "sys_priv.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2008-2009 Cary R. (cygcary@yahoo.com)
|
* Copyright (C) 2008-2010 Cary R. (cygcary@yahoo.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,9 +16,8 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <vpi_user.h>
|
|
||||||
#include "sys_priv.h"
|
#include "sys_priv.h"
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
static PLI_INT32 finish_and_return_calltf(PLI_BYTE8* name)
|
static PLI_INT32 finish_and_return_calltf(PLI_BYTE8* name)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -17,17 +17,15 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* The vpi_config.h include must be before the lxt_write.h include! */
|
/* The sys_priv.h include must be before the lxt_write.h include! */
|
||||||
# include "vpi_config.h"
|
|
||||||
# include "lxt_write.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
|
# include "lxt_write.h"
|
||||||
# include "vcd_priv.h"
|
# include "vcd_priv.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file contains the implementations of the LXT related functions.
|
* This file contains the implementations of the LXT related functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -17,17 +17,15 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* The vpi_config.h include must be before the lxt2_write.h include! */
|
/* The sys_priv.h include must be before the lxt2_write.h include! */
|
||||||
# include "vpi_config.h"
|
|
||||||
# include "lxt2_write.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
|
# include "lxt2_write.h"
|
||||||
# include "vcd_priv.h"
|
# include "vcd_priv.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file contains the implementations of the LXT2 related functions.
|
* This file contains the implementations of the LXT2 related functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002-2008 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2002-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include <vpi_user.h>
|
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "sys_priv.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sys_priv.h"
|
|
||||||
|
|
||||||
PLI_UINT64 timerec_to_time64(const struct t_vpi_time*time)
|
PLI_UINT64 timerec_to_time64(const struct t_vpi_time*time)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2000-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include "sys_random.h"
|
# include "sys_random.h"
|
||||||
|
|
||||||
# include <vpi_user.h>
|
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2000-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include "sys_random.h"
|
# include "sys_random.h"
|
||||||
|
|
||||||
# include <vpi_user.h>
|
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,6 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_config.h"
|
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
# define _ISOC99_SOURCE 1
|
# define _ISOC99_SOURCE 1
|
||||||
# define _SVID_SOURCE 1
|
# define _SVID_SOURCE 1
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2007-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -17,11 +17,8 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_config.h"
|
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include "sdf_priv.h"
|
|
||||||
# include "sys_priv.h"
|
# include "sys_priv.h"
|
||||||
|
# include "sdf_priv.h"
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2000-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -17,13 +17,10 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpi_config.h"
|
#include "sys_priv.h"
|
||||||
|
|
||||||
#include "vpi_user.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys_priv.h>
|
|
||||||
|
|
||||||
static PLI_INT32 sys_time_calltf(PLI_BYTE8*name)
|
static PLI_INT32 sys_time_calltf(PLI_BYTE8*name)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
* This file contains the implementations of the VCD related functions.
|
* This file contains the implementations of the VCD related functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
* This file contains do nothing stubs of all the VCD routines.
|
* This file contains do nothing stubs of all the VCD routines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# include "vpi_user.h"
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
* Verilog-2005 math library for Icarus Verilog
|
* Verilog-2005 math library for Icarus Verilog
|
||||||
* http://www.icarus.com/eda/verilog/
|
* http://www.icarus.com/eda/verilog/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Cary R. (cygcary@yahoo.com)
|
* Copyright (C) 2007-2010 Cary R. (cygcary@yahoo.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <vpi_user.h>
|
#include "vpi_user.h"
|
||||||
|
|
||||||
/* Single argument functions. */
|
/* Single argument functions. */
|
||||||
typedef struct s_single_data {
|
typedef struct s_single_data {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
* Verilog-A math library for Icarus Verilog
|
* Verilog-A math library for Icarus Verilog
|
||||||
* http://www.icarus.com/eda/verilog/
|
* http://www.icarus.com/eda/verilog/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Cary R. (cygcary@yahoo.com)
|
* Copyright (C) 2007-2010 Cary R. (cygcary@yahoo.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <vpi_user.h>
|
#include "vpi_user.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compile time options: (set in the Makefile.)
|
* Compile time options: (set in the Makefile.)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2008-2009 Cary R. (cygcary@yahoo.com)
|
* Copyright (C) 2008-2010 Cary R. (cygcary@yahoo.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,13 +16,12 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "sys_priv.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <vpi_user.h>
|
|
||||||
#include "sys_priv.h"
|
|
||||||
#include "version_base.h"
|
#include "version_base.h"
|
||||||
|
|
||||||
/* Once we have real string objects replace this with a dynamic string. */
|
/* Once we have real string objects replace this with a dynamic string. */
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpi_config.h"
|
#include "sys_priv.h"
|
||||||
#include "vcd_priv.h"
|
#include "vcd_priv.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "stringheap.h"
|
#include "stringheap.h"
|
||||||
#include <sys_priv.h>
|
|
||||||
|
|
||||||
int is_escaped_id(const char *name)
|
int is_escaped_id(const char *name)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2009 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2001-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -64,7 +64,7 @@ enum operand_e {
|
||||||
/* The operand is a second functor pointer */
|
/* The operand is a second functor pointer */
|
||||||
OA_FUNC_PTR2,
|
OA_FUNC_PTR2,
|
||||||
/* The operand is a VPI handle */
|
/* The operand is a VPI handle */
|
||||||
OA_VPI_PTR,
|
OA_VPI_PTR
|
||||||
};
|
};
|
||||||
|
|
||||||
struct opcode_table_s {
|
struct opcode_table_s {
|
||||||
|
|
|
||||||
|
|
@ -369,7 +369,7 @@ bool schedule_stopped(void)
|
||||||
* These are the signal handling infrastructure. The SIGINT signal
|
* These are the signal handling infrastructure. The SIGINT signal
|
||||||
* leads to an implicit $stop.
|
* leads to an implicit $stop.
|
||||||
*/
|
*/
|
||||||
static void signals_handler(int)
|
extern "C" void signals_handler(int)
|
||||||
{
|
{
|
||||||
schedule_stopped_flag = true;
|
schedule_stopped_flag = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,12 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// The SunPro C++ compiler is broken and does not define size_t in cstddef.
|
||||||
|
#ifdef __SUNPRO_CC
|
||||||
|
# include <stddef.h>
|
||||||
|
#else
|
||||||
# include <cstddef>
|
# include <cstddef>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern unsigned long count_opcodes;
|
extern unsigned long count_opcodes;
|
||||||
extern unsigned long count_functors;
|
extern unsigned long count_functors;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2001-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -70,18 +70,19 @@ char*symbol_table_s::key_strdup_(const char*str)
|
||||||
const unsigned leaf_width = 254;
|
const unsigned leaf_width = 254;
|
||||||
const unsigned node_width = 508;
|
const unsigned node_width = 508;
|
||||||
|
|
||||||
|
struct tree_data_ {
|
||||||
|
char*key;
|
||||||
|
symbol_value_t val;
|
||||||
|
};
|
||||||
|
|
||||||
struct tree_node_ {
|
struct tree_node_ {
|
||||||
bool leaf_flag;
|
bool leaf_flag;
|
||||||
unsigned count;
|
unsigned count;
|
||||||
struct tree_node_*parent;
|
struct tree_node_*parent;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct tree_data_ leaf[leaf_width];
|
||||||
char*key;
|
struct tree_node_ *child[node_width];
|
||||||
symbol_value_t val;
|
|
||||||
} leaf[leaf_width];
|
|
||||||
|
|
||||||
struct tree_node_*child[node_width];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1105,14 +1105,19 @@ static char* PV_get_str(int code, vpiHandle ref)
|
||||||
case vpiName:
|
case vpiName:
|
||||||
case vpiFullName: {
|
case vpiFullName: {
|
||||||
const char*nm = vpi_get_str(code, rfp->parent);
|
const char*nm = vpi_get_str(code, rfp->parent);
|
||||||
char full[1024+strlen(nm)];
|
size_t len = 256+strlen(nm);
|
||||||
sprintf(full, "%s[%d:%d]", nm, (int)vpi_get(vpiLeftRange, ref),
|
char *full = (char *) malloc(len);
|
||||||
(int)vpi_get(vpiRightRange, ref));
|
snprintf(full, len, "%s[%d:%d]", nm,
|
||||||
return simple_set_rbuf_str(full);
|
(int)vpi_get(vpiLeftRange, ref),
|
||||||
|
(int)vpi_get(vpiRightRange, ref));
|
||||||
|
full[len-1] = 0;
|
||||||
|
char *res = simple_set_rbuf_str(full);
|
||||||
|
free(full);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "PV_get_str: property %d is unknown\n", code);
|
fprintf(stderr, "PV_get_str: property %d is unknown.\n", code);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue