Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Quartus system verilog interface parameter bug

Does anyone know of a workaround for the following System Verilog interface parameter bug?

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

The short version:

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

In some (not all) contexts, the default value of an interface parameter is used instead of the overriding value.

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

The very long version (offending code is attached):

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

Error message produced by following code:

Error (10232): Verilog HDL error at if_test.sv(44): index 4 cannot fall outside the declared range [3:0] for vector "io.in"

Observations of above message:

- The declared range of io.in is [7:0] not [3:0]

- The default paramater value of the interface would give a range for io.in of [3:0] as reported by the error message.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What QII version are you using? If you delete the db directory, does the problem go away?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    What QII version are you using? If you delete the db directory, does the problem go away?

    --- Quote End ---

    I am using QII 8.0. Deleting the db does not help. This behavior is consistent and repeatable.

    I am really just fishing for any workaround ideas that do not involve re-writing my entire design without interfaces.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Turns out it's pretty trivial, but i'll post my workaround anyway.

    Simply making a wrapper module for the interface support works. If i just encapsulate the problem functionality in a module that does not use interfaces, then call this module from a wrapper that does use interfaces, it works.

    I've attached the updated test case, just for completeness.