Applying Stimuli with the ModelSim force Command

Once you establish a link between ModelSim and MATLAB, you are ready to apply stimuli to the test bench environment. One way of applying stimuli is through the iport parameter of the linked MATLAB function. This parameter forces signal values by deposit. Other ways include issuing force commands in the ModelSim Main window or using the Edit>Clock option in the ModelSim Signals window.

For example, consider the following sequence of force commands:

VSIM n> force clk 0 0 ns, 1 5 ns -repeat 10 ns
VSIM n> force clk_en 1 0
VSIM n> force reset 0 0

These commands


Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS