Commit Graph

8 Commits

Author SHA1 Message Date
mjoekhan 0568961f6b SystemVerilog: support sum() with expressions on arrays
Enable queue/darray sum() with (expr) by lowering to a dedicated _with sfunc, evaluating the with-expression per item, and reducing appended values via new %queue/sum/obj/v runtime support. Add regressions for queue and dynamic-array sum_with and update locator docs.

Made-with: Cursor
2026-04-28 22:59:54 +05:00
mjoekhan f9e3f9a3e4 SystemVerilog: integral sum() reduction for queues and dynamic arrays
Add $ivl_queue_method$sum elaboration, eval_vec4 lowering (%queue/sum/v and property variant), and VVP runtime that sums words with Verilog-style vec4 addition. Empty arrays yield 0. Regressions: sv_queue_sum, sv_darray_sum; document in README_sv_queue_locators.

Made-with: Cursor
2026-04-28 22:29:40 +05:00
mjoekhan 0cd7205585 SystemVerilog: support locator methods on class queue properties
Enable queue locator elaboration for class properties typed as queues (not only dynamic arrays), and add regression coverage for class queue property find/unique/min/max behavior.

Made-with: Cursor
2026-04-28 21:36:01 +05:00
mjoekhan 7cac25cbd1 SystemVerilog: add unique()/unique_index() with predicates
Enable unique and unique_index locator methods with `with (...)` for queues, dynamic arrays, and class dynamic-array properties, including VVP opcode/runtime support and regression coverage.

Made-with: Cursor
2026-04-28 21:10:11 +05:00
mjoekhan 8f18edd20d SystemVerilog: class darray property locator methods and VVP prop fixes
Add class dynamic-array property support for locator methods (find*, unique*, min/max, with predicates) by elaborating dynamic-array property method calls to queue-method sfuns. Extend VVP property paths to treat property values as queue-or-darray sources, not queue-only, and fix object-stack handling in property locator loops so temporary accumulator objects do not hide the class object.

Add regression coverage for class dynamic-array property locators and update locator-method test documentation/listing.

Made-with: Cursor
2026-04-28 20:38:10 +05:00
mjoekhan 3ccba27edb SystemVerilog: darray unique methods and min/max with(predicate)
Add dynamic-array unique() and unique_index() support and extend queue/darray min() and max() to accept locator with(...) predicates. Generate dedicated _with sfuns for min/max, emit VVP code for filtered scans, and reduce through new object-stack min/max opcodes.

Cover the new behavior with ivtest regressions for darray unique and queue/darray min/max with predicates, and update locator method documentation.

Made-with: Cursor
2026-04-28 16:57:23 +05:00
mjoekhan 30b4afa7d2 SystemVerilog: add min/max locator methods for queue and darray
Implement queue and dynamic-array min()/max() for integral vec4 element types, with VVP support for both queue-backed and darray-backed storage and regressions in ivtest. Keep min/max as no-arg methods and document current behavior alongside existing locator tests.

Made-with: Cursor
2026-04-28 16:42:54 +05:00
mjoekhan 20bd360aec SystemVerilog: queue/darray locator methods (find*, unique*) and VVP darray support
Implement array locator methods for SystemVerilog queues and dynamic arrays:
find, find_index, find_first, find_first_index, find_last, find_last_index,
unique, and unique_index. Support both value arguments (equality) and
with (predicate) forms using implicit item and index in the iterator scope.

Elaboration returns queue-typed results for first/last/index locators per LRM
(empty queue when no match). Fix assignment compatibility between queues and
dynamic arrays where element types match.

VVP: extend %queue/size, %queue/word, %queue/find*, and %queue/unique* paths
so nets holding vvp_darray (including atom-backed int[]) are handled, not
only vvp_queue_vec4. Queue types still subclass vvp_darray; resolve vec4
queues before plain dynamic arrays. Fall back to the legacy get_queue_object
path for non-vec4 queues. Document opcode and source file touchpoints in
ivtest/ivltests/README_sv_queue_locators.txt.

Add vvp regressions: sv_queue_find*, sv_queue_unique, sv_queue_find_locators_ext,
sv_darray_find_locators.

Made-with: Cursor
2026-04-15 00:59:58 +05:00