Fix for br1005 - segfault when SV queue is declared inside a class.
For now, output a "sorry" message to indicate this is not yet supported.
This commit is contained in:
parent
ad87704809
commit
ad1101cc80
14
elab_type.cc
14
elab_type.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2014 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2012-2016 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -17,11 +17,13 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
# include "PExpr.h"
|
||||||
# include "pform_types.h"
|
# include "pform_types.h"
|
||||||
# include "netlist.h"
|
# include "netlist.h"
|
||||||
# include "netclass.h"
|
# include "netclass.h"
|
||||||
# include "netdarray.h"
|
# include "netdarray.h"
|
||||||
# include "netenum.h"
|
# include "netenum.h"
|
||||||
|
# include "netqueue.h"
|
||||||
# include "netparray.h"
|
# include "netparray.h"
|
||||||
# include "netscalar.h"
|
# include "netscalar.h"
|
||||||
# include "netstruct.h"
|
# include "netstruct.h"
|
||||||
|
|
@ -245,6 +247,16 @@ ivl_type_s* uarray_type_t::elaborate_type_raw(Design*des, NetScope*scope) const
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Special case: if the dimension is null:nil. this is a queue.
|
||||||
|
if (cur->second==0 && dynamic_cast<PENull*>(cur->first)) {
|
||||||
|
cerr << get_fileline() << ": sorry: "
|
||||||
|
<< "SV queues inside classes are not yet supported." << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
|
||||||
|
ivl_type_s*res = new netqueue_t(btype);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
vector<netrange_t> dimensions;
|
vector<netrange_t> dimensions;
|
||||||
bool bad_range = evaluate_ranges(des, scope, dimensions, *dims);
|
bool bad_range = evaluate_ranges(des, scope, dimensions, *dims);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ void pform_class_property(const struct vlltype&loc,
|
||||||
if (! curp->index.empty()) {
|
if (! curp->index.empty()) {
|
||||||
list<pform_range_t>*pd = new list<pform_range_t> (curp->index);
|
list<pform_range_t>*pd = new list<pform_range_t> (curp->index);
|
||||||
use_type = new uarray_type_t(use_type, pd);
|
use_type = new uarray_type_t(use_type, pd);
|
||||||
|
FILE_NAME(use_type, loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
pform_cur_class->type->properties[curp->name]
|
pform_cur_class->type->properties[curp->name]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue