ucb-bar / riscv-sodor

educational microarchitectures for risc-v isa
Other
688 stars 155 forks source link

csignals lookup table has wrong op1 and op2 sel for JALR. #38

Open ZiCog opened 6 years ago

ZiCog commented 6 years ago

I notice the csignals lookup table has incorrect definition of the op1sel and op2sel signals:

JALR -> List(Y, BR_JR , OP1_RS1, OP2_IMI , ALU_X , WB_PC4, REN_1, MEN_0, M_X , MT_X, CSR.N), Should be:

JALR -> List(Y, BR_JR , OP1_X, OP2_X , ALU_X , WB_PC4, REN_1, MEN_0, M_X , MT_X, CSR.N),

I have not been building riscv-sodor so I can imagine this makes no difference, the ALU result is discarded for JALR anyway.

It just confused me for a while as I'm writing my own Sodar 1-Stage in SpinalHDL and peeking at your csignals table to check I had got mine right.

codelec commented 6 years ago

that's fixed here https://github.com/librecores/riscv-sodor/commit/7d34a96284adc171c820137e64bc8a6c1a8210ee