-
Notifications
You must be signed in to change notification settings - Fork 651
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
misc: many fixes to cospike #1450
Conversation
Signed-off-by: Tianrui Wei <tianrui@tianruiwei.com>
17ab040
to
91ccc7b
Compare
@@ -87,7 +94,7 @@ extern "C" void cospike_cosim(long long int cycle, | |||
nullptr, | |||
info->isa.c_str(), | |||
"MSU", | |||
"vlen:128,elen:64", | |||
"vlen:512,elen:64", |
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.
Remove this for now, we need a API to pass from thhe chisel the vlen (you can implement this in this PR if you want)
@@ -104,6 +111,27 @@ extern "C" void cospike_cosim(long long int cycle, | |||
uint64_t default_boot_addr = 0x80000000; | |||
boot_addr_reg->store(0, 8, (const uint8_t*)(&default_boot_addr)); | |||
|
|||
for (auto& mem : mems) { | |||
if (mem.first == info->mem0_base) { | |||
std::string path_name = "chipyard-cosim-" + std::to_string(getpid()); |
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.
Remove the memory matching stuff, this needs the SimDRAM memory channel dupllication issue to be fixed.
} | ||
printf("\n"); | ||
} | ||
if (valid || raise_interrupt || raise_exception) { | ||
p->step(1); | ||
#ifdef SPIKE_DEBUG |
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.
Use the runtime flag
printf("%d PC mismatch spike:%lx != dut:%lx\n", cycle, s_pc, iaddr); | ||
printf("%d PC mismatch spike %llx != DUT %llx\n", cycle, s_pc, iaddr); | ||
#ifdef SPIKE_DEBUG | ||
printf("spike mstatus is %lx\n", s->mstatus->read()); |
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.
Use runtime flags, not compile-time
for (auto memwrite : mem_write) { | ||
reg_t waddr = std::get<0>(memwrite); | ||
uint64_t w_data = std::get<1>(memwrite); | ||
if (waddr == CLINT_BASE && w_data == 0) { |
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 don't think CLINT_BASE is right, as it assumes hartid=0. Shouldn't it calculate the hartid based on address?
|
||
for (auto ®write : log) { | ||
|
||
// if (regwrite.first == 0) continue; |
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.
Remove comment
bool ignore_read = (!mem_read.empty() && | ||
((magic_addrs.count(mem_read_addr) || | ||
(tohost_addr && mem_read_addr == tohost_addr) || | ||
(fromhost_addr && mem_read_addr == fromhost_addr) || |
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.
Nit: fix the alignment here.
Signed-off-by: Tianrui Wei <tianrui@tianruiwei.com>
|
||
|
||
<<<<<<< HEAD | ||
for (auto memwrite : mem_write) { |
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.
Merge issue
|
||
<<<<<<< HEAD | ||
if (scalar_wb ^ has_wdata) { |
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.
More merge conflicts
|
||
auto& mem_write = s->log_mem_write; | ||
auto& log = s->log_reg_write; | ||
auto& mem_read = s->log_mem_read; |
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.
indentation
9a48dc9
to
bb73c9f
Compare
Signed-off-by: Tianrui Wei <tianrui@tianruiwei.com>
bb73c9f
to
64e8f33
Compare
Related PRs / Issues:
Type of change:
Impact:
Contributor Checklist:
main
as the base branch?changelog:<topic>
label?changelog:
label?.conda-lock.yml
file if you updated the conda requirements file?Please Backport
?