Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
changeset 19:ba3883d39e62
small changes
author | hausers |
---|---|
date | Fri, 02 Mar 2012 18:14:06 +0100 |
parents | b0e9969d8d15 |
children | 3a4be4048a21 |
files | CircuitNetlistCreator.c HWSim__PingPong__HWDef/PingPongElem_Activities.c main.c |
diffstat | 3 files changed, 19 insertions(+), 15 deletions(-) [+] |
line diff
1.1 --- a/CircuitNetlistCreator.c Mon Feb 20 19:07:31 2012 +0100 1.2 +++ b/CircuitNetlistCreator.c Fri Mar 02 18:14:06 2012 +0100 1.3 @@ -13,7 +13,7 @@ 1.4 timeFnPtr, dataPtr)\ 1.5 do{\ 1.6 commPath->idxOfFromElem = fromElIdx; \ 1.7 - commPath->idxOfFromOutPort = fromElIdx; \ 1.8 + commPath->idxOfFromOutPort = outPort; \ 1.9 commPath->idxOfToElem = toElIdx; \ 1.10 commPath->idxOfToInPort = inPort; \ 1.11 commPath->commTimeCalcFn = timeFnPtr;\ 1.12 @@ -92,8 +92,8 @@ 1.13 } 1.14 1.15 //Stefan: copy netlist struct with VMS malloc after VMS initialized? 1.16 - //Sean: yes, otherwise the user has to deal with VMS details. 1.17 - // So we should do this in HWSim__make_netlist_simulatable ? 1.18 + //ANSWER: yes, otherwise the user has to deal with VMS details. 1.19 + // So we should do this in HWSim__make_netlist_simulatable -> yes 1.20 // If so, I can do this 1.21 HWSimElem * 1.22 createAPingPongElem( HWSimNetlist *netlist )
2.1 --- a/HWSim__PingPong__HWDef/PingPongElem_Activities.c Mon Feb 20 19:07:31 2012 +0100 2.2 +++ b/HWSim__PingPong__HWDef/PingPongElem_Activities.c Fri Mar 02 18:14:06 2012 +0100 2.3 @@ -6,6 +6,7 @@ 2.4 * 2.5 */ 2.6 2.7 +#include <stdio.h> 2.8 #include "HWSim__PingPong__HWDef.h" 2.9 2.10 2.11 @@ -29,12 +30,14 @@ 2.12 void * 2.13 pingPongElem_PingActivity_behavior( void *_params, HWSimElem *elem ) 2.14 { //Stefan: FIXME 2.15 - PingPongParams *params; 2.16 - params = (PingPongParams *)_params; 2.17 -// DEBUG( dbgHW, "ping pong activity\n", clone_PingPongParams(params) ); 2.18 - 2.19 -// HWSim__send_on_port( NO_MSG, PORT0, elem ); 2.20 - return params; 2.21 +// PingPongParams *params; 2.22 +// params = (PingPongParams *)_params; 2.23 +//// DEBUG( dbgHW, "ping pong activity\n", clone_PingPongParams(params) ); 2.24 +// 2.25 +//// HWSim__send_on_port( NO_MSG, PORT0, elem ); 2.26 +// return params; 2.27 + printf("Ping-Pong\n"); 2.28 + return NULL; 2.29 } 2.30 2.31 HWSimTimeSpan
3.1 --- a/main.c Mon Feb 20 19:07:31 2012 +0100 3.2 +++ b/main.c Fri Mar 02 18:14:06 2012 +0100 3.3 @@ -12,6 +12,8 @@ 3.4 #include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h" 3.5 #include "../C_Libraries/ParamHelper/Param.h" 3.6 3.7 +#include "../VMS_Implementations/HWSim_impl/HWSim_tests.h" 3.8 + 3.9 3.10 char __ProgrammName[] = "HWSim Hello World"; 3.11 char __DataSet[255]; 3.12 @@ -27,32 +29,31 @@ 3.13 HWSimNetlist *netlist; 3.14 HWSimResults *simResults; 3.15 3.16 - printf("DEBUG: main\n"); 3.17 - 3.18 #ifdef FAKE 3.19 simParams= NULL; 3.20 printf( "param file name: %s\n", argv[1] ); 3.21 printf("Paraver trace file %s\n", argv[2]); 3.22 3.23 #else 3.24 - //Sean: cause Segmentation fault in VMS_int__malloc, I think the reason for 3.25 - // this is, that VMS is not initialized yet ? 3.26 - // => so I continue without params 3.27 + 3.28 + // TODO use the pure C branch of paramBag 3.29 // simParams = makeParamBag(); 3.30 // readParamFileIntoBag( argv[1], simParams ); 3.31 #endif 3.32 3.33 netlist = createPingPongNetlist(); 3.34 + 3.35 #ifdef FAKE 3.36 simResults= create_simulation_results__fake(simParams,netlist); 3.37 #else 3.38 simResults = 3.39 HWSim__run_simulation( NULL, netlist ); 3.40 +// HWSim_test__run(); 3.41 #endif 3.42 3.43 //HWSim 3.44 //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version 3.45 - HWSim__generate_paraver_output(simResults); 3.46 + //HWSim__generate_paraver_output(simResults); 3.47 //HWSim__generate_vcd_output( simResults ); 3.48 3.49 exit(0); //cleans up