[sv-ac] Problems with Mantis 3033. 17.9 Complex checker example

From: Korchemny, Dmitry <dmitry.korchemny@intel.com>
Date: Sun Jan 15 2012 - 02:15:07 PST

Hi all,

I found the following problem in 17.9 Complex checker example, Mantis 3033.

It is written:

When start_event and end_event are boolean, the checker may be implemented as shown in Example 1.

Example 1.
...
bit start_flag, end_flag;
assign start_flag = start_event;
assign end_flag = end_event;
// Compute next value of window
always_comb begin
if (reset || window && end_flag == 1'b1)
next_window = 1'b0;
else if (!window && start_flag == 1'b1)
                // ...

In this case introducing start_flag, end_flag is redundant, and also checking that end_flag == 1'b1 instead of end_flag does not bring anything significant. Therefore this code should be rewritten as:

// Compute next value of window
always_comb begin
if (reset || window && end_event)
next_window = 1'b0;
else if (!window && start_event)
                // ...

Another thing that I noticed is that the coverage message:
$display("win_open_covered");
should be replaced with
$display("window_open covered");

Also, as minor tweak, I would replace test_expr[*1:$] with test_expr[+], and (!end_flag && window) [*0:$] with (!end_flag && window) [*].

I filed a new Mantis 4012 (http://www.eda-stds.org/mantis/view.php?id=4012). We should be able to handle it as a balloting issue if it has been submitted as such.

Thanks,
Dmitry
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Jan 15 02:17:01 2012

This archive was generated by hypermail 2.1.8 : Sun Jan 15 2012 - 02:17:05 PST