• 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. veriloga integer input to 32-bit address output has a strnage...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 126
  • Views 4045
  • 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

veriloga integer input to 32-bit address output has a strnage error/how to debug/where to find the latest veriloga reference documents?

monglebest
monglebest over 6 years ago

I have 3 questions related with veriloga and really appreciate your help.


// VerilogA for integer number input to address output

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

module integer2address(vdda,gnda,OutAddress);

parameter integer BusWidth=32;
parameter integer BusOn=8;
input vdda, gnda;
output [31:0] OutAddress;
electrical [31:0] OutAddress;
electrical vdda, gnda;

genvar i;

analog begin

for(i=0;i<BusWidth;i=i+1) begin
V(OutAddress[i]) <+ V(gnda);
end
// $debug("BusOn=%d",BusOn);
if (BusOn) begin
// $debug("Enter the conditional statement, BusOn=%d",BusOn);
for(i=0;i<BusOn;i=i+1) begin
V(OutAddress[i]) <+ 1.0*V(vdda);
end
end
end

endmodule


I have the above veriloga code to have BusOn as an integer for input and the OutAddress will turn on corresponding lines in DC simulation. The code works well when BusOn is not equal to 0.

Here is my 3 questions;

1. I wonder why this code above will report error when BusOn = 0. It works for BusOn=1 to 32.

2. How to display the debug or display or strobe information in Cadence? I had difficulty to enable the $strobe feature as mentioned in this pdf. (or more specifically, I cannot find where the $strobe information are reported in Cadence, neither spectre.out nor CIW)

http://www.lumerink.com/docs/VerilogA.pdf

3. I actually have access to the latest document folder but I have difficulty to identify which one is the veriloga reference document same as the link above. Below is a screenshot of the documents that is available to me. Can you tell me which folder is for veriloga reference doc?

The error reported is shown below and I try to attach the whole spectre.out file here but was not successful.


Internal error found in spectre during AHDL read-in, during hierarchy flattening, during circuit read-in.
Encountered a critical error during simulation. Please run `mmsimpack' to pack the test case (use mmsimpack -h option to get detailed usage), and submit the case via Cadence Online Support, including the package tar file and any other information that can help identify the problem.
FATAL (SPECTRE-18): Segmentation fault.

Version 18.1.0.235.isr3 64bit -- 8 Jan 2019

****ASSERTION STACK****
0x4d9d38e
0x5e535e
0x355c432570
0x4057b3d
0x4060e50
0x4057213
0x405d07b
0x410bd16
0x41449ea
0x42b9e48
0x42caf5e
0x4035512
0x18391ad
0x183b3a5
0x183383c
0x45f38e0
0x45f3b37
0x19a2890
0x45f6e1b
0x45ad676
0x45b7630
0x19b4303
0x5908da
0x5909fd
0x501a1c
0x50f47e
0x510587
0x5113e8
0x4a6219
0x355c41ed20
0x4fc945

I actually find there is a very easy way to enable the code above to output all 0 whne BusOn=0, but I just don't understand why the top code cannot give me all OutAddress=32'b0 when BusOn=0. Below are the code to enable all lines output 0 for BusOn=0. I just remove the If conditional statement. But due to the lack of debug features in Cadence for veriloga, I have difficulty to understand why this if conditional statement doesn't work for me. Appreciate your help.

// VerilogA for integer number input to address output

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

module integer2address(vdda,gnda,OutAddress);

parameter integer BusWidth=32;
parameter integer BusOn=8;
input vdda, gnda;
output [31:0] OutAddress;
electrical [31:0] OutAddress;
electrical vdda, gnda;

genvar i;

analog begin

for(i=0;i<BusWidth;i=i+1) begin
V(OutAddress[i]) <+ V(gnda);
end
end

endmodule

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    A slightly unusual way of coding it - you have one or two voltage contribution statements for each bus bit - what will happen is that if both are enabled, it would get the sum of the two.

    It works absolutely fine for me in SPECTRE18.1 ISR8 (you’re using iSR3) - although it’s a bit surprising you’d be getting a segmentation fault (I can’t easily check the older version as I’m travelling).

    The documentation for VerilogA is in the SPECTRE stream - if you do `spectre_root`/bin/cdnshelp you can access it that way, or look in the doc directory under the location reported by spectre_root (in a terminal) - it’s veriaref/veriaref.pdf

    The $debug and $strobe in your code works absolutely fine (of course, once uncommented). I assume the segmentation fault you’re getting is before it even gets that far. I don’t see why it should be crashing - so I’d advise checking a newer hot fix in case it was a temporary issue that’s now been resolved.

    By the way, there is a component on support.cadence.com called “busset” (or rather “bussetp” - search for either and I think it will find the article) which is something I put together a few years ago which is a parameterised component with a variable width bus. That allows you to provide a parameter which is the decimal value of the bus. The maximum bus width is (I think) 31 though in that case (so you could just place two instances with 16 bits each if you want 32. That doesn’t use VerilogA.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • monglebest
    monglebest over 6 years ago in reply to Andrew Beckett

    I am able to find the veriaref files, thank you. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • monglebest
    monglebest over 5 years ago in reply to Andrew Beckett

    Hi Andrew:

    Thanks for the support. The reason I am back is because the veriloga code failed for some other reason and I am not able to figure out how to properly load your skill code bussetp.il.

    I load it in CIW and it returns with the below error.

    =======start error report=============

    load("~/Downloads/bussetp.il")
    *Error* Couldn't open library "training"
    *Error* load: error while loading file - "~/Downloads/bussetp.il" at line 284

    =========end of error report==================

    For the veriloga code, I have simplified my code to the code below but I still get error now, it works yesterday, weired.

    `include "constants.vams"

    `include "disciplines.vams"

    module integer2thermocodeOut(vdda,gnda,OutAddress);

    parameter integer BusWidth=32;

    parameter integer BusOn=8;
    input vdda, gnda;
    output [31:0] OutAddress;
    electrical [31:0] OutAddress;
    electrical vdda, gnda;

    genvar i;

    analog begin

    if (BusOn) begin

    for(i=0;i<BusOn;i=i+1) begin

    V(OutAddress[i]) <+ 1.0*V(vdda);
    end
    end
    end

    endmodule

    =======start error report=============

    Error found by spectre during hierarchy flattening.
    ERROR (SFE-100): "input.scs" 6403: `I101': An instance of `integer2thermocodeOut_BusOn_12' can have at most 0 terminals (but has 34). Clean up the directory and recompile or use command '-va,forcecompile' to recompile. If still fail, contact developer for help.

    ========end of error report==========

    I am using IC6.1.7-64b.500.23

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to monglebest

    The busset code will need modifying to specify the library you wish to create the component in. From memory the code specifies it as a library called "training" but you can change the code to be whatever you want. That's why it's failing. Note however that you cannot create a bus wider than 31 bits though using this component because uses integer arithmetic and it's signed 32-bit integer.

    The VerilogA code should work OK - I suspect something has got messed up with your ADE simulation directory. You could try doing what it suggests - go to Setup->Environment and in the User Command line Option field enter:

    -va,forcecompile

    This will force the VerilogA to be recompiled. I'm not sure why it's failing without that (may depend on the Spectre version you're using though, which you didn't mention).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • monglebest2022
    monglebest2022 over 3 years ago in reply to Andrew Beckett

    Hi, Andrew:

    I am using an alternative called bmslib→busset8. It's already in the library bmslib.

    Besides that, the veriloga coded busset I use before will results in Cadence APS simulator not-convergence. The issue can be confirmed in ic6.1.8-64b.500.16. Since I have a workaround here and doesn't have time to debug this, I just left this info here for reference.

    Besides that, it seems the Cadence community webpage is not compatible with chrome browser, opening this page in chrome will results in continuous refreshing, I really cannot read anything in Chrome browser.

    monglebest

    • 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