• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. Ladder signal", My own signal"

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 5133
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Ladder signal", My own signal"

StreamCX
StreamCX over 15 years ago

How to realize signal in schematic such on picture on Cadence 5?

I need "ladder" from 0V to -2.04V with step 0.008 V (step can be smaller), 256 time intervaks.

[URL=http://img227.imageshack.us/i/voltagest.jpg/][img]img227.imageshack.us/.../URL]

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    VerilogA has been supported in spectre for 10-15 years (I forget when) and is certainly supported in IC5X.

    You do not attach it to a vpwl or any other source. The code itself is a new source.

    To use it, do File->New->Cellview (in the CIW). Set the Tool to "VerilogA-Editor" and fill in the library name as whatever you want, and call the cell name "ladder" (you could call it something different if you like). OK this form.

    Then in the resulting editor, paste in the behavioural model code I provided. Change the module name from ladder if you called the cell something other than ladder. Save and exit the editor. It should syntax check the file, and then prompt you to create a symbol. You can then place this component in your testbench, and it will generate the ladder waveform (set vmax=-2.04 when you place it).

    I just noticed that my code omitted a line specifying the direction of the pins. Here's the corrected code:

     

    `include "disciplines.vams"

    module ladder (outp,outm);
    output outp,outm;
    electrical outp,outm;

    // extent of the signal output
    parameter real vmin=0;
    parameter real vmax=2.56;
    // number of steps in the "ladder"
    parameter integer maxcount=256;
    // is it periodic? Set to 0 if you want it to be one shot
    parameter integer periodic=1;
    // period of time between steps in the ladder
    parameter real period=10n;
    // rise, fall, and delay of each step
    parameter real tr=0.1n;
    parameter real tf=0.1n;
    parameter real td=0;

    // internal variables
    real scale;
    integer count;

    analog begin
    @(initial_step) begin
    count=0;
    scale=(vmax-vmin)/(maxcount-1);
    end

    @(timer(period,period))
    if(periodic) count=(count+1)%maxcount;
    else count=min(count+1,maxcount-1);

    V(outp,outm) <+ transition(count*scale,td,tr,tf);
    end

    endmodule

    Regards,
    Andrew. 
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    VerilogA has been supported in spectre for 10-15 years (I forget when) and is certainly supported in IC5X.

    You do not attach it to a vpwl or any other source. The code itself is a new source.

    To use it, do File->New->Cellview (in the CIW). Set the Tool to "VerilogA-Editor" and fill in the library name as whatever you want, and call the cell name "ladder" (you could call it something different if you like). OK this form.

    Then in the resulting editor, paste in the behavioural model code I provided. Change the module name from ladder if you called the cell something other than ladder. Save and exit the editor. It should syntax check the file, and then prompt you to create a symbol. You can then place this component in your testbench, and it will generate the ladder waveform (set vmax=-2.04 when you place it).

    I just noticed that my code omitted a line specifying the direction of the pins. Here's the corrected code:

     

    `include "disciplines.vams"

    module ladder (outp,outm);
    output outp,outm;
    electrical outp,outm;

    // extent of the signal output
    parameter real vmin=0;
    parameter real vmax=2.56;
    // number of steps in the "ladder"
    parameter integer maxcount=256;
    // is it periodic? Set to 0 if you want it to be one shot
    parameter integer periodic=1;
    // period of time between steps in the ladder
    parameter real period=10n;
    // rise, fall, and delay of each step
    parameter real tr=0.1n;
    parameter real tf=0.1n;
    parameter real td=0;

    // internal variables
    real scale;
    integer count;

    analog begin
    @(initial_step) begin
    count=0;
    scale=(vmax-vmin)/(maxcount-1);
    end

    @(timer(period,period))
    if(periodic) count=(count+1)%maxcount;
    else count=min(count+1,maxcount-1);

    V(outp,outm) <+ transition(count*scale,td,tr,tf);
    end

    endmodule

    Regards,
    Andrew. 
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information