Product Documentation
Spectre AMS Designer Cosimulation with MathWorks MATLAB/Simulink
Product Version IC23.1, June 2023

3


Running Cosimulation from ADE Using the simulinkCoupler

AMS-MATLAB/Simulink cosimulation stands for cosimulation using the Spectre AMS Designer simulator and The MathWorks MATLAB®/Simulink®. ADE stands for the Virtuoso Analog Design Environment.
Use IC 6.1.3, IUS 8.1 or later, and MATLAB704R14 or MATLAB R2007b or MATLAB R2008a for this tutorial. The estimated time to complete this tutorial is about one hour.

The simulinkCoupler is a parameterized cell (Pcell) that does not have a fixed number of pins: You can change the number of pins to fit different designs.

To run cosimulation from ADE using the simulinkCoupler block from the Cadence analogLib library, do the following:

  1. Replace the coupler_2_3_a block with the simulinkCoupler block.
  2. Specify automatic generation of the Verilog-AMS module.
  3. Run cosimulation by starting two simulations separately.

Replacing the coupler_2_3_a with the simulinkCoupler

To replace the coupler_2_3_a coupler block on the Virtuoso schematic with the simulinkCoupler block from the Cadence analogLib Library, do the following:

  1. In the schematic window, click the coupler_2_3_a instance and press Delete.
  2. Type i to open the Add Instance form.
  3. Click Browse to open the Library Browser.
  4. In the Library column, select analogLib.
  5. In the Cell column, scroll down and select simulinkCoupler.
  6. On the Add Instance form, change the number of input pins to 2 and the number of output pins to 3 as follows:
    1. In the Number on input pins field, type 2.
    2. In the Number of output pins field, type 3.
  7. In the schematic window, place the simulinkCoupler instance.
  8. Choose File – Check and Save.

Specifying Automatic Generation of the Verilog-AMS Module

To specify automatic generation of a Verilog-AMS module for the simulinkCoupler block, do the following:

  1. In ADE, choose Setup – MATLAB/Simulink – Create Pcell coupler file.
    The Create Pcell Coupler File form appears.
  2. Verify that Auto-create Pcell while netlisting is turned on.
    When Auto-create Pcell while netlisting is turned on, ADE generates the Verilog-AMS module automatically.
  3. Click OK.
    You are ready to run cosimulation by starting two simulations separately.

Viewing and Modifying the Verilog-AMS Module

To view and modify the Verilog-AMS module for the simulinkCoupler that ADE generates, do the following:

  1. In ADE, choose Setup – MATLAB/Simulink – Create Pcell coupler file.
  2. On the Create Pcell Coupler File form, turn off Auto-create Pcell while netlisting.
  3. Click Select twice.
    The RF Transmitter System Testbench schematic appears in the foreground.
  4. Select the CouplerToSimulink instance.
    The instance name appears in the Coupler instance field on the Create Pcell Coupler File form.
  5. Click Generate Verilog-AMS to create the Verilog-AMS code for the Pcell coupler.
    The following success message appears in the output area of the CIW:
    Generated Verilog-AMS file successfully. 
  6. On the Create Pcell Coupler File form, click Edit Verilog-AMS.
    The Verilog-AMS code for the simulinkCoupler cell appears in a text editing window.
  7. Quit the text editor window.
  8. (Optional) You can run cosimulation by starting two simulations separately.
  9. To exit Cadence software and MATLAB, choose File – Exit in the CIW.

Return to top
 ⠀
X