| Contents | Index |
vsim('PropertyName', 'PropertyValue'...)
vsim('PropertyName', 'PropertyValue'...) starts and configures the ModelSim simulator (vsim) for use with the MATLAB and Simulink features of HDL Verifier. The first folder in ModelSim matches your MATLAB current folder.
After you call this function, you can use HDL Verifier functions for the HDL simulator (for example, vsimmatlab, vsimulink) to perform the following actions:
Load instances of VHDL entities or Verilog modules for simulations that use MATLAB for verification
Load instances of VHDL entities or Verilog modules for simulations that use Simulink for cosimulation
The property name/property value pair settings allow you to customize the Tcl commands used to start ModelSim, the vsim executable to be used, the path and name of the DO file that stores the start commands, and for Simulink applications, details about the mode of communication to be used by the applications.
Tip Use pingHdlSim to add a pause between the call to vsim and the call to actually run the simulation when you are attempting to automate the cosimulation. |
'hdlsimdir' |
Specifies the path name to the Cadence Incisive simulator executable to be started.
Default: The first version of the simulator that the function finds on the system path. |
'libdir' |
Creates an entry in the startup Tcl file that points to the folder containing MATLAB library files
|
'libfile' |
Specifies a particular library file.
|
'pingTimeout' |
Time to wait, in seconds, for the HDL simulator to start.
|
'rundir' |
Specifies where to run ModelSim.
|
'runmode' |
Specifies how to start the HDL simulator.
|
'socketsimulink' |
Specifies TCP/IP socket communication for links between ModelSim and Simulink.
|
'startms' |
Determines whether ModelSim will launch from vsim.
|
'startupfile' |
Specifies Tcl script for startup.
|
'tclstart' |
Specifies one or more Tcl commands to execute after ModelSim launches.
|
'vsimdir' |
Specifies the path name to the ModelSim simulator executable (vsim.exe) to be started.
|
The following function call sequence changes the folder location to VHDLproj and then calls the function vsim. Because the call to vsim omits the 'vsimdir' and 'startupfile' properties, vsim uses the default vsim executable and creates a temporary DO file in a temporary folder. The 'tclstart' property specifies a Tcl command that loads an instance of a VHDL entity for MATLAB verification:
The vsimmatlab command loads an instance of the VHDL entity parse in the library work for MATLAB verification.
The matlabtb command begins the test bench session for an instance of entity parse, using TCP/IP socket communication on port 4449 and a test bench timing value of 10 ns.
>>cd VHDLproj % Change folder to ModelSim project folder
>>vsim('tclstart','vsimmatlab work.parse; matlabtb parse 10 ns -socket 4449')
The following function call sequence changes the folder location to VHDLproj and then calls the function vsim.
Because the call to vsim omits the 'vsimdir' and 'startupfile' properties, vsim uses the default vsim executable and creates a DO file in a temporary folder.
The 'tclstart' property specifies a Tcl command that loads the VHDL entity parse in the library work for cosimulation between vsim and Simulink.
The 'socketsimulink' property specifies that TCP/IP socket communication on the same computer is to be used for links between Simulink and ModelSim, using socket port 4449.
>>cd VHDLproj % Change folder to ModelSim project folder
>>vsim('tclstart','vsimulink work.parse','socketsimulink','4449')

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |