Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
comparison src/Application/main.c @ 5:648207f2e38f
Netlist creation runnable + creation of faked simulation results
| author | hausers |
|---|---|
| date | Tue, 06 Dec 2011 18:46:42 +0100 |
| parents | 0ef08e9afd54 |
| children | 3276b8621f96 |
comparison
equal
deleted
inserted
replaced
| 3:5db8b214975f | 4:3083960c1a08 |
|---|---|
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| 11 #include "SimParams.h" | 11 #include "SimParams.h" |
| 12 #include "HWSim__Hello_World_HW/HWSim__Hello_World_HW.h" | 12 #include "HWSim__Hello_World_HW/HWSim__Hello_World_HW.h" |
| 13 | 13 |
| 14 char __ProgrammName[] = "HWSim Hello World"; | |
| 15 char __DataSet[255]; | |
| 16 char __Scheduler[]; | |
| 17 | |
| 14 /* | 18 /* |
| 15 * | 19 * |
| 16 * | 20 * |
| 17 */ | 21 */ |
| 18 | 22 |
| 20 { ParamBag *simParams; | 24 { ParamBag *simParams; |
| 21 HWSimNetlist *netlist; | 25 HWSimNetlist *netlist; |
| 22 HWSimResults *simResults; | 26 HWSimResults *simResults; |
| 23 | 27 |
| 24 printf( "param file name: %s\n", argv[1] ); | 28 printf( "param file name: %s\n", argv[1] ); |
| 29 printf("Paraver trace file %s\n", argv[2]); | |
| 25 | 30 |
| 31 #ifdef FAKE | |
| 32 simParams= NULL; | |
| 33 #else | |
| 26 simParams = makeParamBag(); | 34 simParams = makeParamBag(); |
| 27 readParamFileIntoBag( argv[1], simParams ); | 35 readParamFileIntoBag( argv[1], simParams ); |
| 36 #endif | |
| 28 | 37 |
| 29 netlist = createPingPongNetlist(); | 38 netlist = createPingPongNetlist(); |
| 39 #ifdef FAKE | |
| 40 simResults= create_simulation_results__fake(simParams,netlist); | |
| 41 #else | |
| 30 simResults = | 42 simResults = |
| 31 HWSim__run_simulation( simParams, netlist ); | 43 HWSim__run_simulation( simParams, netlist ); |
| 44 #endif | |
| 32 | 45 |
| 33 //HWSim | 46 //HWSim |
| 34 HWSim__generate_paraver_output( simResults ); | 47 HWSim__generate_paraver_output(argv[2], simResults, netlist); |
| 35 HWSim__generate_vcd_output( simResults ); | 48 //HWSim__generate_vcd_output( simResults ); |
| 36 | 49 |
| 37 exit(0); //cleans up | 50 exit(0); //cleans up |
| 38 } | 51 } |
| 39 | 52 |
