view main.c @ 18:b0e9969d8d15

first runnable version (very buggy)
author hausers
date Mon, 20 Feb 2012 19:07:31 +0100
parents df53f52ef49c
children ba3883d39e62
line source
1 /*
2 * Copyright 2011 OpenSourceStewardshipFoundation.org
3 * Licensed under BSD
4 *
5 * author seanhalle@yahoo.com
6 */
8 #include <malloc.h>
9 #include <stdlib.h>
11 #include "SimParams.h"
12 #include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h"
13 #include "../C_Libraries/ParamHelper/Param.h"
16 char __ProgrammName[] = "HWSim Hello World";
17 char __DataSet[255];
18 char __Scheduler[1];
20 /*
21 *
22 *
23 */
25 int main( int argc, char **argv )
26 { ParamBag *simParams;
27 HWSimNetlist *netlist;
28 HWSimResults *simResults;
30 printf("DEBUG: main\n");
32 #ifdef FAKE
33 simParams= NULL;
34 printf( "param file name: %s\n", argv[1] );
35 printf("Paraver trace file %s\n", argv[2]);
37 #else
38 //Sean: cause Segmentation fault in VMS_int__malloc, I think the reason for
39 // this is, that VMS is not initialized yet ?
40 // => so I continue without params
41 // simParams = makeParamBag();
42 // readParamFileIntoBag( argv[1], simParams );
43 #endif
45 netlist = createPingPongNetlist();
46 #ifdef FAKE
47 simResults= create_simulation_results__fake(simParams,netlist);
48 #else
49 simResults =
50 HWSim__run_simulation( NULL, netlist );
51 #endif
53 //HWSim
54 //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version
55 HWSim__generate_paraver_output(simResults);
56 //HWSim__generate_vcd_output( simResults );
58 exit(0); //cleans up
59 }