-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sv
More file actions
64 lines (55 loc) · 1.6 KB
/
Copy pathtest.sv
File metadata and controls
64 lines (55 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// SPDX-License-Identifier: MIT
// Copyright (c) 2025 Gwangsun Shin
`timescale 1ns/1ps
`include "axi4s_io.sv"
`include "Generator.sv"
`include "Driver.sv"
`include "Receiver.sv"
`include "Scoreboard.sv"
`include "pixelTypes.h"
module tb_mappingLayer;
logic clk = 0;
axi4s_io tb_if(clk);
AxiMappingLayer DUT(
.i_clk(clk),
.i_rstn(tb_if.i_rstn),
.s_axis_tready(tb_if.s_axis_tready),
.s_axis_tvalid(tb_if.s_axis_tvalid),
.s_axis_tdata(tb_if.s_axis_tdata), /* MSB: Ch12 ~ LSB:CH0 */
.m_axis_tdata(tb_if.m_axis_tdata),
.m_axis_tvalid(tb_if.m_axis_tvalid),
.m_axis_tready(tb_if.m_axis_tready),
.EOL(tb_if.eol),
.EOF(tb_if.eof)
);
mailbox #(in_pixel_t) mbox_drv = new();
mailbox #(out_pixel_t) mbox_Recv = new();
Generator gen;
Driver drv;
Receiver recv;
Scoreboard sc;
always #5 clk = ~clk;
initial begin
automatic int width = 320;
automatic int depth = 180;
automatic int out_width = 320;
automatic int out_depth = 180;
automatic int frame_count = 2;
automatic int burst_len = 100;
automatic int pause_cycles = 0;
automatic int master_ready_burst_len = 10;
automatic int master_ready_pause_cycles = 5;
// $dumpfile("sim.vcd");
// $dumpvars(0, tb_mappingLayer);
gen = new("gen", width, depth, frame_count, mbox_drv);
drv = new(tb_if.TB, mbox_drv, burst_len, pause_cycles, width * depth * frame_count);
recv = new(tb_if.TB, mbox_Recv , master_ready_burst_len , master_ready_pause_cycles);
sc = new(mbox_Recv, out_width, out_depth, frame_count);
fork
drv.run();
gen.run();
recv.run();
sc.run();
join
end
endmodule