-
// generate the main menu
include ("include/vcc_menu.php"); ?>
// select and link a stylesheet include ("style/style.php"); ?>
// end of #mainmenu ?>At present the double behaviour will not do anything because we haven't added any code. We must now add C code to each block so that the integer_source block outputs an integer when the simulation starts and the double block doubles and outputs any integer that it receives.
To add code to a block, right click on the block and choose New view.... Now click Whitebox C and answer yes to the question about updating the interface of the cell. A text window will appear with 2 functions already defined. These functions must always be present and will run at the following times:
The code for each block is shown below. This demonstrates how to send and receive messages through ports.
Once you have written the code, save it by clicking the save button on the toolbar and compile it by clicking tools/generate object code. Also update the behaviour by going to the behaviour view and clicking tools/generate netlist.