• 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. [SOLVED] Verilog-AMS code doesn't compile with genvar

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 2609
  • 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

[SOLVED] Verilog-AMS code doesn't compile with genvar

msharma
msharma over 10 years ago

I am writing a verilog-ams model for an 8 bit ADC. The code is derived from section 4.5.8 example 2 of vams2.3.1 reference. However, the use of genvar gives an error:

--------------

Error found by spectre during AHDL compile.
    ERROR (VACOMP-1149):
        "/.../adc_8bit/veriloga/veriloga.va", line
        27: Genvar loop evaluation failed. Check whether `/usr/bin/perl' is
        available.
    ERROR (VACOMP-1816): Exiting AHDL compilation.
Internal error found in spectre during AHDL compile, during generation of
        Artist DPLs.  
Encountered a critical error during simulation. Submit a Service Request via
        Cadence Online Support, including the netlist, the Spectre log file,
        the behavioral model files, and any other information that can help
        identify the problem.
    FATAL (SPECTRE-18): Segmentation fault.
/uusoc/facility/cad_tools/Cadence/MMSIM_13.11.176_lnx86/tools/bin/spectre[80]: .: line 1076: 22896: Abort

--------------

The error is in the first line that uses genvar, and complains about "usr/bin/perl". Any clues to fixing this?

Here is my complete code

--------------


`include "constants.vams"
`include "disciplines.vams"
`timescale 1ns / 1ps

module adc_8bit (out, in, clk, vref, avdd, agnd, ibias) ;
input in, clk, vref, avdd, agnd, ibias;
output [0:7] out;
electrical in, clk, vref, avdd, agnd, ibias;
electrical [0:7] out;

real vdd, ref;
real sample;
integer result[0:7];
//integer i;
genvar i;

analog begin

 vdd = V(avdd) - V(agnd);
 ref = V(vref) - V(agnd);
        @(cross(V(clk) - vdd/2, +1)) begin
                sample = V(in);
                for ( i = 7; i >= 0; i = 1-1) begin
                        if (sample > ref) begin
                                result[i] = 1;
                                sample = sample - ref;
                        end
                        else begin
                                result[i] = 0;
                        end
                        sample = 2.0*sample;
                end
        /*
                for ( i = 7; i >= 0; i = 1-1) begin
                        V(out[i]) <+ transition(result[i], 0, 10n);
                end
        */
                V(out[7]) <+ transition(result[7], 0, 10n);
                V(out[6]) <+ transition(result[6], 0, 10n);
                V(out[5]) <+ transition(result[5], 0, 10n);
                V(out[4]) <+ transition(result[4], 0, 10n);
                V(out[3]) <+ transition(result[3], 0, 10n);
                V(out[2]) <+ transition(result[2], 0, 10n);
                V(out[1]) <+ transition(result[1], 0, 10n);
                V(out[0]) <+ transition(result[0], 0, 10n);
        end

endmodule

--------------

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Please read the forum guidelines and avoid multiple postings of the same question. I've answered this in response to your other post.

    Regards,

    Andrew.

    • 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