标题如下:
第2章 一个简单的UVM验证平台
2.1 验证平台的组成
2.2 只有driver的验证平台
2.2.1 最简单的验证平台
2.2.2 加入factory机制
2.2.3 未完待续
正文在下面
2.2.1 最简单的验证平台
driver是整个验证平台数据流的源泉。
一、DUT是什么?
整个第二章用同一个DUT,实现一个很简单的功能。代码如下。这个DUT的功能就是在时钟上升沿,将输入的rxd、rx_dv给txd和tx_en。
module dut(clk,
rst_n,
rxd,
rx_dv,
txd,
tx_en);
input clk;
input rst_n;
input[7:0] rxd;
input rx_dv;
output [7:0] txd;
output tx_en;
reg[7:0] txd;
reg tx_en;
always @(posedge clk) begin
if(!rst_n) begin
txd <= 8'b0;
tx_en <= 1'b0;
end
else begin
txd <= rxd;
tx_en <= rx_dv;
end
end
endmo