Re: Proposal for OVL severity levels.


Subject: Re: Proposal for OVL severity levels.
From: Adam Krolnik (krolnik@lsil.com)
Date: Thu May 09 2002 - 09:55:11 PDT


I would like to propose these two changes:

Instead of 'severity 0 - Error, Fatal (simulation terminates.)
I propose:

Severity 0 - Fatal, simulation terminates immediately.

Second, I would like to propose that the Error severity
be have the capability to terminate simulation based
on a threshold of errors. Since there already is an error_count
feature, there should be a termination threshold that once
reached will terminate the simulation. This threshold should
be able to be set by the simulation and possibly be altered
at run time so that the user can simulate past an error
or disable the threshold entirely.

For example, the current code looks like:

    `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;
        // termination check here <<<<<<<
      end

The termination check code could be:

  if (`ASSERT_ERROR_THRESHOLD // Enabled and
      && error_count >= `ASSERT_ERROR_THRESHOLD) // above threshold.
    ovl_finish;

Then one could create a global variable for the threshold, set
it in the simulation and it needed, change it by user request.
integer ovl_error_threshold;
initial begin
  ovl_error_threshold = 1;
  #1; // wait a little.
  if ($value$plusargs("error_limit=%d", ovl_error_threshold))
    $display("OVL_INFO: ... error threshold set to %0d.",
             ovl_error_threshold);
  ...

Looking at the last one (4), the implementation does not reflect
the definition:

4 = Note Display only the first occurrence of the message (could easy
    be the fist n occurrences)

The implementation shows:

      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);

It should use a separate counter instead of error_count.

Lastly, I would suggest a different order for the messages.
I see the regularity for parsing ease, but placing the user message
inbetween the fields will make it harder to pick up the last fields.
I would suggest (using the ERROR level as an example):

OVL_ERROR: <name> at time <%t>, %m <user message>

Though I see that the standard message places the user message
(or OVL module message) first.

    Adam Krolnik
    Verification Mgr.
    LSI Logic Corp.
    Plano TX. 75074



This archive was generated by hypermail 2b28 : Thu May 09 2002 - 09:57:32 PDT