OVP Forums - A community of assistance, help, questions, and answers.
|
View previous topic :: View next topic |
Author |
Message |
JensVkb
Joined: 08 Feb 2017 Posts: 31
|
Posted: Tue Apr 19, 2022 10:23 pm Post subject: RISC-V Cannot add U-type instruction |
|
|
We are trying to add a U-type instruction to the RISC-V model, but the available API seems to be missing some necessary definitions.
We've used the RISC-V model API and its documentation available under ${IMPERAS_HOME}/ImperasLib/source/riscv.ovpworld.org/processor/riscv/1.0/model together with the documents Imperas_RISCV_Custom_Instruction_Flow_Application_Note-5.pdf and OVP_VMI_Morph_Time_Function_Reference.pdf.
We know a custom instruction must first be added to the attribute table using the macro EXT_Instruction which is defined in riscvModelCallbackTypes.h. This macro requires the _PATTERN parameter of type riscvExtInstrPattern, a typedef of the enum riscvExtInstrPatternE.
However, this enum has no pattern for the U-type instruction. In other words, there is no pattern that defines the op xd, imm possibility.
We also tried to add this pattern to the enum and then use that added entry in the unpackExtInstruction function available in riscvDecode.c, analogous to the working of the other enums, but this seemed to break a lot of stuff. (or at least generate a lot of errors).
Is there any way to add a U-type instruction?
(We are using Imperas release 20211118) |
|
Back to top |
|
 |
LarryL
Joined: 26 Feb 2008 Posts: 118
|
Posted: Thu Apr 21, 2022 2:03 pm Post subject: |
|
|
Hi Jens,
Yes, it seems you have found a shortcoming in the OVP RISC-V model. We are reviewing this issue, and will respond with our recommendations in the next day or two. Most likely we are going to add the missing capabilities to the RISC-V model, then ask you and your team to add any custom features using the custom instruction flow application note you referenced in your post.
Best Regards,
Larry
Imperas _________________ Larry Lapides
Imperas |
|
Back to top |
|
 |
JimStraus OVP Technologist

Joined: 09 Dec 2008 Posts: 154
|
Posted: Mon Apr 25, 2022 11:56 am Post subject: |
|
|
Support for the RiscV J-, B-, S- and U-Type encodings has been added to the Riscv Extension decode helper functions. Ths change will be included with all future releases.
See doc/ovp/OVP_RISCV_Model_Custom_Extension_Guide.pdf for details. (Note - this document supersedes the older Imperas_RISCV_Custom_Instruction_Flow_Application_Note.pdf) |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Information regarding OVP © 2008-2022 Imperas Software
|