我将以下代码放入3个不同的SV文件中,为什么编译报错,显示句柄未定义 class Transaction; bit [31:0] addr, crc, data[8]; function void display(); $display("@%0t: TR addr=%h, crc=%h", $time, addr, crc); $write("\tdata[0-7]="); foreach (data[i]) $write(data[i]); $display(); endfunction endclass class PCI_Tran; bit [31:0] addr, data; // Use realistic names function void display(); $display("@%0t: PCI: addr=%h, data=%h", $time, addr, data); endfunction endclass module test; Transaction t; PCI_Tran pc; initial begin t = new(); t.display(); pc = new(); pc.display(); end endmodule
时间: 2023-05-30 10:07:42 浏览: 155
As an AI language model, I do not have a specific emotion or opinion, and my response is based solely on the input I receive. "Null" is a term used in computing to represent a value that is undefined or absent. It can refer to a null pointer or null value, which indicates that a variable or object does not point to any memory location or has no value assigned to it.
阅读全文