• 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. Mixed-Signal Design
  3. Weird voltage level in verilogA simulation

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 13776
  • 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

Weird voltage level in verilogA simulation

hafiz2431
hafiz2431 over 6 years ago

Hi,

I'm trying to calibrate a driver against a termination. Algorithm => sweep input code (clk_out[5:0]), check voltage at termination and lock the code (pu_code[5:0]) once the desired value is attained.

The code locked at the desired value (>=0.2) but the voltage levels at pu_code[5:0] are having some weird values (e.g. 0.9V, 0.462V) though logic hi is 0.8V (see the figure attached).

Can anybody explain the reason behind this?

Your assistance is appreciated.

Regards,

Hafiz

  • Cancel
  • hafiz2431
    hafiz2431 over 6 years ago

    Here's the code for the calibration block:

    module nnbank_calib (
       clk_in,
       clk_out,
       midvtt,
       ack,
       pu_code
                       );
           
    input       clk_in;
    electrical      clk_in;
    output [5:0]  clk_out;
    electrical [5:0] clk_out;
    input    midvtt;
    electrical   midvtt;
    output    ack;
    electrical   ack;
    output [5:0]  pu_code;
    electrical [5:0] pu_code;
     
    parameter real  vth=0.4,
                    vol=0,
                    voh=0.8;
    parameter real trf=1p; 
        
    integer count2,n2,count4,n4,count8,n8,count16,n16,count32,n32, countlock;           

    analog begin
    @(initial_step("tran")) begin
    count2=-1;
    count4=-1;
    count8=-1;
    count16=-1;
    count32=-1;
    countlock = 0;
    end
    @(cross(V(clk_in) -vth,-1)) begin
        count2 = count2+1;
        if (count2 >= 2)
         count2 = 0;
         n2 = (2*count2 >= 2);
       
        count4 = count4+1;
        if (count4 >= 4)
         count4 = 0;
         n4 = (2*count4 >= 4);
     count8 = count8+1;
        if (count8 >= 8)
         count8 = 0;
         n8 = (2*count8 >= 8);
     count16 = count16+1;
        if (count16 >= 16)
         count16 = 0;
         n16 = (2*count16 >= 16);
     count32 = count32+1;
        if (count32 >= 32)
         count32 = 0;
         n32 = (2*count32 >= 32);
    end
    V(clk_out[0]) <+ V(clk_in);
    V(clk_out[1]) <+ transition (n2 ? voh : vol, 0, trf);
    V(clk_out[2]) <+ transition (n4 ? voh : vol, 0, trf);
    V(clk_out[3]) <+ transition (n8 ? voh : vol, 0, trf);
    V(clk_out[4]) <+ transition (n16 ? voh : vol, 0, trf);
    V(clk_out[5]) <+ transition (n32 ? voh : vol, 0, trf);

    @(cross(V(clk_in) -vth,0)) begin
        if (V(midvtt) >= 0.2) begin
      countlock = countlock+1;
      if (countlock == 1) begin
          V(pu_code[0]) <+ V(clk_out[0]);
          V(pu_code[1]) <+ V(clk_out[1]);
          V(pu_code[2]) <+ V(clk_out[2]);
          V(pu_code[3]) <+ V(clk_out[3]);
          V(pu_code[4]) <+ V(clk_out[4]);
          V(pu_code[5]) <+ V(clk_out[5]);
          V(ack)   <+ voh;  
      end
       end else begin
          V(pu_code[0]) <+ vol;
          V(pu_code[1]) <+ vol;
          V(pu_code[2]) <+ vol;
          V(pu_code[3]) <+ vol;
          V(pu_code[4]) <+ vol;
          V(pu_code[5]) <+ vol;
          V(ack)   <+ vol;
       end
     end
    end
    endmodule
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • silviabarnett
    silviabarnett over 6 years ago in reply to hafiz2431

    Thanks @hafiz2431, it worked 

    happy wheels

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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