Coder Social home page Coder Social logo

Comments (3)

JimLewis avatar JimLewis commented on June 12, 2024

Hi Sebastian,
The intent is that both ScoreboardPkg_slv and AffirmIfEqual/AlertIfEqual/AlertIfNotEqual all use osvvm.AlertLogPkg.MetaMatch (which is similar to std_match - differences noted below).

For AffirmIf, it is up to you to use MetaMatch, std_match, or "=" in your expression, AffirmIf(MetaMatch(MyVal, ExpVal), ... or alternately use the simpler expression, AffirmIfEqual(MyVal, ExpVal, "Simplified Message prefix"); Note that AffirmIfEqual already prints the "Expected: ExpectedVal" and if there is an error, "/= Actual: ActualVal".

I just did a manual check of AffirmIfEqual and AlertIfEqual/AlertIfNotEqual in the current release. I found that they all use MetaMatch with the std_ulogic family. That said, it is possible I missed something, so it would be helpful to know which one is doing something unexpected.

If there is an issue, the work around is to use the longer AffirmIf(MetaMatch(A, B) , .... instead of AffirmIfEqual.

With respect to 2022.02, the release notes say that:

  • ScoreboardPkg_slv switched to using MetaMatch in 2020.10.
  • AlertLogPkg, AffirmIfEqual switched to using MetaMatch in 2020.12.

I don't see any notes about something being fixed later, but it could have been.

MetaMatch is like std_match except that MetaMatch also considers X = X as true where std_match considers this to be false.
MetaMatch is uses this table:

  constant MetaMatchTable : BooleanTableType := (
    --------------------------------------------------------------------------
    -- U      X      0      1      Z      W      L      H      -
    --------------------------------------------------------------------------
    (TRUE,  FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE),  -- | U |
    (FALSE, TRUE,  FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE),  -- | X |
    (FALSE, FALSE, TRUE,  FALSE, FALSE, FALSE, TRUE,  FALSE, TRUE),  -- | 0 |
    (FALSE, FALSE, FALSE, TRUE,  FALSE, FALSE, FALSE, TRUE,  TRUE),  -- | 1 |
    (FALSE, FALSE, FALSE, FALSE, TRUE,  FALSE, FALSE, FALSE, TRUE),  -- | Z |
    (FALSE, FALSE, FALSE, FALSE, FALSE, TRUE,  FALSE, FALSE, TRUE),  -- | W |
    (FALSE, FALSE, TRUE,  FALSE, FALSE, FALSE, TRUE,  FALSE, TRUE),  -- | L |
    (FALSE, FALSE, FALSE, TRUE,  FALSE, FALSE, FALSE, TRUE,  TRUE),  -- | H |
    (TRUE,  TRUE,  TRUE,  TRUE,  TRUE,  TRUE,  TRUE,  TRUE,  TRUE)   -- | - |
    );

from osvvm.

SebDunst avatar SebDunst commented on June 12, 2024

Hi Jim,

I didn't realize that I only have to use the MetaMatch function.

Thanks a lot!

Regards,
Sebastian

from osvvm.

JimLewis avatar JimLewis commented on June 12, 2024

Or use AffirmIfEqual

from osvvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.