Another Proposal for OVL Assertion Library.....


Subject: Another Proposal for OVL Assertion Library.....
From: Sean W. Smith (sesmith@cisco.com)
Date: Mon Nov 19 2001 - 08:02:13 PST


All,

        Below I will describe my latest enhancement idea for OVL> I'm not sure
whether this be part of the OVL package or an end user modification. The
problem/requirement we are finding using OVL on our current project is that
some designers are using OVL to add functional coverage points to their
design. Examples: Designer A wants to see that the a memory request
arrives the same cycle as a refresh cycle starts. Designer B wants to
ensure that Resource A is in all three possible states while resource B is
busy. Right or Wrong they have turned to OVL to implement these functional
coverage points in their design. The means for doing this exists in OVL by
using a severity other than 0. Problem being that OVL doesn't define what
the severities mean. Below I will show an example of what I have coded for
our team and we can discuss it further here or at our meetings.... I'm very
interested in feedback from others to see if this is useful.

Severity Definition:

0 = Error, Fatal (test terminates)
1 = Error, Non Fatal (test does not terminate)
2 = Warning, Non Fatal
3 = Note, Display message for all occurrences
4 = Note Display only the first occurrence of the message (could easy be the
fist n occurrences)

  task ovl_error;
    input [8*63:0] err_msg;
  begin

    `ifdef ASSERT_MAX_REPORT_ERROR
      if (error_count <= `ASSERT_MAX_REPORT_ERROR)
    `endif
      if (severity_level == 0) begin
        error_count = error_count + 1;
        $display("OVL_ERROR : %s : %s : %0s : severity %0d : time %0t : %m",
          assert_name, msg, err_msg, severity_level, $time);
        ovl_finish;
      end
      if (severity_level == 1) begin
        $display("OVL_ERROR : %s : %s : %0s : severity %0d : time %0t : %m",
          assert_name, msg, err_msg, severity_level, $time);
        error_count = error_count + 1;
      end
      if (severity_level == 2) begin
        $display("OVL_WARNING : %s : %s : %0s : severity %0d : time %0t :
%m",
          assert_name, msg, err_msg, severity_level, $time);
        ovl_warning;
      end
      if (severity_level == 3) begin
        $display("OVL_NOTE : %s : %s : %0s : severity %0d : time %0t : %m",
          assert_name, msg, err_msg, severity_level, $time);
      end
      if ((severity_level == 4) && (error_count == 1)) begin
        $display("OVL_NOTE : %s : %s : %0s : severity %0d : time %0t : %m",
          assert_name, msg, err_msg, severity_level, $time);
      end
    end
  endtask

  task ovl_finish;
    begin
      #100 $finish;
    end
  endtask

  task ovl_init_msg;
    begin
      $display("OVL_NOTE: %s initialized @ %m Severity: %0d, Message: %s",
                assert_name,severity_level, msg);
    end
  endtask

  task ovl_warning;
    begin
      // Some user defined Stuff Here, PLI?
    end
  endtask

regards,
Sean

Sean W. Smith ASIC Design & Verification
sesmith@cisco.com Cisco Systems, RTP, NC
seansmith@nc.rr.com Empowering The Internet Generation

http://qcontinuum.tzo.com/sean for PGP key and more information
http://www.fototime.com/inv/23BD67820A2B057 for Lots of Personal Photos



This archive was generated by hypermail 2b28 : Mon Nov 19 2001 - 08:06:18 PST