Navigation Menu

Skip to content

Commit

Permalink
Fix enum compile warnings and update ivl.def (windows compile).
Browse files Browse the repository at this point in the history
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
caryr authored and steveicarus committed Dec 1, 2010
1 parent 16e1570 commit d0b063b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions ivl.def
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion netenum.cc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pform.cc
Expand Up @@ -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);

Expand Down
5 changes: 5 additions & 0 deletions tgt-vvp/vvp_priv.h
Expand Up @@ -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)
*/
Expand Down
2 changes: 1 addition & 1 deletion vvp/vvp_net.cc
Expand Up @@ -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;
Expand Down

0 comments on commit d0b063b

Please sign in to comment.