Skip to content

packetization fix - #15

Closed
advaywelling wants to merge 14 commits into
masterfrom
packets_advay
Closed

packetization fix#15
advaywelling wants to merge 14 commits into
masterfrom
packets_advay

Conversation

@advaywelling

Copy link
Copy Markdown

hopefully works now.
flag works the same as before.
if this works, i'll make the "nice to have" changes.

@pbantval3

pbantval3 commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

errors:

  • missing opcodes:
    • sge, sgeu, sgef -> don't have dest & both srcs
    • lh, lb, sh, sb -> memory flag & dest/src(s)
      • (we probably dont use these tho idk if hw even supports)
    • auipc -> dest only (no src)
    • beq/bne -> rd = p_dest, rs1/rs2 = srcs (as normal)
    • jpnz -> rd = p_src
    • prsw -> rs1 = p_src, rs2 = src (main reg file)
    • prlw -> rd = p_dest, rs2 = src
    • halt -> recognize as its own packet, any instruction after should also be the start of a separate packet
  • Predicate handling
    • I believe predicates are handled wrong. the predicate field should also be parsed as a different type of src for all instructions with predicates.
    • predicate dest should be parsed as rd for prlw, bne, beq as mentioned above
    • the predicate register file is different from the main register file, but it still has data hazards that matter.
    • ideally no need to use renaming on the predicate register file, just maintain correctness from hazards by making inserting additional packets if predicate register file has RAW/WAW hazards.

must:

  • fix errors
  • remove everything under compiled_kernels
    • not needed, bad to push old binaries as someone might take use it unknowingly

nice to do:

  • concatenate both no-packetize and improved-packetize into 1 flag where you can specify --packets-greedy --packets-rr or some equivalent format. See -O[0/1/2] flag as this is similar to different levels of optimization passes.
  • move the packetization stuff into ppci directory instead of leaving it outside use logger to print instead of external
    • printing format on compilation looks like [time] | [type: INFO/ERROR] | [stage in pipeline] | [action]
    • see if there is an internal print tool for this.

@pbantval3 pbantval3 closed this Apr 29, 2026
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