Skip to content

Commit

Permalink
fix: address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Tianrui Wei <tianrui@tianruiwei.com>
  • Loading branch information
tianrui-wei committed Apr 20, 2023
1 parent c5002ab commit 9a48dc9
Showing 1 changed file with 2 additions and 42 deletions.
44 changes: 2 additions & 42 deletions generators/chipyard/src/main/resources/csrc/cospike.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,25 +295,6 @@ extern "C" void cospike_cosim(long long int cycle,
auto& mem_read = s->log_mem_read;


<<<<<<< HEAD
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) {
s->mip->backdoor_write_with_mask(MIP_MSIP, 0);
||||||| constructed merge base
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) {
s->mip->backdoor_write_with_mask(MIP_MSIP, 0);
}
// Try to remember magic_mem addrs, and ignore these in the future
if ( waddr == tohost_addr && w_data >= info->mem0_base && w_data < (info->mem0_base + info->mem0_size)) {
printf("Probable magic mem %lx\n", w_data);
magic_addrs.insert(w_data);
}
=======
for (auto memwrite : mem_write) {
reg_t waddr = std::get<0>(memwrite);
uint64_t w_data = std::get<1>(memwrite);
Expand All @@ -325,7 +306,6 @@ extern "C" void cospike_cosim(long long int cycle,
printf("Probable magic mem %lx\n", w_data);
magic_addrs.insert(w_data);
}
>>>>>>> fix: address comments
}
// Try to remember magic_mem addrs, and ignore these in the future
if ( waddr == tohost_addr && w_data >= info->mem0_base && w_data < (info->mem0_base + info->mem0_size)) {
Expand Down Expand Up @@ -399,29 +379,9 @@ extern "C" void cospike_cosim(long long int cycle,
}
}

}
}

<<<<<<< HEAD
if (scalar_wb ^ has_wdata) {
printf("Scalar behavior divergence between spike and DUT\n");
exit(-1);
||||||| constructed merge base
if (vector_wb ^ has_vwdata) {
printf("vector behavior divergence between spike and DUT\n");
exit(-1);
}
#ifdef SPIKE_DEBUG
if (vector_wb) {
printf("vector_cnt = %x\n", vector_cnt);
printf("vector_pre = %x\n", vector_pre);
}
#endif
=======
if (vector_wb ^ has_vwdata) {
printf("vector behavior divergence between spike and DUT\n");
if (scalar_wb ^ has_wdata) {
printf("Scalar behavior divergence between spike and DUT\n");
exit(-1);
}
>>>>>>> fix: address comments
}
}

0 comments on commit 9a48dc9

Please sign in to comment.