diff --git a/ivl.def b/ivl.def index 41ae9b00b7..7012c66821 100644 --- a/ivl.def +++ b/ivl.def @@ -26,6 +26,12 @@ ivl_discipline_flow ivl_discipline_name ivl_discipline_potential +ivl_enum_name +ivl_enum_names +ivl_enum_bits +ivl_enum_type +ivl_enum_width + ivl_event_any ivl_event_basename ivl_event_name @@ -42,6 +48,7 @@ ivl_expr_branch ivl_expr_def ivl_expr_delay_val ivl_expr_dvalue +ivl_expr_enumtype ivl_expr_event ivl_expr_file ivl_expr_lineno @@ -161,6 +168,8 @@ ivl_scope_children ivl_scope_def ivl_scope_def_file ivl_scope_def_lineno +ivl_scope_enumerate +ivl_scope_enumerates ivl_scope_event ivl_scope_events ivl_scope_file diff --git a/netenum.cc b/netenum.cc index 873c2b22c0..01bab4c00f 100644 --- a/netenum.cc +++ b/netenum.cc @@ -36,7 +36,8 @@ bool netenum_t::insert_name(size_t name_idx, perm_string name, const verinum&val { std::pair::iterator, bool> res; - assert(val.has_len() && val.len() == (msb_-lsb_+1)); + assert((msb_-lsb_+1) > 0); + assert(val.has_len() && val.len() == (unsigned)(msb_-lsb_+1)); // Insert a map of the name to the value. This also gets a // flag that returns true if the name is unique, or false diff --git a/pform.cc b/pform.cc index ae845b25a8..a9e02cb44b 100644 --- a/pform.cc +++ b/pform.cc @@ -2440,6 +2440,7 @@ void pform_set_integer_2atom(uint64_t width, bool signed_flag, list static void pform_set_enum(const struct vlltype&li, enum_type_t*enum_type, perm_string name) { + (void) li; // The line information is not currently needed. PWire*cur = pform_get_make_wire_in_scope(name, NetNet::REG, NetNet::NOT_A_PORT, enum_type->base_type); assert(cur); diff --git a/tgt-vvp/vvp_priv.h b/tgt-vvp/vvp_priv.h index 72e9fbabb2..aba52522b6 100644 --- a/tgt-vvp/vvp_priv.h +++ b/tgt-vvp/vvp_priv.h @@ -123,6 +123,11 @@ extern struct vector_info draw_vpi_func_call(ivl_expr_t expr, unsigned wid); extern int draw_vpi_rfunc_call(ivl_expr_t expr); +/* + * Enumeration draw routine. + */ +void draw_enumeration_in_scope(ivl_enumtype_t enumtype); + /* * Switches (tran) */ diff --git a/vvp/vvp_net.cc b/vvp/vvp_net.cc index 5680e8b927..9b973a8e76 100644 --- a/vvp/vvp_net.cc +++ b/vvp/vvp_net.cc @@ -1680,7 +1680,7 @@ bool vector4_to_value(const vvp_vector4_t&vec, double&val, bool signed_flag) bool vector2_to_value(const vvp_vector2_t&a, int32_t&val, bool is_signed) { val = 0; - int idx; + unsigned idx; int32_t mask; for (idx = 0, mask = 1 ; idx < a.size() && idx < 32 ; idx += 1, mask <<= 1) { if (a.value(idx)) val |= mask;