mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-04-22 04:57:25 -04:00
[DV] Add exit check for setup call
Check the return value and exit program execution.
This commit is contained in:
parent
7465a68615
commit
21f2a842d8
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,9 @@ int main(int argc, char **argv) {
|
|||
|
||||
// Setup simctrl
|
||||
retcode = simctrl->SetupSimulation(argc, argv);
|
||||
if (retcode != 0) {
|
||||
goto free_return;
|
||||
}
|
||||
|
||||
// Initialize RAM
|
||||
simctrl->InitRam("TOP.ibex_riscv_compliance.u_ram");
|
||||
|
@ -27,6 +30,7 @@ int main(int argc, char **argv) {
|
|||
// Run the simulation
|
||||
simctrl->RunSimulation();
|
||||
|
||||
free_return:
|
||||
delete top;
|
||||
delete simctrl;
|
||||
return retcode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue