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

dm_exception_addr_i hardwired to 0x0 #194

Closed
MikeOpenHWGroup opened this issue Nov 11, 2021 · 5 comments
Closed

dm_exception_addr_i hardwired to 0x0 #194

MikeOpenHWGroup opened this issue Nov 11, 2021 · 5 comments
Assignees
Labels
bug Something isn't working Gates V1.0.0 RTL Freeze

Comments

@MikeOpenHWGroup
Copy link
Member

As of c3ace54, the top-level primary input to the CV32E40P core in the core-v-mcu dm_exception_addr_i[31:0] is hardwired to 0x0 in the MCU (link).

As discussed in core-v-verif issues #820, dm_exception_addr_i should be set to the "appropriate address in the Debug Module".

It is not clear to me what the precise definition of "appropriate address in the Debug Module" is. From the core's perspective it is just a 32-bit number since the CV32E40P has a flat 32-bit wide memory space. Within the MCU the "appropriate address in the Debug Module" could be a fixed address in physical memory, or it could be an address in within the debug module itself.

@davideschiavone
Copy link
Contributor

davideschiavone commented Nov 11, 2021

@bluewww, @gmartin102 do we have an exception routine inside the Debug ROM or somewhere in the Software?
This is the address the core jumps to when in DEBUG MODE, and an illegal instruction, or an ecall, or an mret is encountered.
Pining also @jeremybennett to know how this is handled in SW

@gmartin102
Copy link
Contributor

@davideschiavone, yes i did a little investigation and the debug rom does have an exception routine (_exception:) that is for exception processing while in debug mode. I believe the address is 0x1a11080c, so I plan to try that address and make sure nothing breaks but i'm not to sure how to actually test it. maybe @jeremybennett has some idea on how to test it

@davideschiavone
Copy link
Contributor

ok cool, then if that is the case we can update the RTL.

@davideschiavone
Copy link
Contributor

the software team should decide whether how the exception should be treated. It can also become programmable by adding a register in the APB-domain that is written by the crt0, ROM, or jtag loader. Of course, it's not the safest option but it is one option.

@gmartin102
Copy link
Contributor

Fixed - dm_execption address set to 0x1a11080c as specified in dm module rom code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Gates V1.0.0 RTL Freeze
Projects
None yet
Development

No branches or pull requests

3 participants