Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
comparison main.c @ 26:0deed3ee0b02
update comments for public viewing
| author | kshalle |
|---|---|
| date | Wed, 25 Feb 2015 15:20:16 -0800 |
| parents | b924d86f829e |
| children | fb4970a0c337 |
comparison
equal
deleted
inserted
replaced
| 9:50243d57f6dd | 10:2cb0bb179146 |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2011 OpenSourceStewardshipFoundation.org | 2 * Copyright 2011 OpenSourceResearchInstitute.org |
| 3 * Licensed under BSD | 3 * Licensed under BSD |
| 4 * | 4 * |
| 5 * author seanhalle@yahoo.com | 5 * author seanhalle@yahoo.com |
| 6 */ | 6 */ |
| 7 | 7 |
| 14 | 14 |
| 15 #include "HWSim_impl/HWSim_tests.h" | 15 #include "HWSim_impl/HWSim_tests.h" |
| 16 | 16 |
| 17 | 17 |
| 18 | 18 |
| 19 /* | 19 /* This sample code shows |
| 20 * | 20 * |
| 21 * | 21 * |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 int main(int argc, char **argv) { | 24 int main(int argc, char **argv) |
| 25 ParamBag *simParams; | 25 { |
| 26 HWSimNetlist *netlist; | 26 ParamBag *simParams; |
| 27 HWSimResults *simResults; | 27 HWSimNetlist *netlist; |
| 28 int result; | 28 HWSimResults *simResults; |
| 29 int result; | |
| 29 | 30 |
| 30 #ifdef FAKE | 31 //Use a helper called ParamBag to read in paramters from file |
| 31 simParams = NULL; | |
| 32 printf("param file name: %s\n", argv[1]); | |
| 33 printf("Paraver trace file %s\n", argv[2]); | |
| 34 | |
| 35 #else | |
| 36 simParams = makeParamBag(); | 32 simParams = makeParamBag(); |
| 37 readParamFileIntoBag( argv[1], simParams ); | 33 readParamFileIntoBag( argv[1], simParams ); |
| 38 #endif | |
| 39 | 34 |
| 40 netlist = createPingPongNetlist(); | 35 //Create the simulated objects and connect them to each other |
| 36 netlist = createPingPongNetlist(); //defined in CircuitNetlistCreator.c | |
| 41 | 37 |
| 42 #ifdef FAKE | 38 simResults = HWSim__run_simulation( simParams, netlist ); |
| 43 simResults = create_simulation_results__fake(simParams, netlist); | |
| 44 #else | |
| 45 simResults = HWSim__run_simulation( simParams, netlist ); | |
| 46 //HWSim_test__run(); | |
| 47 #endif | |
| 48 | 39 |
| 49 //HWSim | 40 exit(0); //cleans up |
| 50 //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version | 41 } |
| 51 //HWSim__generate_paraver_output(simResults); | |
| 52 //HWSim__generate_vcd_output( simResults ); | |
| 53 | 42 |
| 54 exit(0); //cleans up | |
| 55 } | |
| 56 |
