# HG changeset patch # User hausers # Date 1330708446 -3600 # Node ID ba3883d39e62eccea0a181e2df1b2c101a19cd1a # Parent b0e9969d8d15884b81d73c8fd5b800da8497a710 small changes diff -r b0e9969d8d15 -r ba3883d39e62 CircuitNetlistCreator.c --- a/CircuitNetlistCreator.c Mon Feb 20 19:07:31 2012 +0100 +++ b/CircuitNetlistCreator.c Fri Mar 02 18:14:06 2012 +0100 @@ -13,7 +13,7 @@ timeFnPtr, dataPtr)\ do{\ commPath->idxOfFromElem = fromElIdx; \ - commPath->idxOfFromOutPort = fromElIdx; \ + commPath->idxOfFromOutPort = outPort; \ commPath->idxOfToElem = toElIdx; \ commPath->idxOfToInPort = inPort; \ commPath->commTimeCalcFn = timeFnPtr;\ @@ -92,8 +92,8 @@ } //Stefan: copy netlist struct with VMS malloc after VMS initialized? - //Sean: yes, otherwise the user has to deal with VMS details. - // So we should do this in HWSim__make_netlist_simulatable ? + //ANSWER: yes, otherwise the user has to deal with VMS details. + // So we should do this in HWSim__make_netlist_simulatable -> yes // If so, I can do this HWSimElem * createAPingPongElem( HWSimNetlist *netlist ) diff -r b0e9969d8d15 -r ba3883d39e62 HWSim__PingPong__HWDef/PingPongElem_Activities.c --- a/HWSim__PingPong__HWDef/PingPongElem_Activities.c Mon Feb 20 19:07:31 2012 +0100 +++ b/HWSim__PingPong__HWDef/PingPongElem_Activities.c Fri Mar 02 18:14:06 2012 +0100 @@ -6,6 +6,7 @@ * */ +#include #include "HWSim__PingPong__HWDef.h" @@ -29,12 +30,14 @@ void * pingPongElem_PingActivity_behavior( void *_params, HWSimElem *elem ) { //Stefan: FIXME - PingPongParams *params; - params = (PingPongParams *)_params; -// DEBUG( dbgHW, "ping pong activity\n", clone_PingPongParams(params) ); - -// HWSim__send_on_port( NO_MSG, PORT0, elem ); - return params; +// PingPongParams *params; +// params = (PingPongParams *)_params; +//// DEBUG( dbgHW, "ping pong activity\n", clone_PingPongParams(params) ); +// +//// HWSim__send_on_port( NO_MSG, PORT0, elem ); +// return params; + printf("Ping-Pong\n"); + return NULL; } HWSimTimeSpan diff -r b0e9969d8d15 -r ba3883d39e62 main.c --- a/main.c Mon Feb 20 19:07:31 2012 +0100 +++ b/main.c Fri Mar 02 18:14:06 2012 +0100 @@ -12,6 +12,8 @@ #include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h" #include "../C_Libraries/ParamHelper/Param.h" +#include "../VMS_Implementations/HWSim_impl/HWSim_tests.h" + char __ProgrammName[] = "HWSim Hello World"; char __DataSet[255]; @@ -27,32 +29,31 @@ HWSimNetlist *netlist; HWSimResults *simResults; - printf("DEBUG: main\n"); - #ifdef FAKE simParams= NULL; printf( "param file name: %s\n", argv[1] ); printf("Paraver trace file %s\n", argv[2]); #else - //Sean: cause Segmentation fault in VMS_int__malloc, I think the reason for - // this is, that VMS is not initialized yet ? - // => so I continue without params + + // TODO use the pure C branch of paramBag // simParams = makeParamBag(); // readParamFileIntoBag( argv[1], simParams ); #endif netlist = createPingPongNetlist(); + #ifdef FAKE simResults= create_simulation_results__fake(simParams,netlist); #else simResults = HWSim__run_simulation( NULL, netlist ); +// HWSim_test__run(); #endif //HWSim //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version - HWSim__generate_paraver_output(simResults); + //HWSim__generate_paraver_output(simResults); //HWSim__generate_vcd_output( simResults ); exit(0); //cleans up