Custom Development

Integrate all your existing models written in C/C++/Java/Python or other simulators, and use trace files from VCD/CSV/Txt

Custom Development Library

VisualSim is a component-based design. The simulators define the semantics of the interaction between components. Blocks are components with input and output that at least conceptually operate concurrently with other blocks.

The functionality of blocks in VisualSim can be defined in a number of ways. The most basic mechanism is hierarchy, where a block is defined as a composite of other blocks. But composites are not always the most convenient.

  1. Defining the blocks in an advanced language like the Script can reduce the overhead burden of definition, threads and dealing with complex debuggers.
  2. Using Expression block, for instance, is often more convenient for involved mathematical relations. The functionality is defined using the expression language explained in an earlier chapter.
  3. Alternatively, you can use the MatlabExpression block and give the behavior as a MATLAB script (assuming you have MATLAB installed).
  4. You can also define the behavior of an block in Python, using the PythonActor or PythonScript actor.
  5. But the most flexible method is to define the block in Java, C or C++.
  6. You can also import code written in SystemC and Verilog

Development in C and C++

The Application_Interface block is used to import any application and C/C++ directly into VisualSim for use in a model. Once the block has been configured and compiled, it can connect to any other block in the Block Diagram Editor. The CustomC block can accept data arriving on any port, inspect the content and determine the next operation. The block can also send data to the block output port at any time independent of data arriving at the input. The user can add any number of input and output ports. There are no restriction on the port names. The block can have user-defined parameters that can be accessed by the code. The module name must be unique for each code variation in the model as the wrapper generator will create a unique directory with that name in the CustomC directory. Multiple instances of the same block can exist in the model. The Application_Interface block is a non-blocking block. This means that while this block executes the rest of the VisualSim model will also continue to execute. There are specific C++ functions available that can stop and start the blocking of the simulator. This must be added to the .h and the .cpp files.

C-like language, platform-independent and compiled to native code