-
Notifications
You must be signed in to change notification settings - Fork 168
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
zilsd/zcmlsd Support #490
base: master
Are you sure you want to change the base?
zilsd/zcmlsd Support #490
Conversation
c_emulator/riscv_sim.c
Outdated
@@ -141,6 +141,8 @@ static struct option options[] = { | |||
{"trace-output", required_argument, 0, OPT_TRACE_OUTPUT }, | |||
{"inst-limit", required_argument, 0, 'l' }, | |||
{"enable-zfinx", no_argument, 0, 'x' }, | |||
{"enable-zilsd", no_argument, 0, 'y' }, |
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.
Can you use long options like OPT_ENABLE_WRITABLE_FIOM
?
model/riscv_insts_base.sail
Outdated
@@ -43,6 +43,7 @@ | |||
/* (ERC) under the European Union’s Horizon 2020 research and innovation */ | |||
/* programme (grant agreement 789108, ELVER). */ | |||
/* */ | |||
/* Modified by NXP on 02/02/2024 */ |
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.
This seems to be based on an older commit - can you rebase on master
?
model/riscv_insts_base.sail
Outdated
signed loads also present for widths equal to xlen_bytes */ | ||
/* for Zilsd unsigned loads are only present for widths strictly less than xlen_bytes*2, | ||
signed loads also present for widths equal to xlen_bytes*2 */ | ||
mapping clause encdec = LOAD(imm, rs1, rd, is_unsigned, size, false, false) if (word_width_bytes(size) < sizeof(xlen_bytes)) | (not(is_unsigned) & word_width_bytes(size) <= sizeof(xlen_bytes)) | (haveZilsd() & (word_width_bytes(size) < sizeof(xlen_bytes)*2) | (not_bool(is_unsigned) & word_width_bytes(size) <= sizeof(xlen_bytes)*2)) |
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.
This guard clause is crazy long now. Probably worth moving to a function?
model/riscv_insts_base.sail
Outdated
|
||
val extend_value : forall 'n, 0 < 'n <= xlen_bytes. (bool, MemoryOpResult(bits(8 * 'n))) -> MemoryOpResult(xlenbits) | ||
function extend_value(is_unsigned, value) = match (value) { | ||
MemValue(v) => MemValue(if is_unsigned then zero_extend(v) else sign_extend(v) : xlenbits), | ||
MemException(e) => MemException(e) | ||
} | ||
|
||
val extend_value_pair : forall 'n, 0 < 'n <= xlen_bytes*2. (bool, MemoryOpResult(bits(8 * 'n))) -> MemoryOpResult(xlenbits_double) |
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 think this is all going to conflict fairly heavily with #477 unfortunately.
debug: flushregs -> maintenance flush register-cache
…sd specification generated from ADL.
…sd specification generated from ADL.
…sd specification generated from ADL.
…sd specification generated from ADL.
…sd specification generated from ADL.
Add support for not yet ratified zilsd/zcmlsd extension
In c_emulator, the following options are added:
-y to enable zilsd extension
-Z to enable zcmlsd extension
In ocaml emulator the following options are added:
-enable-zilsd to enable zilsd extension
-enable-zcmlsd to enable zcmlsd extension
All options are false by default.
The tests were split in Zilsd and Zcmlsd folders because different simulation options are required to run the tests.