-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update RV32 and RV64 architectures #127
Conversation
- semihosting implemented as a jitlib, to be called from the CoreDSL code
…/etiss into maltevonehren-coredsl_exceptions
Converted to draft until interrupt support is ready |
New updates:
|
cp.code() = std::string("//EBREAK\n"); | ||
|
||
// ----------------------------------------------------------------------------- | ||
{ // block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Docu purposes:
Since ebreak
now no longer returns etiss::RETURNCODE::CPUFINISHED
, what is the proper way to leave the simulation loop besides activating "loop-to-self" flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simulation exit is possible by loop-to-self with enabled detection or by semihosting, see https://github.com/tum-ei-eda/etiss_riscv_examples/
*((RV64IMACFD*)parent_.structure_)->X[gprid_] = (etiss_uint64) val; | ||
} | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Fields for:
- CSRs
- FPU Registers
- (Vector Registers)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be added later once these can be generated properly by M2-ISA-R
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the needed Fields manually (JoGei@12db114) to test VirtualStruct with this architecture update.
Tested the interrupt handling for edge-triggered peripheral interrupts in the etiss-sc project with your PR branch. |
This adds updates to the RV32 and RV64 architecture models, namely:
CodeParts
feature, allowing plugins to better insert their own JIT-CodeInterrupt support of these architecture models is currently untested and probably not implemented correctly. Adding interrupt support would be a matter of extending the trap entry function in CoreDSL to handle incoming interrupts, as well as extending ETISS to generate a corresponding call to said trap entry function.
RV64M needs 128 bit arithmetic, this is not supported per se in ETISS, see also #107. This patch uses the GCC
__[u]int128_t
types for limited support until a better solution is found. Because of this, RV64M only works when using GCC or LLVM as JIT engine, as TCC has no 128-bit arithmetic support.