ebreak workaround for RISC-V tests
This commit is contained in:
@@ -131,4 +131,11 @@ module VX_execute #(
|
|||||||
.gpu_commit_if (gpu_commit_if)
|
.gpu_commit_if (gpu_commit_if)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// special workaround to get RISC-V tests Pass/Fail status
|
||||||
|
wire ebreak /* verilator public */;
|
||||||
|
assign ebreak = alu_req_if.valid && alu_req_if.ready
|
||||||
|
&& `IS_BR_MOD(alu_req_if.op_mod)
|
||||||
|
&& (`BR_OP(alu_req_if.op_type) == `BR_EBREAK
|
||||||
|
|| `BR_OP(alu_req_if.op_type) == `BR_ECALL);
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ void Simulator::run() {
|
|||||||
|
|
||||||
// execute program
|
// execute program
|
||||||
while (vortex_->busy
|
while (vortex_->busy
|
||||||
&& !vortex_->ebreak) {
|
&& !get_ebreak()) {
|
||||||
this->step();
|
this->step();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,6 +308,10 @@ void Simulator::run() {
|
|||||||
this->wait(5);
|
this->wait(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Simulator::get_ebreak() const {
|
||||||
|
return (int)vortex_->Vortex->genblk2__BRA__0__KET____DOT__cluster->genblk2__BRA__0__KET____DOT__core->pipeline->execute->ebreak;
|
||||||
|
}
|
||||||
|
|
||||||
int Simulator::get_last_wb_value(int reg) const {
|
int Simulator::get_last_wb_value(int reg) const {
|
||||||
return (int)vortex_->Vortex->genblk2__BRA__0__KET____DOT__cluster->genblk2__BRA__0__KET____DOT__core->pipeline->commit->writeback->last_wb_value[reg];
|
return (int)vortex_->Vortex->genblk2__BRA__0__KET____DOT__cluster->genblk2__BRA__0__KET____DOT__core->pipeline->commit->writeback->last_wb_value[reg];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,8 +40,11 @@ public:
|
|||||||
void get_csr(int core_id, int addr, unsigned *value);
|
void get_csr(int core_id, int addr, unsigned *value);
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
int get_last_wb_value(int reg) const;
|
int get_last_wb_value(int reg) const;
|
||||||
|
|
||||||
|
bool get_ebreak() const;
|
||||||
|
|
||||||
void print_stats(std::ostream& out);
|
void print_stats(std::ostream& out);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user