<Preprocessor>#include </Preprocessor><Prep. Lib>"systemc.h"</Prep. Lib><br/>
<Normal Text></Normal Text><br/>
<Comment>/*</Comment><br/>
<Comment> multi line comment</Comment><br/>
<Comment> */</Comment><br/>
<Normal Text></Normal Text><br/>
<Comment>// declare some module</Comment><br/>
<Extensions-Macros>SC_MODULE</Extensions-Macros><Symbol>(</Symbol><Normal Text>gate</Normal Text><Symbol>)</Symbol><br/>
<Symbol>{</Symbol><br/>
<Normal Text>    </Normal Text><Comment>// inputs</Comment><br/>
<Normal Text>    </Normal Text><Data Type>sc_in</Data Type><Symbol><</Symbol><Data Type>bool</Data Type><Symbol>></Symbol><Normal Text> inA</Normal Text><Separator Symbol>,</Separator Symbol><Normal Text> inB</Normal Text><Separator Symbol>;</Separator Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>    </Normal Text><Comment>// outputs</Comment><br/>
<Normal Text>    </Normal Text><Data Type>sc_out</Data Type><Symbol><</Symbol><Data Type>bool</Data Type><Symbol>></Symbol><Normal Text> out</Normal Text><Separator Symbol>;</Separator Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>    </Normal Text><Comment>// C function</Comment><br/>
<Normal Text>    </Normal Text><Data Type>void</Data Type><Normal Text> do_something</Normal Text><Symbol>()</Symbol><br/>
<Normal Text>    </Normal Text><Symbol>{</Symbol><br/>
<Normal Text>        out</Normal Text><Symbol>.</Symbol><Normal Text>write</Normal Text><Symbol>(</Symbol><Normal Text>inA</Normal Text><Symbol>.</Symbol><Normal Text>read</Normal Text><Symbol>()</Symbol><Normal Text> </Normal Text><Symbol>||</Symbol><Normal Text> inB</Normal Text><Symbol>.</Symbol><Normal Text>read</Normal Text><Symbol>())</Symbol><Separator Symbol>;</Separator Symbol><br/>
<Normal Text>    </Normal Text><Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>    </Normal Text><Comment>// constructor</Comment><br/>
<Normal Text>    </Normal Text><Extensions-Macros>SC_CTOR</Extensions-Macros><Symbol>(</Symbol><Normal Text>gate</Normal Text><Symbol>)</Symbol><br/>
<Normal Text>    </Normal Text><Symbol>{</Symbol><br/>
<Normal Text>        </Normal Text><Comment>// register method</Comment><br/>
<Normal Text>        </Normal Text><Extensions-Macros>SC_METHOD</Extensions-Macros><Symbol>(</Symbol><Normal Text>do_something</Normal Text><Symbol>)</Symbol><Separator Symbol>;</Separator Symbol><br/>
<Normal Text>    </Normal Text><Symbol>}</Symbol><br/>
<Symbol>}</Symbol><Separator Symbol>;</Separator Symbol><br/>
