Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VHPI: Add support for record types #728

Merged
merged 7 commits into from
Jun 22, 2023
Merged

Commits on Jun 22, 2023

  1. vhpi: Pre-calculate names' offsets

    We have all the information necessary to determine the offset of indexed
    names when creating them. To simplify the process of determining the
    offset by pre-calculating them.
    Forty-Bot committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    27ee7da View commit details
    Browse the repository at this point in the history
  2. vhpi: Add support for vhpiPrefixP

    Back when prefixnames got added I forgot to add support for the prefix
    property itself. Add it now.
    Forty-Bot committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    7aa6fb9 View commit details
    Browse the repository at this point in the history
  3. vhpi: Support record elements

    Add support for record elements. Convert the vhpi5 test to gold to make
    it easier to check recursive structures, and change the record
    definition to something a little more interesting.
    Forty-Bot committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    81cd8b5 View commit details
    Browse the repository at this point in the history
  4. vhpi: Support NumFields

    Add support for the NumFields property of record types.
    Forty-Bot committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    695bd8f View commit details
    Browse the repository at this point in the history
  5. vhpi: Add support for selected names

    The other major type of prefixed names is selected names. Add support
    for them. In many ways they are simpler than indexed names, since we
    don't have to keep track of multiple indices. Getting/setting is not
    supported, but it will be addressed in the next commit.
    Forty-Bot committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    3a32fb7 View commit details
    Browse the repository at this point in the history
  6. vhpi: Add get/set support for selected names

    Inhomogenous types are create scopes instead of signals. Additionally,
    inhomogenous arrays have nested scopes for their elements. Add the
    necessary machinery to determine the scope for a name/objDecl, and look
    up the signal at the final level.
    
    In the style of vhpi7, assign a value to each element of the test
    records, and try to change them. To avoid needing to repeat the same
    code while recursing through records, we just print out the values and
    check them against the golden output. We cheat a bit for
    multidimensional arrays because array properties are checked properly in
    vhpi7.
    Forty-Bot committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    683a4b6 View commit details
    Browse the repository at this point in the history
  7. vhpi: Add support for getting record types by name

    When cocotb tries to access an object with a name like `VHPI5.O.F`, it
    doesn't know whether O is a signal or a record. This ambiguity could be
    resolved by trying to look up the name like `:VHPI5:O.F` or
    `:VHPI5:O:F`, but cocotb can't determine which to use ahead of time.
    This is a limitation of cocotb, but probably not one which will ever get
    resolved.
    
    Add support for looking up record types by name, primarily to allow
    cocotb to access them.
    Forty-Bot committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    3b86c2f View commit details
    Browse the repository at this point in the history