Home > Community > Forums > Mixed-Signal Design > Inserting electrical to real connect modules automatically

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Inserting electrical to real connect modules automatically 

Last post Thu, Apr 11 2013 4:41 PM by abdulahadk. 2 replies.
Started by abdulahadk 27 Mar 2013 10:06 AM. Topic has 2 replies and 1255 views
Page 1 of 1 (3 items)
Sort Posts:
  • Wed, Mar 27 2013 10:06 AM

    • abdulahadk
    • Not Ranked
    • Joined on Tue, Mar 26 2013
    • Posts 2
    • Points 25
    Inserting electrical to real connect modules automatically Reply

    This is based on the article in EE times http://www.eetimes.com/design/eda-design/4229801/Assertion-based-verification-in-mixed-signal-design vy 2 Cadence  authors. Another post similar to this used a VAMS test bench it seems http://www.cadence.com/community/forums/T/22576.aspx.

    I am trying to implement this simple test bench in the following manner:

      // Module top.sv

    module top;
    var real r, xr, wr;
    assign xr = 3.14;

    ams_electrical_src e_s1(r);

    // causes insertion of Electrical2Real connection module
    ams_electrical_dst e_d1(xr);

    // causes insertion of Real2Electrical connection module
    ams_wreal_src w_s1(wr);

    // Coercion of SystemVerilog real variable to wreal

    endmodule

    // Module ams_electrical_src.vams
    `timescale 10ns / 10ps
    `include "disciplines.vams"
    module ams_electrical_src(e);
      output e; electrical e;
      analog V(e) <+ 5.0;
    endmodule

     //Module ams_electrical_dst.vams
    `timescale 10ns / 10ps
    //`include "disciplines.vams"

    module ams_electrical_dst(e);
      input e; electrical e;
      initial #10 $display("%M: %f", V(e));
    endmodule

    // Module ams_wreal_src.vams
    `timescale 10ns / 10ps
    //`include "disciplines.vams"
    module ams_wreal_src(w);
      output w; wreal w;
      assign w = 2.5;
    endmodule

     Compile :

    irun -timescale 1ns/1ps -discipline logic -ieinfo ieinfo.txt top.sv ams_electrical_src.vams ams_electrical_dst.vams ams_wreal_src.vams

    Errors:

     Discipline resolution Pass...
    ams_electrical_src e_s1(r);
                            |
    ncelab: *E,CUVNCM (./top.sv,7|24): No connection module found:Need a wreal input port of continuous discipline electrical, and an output port of discrete discipline logic, at instance top.e_s1.
    ams_electrical_dst e_d1(xr);
                             |
    ncelab: *E,CUVNCM (./top.sv,10|25): No connection module found:Need a wreal input port of discrete discipline logic, and an output port of continuous discipline electrical, at instance top.e_d1.
    irun: *E,ELBERR: Error during elaboration (status 1), exiting.

    Tool: IUS 10.029

    Questions:

    1. Does IUS 10.029 support automatic insertion of connect modules as mentioned in the EE times article above?

    2. I tried explicitly to use -setdiscipline to set the net "e" to electrical but to no avail

    Any pointers/help to resolve this would be highly appreciated. I am planning on using SVA's in the test bench to monitor electrical signals from the analog blocks and hence the help would be highly appreciated. Thx

    • Post Points: 20
  • Wed, Apr 10 2013 3:57 PM

    Re: Inserting electrical to real connect modules automatically Reply

    Automatic connectmodule insertion has been supported for as long as AMS Designer has existed, so it's not new - and is certainly in that version.

    If using irun, the best way to do this is using the amsd block in the analog control file. This is used to set options for the analog solver, as well as the duration of the transient analysis. So for example, create control.scs containing:

    // control file for analog solver
    tran tran stop=1u

    amsd {
        ie vsup=5.0
    }

    Then run irun using:

    irun -timescale 1ns/1ps -ieinfo ieinfo.txt top.sv ams_electrical_src.vams ams_electrical_dst.vams ams_wreal_src.vams control.scs

    Note that the -discipline logic conflicts with the ie card in the amsd block so I omitted it.

    The simlation should then run fine. More info on the amsd block is in the documentation (search for amsd block in cdnshelp)

    Regards,

    Andrew.

    • Post Points: 20
  • Thu, Apr 11 2013 4:41 PM

    • abdulahadk
    • Not Ranked
    • Joined on Tue, Mar 26 2013
    • Posts 2
    • Points 25
    Re: Inserting electrical to real connect modules automatically Reply

    Thank you, the irun command was what I was doing wrong. I was throwing -sv switch and -ams switch for the files

     

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by abdulahadk at 27 Mar 2013 10:06 AM. Topic has 2 replies.