Skip to content

Conversation

@CohenArthur
Copy link
Member

We need to rebase the main branch, only the last commit should be reviewed here

nathan-TT and others added 18 commits September 17, 2025 20:36
Signed-off-by: Pierre-Emmanuel Patry <[email protected]>

Command buffer encodings implementation

We have the cmdbuf and reg operand implemented as d0 and d1
respectively. The instruction follows the format, for example:

`ttrocc.cmdbuf_wr_reg dest, cmdbuf, reg, rs1, rs2`, where:

cmdbuf = 1|0
reg = 0..63

Here we have the implementation of:
  - cmdbuf_wr_reg
  - cmdbuf_rd_reg
  - cmdbuf_get_vc_space
  - cmdbuf_get_vc_space_vc
  - cmdbuf_wr_sent

A minimal test for each has also been added.

Command buffer encodings implementation (cont.)

Here we have the implementation of:
 - cmdbuf_wr_sent_trid
 - cmdbuf_tr_ack
 - cmdbuf_tr_ack_trid
 - cmdbuf_reset
 - cmdbuf_idma_get_vc_space
 - cmdbuf_idma_get_vc_space_vc
 - cmdbuf_idma_tr_ack
 - cmdbuf_idma_tr_ack_trid
 - cmdbuf_issue_trans
 - cmdbuf_issue_inline_trans
 - cmdbuf_issue_addr_trans
 - cmdbuf_issue_read1_trans
 - cmdbuf_issue_read2_trans
 - cmdbuf_issue_write1_trans
 - cmdbuf_issue_write2_trans

A minimal test for each has also been added.

Changed vendor to tt.rocc

Refactored ROCC instructions to follow the convention

Add misc instruction to binutils

Add the following instructions:
- dbg_postcode
- noc_fence
- llk_intf_read
- llk_intf_write
- fds_intf_read
- fds_intf_write

Add context switch instruction support

Add support for the following instructions:
- ttrocc.cs_alloc
- ttrocc.cs_dealloc
- ttrocc.cs_save
- ttrocc.cs_restore

Add minimal test for each instruction.

Simple command buffer encodings implementation

Added unused operands to rd and wr SCMDBUF instructions

Addrgen encodings implemention + custom operands

Move operand fields to standard RISCV file

Added reg operand to scmdbuf_wr_reg and rd_reg

The mnemonics are:

`scmdbuf_wr_reg rd, reg, rs1, rs2`

`scmdbuf_rd_reg rd, reg, rs1, rs2`

We specify all the registers to follow the CSR convention as requested
for the read and write instructions.

Add missing addrgen instructions

- addrgen_pop_both
- addrgen_push_src
- addrgen_push_src_pop_x
- addrgen_push_dest
- addrgen_push_dest_pop_x
- addrgen_push_both
- addrgen_push_both_pop_x
Add a limit suffix to constrain values under an upper bound and constrain
ttrocc register operands with this new limit.
Add regular and immediate value bound tests.
Add cmdbuf regular and immediate value bound tests.
Add scmdbuf regular and immediate value bound tests.
Add support for the following instructions:
- WR_TILES_TO_PROCESS_THRES_TR_ACK
- WR_TILES_TO_PROCESS_THRES_WR_SENT
- WR_TILES_TO_PROCESS_THRES_IDMA_TR_ACK
- RD_TILES_TO_PROCESS_THRES_TR_ACK
- RD_TILES_TO_PROCESS_THRES_WR_SENT
- RD_TILES_TO_PROCESS_THRES_IDMA_TR_ACK
- CMDBUF_READ_TILES_TO_PROCESS_TR_ACK
- CMDBUF_READ_TILES_TO_PROCESS_TR_ACK_TR_ID
- CMDBUF_READ_TILES_TO_PROCESS_WR_SENT
- CMDBUF_READ_TILES_TO_PROCESS_WR_SENT_TR_ID
- CMDBUF_READ_TILES_TO_PROCESS_IDMA_TR_ACK
- CMDBUF_READ_TILES_TO_PROCESS_IDMA_TR_ACK_TR_ID
- CMDBUF_CLEAR_TILES_TO_PROCESS_TR_ACK
- CMDBUF_CLEAR_TILES_TO_PROCESS_WR_SENT
- CMDBUF_CLEAR_TILES_TO_PROCESS_IDMA_TR_ACK
- SCMDBUF_READ_TILES_TO_PROCESS_TR_ACK
- SCMDBUF_READ_TILES_TO_PROCESS_TR_ACK_TR_ID
- SCMDBUF_READ_TILES_TO_PROCESS_WR_SENT
- SCMDBUF_READ_TILES_TO_PROCESS_WR_SENT_TR_ID
- SCMDBUF_READ_TILES_TO_PROCESS_IDMA_TR_ACK
- SCMDBUF_READ_TILES_TO_PROCESS_IDMA_TR_ACK_TR_ID
- SCMDBUF_CLEAR_TILES_TO_PROCESS_TR_ACK
- SCMDBUF_CLEAR_TILES_TO_PROCESS_WR_SENT
- SCMDBUF_CLEAR_TILES_TO_PROCESS_IDMA_TR_ACK

Add corresponding gas tests.
@CohenArthur CohenArthur force-pushed the fix-name-cmdbuf-issue-inline-addr-trans branch from d369f0b to 81821b2 Compare January 23, 2026 10:58
Copy link
Member

@P-E-P P-E-P left a comment

Choose a reason for hiding this comment

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

Looks good.

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.

4 participants