# HG changeset patch # User kshalle # Date 1424907606 28800 # Node ID fb4970a0c337d3d54cd51b5b7edc75b145ca9b06 # Parent 0deed3ee0b020a4f666b7f3e1f478962a81a3fb5 fix up comment in main.c diff -r 0deed3ee0b02 -r fb4970a0c337 main.c --- a/main.c Wed Feb 25 15:20:16 2015 -0800 +++ b/main.c Wed Feb 25 15:40:06 2015 -0800 @@ -16,9 +16,27 @@ -/* This sample code shows +/*This Hello World sample code demonstrates the bare structure of an HWSim + * based simulator. + *The application code creates a netlist, which is populated with element + * structures and activity structures. + *The elements register activities, which represent triggered behaviors. + * During a run, the arrival of a communication on the inport of an + * element triggers the registered activity, which in turn calls the + * activity's behavior function and its time-width calculation function. + *The behavior function can access and modify the state of the element, + * and it can send out communications on the elements outports. + *When a communication is sent, a separate function is called to calculate + * the time of flight of that communication. * - * + *Commands of the HWSim langlet are invoked by calling a function. Such + * functions have a name that begins with "HWSim__" for example, + * "HWSim__run_simulation" is a command to tell HWSim to perform a + * simulation run. + * + *Data structures that are defined by the HWSim langlet have names that + * begin with "HWSim", for example "HWSimNetlist" is a data structure + * defined by the HWSim langlet. */ int main(int argc, char **argv)