Swapnajit, I'm not sure I understand the question? Your code snippet causes two separate yet semantically identical cover-group instances to be created. The statement at the block level not only creates a cover-group instance, but also causes the first instance of the cover-group to be destroyed. In this sense, cover-groups behave just like class objects. Arturo ________________________________ From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Swapnajit Chakraborti Sent: Friday, January 20, 2006 6:44 AM To: sv-ec@eda.org Subject: [sv-ec] Syntax for covergroup instantiation As per IEEE P1800 LRM, both the syntax (shown below) for a covergroup instance declaration are supported. cg cg_inst; [In this case, user has to instantiate it procedurally, namely, cg_inst = new; ] cg cg_inst = new; Now, what will be the behavior in the following example? module test; covergroup cg @(posedge clk); coverpoint a; endgroup cg cg_inst = new; // instantiation at module level .. initial begin cg_inst = new; // instantiation at block level ... end endmodule Thx, Swapnajit.Received on Fri Jan 20 11:10:16 2006
This archive was generated by hypermail 2.1.8 : Fri Jan 20 2006 - 11:10:23 PST