SBRD: Check API uses AffirmIf, why GetAffirmCount is 0?

Why OSVVM™? Forums OSVVM SBRD: Check API uses AffirmIf, why GetAffirmCount is 0?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2492

    SBRD User guide says:
    <quote>
    Check a received value (ActualType) with value in scoreboard. The Match function is
    used to determine if the received and expected values match. Checking is handled by
    AffirmIf. As a result, if they match a log PASSED is generated, otherwise, an alert
    ERROR is generated.
    </quote>

    I didn’t create any AlertID (yet), but was thinking the call to check API below would have incremented the AffirmCount by 1. But I see it as 0 at the end of the test and an EndOfTestCheck fails for me.


    i_up_or_down <= '0';
    push(SB_int, 2);
    WaitForClock(i_clk, 5);
    check(SB_int, 1);
    i_up_or_down <= '1';
    wait for 100 ns;

    Failure in log:

    <log>
    # %% Alert ERROR in Default, Test is not Self-Checking at 350 ns
    </log>

    I check this at a central controlProc as:

    AlertIf(GetAffirmCount < 1, "Test is not Self-Checking");

    #2493
    Jim Lewis
    Member

    Hi Ajeetha,
    Next time please provide a complete testable example, such as I have provided below. Try running this.

    library osvvm ; 
    context osvvm.OsvvmContext ; 
    use osvvm.ScoreboardPkg_int.all ; 
    
    entity TbSB_GetAffirmCount_1 is 
    end TbSB_GetAffirmCount_1 ;
    
    architecture GetAffirmCount_1 of TbSB_GetAffirmCount_1 is 
    
    begin
    
      ControlProc : process
        variable SB : ScoreboardIdType ; 
      begin
        SetTestName("TbSB_GetAffirmCount_1") ; 
        SetLogEnable(PASSED, TRUE) ;
        TranscriptOpen ;
        SetTranscriptMirror(TRUE) ; 
        SB := NewID("SB"); 
        push(SB, 5) ; 
        check(SB, 5) ; 
        log("GetAffirmCount = " & to_string(GetAffirmCount)) ; 
        AffirmIf(GetAffirmCount > 0, "GetAffirmCount = " & to_string(GetAffirmCount));
        
        TranscriptClose ; 
        
    --    AffirmIfTranscriptsMatch(VALIDATED_RESULTS_DIR) ; 
    
        EndOfTestSummary(ReportAll => TRUE) ; 
        std.env.stop ; 
        wait ; 
      end process ControlProc ; 
    
    end GetAffirmCount_1 ; 
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.