• 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

    The easiest way to do this is to create a Verilog A view. For example, this code:

    `include "disciplines.vams"

    module ladder (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

    Then on the instance of ladder specify vmax=-2.04 . There's a parameter in this code called periodic, which allows you to specify whether the ladder repeats.

    Attached are some pictures (one zoomed out, one zoomed in). This was with periodic=0.

    Regards,

    Andrew.

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

    The easiest way to do this is to create a Verilog A view. For example, this code:

    `include "disciplines.vams"

    module ladder (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

    Then on the instance of ladder specify vmax=-2.04 . There's a parameter in this code called periodic, which allows you to specify whether the ladder repeats.

    Attached are some pictures (one zoomed out, one zoomed in). This was with periodic=0.

    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