Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
annotate main.c @ 19:ba3883d39e62
small changes
| author | hausers |
|---|---|
| date | Fri, 02 Mar 2012 18:14:06 +0100 |
| parents | b0e9969d8d15 |
| children | 3a4be4048a21 |
| rev | line source |
|---|---|
| Me@11 | 1 /* |
| Me@11 | 2 * Copyright 2011 OpenSourceStewardshipFoundation.org |
| Me@11 | 3 * Licensed under BSD |
| Me@11 | 4 * |
| Me@11 | 5 * author seanhalle@yahoo.com |
| Me@11 | 6 */ |
| Me@11 | 7 |
| Me@11 | 8 #include <malloc.h> |
| Me@11 | 9 #include <stdlib.h> |
| Me@11 | 10 |
| Me@11 | 11 #include "SimParams.h" |
| Me@14 | 12 #include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h" |
| Me@15 | 13 #include "../C_Libraries/ParamHelper/Param.h" |
| Me@15 | 14 |
| hausers@19 | 15 #include "../VMS_Implementations/HWSim_impl/HWSim_tests.h" |
| hausers@19 | 16 |
| Me@11 | 17 |
| Me@11 | 18 char __ProgrammName[] = "HWSim Hello World"; |
| Me@11 | 19 char __DataSet[255]; |
| hausers@16 | 20 char __Scheduler[1]; |
| Me@11 | 21 |
| Me@11 | 22 /* |
| Me@11 | 23 * |
| Me@11 | 24 * |
| Me@11 | 25 */ |
| Me@11 | 26 |
| Me@11 | 27 int main( int argc, char **argv ) |
| Me@11 | 28 { ParamBag *simParams; |
| Me@11 | 29 HWSimNetlist *netlist; |
| Me@11 | 30 HWSimResults *simResults; |
| Me@11 | 31 |
| hausers@18 | 32 #ifdef FAKE |
| hausers@18 | 33 simParams= NULL; |
| Me@11 | 34 printf( "param file name: %s\n", argv[1] ); |
| Me@11 | 35 printf("Paraver trace file %s\n", argv[2]); |
| Me@11 | 36 |
| Me@11 | 37 #else |
| hausers@19 | 38 |
| hausers@19 | 39 // TODO use the pure C branch of paramBag |
| hausers@18 | 40 // simParams = makeParamBag(); |
| hausers@18 | 41 // readParamFileIntoBag( argv[1], simParams ); |
| Me@11 | 42 #endif |
| Me@11 | 43 |
| Me@11 | 44 netlist = createPingPongNetlist(); |
| hausers@19 | 45 |
| Me@11 | 46 #ifdef FAKE |
| Me@11 | 47 simResults= create_simulation_results__fake(simParams,netlist); |
| Me@11 | 48 #else |
| Me@11 | 49 simResults = |
| hausers@18 | 50 HWSim__run_simulation( NULL, netlist ); |
| hausers@19 | 51 // HWSim_test__run(); |
| Me@11 | 52 #endif |
| Me@11 | 53 |
| Me@11 | 54 //HWSim |
| hausers@16 | 55 //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version |
| hausers@19 | 56 //HWSim__generate_paraver_output(simResults); |
| Me@11 | 57 //HWSim__generate_vcd_output( simResults ); |
| Me@11 | 58 |
| Me@11 | 59 exit(0); //cleans up |
| Me@11 | 60 } |
| Me@11 | 61 |
