Skip to content

update asm to yaml for unify mapping#48

Merged
n0thingNoob merged 3 commits intomainfrom
new_verify_update
Mar 2, 2026
Merged

update asm to yaml for unify mapping#48
n0thingNoob merged 3 commits intomainfrom
new_verify_update

Conversation

@n0thingNoob
Copy link
Contributor

No description provided.

@n0thingNoob n0thingNoob requested review from Jackcuii and Copilot March 1, 2026 02:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CoreProgram instances 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.

Comment on lines 98 to 115
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
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@n0thingNoob n0thingNoob requested a review from syifan March 2, 2026 03:18
@n0thingNoob n0thingNoob merged commit ef144c1 into main Mar 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants