Main /
CreatingNewActorsForCodeGenerationOverviewThere are three steps necessary to create new actors for your code generator. First, the actor itself needs to be defined in a java file. This will include the ports, parameters, and how the actor acts when run in Vergil. Second, the actor adapter needs to be created, which is another .java file. This is the actor that handles cases for the code generation and makes it work correctly. Last, the c template file needs to be written. This file is the same that you would use for the embedded code actor. Development can be done with the embedded code actor only and the code generation should work fine, but if you want to make some useful and interesting models, then it is best to make actors that will simulate too. This has been split into three sections. The c code generation is probably the most important to get started, and should be tested out with the embedded code actor first. |