Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
diff main.c @ 26:0deed3ee0b02
update comments for public viewing
| author | kshalle |
|---|---|
| date | Wed, 25 Feb 2015 15:20:16 -0800 |
| parents | b924d86f829e |
| children | fb4970a0c337 |
line diff
1.1 --- a/main.c Thu May 24 08:14:21 2012 -0700 1.2 +++ b/main.c Wed Feb 25 15:20:16 2015 -0800 1.3 @@ -1,56 +1,42 @@ 1.4 -/* 1.5 - * Copyright 2011 OpenSourceStewardshipFoundation.org 1.6 - * Licensed under BSD 1.7 - * 1.8 - * author seanhalle@yahoo.com 1.9 - */ 1.10 - 1.11 -#include <malloc.h> 1.12 -#include <stdlib.h> 1.13 - 1.14 -#include "SimParams.h" 1.15 -#include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h" 1.16 -#include "ParamHelper/Param.h" 1.17 - 1.18 -#include "HWSim_impl/HWSim_tests.h" 1.19 - 1.20 - 1.21 - 1.22 -/* 1.23 - * 1.24 - * 1.25 - */ 1.26 - 1.27 -int main(int argc, char **argv) { 1.28 - ParamBag *simParams; 1.29 - HWSimNetlist *netlist; 1.30 - HWSimResults *simResults; 1.31 - int result; 1.32 - 1.33 -#ifdef FAKE 1.34 - simParams = NULL; 1.35 - printf("param file name: %s\n", argv[1]); 1.36 - printf("Paraver trace file %s\n", argv[2]); 1.37 - 1.38 -#else 1.39 - simParams = makeParamBag(); 1.40 - readParamFileIntoBag( argv[1], simParams ); 1.41 -#endif 1.42 - 1.43 - netlist = createPingPongNetlist(); 1.44 - 1.45 -#ifdef FAKE 1.46 - simResults = create_simulation_results__fake(simParams, netlist); 1.47 -#else 1.48 - simResults = HWSim__run_simulation( simParams, netlist ); 1.49 - //HWSim_test__run(); 1.50 -#endif 1.51 - 1.52 - //HWSim 1.53 - //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version 1.54 - //HWSim__generate_paraver_output(simResults); 1.55 - //HWSim__generate_vcd_output( simResults ); 1.56 - 1.57 - exit(0); //cleans up 1.58 -} 1.59 - 1.60 +/* 1.61 + * Copyright 2011 OpenSourceResearchInstitute.org 1.62 + * Licensed under BSD 1.63 + * 1.64 + * author seanhalle@yahoo.com 1.65 + */ 1.66 + 1.67 +#include <malloc.h> 1.68 +#include <stdlib.h> 1.69 + 1.70 +#include "SimParams.h" 1.71 +#include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h" 1.72 +#include "ParamHelper/Param.h" 1.73 + 1.74 +#include "HWSim_impl/HWSim_tests.h" 1.75 + 1.76 + 1.77 + 1.78 +/* This sample code shows 1.79 + * 1.80 + * 1.81 + */ 1.82 + 1.83 +int main(int argc, char **argv) 1.84 + { 1.85 + ParamBag *simParams; 1.86 + HWSimNetlist *netlist; 1.87 + HWSimResults *simResults; 1.88 + int result; 1.89 + 1.90 + //Use a helper called ParamBag to read in paramters from file 1.91 + simParams = makeParamBag(); 1.92 + readParamFileIntoBag( argv[1], simParams ); 1.93 + 1.94 + //Create the simulated objects and connect them to each other 1.95 + netlist = createPingPongNetlist(); //defined in CircuitNetlistCreator.c 1.96 + 1.97 + simResults = HWSim__run_simulation( simParams, netlist ); 1.98 + 1.99 + exit(0); //cleans up 1.100 + } 1.101 +
