NVC Simulation Error

Why OSVVM™? Forums OSVVM NVC Simulation Error

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2893
    David
    Member

    Hello Jim,

    I’m not sure if this is an OSVVM issue, a QuestaSim issue or an NVC issue, could you help me identify where/if this should be raised please? or if my VHDL is wrong that is using OSVVM.

    This code runs successfully in Questa but gives an error when run in NVC:

    ** Error: type of index BOOLEAN does not match type of array dimension POSITIVE
    Error: > ../../../../00_Test_Libaries/generic_tb_components/output_checker_sl.vhd:658
    Error: |
    Error: 658 | Log(checker_rst_alert_id, get_component_name(TRUE) & “reset checks enabled”, INFO);
    Error: | ^^^^

    Not this is with an older release of OSVVM:
    source ….ripts/StartNVC.tcl
    OSVVM Script Version: 2023.07
    Simulator Version: nvc-1.19.2

    Any help appreciated,
    Regards,
    Dave

    #2894
    Jim Lewis
    Member

    Hi Dave,
    Is get_component_name a function that has an optional boolean parameter and returns type string?
    It would help to see its definition, however, I will make some guesses.

    I have seen this issue before when the optional parameter is type integer, but never with type boolean.
    With type integer, in this context, it is correct if “get_component_name(1)” returns either a string
    or a character value. If the 1 is seen as the optional parameter, the function returns a string
    value. If the 1 is not seen as the optional parameter, then the 1 is indexing the string
    return value and the expression results in a character value. Some tools will report this as
    an ambiguous expression – some will not see the index and will not report it.
    For me, the LRM is complex in this area and I am not clear about the proper interpretation.

    The error is valid if TRUE is not a valid parameter of get_component_name. In which case NVC is
    trying to use the TRUE to index a string and hence the message.

    OTOH, if TRUE is a parameter (optional or not) of get_component_name, it looks like NVC has a
    bug and you should report it at https://github.com/nickg/nvc/issues. Nick is generally quick
    about responding – and explaining why he thinks the message is correct or it is a bug.

    Best Regards,
    Jim

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.