Add -Wextra for C++ compiling in the vpi and vvp directory.
This patch adds -Wextra to the compilation flags for C++ files in the vvp and vpi subdirectories. It also fixes all the problems found while adding -Wextra. This mostly entailed removing some of the unused arguments, removing the name for others and using the correct number of initializers.
This commit is contained in:
parent
be44214598
commit
b0269fa926
|
|
@ -67,9 +67,11 @@ if test ${using_sunpro_c} = 1
|
|||
then
|
||||
AC_SUBST(DEPENDENCY_FLAG, [-xMMD])
|
||||
AC_SUBST(WARNING_FLAGS, [""])
|
||||
AC_SUBST(WARNING_FLAGS_CXX, [""])
|
||||
else
|
||||
AC_SUBST(DEPENDENCY_FLAG, [-MD])
|
||||
AC_SUBST(WARNING_FLAGS, ["-Wall -Wshadow"])
|
||||
AC_SUBST(WARNING_FLAGS_CXX, ["-Wextra"])
|
||||
fi
|
||||
|
||||
AC_LANG(C++)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ endif
|
|||
|
||||
CPPFLAGS = $(INCLUDE_PATH) @file64_support@ @CPPFLAGS@ @DEFS@ @PICFLAG@
|
||||
CFLAGS = @WARNING_FLAGS@ @CFLAGS@
|
||||
CXXFLAGS = @WARNING_FLAGS@ @CXXFLAGS@
|
||||
CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
# Object files for system.vpi
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ endif
|
|||
|
||||
CPPFLAGS = $(INCLUDE_PATH) @CPPFLAGS@ @DEFS@
|
||||
CFLAGS = @WARNING_FLAGS@ @CFLAGS@
|
||||
CXXFLAGS = @WARNING_FLAGS@ @CXXFLAGS@
|
||||
CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@
|
||||
LDFLAGS = @rdynamic@ @LDFLAGS@
|
||||
LIBS = @LIBS@ @EXTRALIBS@
|
||||
|
||||
|
|
|
|||
46
vvp/array.cc
46
vvp/array.cc
|
|
@ -257,16 +257,17 @@ static int array_index_free_object(vpiHandle ref);
|
|||
|
||||
static int vpi_array_var_word_get(int code, vpiHandle);
|
||||
static char*vpi_array_var_word_get_str(int code, vpiHandle);
|
||||
static void vpi_array_var_word_get_value(vpiHandle, p_vpi_value);
|
||||
static vpiHandle vpi_array_var_word_put_value(vpiHandle, p_vpi_value, int);
|
||||
static void vpi_array_var_word_get_value(vpiHandle ref, p_vpi_value vp);
|
||||
static vpiHandle vpi_array_var_word_put_value(vpiHandle ref, p_vpi_value vp,
|
||||
int);
|
||||
static vpiHandle vpi_array_var_word_get_handle(int code, vpiHandle ref);
|
||||
|
||||
static void vpi_array_var_index_get_value(vpiHandle, p_vpi_value);
|
||||
static void vpi_array_var_index_get_value(vpiHandle ref, p_vpi_value vp);
|
||||
|
||||
static int vpi_array_vthr_A_get(int code, vpiHandle);
|
||||
static char*vpi_array_vthr_A_get_str(int code, vpiHandle);
|
||||
static void vpi_array_vthr_A_get_value(vpiHandle, p_vpi_value);
|
||||
static vpiHandle vpi_array_vthr_A_put_value(vpiHandle, p_vpi_value, int);
|
||||
static void vpi_array_vthr_A_get_value(vpiHandle ref, p_vpi_value vp);
|
||||
static vpiHandle vpi_array_vthr_A_put_value(vpiHandle ref, p_vpi_value vp, int);
|
||||
static vpiHandle vpi_array_vthr_A_get_handle(int code, vpiHandle ref);
|
||||
|
||||
static const struct __vpirt vpip_arraymem_rt = {
|
||||
|
|
@ -278,6 +279,9 @@ static const struct __vpirt vpip_arraymem_rt = {
|
|||
vpi_array_get_handle,
|
||||
vpi_array_iterate,
|
||||
vpi_array_index,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_array_iterator_rt = {
|
||||
|
|
@ -289,7 +293,9 @@ static const struct __vpirt vpip_array_iterator_rt = {
|
|||
0,
|
||||
0,
|
||||
array_iterator_scan,
|
||||
&array_iterator_free_object
|
||||
&array_iterator_free_object,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
/* This should look a bit odd since it provides a fake iteration on
|
||||
|
|
@ -304,7 +310,9 @@ static const struct __vpirt vpip_array_index_rt = {
|
|||
0,
|
||||
array_index_iterate,
|
||||
array_index_scan,
|
||||
array_index_free_object
|
||||
array_index_free_object,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_array_var_word_rt = {
|
||||
|
|
@ -316,6 +324,8 @@ static const struct __vpirt vpip_array_var_word_rt = {
|
|||
&vpi_array_var_word_get_handle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -328,6 +338,8 @@ static const struct __vpirt vpip_array_var_index_rt = {
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -340,6 +352,8 @@ static const struct __vpirt vpip_array_vthr_A_rt = {
|
|||
&vpi_array_vthr_A_get_handle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -558,7 +572,7 @@ static char*vpi_array_var_word_get_str(int code, vpiHandle ref)
|
|||
return generic_get_str(code, &parent->scope->base, parent->name, sidx);
|
||||
}
|
||||
|
||||
static void vpi_array_var_word_get_value(vpiHandle ref, p_vpi_value value)
|
||||
static void vpi_array_var_word_get_value(vpiHandle ref, p_vpi_value vp)
|
||||
{
|
||||
struct __vpiArrayWord*obj = array_var_word_from_handle(ref);
|
||||
struct __vpiArray*parent;
|
||||
|
|
@ -568,10 +582,10 @@ static void vpi_array_var_word_get_value(vpiHandle ref, p_vpi_value value)
|
|||
unsigned width = parent->vals4->width();
|
||||
|
||||
vpip_vec4_get_value(parent->vals4->get_word(index), width,
|
||||
parent->signed_flag, value);
|
||||
parent->signed_flag, vp);
|
||||
}
|
||||
|
||||
static vpiHandle vpi_array_var_word_put_value(vpiHandle ref, p_vpi_value vp, int flags)
|
||||
static vpiHandle vpi_array_var_word_put_value(vpiHandle ref, p_vpi_value vp, int)
|
||||
{
|
||||
struct __vpiArrayWord*obj = array_var_word_from_handle(ref);
|
||||
struct __vpiArray*parent;
|
||||
|
|
@ -616,7 +630,7 @@ static vpiHandle vpi_array_var_word_get_handle(int code, vpiHandle ref)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void vpi_array_var_index_get_value(vpiHandle ref, p_vpi_value value)
|
||||
static void vpi_array_var_index_get_value(vpiHandle ref, p_vpi_value vp)
|
||||
{
|
||||
struct __vpiArrayWord*obj = array_var_index_from_handle(ref);
|
||||
struct __vpiArray*parent;
|
||||
|
|
@ -624,8 +638,8 @@ static void vpi_array_var_index_get_value(vpiHandle ref, p_vpi_value value)
|
|||
assert(obj);
|
||||
unsigned index = decode_array_word_pointer(obj, parent);
|
||||
|
||||
assert(value->format == vpiIntVal);
|
||||
value->value.integer = index;
|
||||
assert(vp->format == vpiIntVal);
|
||||
vp->value.integer = index;
|
||||
}
|
||||
|
||||
# define ARRAY_ITERATOR(ref) (assert(ref->vpi_type->type_code==vpiIterator), \
|
||||
|
|
@ -776,7 +790,7 @@ static unsigned vpi_array_is_real(vvp_array_t arr)
|
|||
return 0U;
|
||||
}
|
||||
|
||||
static void vpi_array_vthr_A_get_value(vpiHandle ref, p_vpi_value value)
|
||||
static void vpi_array_vthr_A_get_value(vpiHandle ref, p_vpi_value vp)
|
||||
{
|
||||
struct __vpiArrayVthrA*obj = array_vthr_a_from_handle(ref);
|
||||
assert(obj);
|
||||
|
|
@ -787,11 +801,11 @@ static void vpi_array_vthr_A_get_value(vpiHandle ref, p_vpi_value value)
|
|||
unsigned index = obj->get_address();
|
||||
if (vpi_array_is_real(parent)) {
|
||||
double tmp = array_get_word_r(parent, index);
|
||||
vpip_real_get_value(tmp, value);
|
||||
vpip_real_get_value(tmp, vp);
|
||||
} else {
|
||||
vvp_vector4_t tmp = array_get_word(parent, index);
|
||||
unsigned width = get_array_word_size(parent);
|
||||
vpip_vec4_get_value(tmp, width, parent->signed_flag, value);
|
||||
vpip_vec4_get_value(tmp, width, parent->signed_flag, vp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __array_H // -*- c++ -*-
|
||||
#ifndef __array_H
|
||||
#define __array_H
|
||||
/*
|
||||
* Copyright (c) 2007-2008 Stephen Williams (steve@icarus.com)
|
||||
|
|
|
|||
|
|
@ -1369,7 +1369,7 @@ static struct __vpiModPathSrc*make_modpath_src(struct __vpiModPath*path,
|
|||
}
|
||||
|
||||
vvp_net_t*net = new vvp_net_t;
|
||||
struct __vpiModPathSrc* srcobj = vpip_make_modpath_src (path, use_delay, net) ;
|
||||
struct __vpiModPathSrc* srcobj = vpip_make_modpath_src(path, net) ;
|
||||
vpip_attach_to_current_scope(vpi_handle(srcobj));
|
||||
net->fun = obj;
|
||||
|
||||
|
|
@ -1495,7 +1495,7 @@ char **compile_udp_table(char **table, char *row)
|
|||
assert(strlen(*table)==strlen(row));
|
||||
|
||||
char **tt;
|
||||
for (tt = table; tt && *tt; tt++);
|
||||
for (tt = table; tt && *tt; tt++) { }
|
||||
int n = (tt-table) + 2;
|
||||
|
||||
table = (char**)realloc(table, n*sizeof(char*));
|
||||
|
|
|
|||
29
vvp/delay.cc
29
vvp/delay.cc
|
|
@ -730,27 +730,27 @@ bool vvp_fun_modpath_edge::test_vec4(const vvp_vector4_t&bit)
|
|||
* make some specific delays path operations
|
||||
*
|
||||
*/
|
||||
static int modpath_src_get(int code, vpiHandle ref)
|
||||
static int modpath_src_get(int, vpiHandle ref)
|
||||
{
|
||||
struct __vpiModPathSrc*obj = vpip_modpath_src_from_handle(ref);
|
||||
assert(obj);
|
||||
return 0 ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void modpath_src_get_value(vpiHandle ref, p_vpi_value vp)
|
||||
static void modpath_src_get_value(vpiHandle ref, p_vpi_value)
|
||||
{
|
||||
assert((ref->vpi_type->type_code == vpiModPathIn));
|
||||
struct __vpiModPathSrc* modpathsrc = vpip_modpath_src_from_handle( ref) ;
|
||||
assert ( modpathsrc ) ;
|
||||
return ;
|
||||
struct __vpiModPathSrc* modpathsrc = vpip_modpath_src_from_handle(ref);
|
||||
assert(modpathsrc);
|
||||
return;
|
||||
}
|
||||
|
||||
static vpiHandle modpath_src_put_value(vpiHandle ref, s_vpi_value *vp, int )
|
||||
static vpiHandle modpath_src_put_value(vpiHandle ref, s_vpi_value *, int )
|
||||
{
|
||||
assert((ref->vpi_type->type_code == vpiModPathIn));
|
||||
struct __vpiModPathSrc* modpathsrc = vpip_modpath_src_from_handle( ref) ;
|
||||
assert ( modpathsrc ) ;
|
||||
return 0 ;
|
||||
struct __vpiModPathSrc* modpathsrc = vpip_modpath_src_from_handle(ref);
|
||||
assert(modpathsrc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static vpiHandle modpath_src_get_handle(int code, vpiHandle ref)
|
||||
|
|
@ -780,10 +780,10 @@ static vpiHandle modpath_src_get_handle(int code, vpiHandle ref)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static vpiHandle modpath_src_index ( vpiHandle ref, int code )
|
||||
static vpiHandle modpath_src_index ( vpiHandle ref, int)
|
||||
{
|
||||
assert( (ref->vpi_type->type_code == vpiModPathIn ) );
|
||||
return 0 ;
|
||||
assert(ref->vpi_type->type_code == vpiModPathIn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1021,7 +1021,8 @@ void modpath_delete()
|
|||
*
|
||||
*/
|
||||
|
||||
struct __vpiModPathSrc* vpip_make_modpath_src (struct __vpiModPath*path, vvp_time64_t use_delay[12] , vvp_net_t *net )
|
||||
struct __vpiModPathSrc* vpip_make_modpath_src(struct __vpiModPath*path,
|
||||
vvp_net_t *net)
|
||||
{
|
||||
struct __vpiModPathSrc *obj = (struct __vpiModPathSrc *) calloc (1, sizeof ( struct __vpiModPathSrc ) ) ;
|
||||
|
||||
|
|
|
|||
22
vvp/event.cc
22
vvp/event.cc
|
|
@ -226,7 +226,7 @@ vvp_fun_edge::~vvp_fun_edge()
|
|||
{
|
||||
}
|
||||
|
||||
bool vvp_fun_edge::recv_vec4_(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
bool vvp_fun_edge::recv_vec4_(const vvp_vector4_t&bit,
|
||||
vvp_bit4_t&old_bit, vthread_t&threads)
|
||||
{
|
||||
/* See what kind of edge this represents. */
|
||||
|
|
@ -262,7 +262,7 @@ vthread_t vvp_fun_edge_sa::add_waiting_thread(vthread_t thread)
|
|||
void vvp_fun_edge_sa::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
vvp_context_t)
|
||||
{
|
||||
if (recv_vec4_(port, bit, bits_[port.port()], threads_)) {
|
||||
if (recv_vec4_(bit, bits_[port.port()], threads_)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4(bit, 0);
|
||||
}
|
||||
|
|
@ -273,7 +273,7 @@ void vvp_fun_edge_sa::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
vvp_context_t)
|
||||
{
|
||||
assert(base == 0);
|
||||
if (recv_vec4_(port, bit, bits_[port.port()], threads_)) {
|
||||
if (recv_vec4_(bit, bits_[port.port()], threads_)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4_pv(bit, base, wid, vwid, 0);
|
||||
}
|
||||
|
|
@ -333,7 +333,7 @@ void vvp_fun_edge_aa::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
vvp_fun_edge_state_s*state = static_cast<vvp_fun_edge_state_s*>
|
||||
(vvp_get_context_item(context, context_idx_));
|
||||
|
||||
if (recv_vec4_(port, bit, state->bits[port.port()], state->threads)) {
|
||||
if (recv_vec4_(bit, state->bits[port.port()], state->threads)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4(bit, context);
|
||||
}
|
||||
|
|
@ -368,7 +368,7 @@ vvp_fun_anyedge::~vvp_fun_anyedge()
|
|||
{
|
||||
}
|
||||
|
||||
bool vvp_fun_anyedge::recv_vec4_(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
bool vvp_fun_anyedge::recv_vec4_(const vvp_vector4_t&bit,
|
||||
vvp_vector4_t&old_bits, vthread_t&threads)
|
||||
{
|
||||
bool flag = false;
|
||||
|
|
@ -406,7 +406,7 @@ bool vvp_fun_anyedge::recv_vec4_(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
return flag;
|
||||
}
|
||||
|
||||
bool vvp_fun_anyedge::recv_real_(vvp_net_ptr_t port, double bit,
|
||||
bool vvp_fun_anyedge::recv_real_(double bit,
|
||||
double&old_bits, vthread_t&threads)
|
||||
{
|
||||
if (old_bits != bit) {
|
||||
|
|
@ -437,7 +437,7 @@ vthread_t vvp_fun_anyedge_sa::add_waiting_thread(vthread_t thread)
|
|||
void vvp_fun_anyedge_sa::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
vvp_context_t)
|
||||
{
|
||||
if (recv_vec4_(port, bit, bits_[port.port()], threads_)) {
|
||||
if (recv_vec4_(bit, bits_[port.port()], threads_)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4(bit, 0);
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ void vvp_fun_anyedge_sa::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bi
|
|||
assert(tmp.size() == vwid);
|
||||
tmp.set_vec(base, bit);
|
||||
|
||||
if (recv_vec4_(port, tmp, bits_[port.port()], threads_)) {
|
||||
if (recv_vec4_(tmp, bits_[port.port()], threads_)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4(bit, 0);
|
||||
}
|
||||
|
|
@ -464,7 +464,7 @@ void vvp_fun_anyedge_sa::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bi
|
|||
void vvp_fun_anyedge_sa::recv_real(vvp_net_ptr_t port, double bit,
|
||||
vvp_context_t)
|
||||
{
|
||||
if (recv_real_(port, bit, bitsr_[port.port()], threads_)) {
|
||||
if (recv_real_(bit, bitsr_[port.port()], threads_)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4(vvp_vector4_t(), 0);
|
||||
}
|
||||
|
|
@ -525,7 +525,7 @@ void vvp_fun_anyedge_aa::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
vvp_fun_anyedge_state_s*state = static_cast<vvp_fun_anyedge_state_s*>
|
||||
(vvp_get_context_item(context, context_idx_));
|
||||
|
||||
if (recv_vec4_(port, bit, state->bits[port.port()], state->threads)) {
|
||||
if (recv_vec4_(bit, state->bits[port.port()], state->threads)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4(bit, context);
|
||||
}
|
||||
|
|
@ -546,7 +546,7 @@ void vvp_fun_anyedge_aa::recv_real(vvp_net_ptr_t port, double bit,
|
|||
vvp_fun_anyedge_state_s*state = static_cast<vvp_fun_anyedge_state_s*>
|
||||
(vvp_get_context_item(context, context_idx_));
|
||||
|
||||
if (recv_real_(port, bit, state->bitsr[port.port()], state->threads)) {
|
||||
if (recv_real_(bit, state->bitsr[port.port()], state->threads)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4(vvp_vector4_t(), context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ class vvp_fun_edge : public vvp_net_fun_t, public waitable_hooks_s {
|
|||
virtual ~vvp_fun_edge();
|
||||
|
||||
protected:
|
||||
bool recv_vec4_(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
bool recv_vec4_(const vvp_vector4_t&bit,
|
||||
vvp_bit4_t&old_bit, vthread_t&threads);
|
||||
|
||||
vvp_bit4_t bits_[4];
|
||||
|
|
@ -233,9 +233,9 @@ class vvp_fun_anyedge : public vvp_net_fun_t, public waitable_hooks_s {
|
|||
virtual ~vvp_fun_anyedge();
|
||||
|
||||
protected:
|
||||
bool recv_vec4_(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
bool recv_vec4_(const vvp_vector4_t&bit,
|
||||
vvp_vector4_t&old_bits, vthread_t&threads);
|
||||
bool recv_real_(vvp_net_ptr_t port, double bit,
|
||||
bool recv_real_(double bit,
|
||||
double&old_bits, vthread_t&threads);
|
||||
|
||||
vvp_vector4_t bits_[4];
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ inline void* event_time_s::operator new (size_t size)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
inline void event_time_s::operator delete(void*ptr, size_t size)
|
||||
inline void event_time_s::operator delete(void*ptr, size_t)
|
||||
{
|
||||
event_time_heap.free_slab(ptr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ sfunc_core::~sfunc_core()
|
|||
* This method is only called when a trigger event occurs. Just arrange for
|
||||
* the function to be called.
|
||||
*/
|
||||
void sfunc_core::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
void sfunc_core::recv_vec4(vvp_net_ptr_t, const vvp_vector4_t&/*bit*/,
|
||||
vvp_context_t)
|
||||
{
|
||||
schedule_functor(this);
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ static struct {
|
|||
{ 0, &cmd_unknown, 0}
|
||||
};
|
||||
|
||||
static void cmd_help(unsigned argc, char*argv[])
|
||||
static void cmd_help(unsigned, char*[])
|
||||
{
|
||||
printf("Commands can be from the following table of base commands,\n"
|
||||
"or can be invocations of system tasks/functions.\n\n");
|
||||
|
|
|
|||
|
|
@ -299,6 +299,7 @@ vvp_udp_seq_s::vvp_udp_seq_s(char*label, char*name,
|
|||
unsigned ports, vvp_bit4_t init)
|
||||
: vvp_udp_s(label, ports, init, true)
|
||||
{
|
||||
name_ = name;
|
||||
levels0_ = 0;
|
||||
levels1_ = 0;
|
||||
levelsx_ = 0;
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ class vvp_udp_seq_s : public vvp_udp_s {
|
|||
vvp_bit4_t cur_out);
|
||||
|
||||
private:
|
||||
char*name_;
|
||||
|
||||
vvp_bit4_t test_levels_(const udp_levels_table&cur);
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ void ufunc_core::assign_bits_to_ports(vvp_context_t context)
|
|||
* result from the return code variable and deliver it to the output
|
||||
* of the functor, back into the netlist.
|
||||
*/
|
||||
void ufunc_core::finish_thread(vthread_t thr)
|
||||
void ufunc_core::finish_thread()
|
||||
{
|
||||
thread_ = 0;
|
||||
if (vvp_fun_signal_real*sig = dynamic_cast<vvp_fun_signal_real*>(result_->fun))
|
||||
|
|
@ -118,7 +118,7 @@ void ufunc_core::finish_thread(vthread_t thr)
|
|||
* This method is only called when a trigger event occurs. Just arrange for
|
||||
* the function to be called.
|
||||
*/
|
||||
void ufunc_core::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
void ufunc_core::recv_vec4(vvp_net_ptr_t, const vvp_vector4_t&,
|
||||
vvp_context_t)
|
||||
{
|
||||
invoke_thread_();
|
||||
|
|
@ -129,12 +129,12 @@ void ufunc_core::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
* input value to the port of the functor. I save the input value and
|
||||
* arrange for the function to be called.
|
||||
*/
|
||||
void ufunc_core::recv_vec4_from_inputs(unsigned port)
|
||||
void ufunc_core::recv_vec4_from_inputs(unsigned)
|
||||
{
|
||||
invoke_thread_();
|
||||
}
|
||||
|
||||
void ufunc_core::recv_real_from_inputs(unsigned port)
|
||||
void ufunc_core::recv_real_from_inputs(unsigned)
|
||||
{
|
||||
invoke_thread_();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class ufunc_core : public vvp_wide_fun_core {
|
|||
struct __vpiScope*func_scope() { return func_scope_; }
|
||||
|
||||
void assign_bits_to_ports(vvp_context_t context);
|
||||
void finish_thread(vthread_t thr);
|
||||
void finish_thread();
|
||||
|
||||
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
vvp_context_t context);
|
||||
|
|
|
|||
|
|
@ -42,24 +42,23 @@
|
|||
* deletes the *handle*, and not the object itself, so given the vvp
|
||||
* implementation, there is nothing to do here.
|
||||
*/
|
||||
static int free_simple_callback(vpiHandle ref)
|
||||
static int free_simple_callback(vpiHandle)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
const struct __vpirt callback_rt = {
|
||||
vpiCallback,
|
||||
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
&free_simple_callback
|
||||
&free_simple_callback,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -181,6 +181,10 @@ static const struct __vpirt vpip_string_rt = {
|
|||
string_value,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -200,12 +204,12 @@ static const struct __vpirt vpip_string_temp_rt = {
|
|||
0,
|
||||
string_value,
|
||||
0,
|
||||
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
free_temp_string
|
||||
free_temp_string,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -313,11 +317,11 @@ static const struct __vpirt vpip_string_param_rt = {
|
|||
string_param_get_str,
|
||||
string_value,
|
||||
0,
|
||||
|
||||
string_param_handle,
|
||||
0,
|
||||
0,
|
||||
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -417,6 +421,10 @@ static const struct __vpirt vpip_binary_rt = {
|
|||
binary_value,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -522,11 +530,11 @@ static const struct __vpirt vpip_binary_param_rt = {
|
|||
binary_param_get_str,
|
||||
binary_value,
|
||||
0,
|
||||
|
||||
binary_param_handle,
|
||||
0,
|
||||
0,
|
||||
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -549,7 +557,7 @@ vpiHandle vpip_make_binary_param(char*name, const vvp_vector4_t&bits,
|
|||
}
|
||||
|
||||
|
||||
static int dec_get(int code, vpiHandle ref)
|
||||
static int dec_get(int code, vpiHandle)
|
||||
{
|
||||
|
||||
switch (code) {
|
||||
|
|
@ -636,6 +644,10 @@ static const struct __vpirt vpip_dec_rt = {
|
|||
dec_value,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -657,7 +669,7 @@ vpiHandle vpip_make_dec_const(int value)
|
|||
}
|
||||
|
||||
|
||||
static int real_get(int code, vpiHandle ref)
|
||||
static int real_get(int code, vpiHandle)
|
||||
{
|
||||
|
||||
switch (code) {
|
||||
|
|
@ -705,6 +717,10 @@ static const struct __vpirt vpip_real_rt = {
|
|||
real_value,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -779,11 +795,11 @@ static const struct __vpirt vpip_real_param_rt = {
|
|||
real_param_get_str,
|
||||
real_value,
|
||||
0,
|
||||
|
||||
real_param_handle,
|
||||
0,
|
||||
0,
|
||||
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -76,11 +76,11 @@ static const struct __vpirt vpip_named_event_rt = {
|
|||
named_event_get_str,
|
||||
0,
|
||||
0,
|
||||
|
||||
named_event_get_handle,
|
||||
0,
|
||||
0,
|
||||
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,9 @@ static const struct __vpirt vpip_iterator_rt = {
|
|||
0, // handle_
|
||||
0, // iterate_
|
||||
0, // index_
|
||||
&iterator_free_object
|
||||
&iterator_free_object,
|
||||
0, // vpi_get_delay
|
||||
0 // vpi_put_delay
|
||||
};
|
||||
|
||||
vpiHandle vpip_make_iterator(unsigned nargs, vpiHandle*args,
|
||||
|
|
|
|||
|
|
@ -597,14 +597,15 @@ void vpip_vec4_get_value(const vvp_vector4_t&word_val, unsigned width,
|
|||
break;
|
||||
|
||||
case vpiOctStrVal: {
|
||||
unsigned hwid = (width+2) / 3;
|
||||
rbuf = need_result_buf(hwid+1, RBUF_VAL);
|
||||
vpip_vec4_to_oct_str(word_val, rbuf, hwid+1, signed_flag);
|
||||
unsigned hwid = ((width+2) / 3) + 1;
|
||||
rbuf = need_result_buf(hwid, RBUF_VAL);
|
||||
vpip_vec4_to_oct_str(word_val, rbuf, hwid);
|
||||
vp->value.str = rbuf;
|
||||
break;
|
||||
}
|
||||
|
||||
case vpiDecStrVal: {
|
||||
// HERE need a better estimate.
|
||||
rbuf = need_result_buf(width+1, RBUF_VAL);
|
||||
vpip_vec4_to_dec_str(word_val, rbuf, width+1, signed_flag);
|
||||
vp->value.str = rbuf;
|
||||
|
|
@ -612,12 +613,9 @@ void vpip_vec4_get_value(const vvp_vector4_t&word_val, unsigned width,
|
|||
}
|
||||
|
||||
case vpiHexStrVal: {
|
||||
unsigned hwid = (width + 3) / 4;
|
||||
|
||||
rbuf = need_result_buf(hwid+1, RBUF_VAL);
|
||||
rbuf[hwid] = 0;
|
||||
|
||||
vpip_vec4_to_hex_str(word_val, rbuf, hwid+1, signed_flag);
|
||||
unsigned hwid = ((width + 3) / 4) + 1;
|
||||
rbuf = need_result_buf(hwid, RBUF_VAL);
|
||||
vpip_vec4_to_hex_str(word_val, rbuf, hwid);
|
||||
vp->value.str = rbuf;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -336,9 +336,8 @@ extern struct __vpiModPathSrc* vpip_modpath_src_from_handle(vpiHandle ref);
|
|||
* for vpiModPath && vpiModPathIn objects
|
||||
*/
|
||||
|
||||
extern struct __vpiModPathSrc* vpip_make_modpath_src (struct __vpiModPath*path_dest,
|
||||
vvp_time64_t use_delay[12] ,
|
||||
vvp_net_t *net ) ;
|
||||
extern struct __vpiModPathSrc* vpip_make_modpath_src(struct __vpiModPath*path,
|
||||
vvp_net_t *net) ;
|
||||
|
||||
extern struct __vpiModPath* vpip_make_modpath(vvp_net_t *net) ;
|
||||
|
||||
|
|
@ -596,10 +595,10 @@ extern unsigned vpip_vec4_to_dec_str(const vvp_vector4_t&vec4,
|
|||
|
||||
|
||||
extern void vpip_vec4_to_hex_str(const vvp_vector4_t&bits, char*buf,
|
||||
unsigned nbuf, bool signed_flag);
|
||||
unsigned nbuf);
|
||||
|
||||
extern void vpip_vec4_to_oct_str(const vvp_vector4_t&bits, char*buf,
|
||||
unsigned nbuf, bool signed_flag);
|
||||
unsigned nbuf);
|
||||
|
||||
extern void vpip_bin_str_to_vec4(vvp_vector4_t&val, const char*buf);
|
||||
extern void vpip_oct_str_to_vec4(vvp_vector4_t&val, const char*str);
|
||||
|
|
|
|||
|
|
@ -163,7 +163,8 @@ static const struct __vpirt vpip_real_var_rt = {
|
|||
real_var_get_handle,
|
||||
real_var_iterate,
|
||||
0,
|
||||
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,11 @@ static const struct __vpirt vpip_scope_module_rt = {
|
|||
0,
|
||||
0,
|
||||
scope_get_handle,
|
||||
module_iter
|
||||
module_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_scope_task_rt = {
|
||||
|
|
@ -332,7 +336,11 @@ static const struct __vpirt vpip_scope_task_rt = {
|
|||
0,
|
||||
0,
|
||||
scope_get_handle,
|
||||
module_iter
|
||||
module_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_scope_function_rt = {
|
||||
|
|
@ -342,7 +350,11 @@ static const struct __vpirt vpip_scope_function_rt = {
|
|||
0,
|
||||
0,
|
||||
scope_get_handle,
|
||||
module_iter
|
||||
module_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_scope_begin_rt = {
|
||||
|
|
@ -352,7 +364,11 @@ static const struct __vpirt vpip_scope_begin_rt = {
|
|||
0,
|
||||
0,
|
||||
scope_get_handle,
|
||||
module_iter
|
||||
module_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_scope_fork_rt = {
|
||||
|
|
@ -362,7 +378,11 @@ static const struct __vpirt vpip_scope_fork_rt = {
|
|||
0,
|
||||
0,
|
||||
scope_get_handle,
|
||||
module_iter
|
||||
module_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -868,6 +868,9 @@ static const struct __vpirt vpip_reg_rt = {
|
|||
signal_put_value,
|
||||
signal_get_handle,
|
||||
signal_iterate,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -879,6 +882,9 @@ static const struct __vpirt vpip_net_rt = {
|
|||
signal_put_value,
|
||||
signal_get_handle,
|
||||
signal_iterate,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -1261,6 +1267,10 @@ static const struct __vpirt vpip_PV_rt = {
|
|||
PV_get_value,
|
||||
PV_put_value,
|
||||
PV_get_handle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ static const struct __vpirt vpip_systf_def_rt = {
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -141,7 +145,7 @@ static char *systask_get_str(int type, vpiHandle ref)
|
|||
* the iter function only supports getting an iterator of the
|
||||
* arguments. This works equally well for tasks and functions.
|
||||
*/
|
||||
static vpiHandle systask_iter(int type, vpiHandle ref)
|
||||
static vpiHandle systask_iter(int, vpiHandle ref)
|
||||
{
|
||||
struct __vpiSysTaskCall*rfp = (struct __vpiSysTaskCall*)ref;
|
||||
assert((ref->vpi_type->type_code == vpiSysTaskCall)
|
||||
|
|
@ -160,7 +164,11 @@ static const struct __vpirt vpip_systask_rt = {
|
|||
0,
|
||||
0,
|
||||
systask_handle,
|
||||
systask_iter
|
||||
systask_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -474,7 +482,11 @@ static const struct __vpirt vpip_sysfunc_rt = {
|
|||
0,
|
||||
sysfunc_put_value,
|
||||
systask_handle,
|
||||
systask_iter
|
||||
systask_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_sysfunc_real_rt = {
|
||||
|
|
@ -484,7 +496,11 @@ static const struct __vpirt vpip_sysfunc_real_rt = {
|
|||
0,
|
||||
sysfunc_put_real_value,
|
||||
systask_handle,
|
||||
systask_iter
|
||||
systask_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_sysfunc_4net_rt = {
|
||||
|
|
@ -494,7 +510,11 @@ static const struct __vpirt vpip_sysfunc_4net_rt = {
|
|||
0,
|
||||
sysfunc_put_4net_value,
|
||||
systask_handle,
|
||||
systask_iter
|
||||
systask_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_sysfunc_rnet_rt = {
|
||||
|
|
@ -504,7 +524,11 @@ static const struct __vpirt vpip_sysfunc_rnet_rt = {
|
|||
0,
|
||||
sysfunc_put_rnet_value,
|
||||
systask_handle,
|
||||
systask_iter
|
||||
systask_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_sysfunc_no_rt = {
|
||||
|
|
@ -514,7 +538,11 @@ static const struct __vpirt vpip_sysfunc_no_rt = {
|
|||
0,
|
||||
sysfunc_put_no_value,
|
||||
systask_handle,
|
||||
systask_iter
|
||||
systask_iter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
/* **** Manipulate the internal data structures. **** */
|
||||
|
|
@ -602,7 +630,9 @@ static const struct __vpirt vpip_systf_iterator_rt = {
|
|||
0,
|
||||
0,
|
||||
systf_iterator_scan,
|
||||
systf_iterator_free_object
|
||||
systf_iterator_free_object,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
vpiHandle vpip_make_systf_iterator(void)
|
||||
|
|
@ -714,17 +744,17 @@ void print_vpi_call_errors()
|
|||
free(vpi_call_error_lst);
|
||||
}
|
||||
|
||||
#ifdef CHECK_WITH_VALGRIND
|
||||
static void cleanup_vpi_call_args(unsigned argc, vpiHandle*argv)
|
||||
{
|
||||
#ifdef CHECK_WITH_VALGRIND
|
||||
if (argc) {
|
||||
struct __vpiSysTaskCall*obj = new struct __vpiSysTaskCall;
|
||||
obj->nargs = argc;
|
||||
obj->args = argv;
|
||||
vpi_call_delete(&obj->base);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A vpi_call is actually built up into a vpiSysTaskCall VPI object
|
||||
|
|
@ -749,7 +779,9 @@ vpiHandle vpip_build_vpi_call(const char*name, unsigned vbit, int vwid,
|
|||
struct __vpiUserSystf*defn = vpip_find_systf(name);
|
||||
if (defn == 0) {
|
||||
add_vpi_call_error(VPI_CALL_NO_DEF, name, file_idx, lineno);
|
||||
#ifdef CHECK_WITH_VALGRIND
|
||||
cleanup_vpi_call_args(argc, argv);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -758,7 +790,9 @@ vpiHandle vpip_build_vpi_call(const char*name, unsigned vbit, int vwid,
|
|||
if (vwid != 0 || fnet != 0) {
|
||||
add_vpi_call_error(VPI_CALL_TASK_AS_FUNC, name, file_idx,
|
||||
lineno);
|
||||
#ifdef CHECK_WITH_VALGRIND
|
||||
cleanup_vpi_call_args(argc, argv);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
assert(vbit == 0);
|
||||
|
|
@ -769,7 +803,9 @@ vpiHandle vpip_build_vpi_call(const char*name, unsigned vbit, int vwid,
|
|||
if (func_as_task_err) {
|
||||
add_vpi_call_error(VPI_CALL_FUNC_AS_TASK,
|
||||
name, file_idx, lineno);
|
||||
#ifdef CHECK_WITH_VALGRIND
|
||||
cleanup_vpi_call_args(argc, argv);
|
||||
#endif
|
||||
return 0;
|
||||
} else if (func_as_task_warn) {
|
||||
add_vpi_call_error(VPI_CALL_FUNC_AS_TASK_WARN,
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ vvp_time64_t vpip_scaled_real_to_time64(double val, struct __vpiScope*scope)
|
|||
return delay;
|
||||
}
|
||||
|
||||
static int timevar_time_get(int code, vpiHandle ref)
|
||||
static int timevar_time_get(int code, vpiHandle)
|
||||
{
|
||||
switch (code) {
|
||||
case vpiSize:
|
||||
|
|
@ -129,7 +129,7 @@ static int timevar_stime_get(int code, vpiHandle ref)
|
|||
}
|
||||
}
|
||||
|
||||
static char* timevar_time_get_str(int code, vpiHandle ref)
|
||||
static char* timevar_time_get_str(int code, vpiHandle)
|
||||
{
|
||||
switch (code) {
|
||||
case vpiName:
|
||||
|
|
@ -141,7 +141,7 @@ static char* timevar_time_get_str(int code, vpiHandle ref)
|
|||
}
|
||||
}
|
||||
|
||||
static char* timevar_stime_get_str(int code, vpiHandle ref)
|
||||
static char* timevar_stime_get_str(int code, vpiHandle)
|
||||
{
|
||||
switch (code) {
|
||||
case vpiName:
|
||||
|
|
@ -153,7 +153,7 @@ static char* timevar_stime_get_str(int code, vpiHandle ref)
|
|||
}
|
||||
}
|
||||
|
||||
static char* timevar_simtime_get_str(int code, vpiHandle ref)
|
||||
static char* timevar_simtime_get_str(int code, vpiHandle)
|
||||
{
|
||||
switch (code) {
|
||||
case vpiName:
|
||||
|
|
@ -165,7 +165,7 @@ static char* timevar_simtime_get_str(int code, vpiHandle ref)
|
|||
}
|
||||
}
|
||||
|
||||
static char* timevar_realtime_get_str(int code, vpiHandle ref)
|
||||
static char* timevar_realtime_get_str(int code, vpiHandle)
|
||||
{
|
||||
switch (code) {
|
||||
case vpiName:
|
||||
|
|
@ -177,7 +177,7 @@ static char* timevar_realtime_get_str(int code, vpiHandle ref)
|
|||
}
|
||||
}
|
||||
|
||||
static int timevar_realtime_get(int code, vpiHandle ref)
|
||||
static int timevar_realtime_get(int code, vpiHandle)
|
||||
{
|
||||
switch (code) {
|
||||
case vpiSize:
|
||||
|
|
@ -322,6 +322,10 @@ static const struct __vpirt vpip_system_time_rt = {
|
|||
timevar_get_ivalue,
|
||||
0,
|
||||
timevar_handle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -332,6 +336,10 @@ static const struct __vpirt vpip_system_stime_rt = {
|
|||
timevar_get_svalue,
|
||||
0,
|
||||
timevar_handle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -342,6 +350,10 @@ static const struct __vpirt vpip_system_simtime_rt = {
|
|||
timevar_get_ivalue,
|
||||
0,
|
||||
timevar_handle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -352,6 +364,10 @@ static const struct __vpirt vpip_system_realtime_rt = {
|
|||
timevar_get_rvalue,
|
||||
0,
|
||||
timevar_handle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -450,6 +450,10 @@ static const struct __vpirt vpip_vthr_const_rt = {
|
|||
vthr_vec_get_value,
|
||||
vthr_vec_put_value,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -594,6 +598,10 @@ static const struct __vpirt vpip_vthr_const_real_rt = {
|
|||
vthr_real_get_value,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -139,8 +139,7 @@ void vpip_hex_str_to_vec4(vvp_vector4_t&val, const char*str)
|
|||
}
|
||||
}
|
||||
|
||||
void vpip_vec4_to_hex_str(const vvp_vector4_t&bits, char*buf,
|
||||
unsigned nbuf, bool signed_flag)
|
||||
void vpip_vec4_to_hex_str(const vvp_vector4_t&bits, char*buf, unsigned nbuf)
|
||||
{
|
||||
unsigned slen = (bits.size() + 3) / 4;
|
||||
assert(slen < nbuf);
|
||||
|
|
|
|||
|
|
@ -120,8 +120,7 @@ void vpip_oct_str_to_vec4(vvp_vector4_t&val, const char*str)
|
|||
|
||||
}
|
||||
|
||||
void vpip_vec4_to_oct_str(const vvp_vector4_t&bits, char*buf, unsigned nbuf,
|
||||
bool signed_flag)
|
||||
void vpip_vec4_to_oct_str(const vvp_vector4_t&bits, char*buf, unsigned nbuf)
|
||||
{
|
||||
unsigned slen = (bits.size() + 2) / 3;
|
||||
assert(slen < nbuf);
|
||||
|
|
|
|||
|
|
@ -1226,7 +1226,7 @@ bool of_ASSIGN_WRE(vthread_t thr, vvp_code_t cp)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool of_ASSIGN_X0(vthread_t thr, vvp_code_t cp)
|
||||
bool of_ASSIGN_X0(vthread_t, vvp_code_t)
|
||||
{
|
||||
#if 0
|
||||
unsigned char bit_val = thr_get_bit(thr, cp->bit_idx[1]);
|
||||
|
|
@ -1268,7 +1268,7 @@ bool of_BLEND_WR(vthread_t thr, vvp_code_t cp)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool of_BREAKPOINT(vthread_t thr, vvp_code_t cp)
|
||||
bool of_BREAKPOINT(vthread_t, vvp_code_t)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1280,7 +1280,7 @@ bool of_BREAKPOINT(vthread_t thr, vvp_code_t cp)
|
|||
* unlinked without specifically knowing the source that this
|
||||
* instruction used.
|
||||
*/
|
||||
bool of_CASSIGN_LINK(vthread_t thr, vvp_code_t cp)
|
||||
bool of_CASSIGN_LINK(vthread_t, vvp_code_t cp)
|
||||
{
|
||||
vvp_net_t*dst = cp->net;
|
||||
vvp_net_t*src = cp->net2;
|
||||
|
|
@ -1825,7 +1825,7 @@ bool of_CVT_VR(vthread_t thr, vvp_code_t cp)
|
|||
* long(1) to port-3 of the addressed net. This turns off an active
|
||||
* continuous assign activated by %cassign/v
|
||||
*/
|
||||
bool of_DEASSIGN(vthread_t thr, vvp_code_t cp)
|
||||
bool of_DEASSIGN(vthread_t, vvp_code_t cp)
|
||||
{
|
||||
vvp_net_t*net = cp->net;
|
||||
unsigned base = cp->bit_idx[0];
|
||||
|
|
@ -1864,7 +1864,7 @@ bool of_DEASSIGN(vthread_t thr, vvp_code_t cp)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool of_DEASSIGN_WR(vthread_t thr, vvp_code_t cp)
|
||||
bool of_DEASSIGN_WR(vthread_t, vvp_code_t cp)
|
||||
{
|
||||
vvp_net_t*net = cp->net;
|
||||
|
||||
|
|
@ -2395,7 +2395,7 @@ bool of_EVCTLS(vthread_t thr, vvp_code_t cp)
|
|||
* unlinked without specifically knowing the source that this
|
||||
* instruction used.
|
||||
*/
|
||||
bool of_FORCE_LINK(vthread_t thr, vvp_code_t cp)
|
||||
bool of_FORCE_LINK(vthread_t, vvp_code_t cp)
|
||||
{
|
||||
vvp_net_t*dst = cp->net;
|
||||
vvp_net_t*src = cp->net2;
|
||||
|
|
@ -2829,7 +2829,7 @@ bool of_JMP1(vthread_t thr, vvp_code_t cp)
|
|||
* reap it and go on. Otherwise, I tell the child that I am ready for
|
||||
* it to die, and it will reschedule me when it does.
|
||||
*/
|
||||
bool of_JOIN(vthread_t thr, vvp_code_t cp)
|
||||
bool of_JOIN(vthread_t thr, vvp_code_t)
|
||||
{
|
||||
assert(thr->child);
|
||||
assert(thr->child->parent == thr);
|
||||
|
|
@ -3073,7 +3073,7 @@ bool of_LOAD_AVX_P(vthread_t thr, vvp_code_t cp)
|
|||
* The functor to read from is the vvp_net_t object pointed to by the
|
||||
* cp->net pointer.
|
||||
*/
|
||||
static void load_base(vthread_t thr, vvp_code_t cp, vvp_vector4_t&dst)
|
||||
static void load_base(vvp_code_t cp, vvp_vector4_t&dst)
|
||||
{
|
||||
vvp_net_t*net = cp->net;
|
||||
|
||||
|
|
@ -3095,7 +3095,7 @@ bool of_LOAD_VEC(vthread_t thr, vvp_code_t cp)
|
|||
unsigned wid = cp->bit_idx[1];
|
||||
|
||||
vvp_vector4_t sig_value;
|
||||
load_base(thr, cp, sig_value);
|
||||
load_base(cp, sig_value);
|
||||
|
||||
/* Check the address once, before we scan the vector. */
|
||||
thr_check_addr(thr, bit+wid-1);
|
||||
|
|
@ -3129,7 +3129,7 @@ bool of_LOAD_VP0(vthread_t thr, vvp_code_t cp)
|
|||
vvp_vector4_t sig_value(wid, BIT4_0);
|
||||
|
||||
vvp_vector4_t tmp;
|
||||
load_base(thr, cp, tmp);
|
||||
load_base(cp, tmp);
|
||||
sig_value.copy_bits(tmp);
|
||||
|
||||
load_vp0_common(thr, cp, sig_value);
|
||||
|
|
@ -3141,7 +3141,7 @@ bool of_LOAD_VP0_S(vthread_t thr, vvp_code_t cp)
|
|||
unsigned wid = cp->bit_idx[1];
|
||||
|
||||
vvp_vector4_t tmp;
|
||||
load_base(thr, cp, tmp);
|
||||
load_base(cp, tmp);
|
||||
|
||||
/* We need a vector this wide to make the math work correctly.
|
||||
* Copy the base bits into the vector, but keep the width. */
|
||||
|
|
@ -3713,7 +3713,7 @@ bool of_NAND(vthread_t thr, vvp_code_t cp)
|
|||
}
|
||||
|
||||
|
||||
bool of_NOOP(vthread_t thr, vvp_code_t cp)
|
||||
bool of_NOOP(vthread_t, vvp_code_t)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -4033,7 +4033,7 @@ bool of_POW_WR(vthread_t thr, vvp_code_t cp)
|
|||
* the release/reg command instead. These are very similar to the
|
||||
* %deassign instruction.
|
||||
*/
|
||||
static bool do_release_vec(vthread_t thr, vvp_code_t cp, bool net_flag)
|
||||
static bool do_release_vec(vvp_code_t cp, bool net_flag)
|
||||
{
|
||||
vvp_net_t*net = cp->net;
|
||||
unsigned base = cp->bit_idx[0];
|
||||
|
|
@ -4062,19 +4062,19 @@ static bool do_release_vec(vthread_t thr, vvp_code_t cp, bool net_flag)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool of_RELEASE_NET(vthread_t thr, vvp_code_t cp)
|
||||
bool of_RELEASE_NET(vthread_t, vvp_code_t cp)
|
||||
{
|
||||
return do_release_vec(thr, cp, true);
|
||||
return do_release_vec(cp, true);
|
||||
}
|
||||
|
||||
|
||||
bool of_RELEASE_REG(vthread_t thr, vvp_code_t cp)
|
||||
bool of_RELEASE_REG(vthread_t, vvp_code_t cp)
|
||||
{
|
||||
return do_release_vec(thr, cp, false);
|
||||
return do_release_vec(cp, false);
|
||||
}
|
||||
|
||||
/* The type is 1 for registers and 0 for everything else. */
|
||||
bool of_RELEASE_WR(vthread_t thr, vvp_code_t cp)
|
||||
bool of_RELEASE_WR(vthread_t, vvp_code_t cp)
|
||||
{
|
||||
vvp_net_t*net = cp->net;
|
||||
unsigned type = cp->bit_idx[0];
|
||||
|
|
@ -4591,7 +4591,7 @@ bool of_EXEC_UFUNC(vthread_t thr, vvp_code_t cp)
|
|||
|
||||
/* Now copy the output from the result variable to the output
|
||||
ports of the .ufunc device. */
|
||||
cp->ufunc_core_ptr->finish_thread(thr);
|
||||
cp->ufunc_core_ptr->finish_thread();
|
||||
|
||||
/* If an automatic function, free the context for this call. */
|
||||
if (child_scope->is_automatic) {
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ vvp_island_port::~vvp_island_port()
|
|||
{
|
||||
}
|
||||
|
||||
void vvp_island_port::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
void vvp_island_port::recv_vec4(vvp_net_ptr_t, const vvp_vector4_t&bit,
|
||||
vvp_context_t)
|
||||
{
|
||||
vvp_vector8_t tmp (bit, 6, 6);
|
||||
|
|
@ -187,7 +187,7 @@ void vvp_island_port::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
}
|
||||
|
||||
|
||||
void vvp_island_port::recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit)
|
||||
void vvp_island_port::recv_vec8(vvp_net_ptr_t, const vvp_vector8_t&bit)
|
||||
{
|
||||
if (invalue .eeq(bit))
|
||||
return;
|
||||
|
|
@ -196,8 +196,8 @@ void vvp_island_port::recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit)
|
|||
island_->flag_island();
|
||||
}
|
||||
|
||||
void vvp_island_port::recv_vec8_pv(vvp_net_ptr_t p, const vvp_vector8_t&bit,
|
||||
unsigned base, unsigned wid, unsigned vwid)
|
||||
void vvp_island_port::recv_vec8_pv(vvp_net_ptr_t, const vvp_vector8_t&bit,
|
||||
unsigned base, unsigned wid, unsigned vwid)
|
||||
{
|
||||
if (invalue.size() == 0) {
|
||||
assert(bit.size() == wid);
|
||||
|
|
|
|||
|
|
@ -219,12 +219,16 @@ vvp_net_fil_t::~vvp_net_fil_t()
|
|||
assert(force_link_ == 0);
|
||||
}
|
||||
|
||||
vvp_net_fil_t::prop_t vvp_net_fil_t::filter_vec4(const vvp_vector4_t&val, vvp_vector4_t&, unsigned, unsigned)
|
||||
vvp_net_fil_t::prop_t vvp_net_fil_t::filter_vec4(const vvp_vector4_t&,
|
||||
vvp_vector4_t&,
|
||||
unsigned, unsigned)
|
||||
{
|
||||
return PROP;
|
||||
}
|
||||
|
||||
vvp_net_fil_t::prop_t vvp_net_fil_t::filter_vec8(const vvp_vector8_t&val, vvp_vector8_t&, unsigned, unsigned)
|
||||
vvp_net_fil_t::prop_t vvp_net_fil_t::filter_vec8(const vvp_vector8_t&,
|
||||
vvp_vector8_t&,
|
||||
unsigned, unsigned)
|
||||
{
|
||||
return PROP;
|
||||
}
|
||||
|
|
@ -622,7 +626,8 @@ void vvp_vector4_t::copy_inverted_from_(const vvp_vector4_t&that)
|
|||
}
|
||||
}
|
||||
|
||||
void vvp_vector4_t::allocate_words_(unsigned wid, unsigned long inita, unsigned long initb)
|
||||
/* Make sure to set size_ before calling this routine. */
|
||||
void vvp_vector4_t::allocate_words_(unsigned long inita, unsigned long initb)
|
||||
{
|
||||
if (size_ > BITS_PER_WORD) {
|
||||
unsigned cnt = (size_ + BITS_PER_WORD - 1) / BITS_PER_WORD;
|
||||
|
|
@ -648,7 +653,7 @@ vvp_vector4_t::vvp_vector4_t(unsigned size__, double val)
|
|||
|
||||
/* We return 'bx for a NaN or +/- infinity. */
|
||||
if (val != val || (val && (val == 0.5*val))) {
|
||||
allocate_words_(size_, WORD_X_ABITS, WORD_X_BBITS);
|
||||
allocate_words_(WORD_X_ABITS, WORD_X_BBITS);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -657,7 +662,7 @@ vvp_vector4_t::vvp_vector4_t(unsigned size__, double val)
|
|||
is_neg = true;
|
||||
val = -val;
|
||||
}
|
||||
allocate_words_(size_, WORD_0_ABITS, WORD_0_BBITS);
|
||||
allocate_words_(WORD_0_ABITS, WORD_0_BBITS);
|
||||
|
||||
/* Get the exponent and fractional part of the number. */
|
||||
fraction = frexp(val, &exponent);
|
||||
|
|
@ -720,7 +725,7 @@ vvp_vector4_t::vvp_vector4_t(const vvp_vector4_t&that,
|
|||
size_ = wid;
|
||||
assert((adr + wid) <= that.size_);
|
||||
|
||||
allocate_words_(wid, WORD_X_ABITS, WORD_X_BBITS);
|
||||
allocate_words_(WORD_X_ABITS, WORD_X_BBITS);
|
||||
|
||||
if (wid > BITS_PER_WORD) {
|
||||
/* In this case, the subvector and the source vector are
|
||||
|
|
@ -2803,7 +2808,7 @@ vvp_net_fun_t::~vvp_net_fun_t()
|
|||
{
|
||||
}
|
||||
|
||||
void vvp_net_fun_t::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
void vvp_net_fun_t::recv_vec4(vvp_net_ptr_t, const vvp_vector4_t&,
|
||||
vvp_context_t)
|
||||
{
|
||||
fprintf(stderr, "internal error: %s: recv_vec4 not implemented\n",
|
||||
|
|
@ -2811,8 +2816,8 @@ void vvp_net_fun_t::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
assert(0);
|
||||
}
|
||||
|
||||
void vvp_net_fun_t::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
unsigned base, unsigned wid, unsigned vwid,
|
||||
void vvp_net_fun_t::recv_vec4_pv(vvp_net_ptr_t, const vvp_vector4_t&bit,
|
||||
unsigned base, unsigned wid, unsigned vwid,
|
||||
vvp_context_t)
|
||||
{
|
||||
cerr << "internal error: " << typeid(*this).name() << ": "
|
||||
|
|
@ -2832,7 +2837,7 @@ void vvp_net_fun_t::recv_vec8_pv(vvp_net_ptr_t port, const vvp_vector8_t&bit,
|
|||
recv_vec4_pv(port, reduce4(bit), base, wid, vwid, 0);
|
||||
}
|
||||
|
||||
void vvp_net_fun_t::recv_real(vvp_net_ptr_t port, double bit, vvp_context_t)
|
||||
void vvp_net_fun_t::recv_real(vvp_net_ptr_t, double bit, vvp_context_t)
|
||||
{
|
||||
fprintf(stderr, "internal error: %s: recv_real(%f) not implemented\n",
|
||||
typeid(*this).name(), bit);
|
||||
|
|
@ -2859,7 +2864,7 @@ void vvp_net_fun_t::force_flag(void)
|
|||
|
||||
/* **** vvp_fun_drive methods **** */
|
||||
|
||||
vvp_fun_drive::vvp_fun_drive(vvp_bit4_t init, unsigned str0, unsigned str1)
|
||||
vvp_fun_drive::vvp_fun_drive(vvp_bit4_t /*init*/, unsigned str0, unsigned str1)
|
||||
{
|
||||
assert(str0 < 8);
|
||||
assert(str1 < 8);
|
||||
|
|
@ -2935,7 +2940,7 @@ double vvp_wide_fun_core::value_r(unsigned idx)
|
|||
return port_rvalues_? port_rvalues_[idx] : 0.0;
|
||||
}
|
||||
|
||||
void vvp_wide_fun_core::recv_real_from_inputs(unsigned p)
|
||||
void vvp_wide_fun_core::recv_real_from_inputs(unsigned)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ class vvp_vector4_t {
|
|||
void copy_from_(const vvp_vector4_t&that);
|
||||
void copy_inverted_from_(const vvp_vector4_t&that);
|
||||
|
||||
void allocate_words_(unsigned size, unsigned long inita, unsigned long initb);
|
||||
void allocate_words_(unsigned long inita, unsigned long initb);
|
||||
|
||||
// Values in the vvp_vector4_t are stored split across two
|
||||
// arrays. For each bit in the vector, there is an abit and a
|
||||
|
|
@ -341,7 +341,7 @@ inline vvp_vector4_t::vvp_vector4_t(unsigned size__, vvp_bit4_t val)
|
|||
WORD_Z_BBITS,
|
||||
WORD_X_BBITS };
|
||||
|
||||
allocate_words_(size_, init_atable[val], init_btable[val]);
|
||||
allocate_words_(init_atable[val], init_btable[val]);
|
||||
}
|
||||
|
||||
inline vvp_vector4_t::~vvp_vector4_t()
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ const vvp_vector4_t& vvp_fun_signal4_sa::vec4_unfiltered_value() const
|
|||
return bits4_;
|
||||
}
|
||||
|
||||
vvp_fun_signal4_aa::vvp_fun_signal4_aa(unsigned wid, vvp_bit4_t init)
|
||||
vvp_fun_signal4_aa::vvp_fun_signal4_aa(unsigned wid, vvp_bit4_t /*init */)
|
||||
{
|
||||
context_idx_ = vpip_add_item_to_context(this, vpip_peek_context_scope());
|
||||
size_ = wid;
|
||||
|
|
@ -537,13 +537,13 @@ unsigned vvp_fun_signal_real_aa::value_size() const
|
|||
return 1;
|
||||
}
|
||||
|
||||
vvp_bit4_t vvp_fun_signal_real_aa::value(unsigned idx) const
|
||||
vvp_bit4_t vvp_fun_signal_real_aa::value(unsigned) const
|
||||
{
|
||||
assert(0);
|
||||
return BIT4_X;
|
||||
}
|
||||
|
||||
vvp_scalar_t vvp_fun_signal_real_aa::scalar_value(unsigned idx) const
|
||||
vvp_scalar_t vvp_fun_signal_real_aa::scalar_value(unsigned) const
|
||||
{
|
||||
assert(0);
|
||||
return vvp_scalar_t();
|
||||
|
|
@ -642,7 +642,10 @@ vvp_net_fil_t::prop_t vvp_wire_vec4::filter_vec4(const vvp_vector4_t&bit, vvp_ve
|
|||
return filter_mask_(bit, force4_, rep, base);
|
||||
}
|
||||
|
||||
vvp_net_fil_t::prop_t vvp_wire_vec4::filter_vec8(const vvp_vector8_t&bit, vvp_vector8_t&rep, unsigned base, unsigned vwid)
|
||||
vvp_net_fil_t::prop_t vvp_wire_vec4::filter_vec8(const vvp_vector8_t&bit,
|
||||
vvp_vector8_t&rep,
|
||||
unsigned /*base */,
|
||||
unsigned /*vwid */)
|
||||
{
|
||||
assert(bits4_.size() == bit.size());
|
||||
bits4_ = reduce4(bit);
|
||||
|
|
@ -671,12 +674,12 @@ void vvp_wire_vec4::force_fil_vec4(const vvp_vector4_t&val, vvp_vector2_t mask)
|
|||
run_vpi_callbacks();
|
||||
}
|
||||
|
||||
void vvp_wire_vec4::force_fil_vec8(const vvp_vector8_t&val, vvp_vector2_t mask)
|
||||
void vvp_wire_vec4::force_fil_vec8(const vvp_vector8_t&, vvp_vector2_t)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
void vvp_wire_vec4::force_fil_real(double val, vvp_vector2_t mask)
|
||||
void vvp_wire_vec4::force_fil_real(double, vvp_vector2_t)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
|
@ -764,8 +767,10 @@ vvp_wire_vec8::vvp_wire_vec8(unsigned wid)
|
|||
needs_init_ = true;
|
||||
}
|
||||
|
||||
vvp_net_fil_t::prop_t vvp_wire_vec8::filter_vec4(const vvp_vector4_t&bit, vvp_vector4_t&rep,
|
||||
unsigned base, unsigned vwid)
|
||||
vvp_net_fil_t::prop_t vvp_wire_vec8::filter_vec4(const vvp_vector4_t&bit,
|
||||
vvp_vector4_t&rep,
|
||||
unsigned /*base */,
|
||||
unsigned vwid)
|
||||
{
|
||||
// QUESTION: Is it really correct to propagate a vec4 if this
|
||||
// is a vec8 node? In fact, it is really possible for a vec4
|
||||
|
|
@ -828,7 +833,7 @@ void vvp_wire_vec8::force_fil_vec8(const vvp_vector8_t&val, vvp_vector2_t mask)
|
|||
run_vpi_callbacks();
|
||||
}
|
||||
|
||||
void vvp_wire_vec8::force_fil_real(double val, vvp_vector2_t mask)
|
||||
void vvp_wire_vec8::force_fil_real(double, vvp_vector2_t)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
|
@ -928,12 +933,12 @@ unsigned vvp_wire_real::filter_size() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
void vvp_wire_real::force_fil_vec4(const vvp_vector4_t&val, vvp_vector2_t mask)
|
||||
void vvp_wire_real::force_fil_vec4(const vvp_vector4_t&, vvp_vector2_t)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
void vvp_wire_real::force_fil_vec8(const vvp_vector8_t&val, vvp_vector2_t mask)
|
||||
void vvp_wire_real::force_fil_vec8(const vvp_vector8_t&, vvp_vector2_t)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
|
@ -962,13 +967,13 @@ void vvp_wire_real::release(vvp_net_ptr_t ptr, bool net_flag)
|
|||
}
|
||||
}
|
||||
|
||||
void vvp_wire_real::release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag)
|
||||
void vvp_wire_real::release_pv(vvp_net_ptr_t, unsigned, unsigned, bool)
|
||||
{
|
||||
assert(0);
|
||||
#if 0
|
||||
// A real is a single value. If for some reason this part release
|
||||
// can happen the following code should work correctly (requires
|
||||
// a base of 0 and a width of 1).
|
||||
assert(0);
|
||||
#if 0
|
||||
vvp_vector2_t mask (vvp_vector2_t::FILL1, 1);
|
||||
assert(base == 0 && wid == 1);
|
||||
|
||||
|
|
@ -991,13 +996,13 @@ unsigned vvp_wire_real::value_size() const
|
|||
return 1;
|
||||
}
|
||||
|
||||
vvp_bit4_t vvp_wire_real::value(unsigned idx) const
|
||||
vvp_bit4_t vvp_wire_real::value(unsigned) const
|
||||
{
|
||||
assert(0);
|
||||
return BIT4_X;
|
||||
}
|
||||
|
||||
vvp_scalar_t vvp_wire_real::scalar_value(unsigned idx) const
|
||||
vvp_scalar_t vvp_wire_real::scalar_value(unsigned) const
|
||||
{
|
||||
assert(0);
|
||||
return vvp_scalar_t();
|
||||
|
|
|
|||
18
vvp/words.cc
18
vvp/words.cc
|
|
@ -33,8 +33,7 @@
|
|||
# include <cassert>
|
||||
|
||||
static void __compile_var_real(char*label, char*name,
|
||||
vvp_array_t array, unsigned long array_addr,
|
||||
int msb, int lsb)
|
||||
vvp_array_t array, unsigned long array_addr)
|
||||
{
|
||||
vvp_net_t*net = new vvp_net_t;
|
||||
|
||||
|
|
@ -68,14 +67,16 @@ static void __compile_var_real(char*label, char*name,
|
|||
|
||||
void compile_var_real(char*label, char*name, int msb, int lsb)
|
||||
{
|
||||
__compile_var_real(label, name, 0, 0, msb, lsb);
|
||||
assert(msb == 0 && lsb == 0);
|
||||
__compile_var_real(label, name, 0, 0);
|
||||
}
|
||||
|
||||
void compile_varw_real(char*label, vvp_array_t array,
|
||||
unsigned long addr,
|
||||
int msb, int lsb)
|
||||
{
|
||||
__compile_var_real(label, 0, array, addr, msb, lsb);
|
||||
assert(msb == 0 && lsb == 0);
|
||||
__compile_var_real(label, 0, array, addr);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -152,7 +153,7 @@ void compile_variablew(char*label, vvp_array_t array,
|
|||
__compile_var(label, 0, array, array_addr, msb, lsb, signed_flag, false);
|
||||
}
|
||||
|
||||
vvp_net_t* create_constant_node(const char*label, const char*val_str)
|
||||
vvp_net_t* create_constant_node(const char*val_str)
|
||||
{
|
||||
if (c4string_test(val_str)) {
|
||||
vvp_net_t*net = new vvp_net_t;
|
||||
|
|
@ -304,7 +305,7 @@ static void __compile_net(char*label,
|
|||
|
||||
NOTE: This is a hack! The code generator should be
|
||||
fixed so that this is no longer needed. */
|
||||
node = create_constant_node(label, argv[0].text);
|
||||
node = create_constant_node(argv[0].text);
|
||||
}
|
||||
#endif
|
||||
if (node == 0) {
|
||||
|
|
@ -332,6 +333,8 @@ bool __compile_net_resolv::resolve(bool msg_flag)
|
|||
{
|
||||
vvp_net_t*node = vvp_net_lookup(label());
|
||||
if (node == 0) {
|
||||
if (msg_flag)
|
||||
cerr << "Unable to resolve label " << label() << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -415,6 +418,7 @@ static void __compile_real(char*label, char*name,
|
|||
int msb, int lsb, bool local_flag,
|
||||
unsigned argc, struct symb_s*argv)
|
||||
{
|
||||
assert(msb == 0 && lsb == 0);
|
||||
vvp_array_t array = array_label ? array_find(array_label) : 0;
|
||||
assert(array_label ? array!=0 : true);
|
||||
|
||||
|
|
@ -426,7 +430,7 @@ static void __compile_real(char*label, char*name,
|
|||
/* No existing net, but the string value may be a
|
||||
constant. In that case, we will wind up generating a
|
||||
bufz node that can carry the constant value. */
|
||||
node = create_constant_node(label, argv[0].text);
|
||||
node = create_constant_node(argv[0].text);
|
||||
}
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
if (node == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue