Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__LPGPU_Arch__HWDef
diff main.c @ 0:def43ecee616
Initial add
| author | Me@portablequad |
|---|---|
| date | Sat, 11 Feb 2012 14:29:21 -0800 |
| parents | |
| children | 46c8ea895bff |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/main.c Sat Feb 11 14:29:21 2012 -0800 1.3 @@ -0,0 +1,52 @@ 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__Hello_World_HW/HWSim__Hello_World_HW.h" 1.16 + 1.17 +char __ProgrammName[] = "HWSim Hello World"; 1.18 +char __DataSet[255]; 1.19 +char __Scheduler[]; 1.20 + 1.21 +/* 1.22 + * 1.23 + * 1.24 + */ 1.25 + 1.26 +int main( int argc, char **argv ) 1.27 + { ParamBag *simParams; 1.28 + HWSimNetlist *netlist; 1.29 + HWSimResults *simResults; 1.30 + 1.31 + printf( "param file name: %s\n", argv[1] ); 1.32 + printf("Paraver trace file %s\n", argv[2]); 1.33 + 1.34 +#ifdef FAKE 1.35 + simParams= NULL; 1.36 +#else 1.37 + simParams = makeParamBag(); 1.38 + readParamFileIntoBag( argv[1], simParams ); 1.39 +#endif 1.40 + 1.41 + netlist = createPingPongNetlist(); 1.42 +#ifdef FAKE 1.43 + simResults= create_simulation_results__fake(simParams,netlist); 1.44 +#else 1.45 + simResults = 1.46 + HWSim__run_simulation( simParams, netlist ); 1.47 +#endif 1.48 + 1.49 + //HWSim 1.50 + HWSim__generate_paraver_output(argv[2], simResults, netlist); 1.51 + //HWSim__generate_vcd_output( simResults ); 1.52 + 1.53 + exit(0); //cleans up 1.54 + } 1.55 +
