Skip to content

Conversation

@pietraferreira
Copy link

For this set of instructions we implement a new reg and cmdbuf operands which are 0..31 and 0|1 (32bit) instead of 0..63 and 0|1 (64bit).

Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

LGTM!

tt.rocc.addrgen_wr_reg x0, 1, 2, a1, x0
tt.rocc.addrgen_rd_reg a0, 0, 1, x0, x0
tt.rocc.addrgen_reset 1
tt.rocc.addrgen_reset_counters 0, x0
Copy link
Member

Choose a reason for hiding this comment

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

So here we use 0, x0 because rs1 is marked as used in the spec? even though we don't really pass any values to the instruction?

Parameter Type Description
cmdbuf uint64_t Command buffer ID (0-based)

Instruction Fields:

Field Bits Value Description
funct7 31-25 0x1A Function code
rs2 24-20 0x00 Unused (x0)
rs1 19-15 0x00 Zero value
xs2 12 0 rs2 not used
xs1 13 1 rs1 used

Copy link
Author

Choose a reason for hiding this comment

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

Yes. Because it says "rs1 used" then I do set it as so, but put a zero value in for the test so it matches the spec. But I guess yes, it seems like we will always pass in a zero value.

@P-E-P P-E-P merged commit c27f8b9 into pf-base Oct 20, 2025
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