• 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. Functional Verification
  3. Replication Patterns

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 64
  • Views 15208
  • 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

Replication Patterns

archive
archive over 18 years ago

Look what I got!

    preamble =   '{PREAMBLE_SIZE{40'hDDDDDDDDDD}};
                                |
ncvlog: *E,APTYPE (/lsi/ftc/yampa_design/users/dfechser/experimental/lib/lsi_uvc_lib/lsi_nrz/sv/lsi_nrz_package.sv,81|32): Assignment Pattern - replication patterns unsupported at this time (PREAMBLE_SIZE) [SystemVerilog].


...anyone know when ncverilog will support this (PREAMBLE_SIZE is a variable)?

Dave F.


Originally posted in cdnusers.org by dfechser
  • Cancel
Parents
  • archive
    archive over 18 years ago

    If it's a parameter, why not do

    ------------------------------------
    module temp;

    parameter PREAMBLE_SIZE = 16;
    bit [PREAMBLE_SIZE*40-1:0] preamble;

    initial begin
    preamble='{{PREAMBLE_SIZE{40'hDDDDDDDDDD}}};
    end

    endmodule
    ------------------------------------
    It compiled for me in 5.83. I assume the OP wanted to pass it to a task as a parameter like

    ------------------------------------
    module test;

    // the dynamic array must be defined here because it is invalid in a task
    bit preamble[];

    task xxx(input int PREAMBLE_SIZE);


    preamble = new[PREAMBLE_SIZE*40];

    preamble = '{PREAMBLE_SIZE{40'hDDDDDDDDDD}};

    endtask

    initial begin
    xxx(13);
    xxx(10);
    end

    endmodule
    ------------------------------------

    When I did this, I got the same error messages as the OP. I tried your for loop trick in the above and it worked OK.

    David Walker


    Originally posted in cdnusers.org by dwalker@sirenza.com
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • archive
    archive over 18 years ago

    If it's a parameter, why not do

    ------------------------------------
    module temp;

    parameter PREAMBLE_SIZE = 16;
    bit [PREAMBLE_SIZE*40-1:0] preamble;

    initial begin
    preamble='{{PREAMBLE_SIZE{40'hDDDDDDDDDD}}};
    end

    endmodule
    ------------------------------------
    It compiled for me in 5.83. I assume the OP wanted to pass it to a task as a parameter like

    ------------------------------------
    module test;

    // the dynamic array must be defined here because it is invalid in a task
    bit preamble[];

    task xxx(input int PREAMBLE_SIZE);


    preamble = new[PREAMBLE_SIZE*40];

    preamble = '{PREAMBLE_SIZE{40'hDDDDDDDDDD}};

    endtask

    initial begin
    xxx(13);
    xxx(10);
    end

    endmodule
    ------------------------------------

    When I did this, I got the same error messages as the OP. I tried your for loop trick in the above and it worked OK.

    David Walker


    Originally posted in cdnusers.org by dwalker@sirenza.com
    • 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