Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TODO] Add RV32C support #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

howard0su
Copy link
Contributor

also fix the illegal instruction handling to raise the exception during execute stage.

The instruction fetch stage need some additional work to get this RV32C fully working.

also fix the illegal instruction handling to raise the exception during execute stage.
@howard0su
Copy link
Contributor Author

Create this to get some earlier code review.

// C0
2'b00: begin
case (instr_i[15:13])
3'b000: begin
Copy link
Member

@PulseRainmaker PulseRainmaker Aug 28, 2019

Choose a reason for hiding this comment

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

One suggestion is to make those constants as macro definitions, which can include both bit [15:13] and bit [1 :0], and put them in common.vh, like the following:

define C_ADDI4SPN (5'b000_00) define C_LW (5'b010_00)
define C_SW (5'b110_00) define C_NOP_ADDI (5'b000_01)
define C_JAL (5'b001_01) define C_J (5'b101_01)
define C_LI (5'b010_01) define C_BEQZ (5'b110_01)
define C_BNEZ (5'b111_01) define C_ADDI16SP_LUI (5'b011_01)
define C_SLLI (5'b000_10) define C_SWSP (5'b110_10)
define C_LWSP (5'b010_10) define C_JR_JALR_MV_ADD (5'b100_10)
`define C_MISC_ALU (5'b100_01)

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.

2 participants