修改spi接口的打印消息,和测试用例启用注释

This commit is contained in:
2025-09-28 23:51:54 +08:00
parent 1716ae1e04
commit 701f5c8432
2 changed files with 19 additions and 13 deletions

View File

@@ -636,7 +636,8 @@ task spi_trans( input [15:0] saddress, input [7:0] scmd, input [12:0] slength, i
@( negedge isBusy) #1000
begin
//$fwrite(spidata_file, "------------%5t------------\n", $realtime);
$fwrite(spidata_file, "T:%t \tdev:%4d(%4d), addr:0x%02h%02h, %s, len:%4d (0x%02h%02h)\n",
if (sidx >=(`ALL_DEV_NUM * 3)) begin
$fwrite(spidata_file, "T:%t \tdev:%4d(%4d), addr:0x%02h%02h, %s, len:%4d (0x%02h%02h)\n",
$realtime,
sidx % (`ALL_DEV_NUM), sidx,
txBuf[0],
@@ -644,6 +645,15 @@ task spi_trans( input [15:0] saddress, input [7:0] scmd, input [12:0] slength, i
(((txBuf[2] & 8'h80) == 0)? "Write":" Read"),
slength,
txBuf[2], txBuf[3]);
end else begin
$fwrite(spidata_file, "T:%t \tdev:%4d(%4d), addr:0x%02h%02h, %s, len:%4d\n",
$realtime,
sidx % (`ALL_DEV_NUM), sidx,
txBuf[0],
txBuf[1],
(((txBuf[2] & 8'h80) == 0)? "Write":" Read"),
slength);
end
if (sidx >=(`ALL_DEV_NUM * 3)) begin _pos = 4; end
else begin _pos = 3; end