fix: update names in out_axis_fifo_tb
This commit is contained in:
@ -4,7 +4,7 @@ module tb_out_axis_fifo;
|
|||||||
|
|
||||||
localparam int ACCUM_WIDTH = 32;
|
localparam int ACCUM_WIDTH = 32;
|
||||||
localparam int WINDOW_SIZE = 65;
|
localparam int WINDOW_SIZE = 65;
|
||||||
localparam int PACKET_SIZE = 1024;
|
localparam int PACKET_SIZE = 8;
|
||||||
localparam int BYTES_PER_WORD = ACCUM_WIDTH / 8;
|
localparam int BYTES_PER_WORD = ACCUM_WIDTH / 8;
|
||||||
localparam int WORDS_PER_BATCH = PACKET_SIZE / BYTES_PER_WORD; // 1024 / 4 = 256 слов
|
localparam int WORDS_PER_BATCH = PACKET_SIZE / BYTES_PER_WORD; // 1024 / 4 = 256 слов
|
||||||
|
|
||||||
@ -14,10 +14,10 @@ module tb_out_axis_fifo;
|
|||||||
|
|
||||||
logic [31:0] smp_num;
|
logic [31:0] smp_num;
|
||||||
|
|
||||||
logic [7:0] s_axis_tdata;
|
logic [7:0] m_axis_tdata;
|
||||||
logic s_axis_tvalid;
|
logic m_axis_tvalid;
|
||||||
logic s_axis_tready;
|
logic m_axis_tready;
|
||||||
logic s_axis_tlast;
|
logic m_axis_tlast;
|
||||||
|
|
||||||
logic [ACCUM_WIDTH-1:0] acc_din;
|
logic [ACCUM_WIDTH-1:0] acc_din;
|
||||||
logic din_valid;
|
logic din_valid;
|
||||||
@ -40,10 +40,10 @@ module tb_out_axis_fifo;
|
|||||||
.rst (rst),
|
.rst (rst),
|
||||||
.smp_num (smp_num),
|
.smp_num (smp_num),
|
||||||
|
|
||||||
.s_axis_tdata (s_axis_tdata),
|
.m_axis_tdata (m_axis_tdata),
|
||||||
.s_axis_tvalid (s_axis_tvalid),
|
.m_axis_tvalid (m_axis_tvalid),
|
||||||
.s_axis_tready (s_axis_tready),
|
.m_axis_tready (m_axis_tready),
|
||||||
.s_axis_tlast (s_axis_tlast),
|
.m_axis_tlast (m_axis_tlast),
|
||||||
|
|
||||||
.acc_din (acc_din),
|
.acc_din (acc_din),
|
||||||
.din_valid (din_valid),
|
.din_valid (din_valid),
|
||||||
@ -113,18 +113,18 @@ module tb_out_axis_fifo;
|
|||||||
compared_bytes <= 0;
|
compared_bytes <= 0;
|
||||||
mismatch_count <= 0;
|
mismatch_count <= 0;
|
||||||
end else begin
|
end else begin
|
||||||
if (s_axis_tvalid && s_axis_tready) begin
|
if (m_axis_tvalid && m_axis_tready) begin
|
||||||
if (expected_bytes.size() == 0) begin
|
if (expected_bytes.size() == 0) begin
|
||||||
$error("[%0t] AXIS produced unexpected byte 0x%02x: expected queue is empty",
|
$error("[%0t] AXIS produced unexpected byte 0x%02x: expected queue is empty",
|
||||||
$time, s_axis_tdata);
|
$time, m_axis_tdata);
|
||||||
mismatch_count <= mismatch_count + 1;
|
mismatch_count <= mismatch_count + 1;
|
||||||
end else begin
|
end else begin
|
||||||
exp_byte = expected_bytes.pop_front();
|
exp_byte = expected_bytes.pop_front();
|
||||||
compared_bytes <= compared_bytes + 1;
|
compared_bytes <= compared_bytes + 1;
|
||||||
|
|
||||||
if (s_axis_tdata !== exp_byte) begin
|
if (m_axis_tdata !== exp_byte) begin
|
||||||
$error("[%0t] AXIS mismatch at byte #%0d: got=0x%02x expected=0x%02x",
|
$error("[%0t] AXIS mismatch at byte #%0d: got=0x%02x expected=0x%02x",
|
||||||
$time, compared_bytes, s_axis_tdata, exp_byte);
|
$time, compared_bytes, m_axis_tdata, exp_byte);
|
||||||
mismatch_count <= mismatch_count + 1;
|
mismatch_count <= mismatch_count + 1;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -236,17 +236,17 @@ module tb_out_axis_fifo;
|
|||||||
if (rst) begin
|
if (rst) begin
|
||||||
axis_byte_count <= 0;
|
axis_byte_count <= 0;
|
||||||
req_ready <= 0;
|
req_ready <= 0;
|
||||||
s_axis_tready <= 1'b0;
|
m_axis_tready <= 1'b0;
|
||||||
end else begin
|
end else begin
|
||||||
req_ready <= 1;
|
req_ready <= 1;
|
||||||
|
|
||||||
// request send
|
// request send
|
||||||
if (send_req) begin
|
if (send_req) begin
|
||||||
s_axis_tready <= 1'b1;
|
m_axis_tready <= 1'b1;
|
||||||
req_ready <= 0;
|
req_ready <= 0;
|
||||||
end
|
end
|
||||||
|
|
||||||
if (s_axis_tvalid && s_axis_tready) begin
|
if (m_axis_tvalid && m_axis_tready) begin
|
||||||
axis_byte_count <= axis_byte_count + 1;
|
axis_byte_count <= axis_byte_count + 1;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user