File tree 1 file changed +16
-1
lines changed 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1601,7 +1601,22 @@ struct CxxrtlBackend : public Backend {
1601
1601
log (" \n " );
1602
1602
log (" write_cxxrtl [options] [filename]\n " );
1603
1603
log (" \n " );
1604
- log (" Write C++ code for simulating the design.\n " );
1604
+ log (" Write C++ code for simulating the design. The generated code requires a driver;\n " );
1605
+ log (" the following simple driver is provided as an example:\n " );
1606
+ log (" \n " );
1607
+ log (" #include \" top.cc\"\n " );
1608
+ log (" \n " );
1609
+ log (" int main() {\n " );
1610
+ log (" cxxrtl_design::p_top top;\n " );
1611
+ log (" while (1) {\n " );
1612
+ log (" top.p_clk.next = value<1> {1u};\n " );
1613
+ log (" top.step();\n " );
1614
+ log (" top.p_clk.next = value<1> {0u};\n " );
1615
+ log (" top.step();\n " );
1616
+ log (" }\n " );
1617
+ log (" }\n " );
1618
+ log (" \n " );
1619
+ log (" The following options are supported by this backend:\n " );
1605
1620
log (" \n " );
1606
1621
log (" -O <level>\n " );
1607
1622
log (" set the optimization level. the default is -O%d. higher optimization\n " , DEFAULT_OPT_LEVEL);
You can’t perform that action at this time.
0 commit comments