diff options
| author | Henry Cook | 2015-11-06 10:49:32 -0800 |
|---|---|---|
| committer | Henry Cook | 2015-11-06 10:49:32 -0800 |
| commit | dd31ad4fad3880ae8bda6172fd9303d719250be5 (patch) | |
| tree | 0720013a5389431d8f0995b56af37f46a201f49a /src | |
| parent | cc9845a05ddb013408643180be007530496fffc9 (diff) | |
return -1 on simulation timeout
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/resources/top.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/resources/top.cpp b/src/main/resources/top.cpp index 8951032e..756b5531 100644 --- a/src/main/resources/top.cpp +++ b/src/main/resources/top.cpp @@ -78,14 +78,14 @@ int main(int argc, char** argv) { if (tfp) tfp->close(); #endif - if (main_time >= timeout) + if (main_time >= timeout) { cout << "Simulation terminated by timeout at cycle " << main_time << endl; - else + return -1; + } else { cout << "Simulation completed at cycle " << main_time << endl; - - int error = top->io__024error; - cout << "Simulation return value: " << error << endl; - - return error; + int error = top->io__024error; + cout << "Simulation return value: " << error << endl; + return error; + } } |
