From 697701a26e1f75c428779e5b2f6979a0ab00f3c9 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sun, 7 Sep 2014 17:48:19 -0700 Subject: [PATCH] Sorry messages for property arrays. --- elab_expr.cc | 11 ++++++++++- elab_lval.cc | 7 +++++++ elab_scope.cc | 9 +++++---- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/elab_expr.cc b/elab_expr.cc index d0eb01c2a..d27ad8adf 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -30,6 +30,7 @@ # include "netlist.h" # include "netclass.h" # include "netenum.h" +# include "netparray.h" # include "netvector.h" # include "discipline.h" # include "netmisc.h" @@ -3318,7 +3319,8 @@ NetExpr* PEIdent::elaborate_expr_class_member_(Design*des, NetScope*scope, << "Found member " << member_name << " is a member of class " << class_type->get_name() << ", context scope=" << scope_path(scope) - << ", so synthesizing a NetEProperty." << endl; + << ", type=" << *class_type->get_prop_type(pidx) + << ", so making a NetEProperty." << endl; } property_qualifier_t qual = class_type->get_prop_qual(pidx); @@ -3334,6 +3336,13 @@ NetExpr* PEIdent::elaborate_expr_class_member_(Design*des, NetScope*scope, return class_static_property_expression(this, class_type, member_name); } + ivl_type_t tmp_type = class_type->get_prop_type(pidx); + if (/* const netuarray_t*tmp_ua =*/ dynamic_cast(tmp_type)) { + cerr << get_fileline() << ": sorry: " + << "Unpacked array properties not supported yet." << endl; + des->errors += 1; + } + NetEProperty*tmp = new NetEProperty(this_net, member_name); tmp->set_line(*this); return tmp; diff --git a/elab_lval.cc b/elab_lval.cc index 3888a3dbf..6d647652c 100644 --- a/elab_lval.cc +++ b/elab_lval.cc @@ -488,6 +488,13 @@ NetAssign_* PEIdent::elaborate_lval_method_class_member_(Design*des, } } + ivl_type_t tmp_type = class_type->get_prop_type(pidx); + if (const netuarray_t*tmp_ua = dynamic_cast(tmp_type)) { + cerr << get_fileline() << ": sorry: " + << "Unpacked array properties (l-values) not supported yet." << endl; + des->errors += 1; + } + NetAssign_*this_lval = new NetAssign_(this_net); this_lval->set_property(member_name); if (canon_index) this_lval->set_word(canon_index); diff --git a/elab_scope.cc b/elab_scope.cc index 04cff8861..5c3db1c34 100644 --- a/elab_scope.cc +++ b/elab_scope.cc @@ -440,12 +440,13 @@ static void elaborate_scope_class(Design*des, NetScope*scope, PClass*pclass) // elaborated class definition. for (map::iterator cur = use_type->properties.begin() ; cur != use_type->properties.end() ; ++ cur) { - if (debug_scopes) { - cerr << pclass->get_fileline() << ": elaborate_scope_class: " - << " Property " << cur->first << endl; - } ivl_type_s*tmp = cur->second.type->elaborate_type(des, scope); ivl_assert(*pclass, tmp); + if (debug_scopes) { + cerr << pclass->get_fileline() << ": elaborate_scope_class: " + << " Property " << cur->first + << " type=" << *tmp << endl; + } use_class->set_property(cur->first, cur->second.qual, tmp); }