fbochud Posted September 5, 2013 Report Share Posted September 5, 2013 Hi, I have issues connecting my interface to my dut when using the cadence compilator (vcs does not give any warning here): See the source code below. I get the following warning: ncelab: *W,ICDPAVW (<my_file>): Illegal combination of driver and procedural assignment to variable my_data detected (output clockvar found in clocking block at line <n> in file <my_file>). .out_data (my_if.my_data) Any idea what is wrong her? Thank you Here's the source code: interface my_if (input bit clk); logic reset; logic data; clocking master_cb @ (posedge clk); output data; endclocking // cb clocking slave_cb @ (posedge clk); input data; endclocking // cb clocking passive_cb @ (posedge clk); input data; endclocking // cb endinterface : my_if module tb_top; logic clk; logic reset; /* Dut interfaces */ my_if my_if(clk); /* Clocks and reset gen*/ <...> assign my_if.reset = reset; dut my_dut( .clk (my_if.clk), .arst (my_if.reset), .out_data (my_if.data) ); initial begin : ib_main <...> end endmodule Quote Link to comment Share on other sites More sharing options...
dave_59 Posted September 5, 2013 Report Share Posted September 5, 2013 Questa will also generate an error because the code is illegal as the error message reports. The DUT connection makes a continuous assignment to data, and the clocking block output is consider a procedural assignment to data. Declare data as a wire instead. See http://go.mentor.com/wire-vs-reg for an explanation of why you can;t mix procedural and continuous assignments to the same signal. Quote Link to comment Share on other sites More sharing options...
fbochud Posted September 6, 2013 Author Report Share Posted September 6, 2013 Thank you. I don't quite understand though. The signal of my_if interface will always be single-driven, as long as I am not using the master_cb clocking block in my monitor. Is that because the interface is connected at run-time and the compiler won't know about which clocking block will drive/monitor the interface at compile time? It checks for the worst case Could I use modport to avoid this as well? How? Quote Link to comment Share on other sites More sharing options...
fbochud Posted September 6, 2013 Author Report Share Posted September 6, 2013 I have a book here that recommends to use logic in interfaces (System Verilog for Verification, Chris Spear / Greg Tumbush, chapter 4.2.8). This is then not valid when using clocking blocks? Quote Link to comment Share on other sites More sharing options...
dave_59 Posted September 6, 2013 Report Share Posted September 6, 2013 Thank you. I don't quite understand though. The signal of my_if interface will always be single-driven, as long as I am not using the master_cb clocking block in my monitor. Is that because the interface is connected at run-time and the compiler won't know about which clocking block will drive/monitor the interface at compile time? It checks for the worst case Could I use modport to avoid this as well? How? The LRM considers the clocking block output declaration as the assignment to the signal data. The statement cb.data <= value is not a direct assignment to data. Checking this at run-time rather than statically would be a severe performance penalty for all assignments. A modport would not help. You either need to change data to a wire, or conditionally compile/generate the clocking block. I have a book here that recommends to use logic in interfaces (System Verilog for Verification, Chris Spear / Greg Tumbush, chapter 4.2.8). This is then not valid when using clocking blocks? Chris Spear is a Synopsys employee and mainly has access to VCS. From my experience with other joint customers, VCS is not performing any assignment checks regardless of whether the clocking block is driven or not. Quote Link to comment Share on other sites More sharing options...
fbochud Posted September 9, 2013 Author Report Share Posted September 9, 2013 Ok, it make sense. Thank you, Dave Quote Link to comment Share on other sites More sharing options...
janaksw.patel Posted December 21, 2017 Report Share Posted December 21, 2017 So how to handle active and passive agent. In interface we would require clocking block for monitor and driver. Same agent will be require to instance multiple times let say one with active and other with passive. Is this tool issue or LRM Quote Link to comment Share on other sites More sharing options...
dave_59 Posted December 21, 2017 Report Share Posted December 21, 2017 Change the interface signal to a wire. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.