Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
annotate 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 |
| rev | line source |
|---|---|
| Me@1 | 1 /* |
| Me@1 | 2 * Copyright 2011 OpenSourceStewardshipFoundation.org |
| Me@3 | 3 * Licensed under BSD |
| Me@1 | 4 * |
| Me@1 | 5 * author seanhalle@yahoo.com |
| Me@1 | 6 */ |
| Me@1 | 7 |
| Me@1 | 8 #include <malloc.h> |
| Me@1 | 9 #include <stdlib.h> |
| Me@1 | 10 |
| Me@1 | 11 #include "SimParams.h" |
| Me@1 | 12 #include "HWSim__Hello_World_HW/HWSim__Hello_World_HW.h" |
| Me@1 | 13 |
| hausers@5 | 14 char __ProgrammName[] = "HWSim Hello World"; |
| hausers@5 | 15 char __DataSet[255]; |
| hausers@5 | 16 char __Scheduler[]; |
| hausers@5 | 17 |
| Me@1 | 18 /* |
| Me@1 | 19 * |
| Me@1 | 20 * |
| Me@1 | 21 */ |
| Me@1 | 22 |
| Me@1 | 23 int main( int argc, char **argv ) |
| Me@1 | 24 { ParamBag *simParams; |
| Me@3 | 25 HWSimNetlist *netlist; |
| Me@1 | 26 HWSimResults *simResults; |
| Me@1 | 27 |
| Me@1 | 28 printf( "param file name: %s\n", argv[1] ); |
| hausers@5 | 29 printf("Paraver trace file %s\n", argv[2]); |
| Me@1 | 30 |
| hausers@5 | 31 #ifdef FAKE |
| hausers@5 | 32 simParams= NULL; |
| hausers@5 | 33 #else |
| Me@1 | 34 simParams = makeParamBag(); |
| Me@1 | 35 readParamFileIntoBag( argv[1], simParams ); |
| hausers@5 | 36 #endif |
| Me@1 | 37 |
| Me@1 | 38 netlist = createPingPongNetlist(); |
| hausers@5 | 39 #ifdef FAKE |
| hausers@5 | 40 simResults= create_simulation_results__fake(simParams,netlist); |
| hausers@5 | 41 #else |
| Me@1 | 42 simResults = |
| Me@1 | 43 HWSim__run_simulation( simParams, netlist ); |
| hausers@5 | 44 #endif |
| Me@1 | 45 |
| Me@1 | 46 //HWSim |
| hausers@5 | 47 HWSim__generate_paraver_output(argv[2], simResults, netlist); |
| hausers@5 | 48 //HWSim__generate_vcd_output( simResults ); |
| Me@1 | 49 |
| Me@1 | 50 exit(0); //cleans up |
| Me@1 | 51 } |
| Me@1 | 52 |
