Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
annotate main.c @ 24:b924d86f829e
works in sequential mode
author | Sean <seanhalle@yahoo.com> |
---|---|
date | Thu, 17 May 2012 20:42:24 +0200 |
parents | c11c48758df3 |
children | 0deed3ee0b02 |
rev | line source |
---|---|
Me@11 | 1 /* |
Me@11 | 2 * Copyright 2011 OpenSourceStewardshipFoundation.org |
Me@11 | 3 * Licensed under BSD |
Me@11 | 4 * |
Me@11 | 5 * author seanhalle@yahoo.com |
Me@11 | 6 */ |
hausers@20 | 7 |
Me@11 | 8 #include <malloc.h> |
Me@11 | 9 #include <stdlib.h> |
Me@11 | 10 |
Me@11 | 11 #include "SimParams.h" |
Me@14 | 12 #include "HWSim__PingPong__HWDef/HWSim__PingPong__HWDef.h" |
seanhalle@24 | 13 #include "ParamHelper/Param.h" |
Me@15 | 14 |
seanhalle@24 | 15 #include "HWSim_impl/HWSim_tests.h" |
hausers@19 | 16 |
Me@11 | 17 |
Me@11 | 18 |
Me@11 | 19 /* |
Me@11 | 20 * |
Me@11 | 21 * |
Me@11 | 22 */ |
Me@11 | 23 |
hausers@20 | 24 int main(int argc, char **argv) { |
hausers@20 | 25 ParamBag *simParams; |
hausers@20 | 26 HWSimNetlist *netlist; |
hausers@20 | 27 HWSimResults *simResults; |
hausers@20 | 28 int result; |
Me@11 | 29 |
Me@11 | 30 #ifdef FAKE |
hausers@20 | 31 simParams = NULL; |
hausers@20 | 32 printf("param file name: %s\n", argv[1]); |
hausers@20 | 33 printf("Paraver trace file %s\n", argv[2]); |
Me@15 | 34 |
Me@11 | 35 #else |
seanhalle@24 | 36 simParams = makeParamBag(); |
seanhalle@24 | 37 readParamFileIntoBag( argv[1], simParams ); |
Me@11 | 38 #endif |
Me@11 | 39 |
hausers@20 | 40 netlist = createPingPongNetlist(); |
Me@11 | 41 |
Me@15 | 42 #ifdef FAKE |
hausers@20 | 43 simResults = create_simulation_results__fake(simParams, netlist); |
Me@15 | 44 #else |
hausers@20 | 45 simResults = HWSim__run_simulation( simParams, netlist ); |
hausers@20 | 46 //HWSim_test__run(); |
Me@15 | 47 #endif |
Me@15 | 48 |
hausers@20 | 49 //HWSim |
hausers@20 | 50 //HWSim__generate_paraver_output(argv[2], simResults, netlist); //Stefan: my version |
hausers@20 | 51 //HWSim__generate_paraver_output(simResults); |
hausers@20 | 52 //HWSim__generate_vcd_output( simResults ); |
Me@15 | 53 |
hausers@20 | 54 exit(0); //cleans up |
hausers@20 | 55 } |
hausers@20 | 56 |