Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
comparison main.c @ 19:ba3883d39e62
small changes
| author | hausers |
|---|---|
| date | Fri, 02 Mar 2012 18:14:06 +0100 |
| parents | b0e9969d8d15 |
| children | 3a4be4048a21 |
comparison
equal
deleted
inserted
replaced
| 4:16a918db1a1f | 5:4dc94457d16d |
|---|---|
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| 11 #include "SimParams.h" | 11 #include "SimParams.h" |
| 12 #include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h" | 12 #include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h" |
| 13 #include "../C_Libraries/ParamHelper/Param.h" | 13 #include "../C_Libraries/ParamHelper/Param.h" |
| 14 | |
| 15 #include "../VMS_Implementations/HWSim_impl/HWSim_tests.h" | |
| 14 | 16 |
| 15 | 17 |
| 16 char __ProgrammName[] = "HWSim Hello World"; | 18 char __ProgrammName[] = "HWSim Hello World"; |
| 17 char __DataSet[255]; | 19 char __DataSet[255]; |
| 18 char __Scheduler[1]; | 20 char __Scheduler[1]; |
| 25 int main( int argc, char **argv ) | 27 int main( int argc, char **argv ) |
| 26 { ParamBag *simParams; | 28 { ParamBag *simParams; |
| 27 HWSimNetlist *netlist; | 29 HWSimNetlist *netlist; |
| 28 HWSimResults *simResults; | 30 HWSimResults *simResults; |
| 29 | 31 |
| 30 printf("DEBUG: main\n"); | |
| 31 | |
| 32 #ifdef FAKE | 32 #ifdef FAKE |
| 33 simParams= NULL; | 33 simParams= NULL; |
| 34 printf( "param file name: %s\n", argv[1] ); | 34 printf( "param file name: %s\n", argv[1] ); |
| 35 printf("Paraver trace file %s\n", argv[2]); | 35 printf("Paraver trace file %s\n", argv[2]); |
| 36 | 36 |
| 37 #else | 37 #else |
| 38 //Sean: cause Segmentation fault in VMS_int__malloc, I think the reason for | 38 |
| 39 // this is, that VMS is not initialized yet ? | 39 // TODO use the pure C branch of paramBag |
| 40 // => so I continue without params | |
| 41 // simParams = makeParamBag(); | 40 // simParams = makeParamBag(); |
| 42 // readParamFileIntoBag( argv[1], simParams ); | 41 // readParamFileIntoBag( argv[1], simParams ); |
| 43 #endif | 42 #endif |
| 44 | 43 |
| 45 netlist = createPingPongNetlist(); | 44 netlist = createPingPongNetlist(); |
| 45 | |
| 46 #ifdef FAKE | 46 #ifdef FAKE |
| 47 simResults= create_simulation_results__fake(simParams,netlist); | 47 simResults= create_simulation_results__fake(simParams,netlist); |
| 48 #else | 48 #else |
| 49 simResults = | 49 simResults = |
| 50 HWSim__run_simulation( NULL, netlist ); | 50 HWSim__run_simulation( NULL, netlist ); |
| 51 // HWSim_test__run(); | |
| 51 #endif | 52 #endif |
| 52 | 53 |
| 53 //HWSim | 54 //HWSim |
| 54 //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version | 55 //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version |
| 55 HWSim__generate_paraver_output(simResults); | 56 //HWSim__generate_paraver_output(simResults); |
| 56 //HWSim__generate_vcd_output( simResults ); | 57 //HWSim__generate_vcd_output( simResults ); |
| 57 | 58 |
| 58 exit(0); //cleans up | 59 exit(0); //cleans up |
| 59 } | 60 } |
| 60 | 61 |
