Skip to content

Questions regarding custom instruction extension using the CFU interface #1490

@Kyrie-T

Description

@Kyrie-T

Subject: Inquiry about the best practices for implementing custom instructions via CFU

Hello NEORV32 Team,

I am a beginner exploring the NEORV32 processor, and I am planning to implement a custom instruction extension using the CFU (Custom Functions Unit). I have a few questions regarding the integration process:

  1. Scope of Modification: Aside from implementing the logic in neorv32_cfu.vhd and enabling RISCV_ISA_Zxcfu in the top entity, are there any mandatory modifications required in the core pipeline (e.g., neorv32_cpu_control.vhd) to support new custom-X opcodes?
  2. Pipeline Latency: If my custom logic requires multiple clock cycles, how should I properly handle the cfu_done_o signal to ensure the CPU pipeline stalls correctly? Is there a recommended maximum latency?
  3. Software Toolchain: For a beginner, is it recommended to use the neorv32_cfu.h intrinsic functions, or should I define my own inline assembly macros to trigger the CFU?
  4. Verification: Is there a specific testbench or a minimal software example you recommend for verifying that the CFU is correctly communicating with the register file?

Thank you for your time and for this great open-source project!

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions