Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
changeset 18:b0e9969d8d15
first runnable version (very buggy)
author | hausers |
---|---|
date | Mon, 20 Feb 2012 19:07:31 +0100 |
parents | fa277c6ce6f2 |
children | ba3883d39e62 |
files | CircuitNetlistCreator.c main.c |
diffstat | 2 files changed, 13 insertions(+), 5 deletions(-) [+] |
line diff
1.1 --- a/CircuitNetlistCreator.c Mon Feb 20 17:06:56 2012 +0100 1.2 +++ b/CircuitNetlistCreator.c Mon Feb 20 19:07:31 2012 +0100 1.3 @@ -21,6 +21,7 @@ 1.4 }while(0); //macro magic for namespace 1.5 1.6 1.7 + 1.8 HWSimActivityType* createPingPongActivityType (); 1.9 1.10 HWSimElem* createAPingPongElem (HWSimNetlist *netlist); 1.11 @@ -78,8 +79,10 @@ 1.12 netlist->numCommPaths= numCommPaths; 1.13 netlist->commPaths= commPaths; 1.14 //TL 0, out-port 0 to TL 1, in-port 0 1.15 + commPaths[0]= malloc(sizeof(HWSimCommPath)); 1.16 setCommPathValuesTo(commPaths[0],0,0,1,0, commPath_TimeSpanCalc, NULL); 1.17 //TL 1, out-port 0 to TL 0, in-port 0 1.18 + commPaths[1]= malloc(sizeof(HWSimCommPath)); 1.19 setCommPathValuesTo(commPaths[1], 1,0,0,0, commPath_TimeSpanCalc, NULL); 1.20 1.21 //TODO: decide how do in-out bidirectional commPaths -- thinking make it two
2.1 --- a/main.c Mon Feb 20 17:06:56 2012 +0100 2.2 +++ b/main.c Mon Feb 20 19:07:31 2012 +0100 2.3 @@ -27,14 +27,19 @@ 2.4 HWSimNetlist *netlist; 2.5 HWSimResults *simResults; 2.6 2.7 + printf("DEBUG: main\n"); 2.8 + 2.9 +#ifdef FAKE 2.10 + simParams= NULL; 2.11 printf( "param file name: %s\n", argv[1] ); 2.12 printf("Paraver trace file %s\n", argv[2]); 2.13 2.14 -#ifdef FAKE 2.15 - simParams= NULL; 2.16 #else 2.17 - simParams = makeParamBag(); 2.18 - readParamFileIntoBag( argv[1], simParams ); 2.19 + //Sean: cause Segmentation fault in VMS_int__malloc, I think the reason for 2.20 + // this is, that VMS is not initialized yet ? 2.21 + // => so I continue without params 2.22 +// simParams = makeParamBag(); 2.23 +// readParamFileIntoBag( argv[1], simParams ); 2.24 #endif 2.25 2.26 netlist = createPingPongNetlist(); 2.27 @@ -42,7 +47,7 @@ 2.28 simResults= create_simulation_results__fake(simParams,netlist); 2.29 #else 2.30 simResults = 2.31 - HWSim__run_simulation( simParams, netlist ); 2.32 + HWSim__run_simulation( NULL, netlist ); 2.33 #endif 2.34 2.35 //HWSim