mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
SV: class queue/darray property foundation
Fold in Windows VPI routing for vpip_format_pretty, fix queue method argument elaboration via elaborate_rval_expr, reject class tasks used as expressions cleanly, and update br1005 now that class queues compile. Review follow-up: move vpip_format_pretty to vpip_format.cc with diagnostic return strings, restore NetNet-based queue method elaboration with a separate property path, drop spurious /devel/ from .gitignore, and bump copyright years on touched files. Formatting pass per inline review: brace style for multi-line if bodies, ||/&& at end-of-line continuations, switch/case indentation, single-line if returns, NetNet-based sys_task_method_ again, and aligned extern decls.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
# include <cmath>
|
||||
|
||||
# include "netlist.h"
|
||||
# include "netclass.h"
|
||||
# include "ivl_assert.h"
|
||||
# include "netmisc.h"
|
||||
|
||||
@@ -2182,6 +2183,25 @@ static bool get_array_info(const NetExpr*arg, long dim,
|
||||
left = range.get_msb();
|
||||
right = range.get_lsb();
|
||||
return false;
|
||||
}
|
||||
/* Class property (e.g. queue field): size is dynamic; defer to runtime
|
||||
* instead of folding to all-X in evaluate_array_funcs_. */
|
||||
if (const NetEProperty*prop = dynamic_cast<const NetEProperty*>(arg)) {
|
||||
const NetNet*obj = prop->get_sig();
|
||||
const netclass_t*cls = dynamic_cast<const netclass_t*>(obj->net_type());
|
||||
if (cls == 0) return true;
|
||||
ivl_type_t ptype = cls->get_prop_type(prop->property_idx());
|
||||
if (ptype == 0) return true;
|
||||
switch (ptype->base_type()) {
|
||||
case IVL_VT_DARRAY:
|
||||
case IVL_VT_QUEUE:
|
||||
case IVL_VT_STRING:
|
||||
defer = true;
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/* The argument must be a signal that has enough dimensions. */
|
||||
const NetESignal*esig = dynamic_cast<const NetESignal*>(arg);
|
||||
|
||||
Reference in New Issue
Block a user