Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for parsing “SIMD/broadcast” ASM blocks (PE(*,*)) and emitting per-core YAML mappings by expanding a template across an array.
Changes:
- Added parsing for
PE(*,*)headers and# Array Size: <rows>x<columns>metadata. - Implemented SIMD template expansion to generate
CorePrograminstances for all cores. - Updated compiled-II inference to work off the final ordered cores (explicit or expanded).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tool/asm_to_yaml.py | Adds broadcast PE parsing, array-size handling, and template expansion into per-core programs. |
| test/Zeonica_Testbench | Updates submodule pointer (testbench revision). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tool/asm_to_yaml.py
Outdated
| next_op_id = 0 | ||
| for row in range(rows): | ||
| for column in range(columns): | ||
| groups: List[InstructionGroup] = [] | ||
| for group in template_groups: | ||
| operations: List[Operation] = [] | ||
| for op in group.operations: | ||
| operations.append( | ||
| Operation( | ||
| opcode=op.opcode, | ||
| time_step=op.time_step, | ||
| invalid_iterations=op.invalid_iterations, | ||
| src_operands=[dict(item) for item in op.src_operands], | ||
| dst_operands=[dict(item) for item in op.dst_operands], | ||
| op_id=next_op_id, | ||
| ) | ||
| ) | ||
| next_op_id += 1 |
There was a problem hiding this comment.
In SIMD/broadcast mode, op_id assignment restarts from 0 inside expand_simd_template, while template parsing in parse_asm already increments an op_id counter for operations. This makes op_id semantics inconsistent between explicit-PE and broadcast-PE inputs, and can break any downstream logic that expects op_id stability/uniqueness across runs or parity with explicit mode. Consider defining a single op_id policy: e.g., (a) pass an initial counter into expand_simd_template and return the final counter, using one global monotonically-increasing sequence like explicit mode, or (b) derive op_id deterministically from (core_index, template_local_op_index) so IDs are unique and reproducible across expansions.
No description provided.