Using VCs without the built-in Scripts

Why OSVVM™? Forums OSVVM Using VCs without the built-in Scripts

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2716
    Isaac
    Member

    Hi everyone,

    currently I’m setting up a verification environment with an AXI (Full) verification component (VC) at work. I’ve ran several demos in the past using the built-in Scripts, however, now I would like to compile everything from scratch to target our verification environment (Questa + VUnit). My question is: is there a recommended way to compile everything from scratch? I’ve looked for it in the official documentation, but haven’t found anything helpful so far. Maybe the Scripts themselves are the documentation for this?

    I got the Basic Read/Write test running last week as a proof of concept to get buy-in from my colleagues. I reverse-engineered the compilation requirements by trial and error, which took me about 3 – 4 hours, though it probably would have been quicker without so many meetings in between. Now that it is time to integrate it in our codebase, I want to know if there is a better way to do this, other than reverse-engineering from the error messages in the simulator.

    Thanks in advance.

    Cheers,

    Isaac

    #2717
    Jim Lewis
    Member

    Hi Isaac,
    From time to time, the OSVVM compile scripts are updated. It is hard to maintain more than one approach. The reason we developed the OSVVM scripts is to provide a better reporting mechanism. In addition the the ordinary JUnit reports, OSVVM does a more comprehensive Build summary. We also do test case summaries, functional coverage reports, requirements tracking, detailed alert reports, scoreboard reports, … and all of this is automatic.

    The effortless way to work with another flow is to build OsvvmLibraries with the OSVVM pro scripts and then link the libraries into the other methodology. Unless you are editing things in the OsvvmLibraries, you can compile it once and use the library as a resource library.

    The good thing about tcl is it is already there – either in the tool gui, or if you are running in Linux, it is available in the standard installs of the OS.

    I don’t use VUnit, is there a compile script format for VUnit? The low level of OSVVM scripting, VendorScripts_***.tcl is adaptable and it should be easy to create one that generates VUnit compile scripts – rather than compiling the design.

    Best Regards,
    Jim

    #2718
    Isaac
    Member

    Hi Jim,

    thanks a lot for the quick reply and, of course, for all the work you put into the OSVVM.

    If I understand you correctly, I could either a) build the OSVVM libraries with the built-in scripts, and then link to those libraries in my workflow, or b) take a look at the scripts, specially VendorScripts_Siemens.tcl, and reverse-engineer the compilation from sources from there.

    I’ll have to speak to the tool managers to see which option suits us best. VUnit has built-in capabilities for managing libraries, recompiling, etc. so we’ll have to check if there’s a clean way to manage the OSVVM libraries from VUnit.

    I just checked – VUnit includes the OSVVM VHDL Verification Utility Library. Maybe I can start from there. It’s an old version though, so it probably won’t work right out of the box.

    Anyway, I need to go do some testing. Thanks again for your help.

    Cheers,

    Isaac

    #2721
    Patrick
    Member

    Hi Isaac,

    a few weeks ago, I release pyEDAA.OSVVM as part of the bigger EDA² Python package family. It provides a OSVVM *.pro file processor as well as data models and parsers for OSVVM’s YAML (and XML) file formats.

    Repository: https://github.com/edaa-org/pyEDAA.OSVVM
    Documentation: https://edaa-org.github.io/pyEDAA.OSVVM

    from pathlib import Path
    from pyEDAA.OSVVM.TCL import OsvvmProFileProcessor
    processor = OsvvmProFileProcessor()
    processor.LoadBuildFile(Path("OSVVM/OSVVMLibraries/OsvvmLibraries.pro"))
    processor.LoadBuildFile(Path("OSVVM/OSVVMLibraries/RunAllTests.pro"))
    project = processor.Context.ToProject("OsvvmLibraries")
    for buildName, build in project.Builds.items():
    for libraryName, lib in build.Libraries.items():
    vunitLibrary = vu.add_library(libraryName, ...)
    vunitLibrary.add_source_files(file.Path for file in lib.Files)`

    This processes 2 OSVVM pro files and then it iterates the builds and then within each build the used libraries. Then a generator expression is used to create an iterable for VUnits add_source_files method.

    If you have questions, we can continue here or ask questions via issues at GitHub.

    Kind regards
    Patrick Lehmann

    #2722
    Jim Lewis
    Member

    Hi Isaac,
    I think Patrick’s solution will be the defacto solution for integration with VUnit. Particularly since he is working on generating reports too – really cool.

    Before I talked to Patrick today, I worked on the script I mentioned above. For each OSVVM library, it will create a list of files associated with the library. Note the file list may be be different for different simulators since there are files with work arounds for particular simulator issues.

    Run this by starting up your simulator with the OSVVM scripts, per the OSVVM Script_users_guide.pdf in the OsvvmLibraries/Documentation directory. For Questa, ModelSim or Riviera-PRO, all you do is:
    source <path-to-OsvvmLibraries/OsvvmLibraries/Scripts/StartUp.tcl

    Then do:
    source $OsvvmLibraries/Scripts/VendorScripts_CompileList.tcl

    And then run the OSVVM Scripts (takes only seconds):
    build $OsvvmLibraries

    You will find the scripts in files named: _.files.

    You will find VendorScripts_CompileList.tcl on the dev branch of OsvvmLibraries.

    Best Regards,
    Jim

    #2723
    Patrick
    Member

    Oh, I forgot to mention how to run it for different vendor tools…

    The instantiation of the OsvvmProFileProcessor takes an optional argument of type OsvvmVariables

    osvvmVariables = OsvvmVariables(
      vhdlVersion = VHDLVersion.VHDL2008,
      toolVendor = "Aldec"
      toolName = "RivieraPRO"
      toolVersion = "2024.10"
    )
    processor = OsvvmProFileProcessor(osvvmVariables)
    

    See this list of allowed values for other vendors/tools:
    https://github.com/OSVVM/OSVVM-Scripts?tab=readme-ov-file#variables

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