[sv-bc] Virtual interfaces in always_comb

From: Daniel Mlynek <daniel.mlynek_at_.....>
Date: Mon Sep 07 2009 - 02:44:51 PDT
Should virtual interfaces be allowed to be assigned in always_comb blocks?
This leads to situation like below- vi1.i  nad vi2.i point the same output
variable while this is forbidden for variable driven from always comb to be
driven in other processes (lrm:  "The variables written on the left-hand
side of assignments shall not be written to by any other process.". Such
situation can be detected only on runtime. 
As always_comb was added to be used in synthethisabe combitional processses
maybe there should be a rule saying that this is forbidden to drive virtual
interface drives (similar for class handles)
 
interface iface1;
 bit [7:0] i;
endinterface

module top;
  iface1 ifci1();
  virtual iface1 vi1 = ifci1, vi2 = ifci1; bit [7:0] ii1 = 1; bit [7:0]  ii2
= 2;

 always_comb
    vi1.i = ii1;


 always_comb
   vi2.i = ii2;

 initial #2 $finish;

endmodule

 

DANiel


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Sep 7 02:45:45 2009

This archive was generated by hypermail 2.1.8 : Mon Sep 07 2009 - 02:46:44 PDT