Make vpi_put_value to a real accept an integer value and add diagnostic code.

Modified the code that deals with real variables to accept an integer
value when using vpi_put_value(). Also added some type of diagnostic
message for all switch defaults that have an assert(0) to indicate an
error condition, removed CVS comments and removed a small section of
unreachable code.
This commit is contained in:
Cary R 2007-08-22 15:15:32 -07:00 committed by Stephen Williams
parent 23ce6c39ab
commit 81a45cdc5f
19 changed files with 78 additions and 709 deletions

View File

@ -51,6 +51,7 @@ void vvp_arith_::dispatch_operand_(vvp_net_ptr_t ptr, vvp_vector4_t bit)
op_b_ = bit;
break;
default:
fprintf(stderr, "Unsupported port type %d.\n", port);
assert(0);
}
}
@ -749,6 +750,7 @@ void vvp_arith_real_::dispatch_operand_(vvp_net_ptr_t ptr, double bit)
op_b_ = bit;
break;
default:
fprintf(stderr, "Unsupported port type %d.\n", ptr.port());
assert(0);
}
}
@ -786,69 +788,3 @@ void vvp_arith_sub_real::recv_real(vvp_net_ptr_t ptr, double bit)
vvp_send_real(ptr.ptr()->out, val);
}
/*
* $Log: arith.cc,v $
* Revision 1.50 2007/01/20 02:09:54 steve
* Better size error details.
*
* Revision 1.49 2006/07/30 02:51:36 steve
* Fix/implement signed right shift.
*
* Revision 1.48 2006/01/03 06:19:31 steve
* Support wide divide nodes.
*
* Revision 1.47 2005/11/10 13:27:16 steve
* Handle very wide % and / operations using expanded vector2 support.
*
* Revision 1.46 2005/09/15 22:54:04 steve
* Use iostream instead of stdio.
*
* Revision 1.45 2005/07/06 04:29:25 steve
* Implement real valued signals and arith nodes.
*
* Revision 1.44 2005/06/22 00:04:48 steve
* Reduce vvp_vector4 copies by using const references.
*
* Revision 1.43 2005/03/19 06:23:49 steve
* Handle LPM shifts.
*
* Revision 1.42 2005/03/12 06:42:28 steve
* Implement .arith/mod.
*
* Revision 1.41 2005/03/09 05:52:04 steve
* Handle case inequality in netlists.
*
* Revision 1.40 2005/02/19 02:41:23 steve
* Handle signed divide.
*
* Revision 1.39 2005/02/19 01:32:52 steve
* Implement .arith/div.
*
* Revision 1.38 2005/02/04 05:13:02 steve
* Add wide .arith/mult, and vvp_vector2_t vectors.
*
* Revision 1.37 2005/01/30 05:06:49 steve
* Get .arith/sub working.
*
* Revision 1.36 2005/01/28 05:34:25 steve
* Add vector4 implementation of .arith/mult.
*
* Revision 1.35 2005/01/22 17:36:15 steve
* .cmp/x supports signed magnitude compare.
*
* Revision 1.34 2005/01/22 16:21:11 steve
* Implement vectored CMP_EQ and NE
*
* Revision 1.33 2005/01/22 01:06:20 steve
* Implement the .cmp/eeq LPM node.
*
* Revision 1.32 2005/01/16 04:19:08 steve
* Reimplement comparators as vvp_vector4_t nodes.
*
* Revision 1.31 2004/12/11 02:31:29 steve
* Rework of internals to carry vectors through nexus instead
* of single bits. Make the ivl, tgt-vvp and vvp initial changes
* down this path.
*
*/

View File

@ -269,6 +269,8 @@ vvp_net_t* vvp_net_lookup(const char*label)
}
default:
fprintf(stderr, "Unsupported type %d.\n",
vpi->vpi_type->type_code);
assert(0);
}
}
@ -1150,10 +1152,6 @@ static vvp_net_t*make_modpath_src(vvp_fun_modpath*dst, char edge,
} else {
bool posedge, negedge;
switch (edge) {
case 0:
posedge = false;
negedge = false;
break;
case '+':
posedge = true;
negedge = false;
@ -1167,6 +1165,8 @@ static vvp_net_t*make_modpath_src(vvp_fun_modpath*dst, char edge,
negedge = false;
break;
default:
fprintf(stderr, "Unknown edge identifier %c(%d).\n", edge,
edge);
assert(0);
}
obj = new vvp_fun_modpath_edge(use_delay, posedge, negedge);
@ -1655,104 +1655,3 @@ void compile_param_string(char*label, char*name, char*value)
free(label);
}
/*
* $Log: compile.cc,v $
* Revision 1.232 2007/06/07 03:20:16 steve
* Properly handle signed conversion to real
*
* Revision 1.231 2007/04/14 04:43:02 steve
* Finish up part select of array words.
*
* Revision 1.230 2007/03/02 06:13:22 steve
* Add support for edge sensitive spec paths.
*
* Revision 1.229 2007/03/01 06:19:39 steve
* Add support for conditional specify delay paths.
*
* Revision 1.228 2007/02/14 05:58:14 steve
* Add the mov/wr opcode.
*
* Revision 1.227 2007/01/16 05:44:16 steve
* Major rework of array handling. Memories are replaced with the
* more general concept of arrays. The NetMemory and NetEMemory
* classes are removed from the ivl core program, and the IVL_LPM_RAM
* lpm type is removed from the ivl_target API.
*
* Revision 1.226 2006/10/05 01:23:53 steve
* Handle non-constant delays on indexed non-blocking assignments.
*
* Revision 1.225 2006/09/29 03:57:01 steve
* Modpath delay chooses correct delay for edge.
*
* Revision 1.224 2006/09/23 04:57:19 steve
* Basic support for specify timing.
*
* Revision 1.223 2006/08/09 05:19:08 steve
* Add support for real valued modulus.
*
* Revision 1.222 2006/08/08 05:11:37 steve
* Handle 64bit delay constants.
*
* Revision 1.221 2006/07/30 02:51:36 steve
* Fix/implement signed right shift.
*
* Revision 1.220 2006/06/18 04:15:50 steve
* Add support for system functions in continuous assignments.
*
* Revision 1.219 2006/03/18 22:51:10 steve
* Syntax for carrying sign with parameter.
*
* Revision 1.218 2006/03/08 05:29:42 steve
* Add support for logic parameters.
*
* Revision 1.217 2006/02/02 02:44:00 steve
* Allow part selects of memory words in l-values.
*
* Revision 1.216 2006/01/02 05:32:06 steve
* Require explicit delay node from source.
*
* Revision 1.215 2005/11/26 17:16:05 steve
* Force instruction that can be indexed.
*
* Revision 1.214 2005/10/12 17:23:15 steve
* Add alias nodes.
*
* Revision 1.213 2005/09/20 18:34:01 steve
* Clean up compiler warnings.
*
* Revision 1.212 2005/09/17 04:01:01 steve
* Add the load/v.p instruction.
*
* Revision 1.211 2005/09/14 02:50:07 steve
* Add word integer compares.
*
* Revision 1.210 2005/07/06 04:29:25 steve
* Implement real valued signals and arith nodes.
*
* Revision 1.209 2005/06/14 01:44:09 steve
* Add the assign_v0_d instruction.
*
* Revision 1.208 2005/06/14 00:42:06 steve
* Accomodate fussy compilers.
*
* Revision 1.207 2005/06/12 01:10:26 steve
* Remove useless references to functor.h
*
* Revision 1.206 2005/06/09 05:04:45 steve
* Support UDP initial values.
*
* Revision 1.205 2005/06/09 04:12:30 steve
* Support sequential UDP devices.
*
* Revision 1.204 2005/06/02 16:02:11 steve
* Add support for notif0/1 gates.
* Make delay nodes support inertial delay.
* Add the %force/link instruction.
*
* Revision 1.203 2005/05/25 05:44:51 steve
* Handle event/or with specific, efficient nodes.
*
* Revision 1.202 2005/05/24 01:43:27 steve
* Add a sign-extension node.
*/

View File

@ -325,6 +325,7 @@ void vvp_fun_muxr::recv_real(vvp_net_ptr_t ptr, double bit)
break;
default:
fprintf(stderr, "Unsupported port type %d.\n", ptr.port());
assert(0);
}
}

View File

@ -133,6 +133,7 @@ void vvp_fun_part_var::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit)
base_ = tmp;
break;
default:
fprintf(stderr, "Unsupported port type %d.\n", port.port());
assert(0);
break;
}
@ -198,45 +199,3 @@ void compile_part_select_var(char*label, char*source, char*var,
input_connect(net, 1, var);
}
/*
* $Log: part.cc,v $
* Revision 1.12 2006/11/16 01:11:26 steve
* Support part writes into part select nodes.
*
* Revision 1.11 2006/05/01 18:44:08 steve
* Reduce steps to make logic output.
*
* Revision 1.10 2006/04/26 04:39:23 steve
* Include bit value in assertion message.
*
* Revision 1.9 2005/09/20 00:51:53 steve
* Lazy processing of vvp_fun_part functor.
*
* Revision 1.8 2005/07/14 23:34:19 steve
* gcc4 compile errors.
*
* Revision 1.7 2005/06/26 21:08:11 steve
* More verbose debugging of part select width errors.
*
* Revision 1.6 2005/06/22 00:04:49 steve
* Reduce vvp_vector4 copies by using const references.
*
* Revision 1.5 2005/05/09 00:36:58 steve
* Force part base out of bounds if index is invalid.
*
* Revision 1.4 2005/05/08 23:40:14 steve
* Add support for variable part select.
*
* Revision 1.3 2005/01/09 20:11:16 steve
* Add the .part/pv node and related functionality.
*
* Revision 1.2 2004/12/29 23:44:39 steve
* Fix missing output propagation of part node.
*
* Revision 1.1 2004/12/11 02:31:30 steve
* Rework of internals to carry vectors through nexus instead
* of single bits. Make the ivl, tgt-vvp and vvp initial changes
* down this path.
*
*/

View File

@ -95,6 +95,7 @@ static int make_vpi_argv(unsigned argc, vpiHandle*vpi_argv,
break;
default:
fprintf(stderr, "Unsupported type %c(%d).\n", *cp);
assert(0);
break;
}
@ -117,6 +118,7 @@ static int make_vpi_argv(unsigned argc, vpiHandle*vpi_argv,
}
default:
fprintf(stderr, "Unsupported type %c(%d).\n", *cp);
assert(0);
}
idx += 1;
@ -151,10 +153,3 @@ void compile_sfunc(char*label, char*name, char*format_string,
free(argv);
}
/*
* $Log: sfunc.cc,v $
* Revision 1.1 2006/06/18 04:15:50 steve
* Add support for system functions in continuous assignments.
*
*/

View File

@ -184,6 +184,7 @@ static void or_based_on_char(udp_levels_table&cur, char flag,
cur.mask1 |= mask_bit;
break;
default:
fprintf(stderr, "Unsupported flag %c(%d).\n", flag, flag);
assert(0);
}
}
@ -206,6 +207,8 @@ void vvp_udp_comb_s::compile_table(char**tab)
case 'x':
break;
default:
fprintf(stderr, "Unsupported entry %c(%d).\n",
tab[idx][port_count()], tab[idx][port_count()]);
assert(0);
}
}
@ -438,6 +441,8 @@ void vvp_udp_seq_s::compile_table(char**tab)
nlevelsL_ += 1;
break;
default:
fprintf(stderr, "Unsupported entry %c(%d).\n",
row[port_count()+1], row[port_count()+1]);
assert(0);
break;
}
@ -466,6 +471,8 @@ void vvp_udp_seq_s::compile_table(char**tab)
nedgesL_ += 1 + extra;
break;
default:
fprintf(stderr, "Unsupported entry %c(%d).\n",
row[port_count()+1], row[port_count()+1]);
assert(0);
break;
}
@ -517,6 +524,8 @@ void vvp_udp_seq_s::compile_table(char**tab)
levelsL_[idx_levL++] = cur;
break;
default:
fprintf(stderr, "Unsupported entry %c(%d).\n",
row[port_count()+1], row[port_count()+1]);
assert(0);
break;
}
@ -606,6 +615,8 @@ void vvp_udp_seq_s::compile_table(char**tab)
edgesL_[idx_edgL++] = ext1;
break;
default:
fprintf(stderr, "Unsupported entry %c(%d).\n",
row[port_count()+1], row[port_count()+1]);
assert(0);
break;
}
@ -943,3 +954,4 @@ void compile_udp_functor(char*label, char*type,
wide_inputs_connect(core, argc, argv);
free(argv);
}

View File

@ -238,6 +238,7 @@ static struct __vpiCallback* make_sync(p_cb_data data, bool readonly_flag)
}
default:
fprintf(stderr, "Unsupported time type %d.\n", obj->cb_time.type);
assert(0);
break;
}
@ -267,6 +268,7 @@ static struct __vpiCallback* make_afterdelay(p_cb_data data)
}
default:
fprintf(stderr, "Unsupported time type %d.\n", obj->cb_time.type);
assert(0);
break;
}
@ -596,56 +598,3 @@ void vvp_fun_signal_real::get_value(struct t_vpi_value*vp)
}
}
/*
* $Log: vpi_callback.cc,v $
* Revision 1.46 2007/04/10 04:32:05 steve
* vpi_free_object doesnot free callback out from under runtime.
*
* Revision 1.45 2007/01/16 05:44:16 steve
* Major rework of array handling. Memories are replaced with the
* more general concept of arrays. The NetMemory and NetEMemory
* classes are removed from the ivl core program, and the IVL_LPM_RAM
* lpm type is removed from the ivl_target API.
*
* Revision 1.44 2006/09/29 01:24:34 steve
* rwsync callback fixes from Ben Staveley (with modifications.)
*
* Revision 1.43 2006/03/05 05:45:58 steve
* Add support for memory value change callbacks.
*
* Revision 1.42 2006/02/22 03:08:53 steve
* Some trivial log message improvements.
*
* Revision 1.41 2005/12/05 21:21:18 steve
* Fixes for stubborn compilers.
*
* Revision 1.40 2005/11/25 17:55:26 steve
* Put vec8 and vec4 nets into seperate net classes.
*
* Revision 1.39 2005/07/06 04:29:25 steve
* Implement real valued signals and arith nodes.
*
* Revision 1.38 2005/06/12 01:10:26 steve
* Remove useless references to functor.h
*
* Revision 1.37 2005/06/09 05:04:45 steve
* Support UDP initial values.
*
* Revision 1.36 2005/06/02 16:02:11 steve
* Add support for notif0/1 gates.
* Make delay nodes support inertial delay.
* Add the %force/link instruction.
*
* Revision 1.35 2004/12/11 02:31:30 steve
* Rework of internals to carry vectors through nexus instead
* of single bits. Make the ivl, tgt-vvp and vvp initial changes
* down this path.
*
* Revision 1.34 2004/10/04 01:10:59 steve
* Clean up spurious trailing white space.
*
* Revision 1.33 2004/02/18 02:51:59 steve
* Fix type mismatches of various VPI functions.
*/

View File

@ -638,6 +638,7 @@ static void real_value(vpiHandle ref, p_vpi_value vp)
vp->value.real = rfp->value;
break;
default:
fprintf(stderr, "vvp error: unsupported format %d.\n", vp->format);
assert(0);
}
}

View File

@ -74,15 +74,15 @@ vpiHandle vpip_make_iterator(unsigned nargs, vpiHandle*args,
vpiHandle vpi_scan(vpiHandle ref)
{
if (ref == 0) {
vpi_printf("ERROR: NULL handle passed to vpi_scan.\n");
fprintf(stderr, "ERROR: NULL handle passed to vpi_scan.\n");
assert(0);
return 0;
}
if (ref->vpi_type->type_code != vpiIterator) {
vpi_printf("ERROR: vpi_scan argument is "
"inappropriate vpiType code %d\n",
ref->vpi_type->type_code);
fprintf(stderr, "ERROR: vpi_scan argument is "
"inappropriate vpiType code %d\n",
ref->vpi_type->type_code);
assert(0);
return 0;
}
@ -102,30 +102,3 @@ vpiHandle vpi_scan(vpiHandle ref)
return hp->args[hp->next++];
}
/*
* $Log: vpi_iter.cc,v $
* Revision 1.7 2003/02/25 01:17:28 steve
* Some error messages around asserts.
*
* Revision 1.6 2003/02/17 00:58:38 steve
* Strict correctness of vpi_free_object results.
*
* Revision 1.5 2002/08/12 01:35:09 steve
* conditional ident string using autoconfig.
*
* Revision 1.4 2002/06/02 19:05:50 steve
* Check for null pointers from users.
*
* Revision 1.3 2002/05/03 15:44:11 steve
* Add vpiModule iterator to vpiScope objects.
*
* Revision 1.2 2001/05/08 23:59:33 steve
* Add ivl and vvp.tgt support for memories in
* expressions and l-values. (Stephan Boettcher)
*
* Revision 1.1 2001/03/16 01:44:34 steve
* Add structures for VPI support, and all the %vpi_call
* instruction. Get linking of VPI modules to work.
*
*/

View File

@ -298,6 +298,8 @@ static vpiHandle memory_word_put(vpiHandle ref, p_vpi_value val)
put_val.set_bit(idx, BIT4_Z);
break;
default:
fprintf(stderr, "Unsupported value %c(%d).\n",
str[width-idx-1], str[width-idx-1]);
assert(0);
}
}
@ -476,76 +478,3 @@ vpiHandle vpip_make_memory(vvp_memory_t mem, const char*name)
return &(obj->base);
}
/*
* $Log: vpi_memory.cc,v $
* Revision 1.33 2006/03/06 05:43:15 steve
* Cleanup vpi_const to use vec4 values.
*
* Revision 1.32 2006/03/05 05:45:58 steve
* Add support for memory value change callbacks.
*
* Revision 1.31 2006/02/21 03:19:03 steve
* Remove dead code.
*
* Revision 1.30 2006/02/21 02:56:49 steve
* Get vpiVectorVal from memory words.
*
* Revision 1.29 2006/02/21 02:39:27 steve
* Support string values for memory words.
*
* Revision 1.28 2006/02/02 02:44:00 steve
* Allow part selects of memory words in l-values.
*
* Revision 1.27 2005/06/17 05:13:07 steve
* Support set of IntVal to memory words.
*
* Revision 1.26 2005/06/13 00:54:04 steve
* More unified vec4 to hex string functions.
*
* Revision 1.25 2005/03/05 05:43:03 steve
* Get base address from word ranges that VPI user passed.
*
* Revision 1.24 2005/03/03 04:33:10 steve
* Rearrange how memories are supported as vvp_vector4 arrays.
*
* Revision 1.23 2004/05/19 03:30:46 steve
* Support delayed/non-blocking assignment to reals and others.
*
* Revision 1.22 2003/02/09 23:33:26 steve
* Spelling fixes.
*
* Revision 1.21 2003/02/02 01:40:24 steve
* Five vpi_free_object a default behavior.
*
* Revision 1.20 2002/09/12 15:13:07 steve
* Account for buffer overrun in memory word names.
*
* Revision 1.19 2002/09/11 16:06:57 steve
* Fix wrecked rbuf in vpi_get_str of signals and memories.
*
* Revision 1.18 2002/08/12 01:35:09 steve
* conditional ident string using autoconfig.
*
* Revision 1.17 2002/07/09 03:24:37 steve
* Dynamic resizevpi result buf in more places.
*
* Revision 1.16 2002/07/05 17:14:15 steve
* Names of vpi objects allocated as vpip_strings.
*
* Revision 1.15 2002/07/04 16:37:07 steve
* Fix s_vpi_vecval array byte size.
*
* Revision 1.14 2002/07/03 23:39:57 steve
* Dynamic size result buffer for _str and _get_value functions.
*
* Revision 1.13 2002/07/03 23:16:27 steve
* don't pollute name space
* fix vecval for Z/X cases
*
* Revision 1.12 2002/07/03 02:09:38 steve
* vpiName, vpiFullName support in memory types,
* length checks for *_get_str() buffers,
* temporary buffers for *_get_str() data,
* dynamic storage for vpi_get_data() in memory types
* shared with signal white space
*/

View File

@ -877,6 +877,7 @@ extern "C" void vpi_sim_vcontrol(int operation, va_list ap)
break;
default:
fprintf(stderr, "Unsupported operation %d.\n", operation);
assert(0);
}
}

View File

@ -81,9 +81,23 @@ static vpiHandle real_var_put_value(vpiHandle ref, p_vpi_value vp)
vvp_net_ptr_t destination (rfp->net, 0);
assert(vp->format == vpiRealVal);
vvp_send_real(destination, vp->value.real);
switch (vp->format) {
case vpiRealVal:
vvp_send_real(destination, vp->value.real);
break;
case vpiIntVal:
vvp_send_real(destination, (double)vp->value.integer);
break;
default:
fprintf(stderr, "Cannot convert type %d to a real value.",
vp->format);
assert(0);
break;
}
return 0;
}

View File

@ -119,7 +119,7 @@ static int signal_get(int code, vpiHandle ref)
return 0;
default:
vpi_printf("signal_get: property %d is unknown\n", code);
fprintf(stderr, "signal_get: property %d is unknown\n", code);
return 0;
}
}

View File

@ -208,6 +208,7 @@ static vpiHandle sysfunc_put_value(vpiHandle ref, p_vpi_value vp)
vthread_put_bit(vpip_current_vthread, rfp->vbit, BIT4_Z);
break;
default:
fprintf(stderr, "Unsupported value %d.\n", vp->value.scalar);
assert(0);
}
break;
@ -239,6 +240,8 @@ static vpiHandle sysfunc_put_value(vpiHandle ref, p_vpi_value vp)
bit4 = BIT4_X;
break;
default:
fprintf(stderr, "Unsupported bit value %d.\n",
bit);
assert(0);
}
vthread_put_bit(vpip_current_vthread,
@ -251,6 +254,7 @@ static vpiHandle sysfunc_put_value(vpiHandle ref, p_vpi_value vp)
break;
default:
fprintf(stderr, "Unsupported format %d.\n", vp->format);
assert(0);
}
@ -275,6 +279,7 @@ static vpiHandle sysfunc_put_real_value(vpiHandle ref, p_vpi_value vp)
break;
default:
fprintf(stderr, "Unsupported format %d.\n", vp->format);
assert(0);
}
@ -308,6 +313,8 @@ static vpiHandle sysfunc_put_4net_value(vpiHandle ref, p_vpi_value vp)
val.set_bit(0, BIT4_Z);
break;
default:
fprintf(stderr, "Unsupported bit value %d.\n",
vp->value.scalar);
assert(0);
}
}
@ -346,6 +353,8 @@ static vpiHandle sysfunc_put_4net_value(vpiHandle ref, p_vpi_value vp)
bit4 = BIT4_X;
break;
default:
fprintf(stderr, "Unsupported bit value %d.\n",
bit);
assert(0);
}
val.set_bit(wdx+idx, bit4);
@ -379,6 +388,7 @@ static vpiHandle sysfunc_put_rnet_value(vpiHandle ref, p_vpi_value vp)
break;
default:
fprintf(stderr, "Unsupported format %d.\n", vp->format);
assert(0);
}
@ -507,6 +517,7 @@ vpiHandle vpip_build_vpi_call(const char*name, unsigned vbit, int vwid,
break;
default:
fprintf(stderr, "Unsupported type %d.\n", defn->info.type);
assert(0);
}
@ -594,6 +605,7 @@ void vpi_register_systf(const struct t_vpi_systf_data*ss)
cur->base.vpi_type = &vpip_sysfunc_def_rt;
break;
default:
fprintf(stderr, "Unsupported type %d.\n", ss->type);
assert(0);
}

View File

@ -358,6 +358,8 @@ static vpiHandle vthr_vec_put_value(vpiHandle ref, s_vpi_value*vp)
set_bit(rfp, 0, BIT4_Z);
break;
default:
fprintf(stderr, "Unsupported bit value %d.\n",
vp->value.scalar);
assert(0);
}
break;
@ -390,6 +392,7 @@ static vpiHandle vthr_vec_put_value(vpiHandle ref, s_vpi_value*vp)
}
default:
fprintf(stderr, "Unsupported format %d.\n", vp->format);
assert(0);
}
@ -550,86 +553,3 @@ vpiHandle vpip_make_vthr_word(unsigned base, const char*type)
return &obj->base;
}
/*
* $Log: vpi_vthr_vector.cc,v $
* Revision 1.24 2007/02/19 01:45:56 steve
* Improved version of pr1639064 patch handles huge values. (larry doolittle)
*
* Revision 1.23 2007/02/18 06:01:25 steve
* Fix print of integers as real. <larry Doolittle>
*
* Revision 1.22 2005/08/29 02:38:50 steve
* Eliminate int to vvp_bit4_t casts.
*
* Revision 1.21 2004/10/04 01:11:00 steve
* Clean up spurious trailing white space.
*
* Revision 1.20 2004/05/19 03:30:46 steve
* Support delayed/non-blocking assignment to reals and others.
*
* Revision 1.19 2004/02/20 01:52:25 steve
* vpiStringVal does not include leading nulls.
*
* Revision 1.18 2003/06/17 19:17:42 steve
* Remove short int restrictions from vvp opcodes.
*
* Revision 1.17 2003/06/11 05:07:31 steve
* support vpiVectorVal for value of thread vector.
*
* Revision 1.16 2003/05/29 03:46:21 steve
* Add tf_getp/putp support for integers
* and real valued arguments.
*
* Add tf_mipname function.
*
* Revision 1.15 2003/05/28 03:10:52 steve
* Some asserts that check for thread vector overflow.
*
* Revision 1.14 2003/03/13 04:59:21 steve
* Use rbufs instead of static buffers.
*
* Revision 1.13 2003/03/01 00:46:13 steve
* Careful about compiletf calls.
*
* Revision 1.12 2003/02/09 23:33:26 steve
* Spelling fixes.
*
* Revision 1.11 2003/02/06 17:41:33 steve
* Support constant types for thread words.
*
* Revision 1.10 2003/02/04 04:03:40 steve
* Add hex and binary formatting of real values.
*
* Revision 1.9 2003/01/26 18:16:22 steve
* Add %cvt/ir and %cvt/ri instructions, and support
* real values passed as arguments to VPI tasks.
*
* Revision 1.8 2002/08/12 01:35:09 steve
* conditional ident string using autoconfig.
*
* Revision 1.7 2002/05/12 00:32:21 steve
* Get thread vectors by vpiIntVal.
*
* Revision 1.6 2002/04/14 02:56:19 steve
* Support signed expressions through to VPI.
*
* Revision 1.5 2002/01/10 01:54:04 steve
* odd width thread vectors as strings.
*
* Revision 1.4 2001/12/30 21:31:38 steve
* Support vpiStringVal in vhtread vectors.
*
* Revision 1.3 2001/09/15 18:27:05 steve
* Make configure detect malloc.h
*
* Revision 1.2 2001/05/20 00:40:12 steve
* Get bit ordering right when making decimal strings.
*
* Revision 1.1 2001/05/10 00:26:53 steve
* VVP support for memories in expressions,
* including general support for thread bit
* vectors as system task parameters.
* (Stephan Boettcher)
*
*/

View File

@ -102,14 +102,9 @@ void vpip_format_strength(char*str, s_vpi_value*value)
str[2] = 'Z';
break;
default:
fprintf(stderr, "Unsupported type %d.\n",
value->value.strength[0].logic);
assert(0);
}
}
/*
* $Log: vpip_format.c,v $
* Revision 1.1 2003/04/20 02:49:07 steve
* acc_fetch_value support for %v format.
*
*/

View File

@ -101,6 +101,7 @@ void vpip_hex_str_to_vec4(vvp_vector4_t&val, const char*str)
val.set_bit(idx, BIT4_Z);
break;
default:
fprintf(stderr, "Unsupported digit %c(%d).\n", ch, ch);
assert(0);
break;
}
@ -157,20 +158,3 @@ void vpip_vec4_to_hex_str(const vvp_vector4_t&bits, char*buf,
}
}
/*
* $Log: vpip_hex.cc,v $
* Revision 1.4 2006/02/21 02:39:27 steve
* Support string values for memory words.
*
* Revision 1.3 2005/06/13 00:54:04 steve
* More unified vec4 to hex string functions.
*
* Revision 1.2 2002/08/12 01:35:09 steve
* conditional ident string using autoconfig.
*
* Revision 1.1 2002/05/11 04:39:35 steve
* Set and get memory words by string value.
*
*/

View File

@ -81,6 +81,7 @@ void vpip_oct_str_to_vec4(vvp_vector4_t&val, const char*str)
val.set_bit(idx, BIT4_Z);
break;
default:
fprintf(stderr, "Unsupported digit %c(%d).\n", ch, ch);
assert(0);
break;
}
@ -156,19 +157,3 @@ void vpip_vec4_to_oct_str(const vvp_vector4_t&bits, char*buf, unsigned nbuf,
}
}
/*
* $Log: vpip_oct.cc,v $
* Revision 1.4 2006/02/21 02:39:27 steve
* Support string values for memory words.
*
* Revision 1.3 2005/06/13 00:54:04 steve
* More unified vec4 to hex string functions.
*
* Revision 1.2 2002/08/12 01:35:09 steve
* conditional ident string using autoconfig.
*
* Revision 1.1 2002/05/11 04:39:36 steve
* Set and get memory words by string value.
*
*/

View File

@ -53,6 +53,7 @@ vvp_bit4_t add_with_carry(vvp_bit4_t a, vvp_bit4_t b, vvp_bit4_t&c)
c = BIT4_1;
return BIT4_1;
default:
fprintf(stderr, "Incorrect result %d.\n", sum);
assert(0);
}
}
@ -1230,6 +1231,8 @@ vvp_vector4_t c4string_to_vector4(const char*str)
bit = BIT4_Z;
break;
default:
fprintf(stderr, "Unsupported bit value %c(%d).\n", str[idx],
str[idx]);
assert(0);
bit = BIT4_0;
break;
@ -1452,12 +1455,14 @@ void vvp_fun_signal_base::recv_long(vvp_net_ptr_t ptr, long bit)
release(ptr, false);
break;
default:
fprintf(stderr, "Unsupported command %d.\n", bit);
assert(0);
break;
}
break;
default: // Other ports ar errors.
default: // Other ports are errors.
fprintf(stderr, "Unsupported port type %d.\n", ptr.port());
assert(0);
break;
}
@ -1517,6 +1522,7 @@ void vvp_fun_signal::recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit)
break;
default:
fprintf(stderr, "Unsupported port type %d.\n", ptr.port());
assert(0);
break;
}
@ -1557,6 +1563,7 @@ void vvp_fun_signal::recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
break;
default:
fprintf(stderr, "Unsupported port type %d.\n", ptr.port());
assert(0);
break;
}
@ -1682,6 +1689,7 @@ void vvp_fun_signal8::recv_vec8(vvp_net_ptr_t ptr, vvp_vector8_t bit)
break;
default:
fprintf(stderr, "Unsupported port type %d.\n", ptr.port());
assert(0);
break;
}
@ -1800,6 +1808,7 @@ void vvp_fun_signal_real::recv_real(vvp_net_ptr_t ptr, double bit)
break;
default:
fprintf(stderr, "Unsupported port type %d.\n", ptr.port());
assert(0);
break;
}
@ -2304,208 +2313,3 @@ vvp_bit4_t compare_gtge_signed(const vvp_vector4_t&a,
return BIT4_0;
}
/*
* $Log: vvp_net.cc,v $
* Revision 1.64 2007/06/12 02:36:58 steve
* handle constant inf values.
*
* Revision 1.63 2007/04/15 02:07:24 steve
* Fix div/mod calculation that caused a hang for some divisions.
*
* Revision 1.62 2007/03/22 16:08:19 steve
* Spelling fixes from Larry
*
* Revision 1.61 2007/03/07 03:55:42 steve
* Cast to remove ambiguities calling pow function.
*
* Revision 1.60 2007/03/07 00:38:16 steve
* Lint fixes.
*
* Revision 1.59 2007/03/02 06:13:22 steve
* Add support for edge sensitive spec paths.
*
* Revision 1.58 2007/02/05 01:08:10 steve
* Handle relink of continuous assignment.
*
* Revision 1.57 2006/12/10 17:15:48 steve
* Fix build error overloading pow function.
*
* Revision 1.56 2006/12/09 19:06:53 steve
* Handle vpiRealVal reads of signals, and real anyedge events.
*
* Revision 1.55 2006/11/22 06:10:05 steve
* Fix spurious event from net8 that is forced.
*
* Revision 1.54 2006/07/08 21:48:00 steve
* Delay object supports real valued delays.
*
* Revision 1.53 2006/06/18 04:15:50 steve
* Add support for system functions in continuous assignments.
*
* Revision 1.52 2006/03/15 19:15:34 steve
* const/non-const clash.
*
* Revision 1.51 2006/03/08 05:29:42 steve
* Add support for logic parameters.
*
* Revision 1.50 2006/01/03 06:19:31 steve
* Support wide divide nodes.
*
* Revision 1.49 2005/11/26 17:16:05 steve
* Force instruction that can be indexed.
*
* Revision 1.48 2005/11/25 17:55:26 steve
* Put vec8 and vec4 nets into seperate net classes.
*
* Revision 1.47 2005/11/10 13:27:16 steve
* Handle very wide % and / operations using expanded vector2 support.
*
* Revision 1.46 2005/10/04 04:41:07 steve
* Make sure the new size sticks in resize method.
*
* Revision 1.45 2005/08/30 00:49:42 steve
* Clean up a few overflowed shifts.
*
* Revision 1.44 2005/08/29 04:46:52 steve
* Safe handling of C left shift.
*
* Revision 1.43 2005/08/27 03:28:16 steve
* Be more cautios about accessing out-of-range bits.
*
* Revision 1.42 2005/08/27 02:34:43 steve
* Bring threads into the vvp_vector4_t structure.
*
* Revision 1.41 2005/07/06 04:29:25 steve
* Implement real valued signals and arith nodes.
*
* Revision 1.40 2005/06/27 21:13:14 steve
* Make vector2 multiply more portable.
*
* Revision 1.39 2005/06/26 01:57:22 steve
* Make bit masks of vector4_t 64bit aware.
*
* Revision 1.38 2005/06/24 02:16:42 steve
* inline the vvp_send_vec4_pv function.
*
* Revision 1.37 2005/06/22 18:30:12 steve
* Inline more simple stuff, and more vector4_t by const reference for performance.
*
* Revision 1.36 2005/06/22 00:04:49 steve
* Reduce vvp_vector4 copies by using const references.
*
* Revision 1.35 2005/06/21 22:48:23 steve
* Optimize vvp_scalar_t handling, and fun_buf Z handling.
*
* Revision 1.34 2005/06/20 01:28:14 steve
* Inline some commonly called vvp_vector4_t methods.
*
* Revision 1.33 2005/06/19 18:42:00 steve
* Optimize the LOAD_VEC implementation.
*
* Revision 1.32 2005/06/15 00:47:15 steve
* Resolv do not propogate inputs that do not change.
*
* Revision 1.31 2005/06/13 00:54:04 steve
* More unified vec4 to hex string functions.
*
* Revision 1.30 2005/06/12 15:13:37 steve
* Support resistive mos devices.
*
* Revision 1.29 2005/06/02 16:02:11 steve
* Add support for notif0/1 gates.
* Make delay nodes support inertial delay.
* Add the %force/link instruction.
*
* Revision 1.28 2005/05/17 20:54:56 steve
* Clean up definition of vvp_vector4_t insertion into ostream.
*
* Revision 1.27 2005/05/07 03:14:50 steve
* ostream insert for vvp_vector4_t objects.
*
* Revision 1.26 2005/04/28 04:59:53 steve
* Remove dead functor code.
*
* Revision 1.25 2005/04/25 04:42:17 steve
* vvp_fun_signal eliminates duplicate propagations.
*
* Revision 1.24 2005/04/13 06:34:20 steve
* Add vvp driver functor for logic outputs,
* Add ostream output operators for debugging.
*
* Revision 1.23 2005/04/09 06:00:58 steve
* scalars with 0-drivers are hiZ by definition.
*
* Revision 1.22 2005/04/09 05:30:38 steve
* Default behavior for recv_vec8 methods.
*
* Revision 1.21 2005/04/03 05:45:51 steve
* Rework the vvp_delay_t class.
*
* Revision 1.20 2005/04/01 06:02:45 steve
* Reimplement combinational UDPs.
*
* Revision 1.19 2005/03/18 02:56:04 steve
* Add support for LPM_UFUNC user defined functions.
*
* Revision 1.18 2005/03/12 04:27:43 steve
* Implement VPI access to signal strengths,
* Fix resolution of ambiguous drive pairs,
* Fix spelling of scalar.
*
* Revision 1.17 2005/02/14 01:50:23 steve
* Signals may receive part vectors from %set/x0
* instructions. Re-implement the %set/x0 to do
* just that. Remove the useless %set/x0/x instruction.
*
* Revision 1.16 2005/02/12 06:13:22 steve
* Add debug dumps for vectors, and fix vvp_scaler_t make from BIT4_X values.
*
* Revision 1.15 2005/02/10 04:54:41 steve
* Simplify vvp_scaler strength representation.
*
* Revision 1.14 2005/02/07 22:42:42 steve
* Add .repeat functor and BIFIF functors.
*
* Revision 1.13 2005/02/04 05:13:02 steve
* Add wide .arith/mult, and vvp_vector2_t vectors.
*
* Revision 1.12 2005/02/03 04:55:13 steve
* Add support for reduction logic gates.
*
* Revision 1.11 2005/01/30 05:06:49 steve
* Get .arith/sub working.
*
* Revision 1.10 2005/01/29 17:52:06 steve
* move AND to buitin instead of table.
*
* Revision 1.9 2005/01/28 05:34:25 steve
* Add vector4 implementation of .arith/mult.
*
* Revision 1.8 2005/01/22 17:36:15 steve
* .cmp/x supports signed magnitude compare.
*
* Revision 1.7 2005/01/22 00:58:22 steve
* Implement the %load/x instruction.
*
* Revision 1.6 2005/01/16 04:19:08 steve
* Reimplement comparators as vvp_vector4_t nodes.
*
* Revision 1.5 2005/01/09 20:11:16 steve
* Add the .part/pv node and related functionality.
*
* Revision 1.4 2005/01/01 02:12:34 steve
* vvp_fun_signal propagates vvp_vector8_t vectors when appropriate
*
* Revision 1.3 2004/12/31 06:00:06 steve
* Implement .resolv functors, and stub signals recv_vec8 method.
*
* Revision 1.2 2004/12/15 17:16:08 steve
* Add basic force/release capabilities.
*
* Revision 1.1 2004/12/11 02:31:30 steve
* Rework of internals to carry vectors through nexus instead
* of single bits. Make the ivl, tgt-vvp and vvp initial changes
* down this path.
*
*/