OSVVM: Build part of design and run only single test

Why OSVVM™? Forums OSVVM OSVVM: Build part of design and run only single test

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2791
    Hassan
    Member

    Here are the steps:

    First compile everything.

    build ../OsvvmLibraries/OsvvmLibraries.pro
    ...

    Later just compile the DUT, lets say that it is the AXI4.
    build ../OsvvmLibraries/Axi4/Axi4/build.pro

    Now compile the testbench for this DUT:
    build ../OsvvmLibraries/Axi4/Axi4/testbench/build.pro

    Now run single test:
    RunTest ../OsvvmLibraries/Axi4/Axi4/TestCases/TbAxi4_MemoryReadWrite1.vhd

    The first step says this:

    Build Start time  21:52:01 BST Sat Oct 18 2025
    Build Finish time 21:52:45, Elapsed time: 0:00:44
    Build: OsvvmLibraries PASSED,  Passed: 0,  Failed: 0,  Skipped: 0,  Analyze Errors: 0,  Simulate Errors: 0

    The next step for DUT says this:

    Build Start time  21:53:53 BST Sat Oct 18 2025
    Build Finish time 21:53:57, Elapsed time: 0:00:04
    Build: Axi4_build PASSED,  Passed: 0,  Failed: 0,  Skipped: 0,  Analyze Errors: 0,  Simulate Errors: 0

    The step that compiles only the testbench says this and it says FAIL but all counts are zero:

    Build Start time  21:55:36 BST Sat Oct 18 2025
    Build Finish time 21:55:38, Elapsed time: 0:00:02
    BuildError: testbench_build FAILED,  Passed: 0,  Failed: 0,  Skipped: 0,  Analyze Errors: 0,  Simulate Errors: 0,  Build Error Code: 0

    Running the test produces this:

    # %%    430 ns    DONE   PASSED   TbAxi4_MemoryReadWrite1  Passed: 40  Affirmations Checked: 40
    # Break in Process ControlProc at ../OsvvmLibraries/AXI4/Axi4/TestCases/TbAxi4_MemoryReadWrite1.vhd line 78
    # Stopped at ../OsvvmLibraries/AXI4/Axi4/TestCases/TbAxi4_MemoryReadWrite1.vhd line 78
    Simulation Finish time 21:57:33, Elapsed time: 0:00:01

    If this test fails, then it looks like this:

    # %%    430 ns    DONE   FAILED   TbAxi4_MemoryReadWrite1  Total Error(s) = 1  Failures: 0  Errors: 1  Warnings: 0  Passed: 39  Affirmations Checked: 40
    # %%    Default            Failures: 0  Errors: 1  Warnings: 0  Passed: 0
    # %%    OSVVM              Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%    manager_1          Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%      Protocol Error   Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%      Data Check       Failures: 0  Errors: 0  Warnings: 0  Passed: 9
    # %%      No response      Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%      WriteResp SB     Failures: 0  Errors: 0  Warnings: 0  Passed: 10
    # %%      ReadResp SB      Failures: 0  Errors: 0  Warnings: 0  Passed: 10
    # %%      WriteBurstFifo   Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%      ReadBurstFifo    Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%    memory_1           Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%      memory_1:memory  Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%      No response      Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%      Data Check       Failures: 0  Errors: 0  Warnings: 0  Passed: 10
    # %%      WriteBurstFifo   Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # %%      ReadBurstFifo    Failures: 0  Errors: 0  Warnings: 0  Passed: 0
    # Break in Process ControlProc at ../OsvvmLibraries/AXI4/Axi4/TestCases/TbAxi4_MemoryReadWrite1.vhd line 78
    # Stopped at ../OsvvmLibraries/AXI4/Axi4/TestCases/TbAxi4_MemoryReadWrite1.vhd line 78

    Questions:
    1. When only the testbench code was compiled. Why did it say “failed”?
    2. How can one open the HTML report that shows details of the build and also the single test that was run?
    3. Without changing the VHDL code, how can one cause the log and debug messages to be printed only for failing test but not when the test passes? I am referring to the terminal in which the test is running and not the HTML report or any other file generated with the transcript.

    #2792
    Jim Lewis
    Member

    Hi Hassan,
    What version of OSVVM are you using? The current version is 2025.06a.
    What simulator and version are you using?

    > 1. When only the testbench code was compiled. Why did it say “failed”?

    Perhaps you can share the log files with me so I can look at it. Ultimately I need a reproducer test case of this.
    Also try puts $::errorInfo

    Did you do the exact sequence as above or were there other builds before it?

    > 2. How can one open the HTML report that shows details of the build and also the single test that was run?

    You need to run the test case with build. So put the RunTest in a *.pro file.

    > 3. Without changing the VHDL code, how can one cause the log and debug messages to be
    > printed only for failing test but not when the test passes? I am referring to the
    > terminal in which the test is running and not the HTML report or any other file generated
    > with the transcript.

    Ultimately you need to know a test case is going to fail – this may mean running it twice. Once observing that it failed and a second time rerunning it with a method to change the settings.

    You can change the settings by:
    1) Add a generic to TestCtrl that turns on info and debug messages.
    2) Read the log enables from a file using ReadLogEnables. May not allow test wide settings.

    I am looking for what is next and am open to suggestions. One thing I need to do is to make sure ReadLogEnables allows test wide settings – either independent of or matching the test case name. Another might be a mechanism to turn on mirroring.

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