Skip to content

initial merge b4 rebase. csr can now write to mtvec, added fence as a nop#67

Open
nganjehloo wants to merge 60 commits intomasterfrom
system_csr
Open

initial merge b4 rebase. csr can now write to mtvec, added fence as a nop#67
nganjehloo wants to merge 60 commits intomasterfrom
system_csr

Conversation

@nganjehloo
Copy link
Contributor

@nganjehloo nganjehloo commented Jun 18, 2019

I made a slight change to csr unit to allow a program to change the exception/trap vector (mtvec register) and added the fence instruction as a nop

Nima Ganjehloo and others added 30 commits May 14, 2019 18:24
Nima Ganjehloo and others added 28 commits May 16, 2019 18:23
Copy link
Contributor

@powerjg powerjg left a comment

Choose a reason for hiding this comment

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

Remind me to help you learn how to rebase :). We need to clean up the commit history. There's 60 commits for 17 lines of changes!

/* write address to trap too
*/
when (decoded_addr(MCSRs.mtvec)) {
val new_mtvec = wdata.asTypeOf(new MTVec())
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't you just say reg_mtvec := wdata.asTypeOf(new MTVec())?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose I could. I just wanted to be explicit in case of any weird optimization trickery. Should I change it?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's up to you.

@jardhu
Copy link
Collaborator

jardhu commented Nov 15, 2019

@nganjehloo, when you come back to this pull request make sure to place the CSR within the dinocpu.components package, or maybe its own package if necessary. I refactored the dinocpu namespace in #95 to better organize the code, but did not touch your code as that would probably introduce some merging issues.

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