Me@0: /* Me@0: Me@0: * Copyright Oct 24, 2009 OpenSourceStewardshipFoundation.org Me@0: Me@0: * Licensed under GNU General Public License version 2 Me@0: Me@0: * Me@0: Me@0: * author seanhalle@yahoo.com Me@0: Me@0: */ Me@0: Me@0: Me@0: Me@0: #include Me@0: Me@0: #include Me@0: Me@0: Me@0: Me@0: #include "SimParams.h" Me@0: Me@0: #include "HWSim_TeraFlux/HWSim_TeraFlux.h" Me@0: Me@0: Me@0: Me@0: /** Me@0: Me@0: * Me@0: Me@0: */ Me@0: Me@0: int main( int argc, char **argv ) Me@0: Me@0: { SimulationParams *simParams; Me@0: Me@0: SimulationResults *simResults; Me@0: Me@0: ParamBag *paramBag; Me@0: Me@0: Me@0: Me@0: printf( "arguments: %s | %s\n", argv[0], argv[1] ); Me@0: Me@0: Me@0: Me@0: simParams = malloc( sizeof(SimulationParams) ); Me@0: Me@0: Me@0: Me@0: Me@0: Me@0: //VMS has its own separate internal malloc, so to get results out, Me@0: Me@0: // have to pass in empty array for it to fill up Me@0: Me@0: //The alternative is internally telling HWSim make external space to use Me@0: Me@0: simResults = malloc( sizeof(SimulationResults) ); Me@0: Me@0: simParams->simResults = simResults; Me@0: Me@0: Me@0: Me@0: paramBag = makeParamBag(); Me@0: Me@0: Me@0: Me@0: readParamFileIntoBag( argv[1], paramBag ); Me@0: Me@0: fill_sim_params_from_bag( simParams, paramBag ); Me@0: Me@0: Me@0: Me@0: Me@0: Me@0: constructAndSimulateSystem( simParams ); Me@0: Me@0: Me@0: Me@0: printSimResults( simResults ); Me@0: Me@0: Me@0: Me@0: fflush(stdin); Me@0: Me@0: Me@0: Me@0: exit(0); //cleans up Me@0: Me@0: } Me@0: Me@0: Me@0: Me@0: Me@0: