I written in interface
logic sda_out; //inout signal driving for bi-directional signal from UVC
wire sda; //inout signal driving for bi-directional signal from DUT
assign sda=sda_out;
I want verify master vip so i need assign some values to sda. once i assigned to sda questa simulator given error
** Error: (vsim-8220) tb/top.sv(33): This or another usage of ‘vif.sda’ inconsistent with ‘net’ object.
I understand your solution thanks…
In my case their is no DUT or slave VIP, so i try to generating slave signal(data,ack) in top module, and slave signal(sda)to communicate with master.
I am new to UVM world, working on I2C vip. In I2C signal sda is bidirectional signal, for writing data on sda from my master driver for a particular address, i dont have slave vip or dut so i try generating red data in my master top module, for that i used vif.sda=0; but simulator given an error Error: (vsim-8220) tb/top.sv(33): This or another usage of ‘vif.sda’ inconsistent with ‘net’ object.
Please guide me how to do it?
It is better to develop slave class as well and connect these signals. Responding to an interface signals for a particular functionality from top module is not a good approach.
Modelsim/Questasim provides a ‘verror’ command to gain more insight for a specific error message. For this case, verror provides the following information:
Message # 8220:
The specified object name was used in a place where the type of that
object is not allowed. For example, using the hierarchical name of a
net as the LHS of a procedural assignment would produce this message.
NOTE 1: If more than one use of the object name exists, consider all
occurrences in resolving the error.
NOTE 2: If this error follows error number 8776 then please fix the
cause of 8776 before fixing this error.
The error is from your statement:
vif.sda=0;
Since sda is declared as a wire in your interface, you cannot assign a value with this procedural assignment. However, you can use: