• 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. Error in Verilog AMS for decoding logic

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 65
  • Views 13995
  • 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

Error in Verilog AMS for decoding logic

ksnf3000
ksnf3000 over 11 years ago

 Hello All,

I am trying to implement a decoding logic using Verilog AMS. However, I am always stuck wtih the below errors. (Screenshot 43.png)

 The code is as follows: 

`include "constants.vams"
`include "disciplines.vams"

module decode_logic_new11 (D_I,D_O);
 input   [2:0] D_I;
 electrical [2:0] D_I;

 output  [23:0] D_O;
 electrical [23:0] D_O;

 parameter real Vout;

parameter real
     Term1 = 555,Term2 = 550, Term3 = 505,Term4 = 500,Term5 = 055,Term6 = 050, Term7 = 005,Term8 = 000;

 
  parameter real   one = 5.0;
  parameter real  zero = 0.0;
  parameter real   vth = 3.0m;
  parameter real slack = 10.0p from (0:inf);
  parameter real trise = 50.0p from (0:inf);
  parameter real tfall = 50.0p from (0:inf);
  parameter real tconv = 500.0p from [0:inf);
  parameter integer traceflag = 0;

      analog begin
      @(initial_step or initial_step("dc", "ac", "tran", "xf"))  begin

        if(V(D_I[2:0]) == Term1)
    begin
         assign Vout = 000000000000000000000000;
         V(D_O[23:0]) <+ transition (Vout,tconv, trise, tfall);
    end
    if(V(D_I[2:0]) == Term2)
    begin
        Vout = 000000000000000000005555;
         V(D_O[23:0]) <+ transition (Vout,tconv, trise, tfall);
    end
     if(V(D_I[2:0]) == Term3)
    begin
         Vout = 000000000000000055555555;
         V(D_O[23:0]) <+ transition (Vout,tconv, trise, tfall);
    end
    if(V(D_I[2:0]) == Term4)
    begin
        Vout = 000000000000555555555555;
        V(D_O[23:0]) <+ transition (Vout,tconv, trise, tfall);
    end
    if(V(D_I[2:0]) == Term5)
    begin
        Vout = 000000005555555555555555;
        V(D_O[23:0]) <+ transition (Vout,tconv, trise, tfall);
    end
    if(V(D_I[2:0]) == Term6)
    begin
         Vout = 000055555555555555555555;
         V(D_O[23:0]) <+ transition (,tconv, trise, tfall);
      end
    if(V(D_I[2:0]) == Term7)
    begin
        Vout = 000055555555555555555555;
          V(D_O[23:0]) <+ transition (Vout,tconv, trise, tfall);
    end
    if(V(D_I[2:0]) == Term8)
    begin
         Vout = 000000555555555555555555;
         V(D_O[23:0]) <+ transition (,tconv, trise, tfall);
    end
    end   
end               
endmodule

Please let me know the possible reason for it and any solutions for this problem.

 Regards,

ksnf3000

  • Screenshot-43.png
  • View
  • Hide
  • Cancel
  • shalem7
    shalem7 over 11 years ago

    First problem is

    "paramter real Vout"  you are missing right hand side assignment as you did while declaring  Term1 = 555,Term2 = 550 etc...

    It has to be  something like this "parameter real Vout=5.0"

     Next problem is using assign statement in analog block is not allowed.

    And third problem I see is the Vout value that was being assigned(000055555555555555555555) which I think the tool is unble to store such a big value.

     Thanks,

    Shalem

    • 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