[sv-bc] always_comb sensitivity list

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Sun May 31 2009 - 02:13:15 PDT
The LRM (ballot draft) says in 9.2.2.2.1,

"9.2.2.2.1 Implicit always_comb sensitivities

The implicit sensitivity list of an always_comb includes the expansions of the longest static prefix of each variable or select expression that is read within the block or within any function called within the block with the following exceptions:

a) Any expansion of a variable declared within the block or within any function called within the block
b) Any expression that is also written within the block or within any function called within the block"

I tried the following example on several simulators:

module test_case();

   integer i;
   reg [7:0] try;
   reg [7:0] try_out;

reg a;
initial #10 a=0;

   always_comb
     begin
        $display(a);
        for (i=0; i < 8; i = i+1)
          begin
             try[i] <= 1'b1;
          end

        try_out[0] <= try[0];
        try_out[1] <= try[1];
        try_out[2] <= try[2];
        try_out[3] <= try[3];
        try_out[4] <= try[4];
        try_out[5] <= try[5];
        try_out[6] <= try[6];
        try_out[7] <= try[7];
        $displayb(try,,try_out);

     end // always @ (*)

endmodule // test_case

The variables i, try, and try_out are all written with the always_comb block. Only a is not.
So I expected the block to be sensitive only to changes in a.
I expected the always_comb block to execute twice, once at time 0 and once upon the change in a.
In reality, I found that several of the tools were clearly sensitive to the nonblocking assignments to try and try_out.

Comments?

Thanks,
Shalom

Shalom Bresticker
Intel LAD DA
Jerusalem, Israel
+972  2 589 6582 (office)
+972 54 721 1033 (cell)


---------------------------------------------------------------------
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 May 31 02:15:59 2009

This archive was generated by hypermail 2.1.8 : Sun May 31 2009 - 02:17:00 PDT