Skip to content
Browse files

Fix enum compile warnings and update ivl.def (windows compile).

This patch fixes a few compilation warnings introduced by the
enumeration code. It also updates the ivl.def file so that the
proper routines get exported under windows.
  • Loading branch information...
1 parent 16e1570 commit d0b063b4a4986cb52f2a9c5853156de87b699ccf @caryr caryr committed with steveicarus Nov 29, 2010
Showing with 18 additions and 2 deletions.
  1. +9 −0 ivl.def
  2. +2 −1 netenum.cc
  3. +1 −0 pform.cc
  4. +5 −0 tgt-vvp/vvp_priv.h
  5. +1 −1 vvp/vvp_net.cc
View
9 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
View
3 netenum.cc
@@ -36,7 +36,8 @@ bool netenum_t::insert_name(size_t name_idx, perm_string name, const verinum&val
{
std::pair<std::map<perm_string,verinum>::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
View
1 pform.cc
@@ -2440,6 +2440,7 @@ void pform_set_integer_2atom(uint64_t width, bool signed_flag, list<perm_string>
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);
View
5 tgt-vvp/vvp_priv.h
@@ -124,6 +124,11 @@ extern struct vector_info draw_vpi_func_call(ivl_expr_t expr,
extern int draw_vpi_rfunc_call(ivl_expr_t expr);
/*
+ * Enumeration draw routine.
+ */
+void draw_enumeration_in_scope(ivl_enumtype_t enumtype);
+
+/*
* Switches (tran)
*/
extern void draw_switch_in_scope(ivl_switch_t sw);
View
2 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;

0 comments on commit d0b063b

Please sign in to comment.
Something went wrong with that request. Please try again.