Interface的另类用法 --- bind interface in DUT
一、harness interface(AXI4)
- 与以往不同,这个Interface中的信号多定义为port,而非logic。
- 不用modeport
1.1 下面为一个axi4_if的代码
interface axi4_if#(`AXI4_VIP_PARAMETER_DECLEAR)
(
//Global Signals
input aclk,
input aresetn,
//Write Command Channel Signals
inout [MAX_ID_WIDTH-1:0] awid,
inout [ADDR_WIDTH-1:0] awaddr,
inout [2:0] awsize,
inout [BURST_LENGTH-1:0] awlength,
inout [1:0] awburst,
inout [AWCACHE_WIDTH-1:0] awcache,
inout [2:0] awport,
inout [0:0] awvalid,
inout [0:0] awready,
inout [0:0] awloc