diff --git a/Module.h b/Module.h index daca15078..cd8ae1fb5 100644 --- a/Module.h +++ b/Module.h @@ -94,7 +94,7 @@ class Module : public PScope, public LineInfo { module is elaborated. During parsing, I put the parameters into this map. */ struct param_expr_t : public LineInfo { - param_expr_t() : range(0) { } + param_expr_t() : type(IVL_VT_NO_TYPE), msb(0), lsb(0), signed_flag(false), expr(0), range(0) { } // Type information ivl_variable_type_t type; PExpr*msb; diff --git a/ivl.def b/ivl.def index 7c46bfbfd..6a74bf7cb 100644 --- a/ivl.def +++ b/ivl.def @@ -53,6 +53,9 @@ ivl_file_table_index ivl_file_table_item ivl_file_table_size +ivl_island_flag_set +ivl_island_flag_test + ivl_logic_attr ivl_logic_attr_cnt ivl_logic_attr_val diff --git a/net_design.cc b/net_design.cc index 25845240a..05cd2cfb8 100644 --- a/net_design.cc +++ b/net_design.cc @@ -529,6 +529,10 @@ void NetScope::evaluate_parameters(Design*des) cerr << (*cur).second.get_fileline() << ": internal error: " << "Unexpected expression type " << (*cur).second.type << "." << endl; + cerr << (*cur).second.get_fileline() << ": : " + << "Parameter name: " << (*cur).first << endl; + cerr << (*cur).second.get_fileline() << ": : " + << "Expression is: " << *(*cur).second.expr << endl; ivl_assert((*cur).second, 0); break; } diff --git a/net_scope.cc b/net_scope.cc index 4425a2a49..c8a986fb2 100644 --- a/net_scope.cc +++ b/net_scope.cc @@ -121,6 +121,9 @@ NetExpr* NetScope::set_parameter(perm_string key, NetExpr*expr, ivl_assert(file_line, ref.range == 0); ref.range = range_list; ref.set_line(file_line); + + ivl_assert(file_line, type != IVL_VT_NO_TYPE); + return res; } diff --git a/netlist.cc b/netlist.cc index 22c9f03ee..fefd23581 100644 --- a/netlist.cc +++ b/netlist.cc @@ -761,10 +761,6 @@ NetPartSelect::NetPartSelect(NetNet*sig, unsigned off, unsigned wid, pin(0).set_dir(Link::INPUT); pin(1).set_dir(Link::OUTPUT); break; - case NetPartSelect::BI: - pin(0).set_dir(Link::OUTPUT); - pin(1).set_dir(Link::OUTPUT); - break; } pin(0).set_name(perm_string::literal("Part"), 0); pin(1).set_name(perm_string::literal("Vect"), 0); @@ -787,10 +783,6 @@ NetPartSelect::NetPartSelect(NetNet*sig, NetNet*sel, pin(0).set_dir(Link::INPUT); pin(1).set_dir(Link::OUTPUT); break; - case NetPartSelect::BI: - pin(0).set_dir(Link::PASSIVE); - pin(1).set_dir(Link::PASSIVE); - break; } pin(2).set_dir(Link::INPUT); diff --git a/parse.y b/parse.y index 16702ccf9..0775a325c 100644 --- a/parse.y +++ b/parse.y @@ -2486,7 +2486,7 @@ localparam_assign_decl localparam_assign_list { param_active_range = 0; param_active_signed = false; - param_active_type = IVL_VT_NO_TYPE; + param_active_type = IVL_VT_LOGIC; } | K_integer { param_active_range = 0; @@ -2496,7 +2496,7 @@ localparam_assign_decl localparam_assign_list { param_active_range = 0; param_active_signed = false; - param_active_type = IVL_VT_NO_TYPE; + param_active_type = IVL_VT_LOGIC; } | K_real { param_active_range = 0; @@ -2506,7 +2506,7 @@ localparam_assign_decl localparam_assign_list { param_active_range = 0; param_active_signed = false; - param_active_type = IVL_VT_NO_TYPE; + param_active_type = IVL_VT_LOGIC; } ;