-
Notifications
You must be signed in to change notification settings - Fork 69
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
ram: add gcpt-restore option for VCS #322
Conversation
04ba8f0
to
69f510c
Compare
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.
Format the code. Then it looks ok to me
src/test/vsrc/vcs/top.v
Outdated
@@ -126,6 +128,11 @@ initial begin | |||
$value$plusargs("flash=%s", flash_bin_file); | |||
set_flash_bin(flash_bin_file); | |||
end | |||
// overwrite gcpt on ram: bin file | |||
if ($test$plusargs("gcpt")) begin |
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.
Should use the same argument name as Verilator. Use gcpt-restore instead of gcpt.
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.
ok
63d19bd
to
438b3c3
Compare
src/test/csrc/verilator/emu.cpp
Outdated
delete reader; | ||
char gcpt_restore[256]; | ||
uint64_t overwrite_nbytes = args.overwrite_nbytes; | ||
strcpy(gcpt_restore, args.gcpt_restore); |
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.
why do we need this strcpy
?
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.
/home/runner/work/difftest/xs-env/NutShell/difftest/src/test/csrc/common/ram.h:217:6: note: candidate function not viable: 1st argument ('const char *') would lose const qualifier
There seems to be no way to pass the args argument as a function argument
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.
should add const to the function declaration:
void overwrite_ram(const char *gcpt_restore, uint64_t overwrite_nbytes)
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.
thankyou
The mobile gcpt overlay function becomes public so that it can also be used on the vcs Paladin