axi_tdl 0.0.9 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +44 -0
- data/.github/workflows/ruby.yml +35 -0
- data/.gitignore +3 -1
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/README.EN.md +322 -0
- data/README.md +24 -20
- data/Rakefile +2 -6
- data/axi_tdl.gemspec +5 -6
- data/lib/axi/AXI4/axi4_direct_B1.sv +23 -23
- data/lib/axi/AXI4/axi4_dpram_cache.sv +33 -33
- data/lib/axi/AXI4/axis_to_axi4_wr.rb +1 -0
- data/lib/axi/AXI4/axis_to_axi4_wr.sv +20 -20
- data/lib/axi/AXI4/packet_partition/axi4_partition_rd_verb.sv +32 -32
- data/lib/axi/AXI4/packet_partition/data_inf_partition.rb +2 -0
- data/lib/axi/AXI4/packet_partition/data_inf_partition.sv +71 -71
- data/lib/axi/AXI4/wide_axis_to_axi4_wr.rb +2 -1
- data/lib/axi/AXI4/wide_axis_to_axi4_wr.sv +23 -23
- data/lib/axi/AXI_stream/axi_stream_split_channel.rb +7 -1
- data/lib/axi/AXI_stream/axis_head_cut_verb.sv +6 -2
- data/lib/axi/AXI_stream/axis_insert_copy.rb +18 -4
- data/lib/axi/AXI_stream/axis_sim_master_model.rb +28 -0
- data/lib/axi/AXI_stream/axis_sim_slaver_model.rb +26 -0
- data/lib/axi/AXI_stream/axis_sim_verify_by_coe.sv +101 -0
- data/lib/axi/AXI_stream/axis_split_channel_verb.rb +2 -0
- data/lib/axi/common/common_ram_sim_wrapper.sv +9 -9
- data/lib/axi/common/common_ram_wrapper.sv +12 -12
- data/lib/axi/data_interface/data_inf_c/data_c_pipe_sync_seam.sv +26 -26
- data/lib/axi/data_interface/data_inf_c/data_c_sim_master_model.sv +69 -0
- data/lib/axi/data_interface/data_inf_c/data_c_sim_slaver_model.sv +58 -0
- data/lib/axi/data_interface/data_inf_c/logic_sim_model.sv +64 -0
- data/lib/axi/techbench/tb_axi_stream_split_channel.rb +69 -0
- data/lib/axi/techbench/tb_axi_stream_split_channel.sv +149 -0
- data/lib/axi/techbench/tb_axis_split_channel_verb.rb +69 -0
- data/lib/axi/techbench/tb_axis_split_channel_verb.sv +125 -0
- data/lib/axi_tdl.rb +1 -0
- data/lib/axi_tdl/version.rb +1 -1
- data/lib/tdl/auto_script/autogensdl.rb +16 -5
- data/lib/tdl/axi4/axi4_interconnect_verb.rb +4 -2
- data/lib/tdl/basefunc.rb +1 -0
- data/lib/tdl/class_hdl/hdl_always_comb.rb +4 -3
- data/lib/tdl/class_hdl/hdl_always_ff.rb +49 -8
- data/lib/tdl/class_hdl/hdl_assign.rb +5 -3
- data/lib/tdl/class_hdl/hdl_block_ifelse.rb +11 -9
- data/lib/tdl/class_hdl/hdl_foreach.rb +2 -2
- data/lib/tdl/class_hdl/hdl_function.rb +4 -2
- data/lib/tdl/class_hdl/hdl_generate.rb +5 -4
- data/lib/tdl/class_hdl/hdl_initial.rb +11 -10
- data/lib/tdl/class_hdl/hdl_module_def.rb +18 -1
- data/lib/tdl/class_hdl/hdl_redefine_opertor.rb +35 -14
- data/lib/tdl/class_hdl/hdl_struct.rb +1 -1
- data/lib/tdl/class_hdl/hdl_verify.rb +1 -1
- data/lib/tdl/elements/originclass.rb +6 -1
- data/lib/tdl/elements/parameter.rb +1 -1
- data/lib/tdl/examples/10_random/exp_random.sv +3 -3
- data/lib/tdl/examples/11_test_unit/dve.tcl +155 -2
- data/lib/tdl/examples/11_test_unit/exp_test_unit.rb +9 -8
- data/lib/tdl/examples/11_test_unit/exp_test_unit.sv +1 -1
- data/lib/tdl/examples/11_test_unit/modules/sub_md0.rb +6 -3
- data/lib/tdl/examples/11_test_unit/modules/sub_md0.sv +5 -5
- data/lib/tdl/examples/11_test_unit/modules/sub_md1.rb +9 -4
- data/lib/tdl/examples/11_test_unit/modules/sub_md1.sv +5 -5
- data/lib/tdl/examples/11_test_unit/tb_exp_test_unit.sv +1 -3
- data/lib/tdl/examples/11_test_unit/tu0.sv +9 -9
- data/lib/tdl/examples/11_test_unit/tu1.sv +1 -1
- data/lib/tdl/examples/1_define_module/exmple_md.sv +12 -12
- data/lib/tdl/examples/2_hdl_class/tmp/always_comb_test.sv +60 -60
- data/lib/tdl/examples/2_hdl_class/tmp/always_ff_test.sv +2 -2
- data/lib/tdl/examples/2_hdl_class/tmp/case_test.sv +17 -17
- data/lib/tdl/examples/2_hdl_class/tmp/head_pkg_module.sv +9 -9
- data/lib/tdl/examples/2_hdl_class/tmp/simple_assign_test.sv +1 -1
- data/lib/tdl/examples/2_hdl_class/tmp/state_case_test.sv +10 -10
- data/lib/tdl/examples/2_hdl_class/tmp/test_foreach.sv +3 -3
- data/lib/tdl/examples/2_hdl_class/tmp/test_function.sv +7 -7
- data/lib/tdl/examples/2_hdl_class/tmp/test_initial_assert.sv +3 -3
- data/lib/tdl/examples/2_hdl_class/tmp/test_module.sv +2 -2
- data/lib/tdl/examples/2_hdl_class/tmp/test_module_var.sv +2 -2
- data/lib/tdl/examples/2_hdl_class/tmp/test_package.sv +4 -5
- data/lib/tdl/examples/2_hdl_class/tmp/test_package2.sv +4 -4
- data/lib/tdl/examples/2_hdl_class/tmp/test_struct_function.sv +2 -2
- data/lib/tdl/examples/2_hdl_class/tmp/test_vcs_string.sv +1 -1
- data/lib/tdl/examples/2_hdl_class/tmp/text_generate.sv +7 -7
- data/lib/tdl/examples/4_generate/test_generate.sv +11 -11
- data/lib/tdl/examples/5_logic_combin/test_logic_combin.sv +3 -3
- data/lib/tdl/examples/7_module_with_package/body_package.sv +3 -4
- data/lib/tdl/examples/7_module_with_package/example_pkg.sv +4 -4
- data/lib/tdl/examples/7_module_with_package/head_package.sv +3 -4
- data/lib/tdl/examples/8_top_module/tb_test_top.sv +1 -2
- data/lib/tdl/examples/9_itegration/tb_test_tttop.sv +2 -2
- data/lib/tdl/examples/9_itegration/test_tttop.sv +3 -3
- data/lib/tdl/exlib/axis_eth_ex.rb +95 -0
- data/lib/tdl/exlib/axis_verify.rb +264 -0
- data/lib/tdl/exlib/clock_reset_verify.rb +29 -0
- data/lib/tdl/exlib/dve_tcl.rb +30 -11
- data/lib/tdl/exlib/itegration.rb +15 -3
- data/lib/tdl/exlib/logic_verify.rb +88 -0
- data/lib/tdl/exlib/test_point.rb +96 -94
- data/lib/tdl/exlib/test_point.rb.bak +293 -0
- data/lib/tdl/rebuild_ele/ele_base.rb +1 -1
- data/lib/tdl/sdlmodule/sdlmodlule_path_db.rb +34 -0
- data/lib/tdl/sdlmodule/sdlmodule.rb +18 -14
- data/lib/tdl/sdlmodule/sdlmodule_draw.rb +81 -16
- data/lib/tdl/sdlmodule/test_unit_module.rb +272 -33
- data/lib/tdl/sdlmodule/test_unit_module.rb.bak +143 -0
- data/lib/tdl/sdlmodule/top_module.rb +53 -48
- data/lib/tdl/sdlmodule/top_module.rb.bak +547 -0
- data/lib/tdl/tdl.rb +19 -4
- metadata +36 -137
- data/Gemfile.lock +0 -28
- data/lib/axi/AXI_stream/axi_stream_split_channel.sv +0 -149
- data/lib/axi/AXI_stream/axis_head_cut_verc.sv +0 -242
- data/lib/axi/AXI_stream/axis_insert_copy.sv +0 -66
- data/lib/axi/AXI_stream/axis_pipe_sync_seam.sv +0 -48
- data/lib/axi/AXI_stream/axis_rom_contect_sim.sv +0 -113
- data/lib/axi/AXI_stream/axis_split_channel_verb.sv +0 -62
@@ -1,5 +1,6 @@
|
|
1
1
|
# require_relative "../prj_lib"
|
2
|
-
require_hdl
|
2
|
+
require_hdl "axis_length_split_with_addr.sv"
|
3
|
+
require_hdl 'axi_stream_wide_fifo.sv'
|
3
4
|
new_m = SdlModule.new(name:File.basename(__FILE__,".rb"),out_sv_path:__dir__)
|
4
5
|
new_m.target_class = AxiStream
|
5
6
|
|
@@ -56,7 +56,7 @@ logic stream_en;
|
|
56
56
|
axi_stream_inf #(.DSIZE(axis_in.DSIZE),.USIZE(1)) split_out (.aclk(axis_in.aclk),.aresetn(axis_in.aresetn),.aclken(1'b1)) ;
|
57
57
|
axi_stream_inf #(.DSIZE(axis_in.DSIZE),.USIZE(1)) fifo_axis (.aclk(axi_wr.axi_aclk),.aresetn(axi_wr.axi_aresetn),.aclken(1'b1)) ;
|
58
58
|
axi_stream_inf #(.DSIZE(axi_wr.IDSIZE + axi_wr.ASIZE + axi_wr.LSIZE),.USIZE(1)) id_add_len_in (.aclk(axi_wr.axi_aclk),.aresetn(axi_wr.axi_aresetn),.aclken(1'b1)) ;
|
59
|
-
axi_inf #(.DSIZE(axi_wr.DSIZE),.IDSIZE(axi_wr.IDSIZE),.ASIZE(axi_wr.ASIZE),.LSIZE(axi_wr.LSIZE),.MODE(axi_wr.MODE),.ADDR_STEP(axi_wr.ADDR_STEP))
|
59
|
+
axi_inf #(.DSIZE(axi_wr.DSIZE),.IDSIZE(axi_wr.IDSIZE),.ASIZE(axi_wr.ASIZE),.LSIZE(axi_wr.LSIZE),.MODE(axi_wr.MODE),.ADDR_STEP(axi_wr.ADDR_STEP)) axi_wr_vcs_cp_R236 (.axi_aclk(axi_wr.axi_aclk),.axi_aresetn(axi_wr.axi_aresetn)) ;
|
60
60
|
axi_stream_inf #(.DSIZE(axis_in.DSIZE),.USIZE(1)) pipe_axis (.aclk(axi_wr.axi_aclk),.aresetn(axi_wr.axi_aresetn),.aclken(1'b1)) ;
|
61
61
|
//==========================================================================
|
62
62
|
//-------- instance --------------------------------------------------------
|
@@ -91,16 +91,16 @@ independent_clock_fifo #(
|
|
91
91
|
/* output */.full (fifo_full )
|
92
92
|
);
|
93
93
|
axi4_wr_auxiliary_gen_without_resp axi4_wr_auxiliary_gen_without_resp_inst(
|
94
|
-
/* output */.stream_en (stream_en
|
95
|
-
/* axi_stream_inf.slaver */.id_add_len_in (id_add_len_in
|
96
|
-
/* axi_inf.master_wr_aux_no_resp */.axi_wr_aux (
|
94
|
+
/* output */.stream_en (stream_en ),
|
95
|
+
/* axi_stream_inf.slaver */.id_add_len_in (id_add_len_in ),
|
96
|
+
/* axi_inf.master_wr_aux_no_resp */.axi_wr_aux (axi_wr_vcs_cp_R236 )
|
97
97
|
);
|
98
98
|
vcs_axi4_comptable #(
|
99
99
|
.ORIGIN ("master_wr_aux_no_resp" ),
|
100
100
|
.TO ("master_wr" )
|
101
|
-
)
|
102
|
-
/* input */.origin (
|
103
|
-
/* output */.to (axi_wr
|
101
|
+
)vcs_axi4_comptable_axi_wr_aux_R372_axi_wr_inst(
|
102
|
+
/* input */.origin (axi_wr_vcs_cp_R236 ),
|
103
|
+
/* output */.to (axi_wr )
|
104
104
|
);
|
105
105
|
axis_valve_with_pipe #(
|
106
106
|
.MODE ("OUT" )
|
@@ -111,30 +111,30 @@ axis_valve_with_pipe #(
|
|
111
111
|
);
|
112
112
|
//==========================================================================
|
113
113
|
//-------- expression ------------------------------------------------------
|
114
|
-
|
114
|
+
always@(posedge axis_in.aclk,negedge axis_in.aresetn) begin
|
115
115
|
if(~axis_in.aresetn)begin
|
116
|
-
|
116
|
+
id <= 0;
|
117
117
|
end
|
118
118
|
else if(split_out.axis_tvalid && split_out.axis_tready && split_out.axis_tlast)begin
|
119
|
-
|
119
|
+
id <= (id+1);
|
120
120
|
end
|
121
121
|
else begin
|
122
|
-
|
122
|
+
id <= id;
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
126
|
-
assign
|
127
|
-
assign
|
128
|
-
assign
|
129
|
-
assign
|
130
|
-
assign
|
131
|
-
assign
|
126
|
+
assign addr_s = addr_cur;
|
127
|
+
assign len_s = split_out.axis_tcnt;
|
128
|
+
assign id_add_len_in.axis_tvalid = ~fifo_empty;
|
129
|
+
assign id_add_len_in.axis_tdata = fifo_rdata;
|
130
|
+
assign id_add_len_in.axis_tlast = "1'b1";
|
131
|
+
assign fifo_rd_en = id_add_len_in.axis_tready;
|
132
132
|
|
133
|
-
assign
|
134
|
-
assign
|
135
|
-
assign
|
136
|
-
assign
|
137
|
-
assign
|
138
|
-
assign
|
133
|
+
assign axi_wr.axi_wdata = pipe_axis.axis_tdata;
|
134
|
+
assign axi_wr.axi_wstrb = ~pipe_axis.axis_tkeep;
|
135
|
+
assign axi_wr.axi_wvalid = pipe_axis.axis_tvalid;
|
136
|
+
assign axi_wr.axi_wlast = pipe_axis.axis_tlast;
|
137
|
+
assign pipe_axis.axis_tready = axi_wr.axi_wready;
|
138
|
+
assign axi_wr.axi_bready = 1'b1;
|
139
139
|
|
140
140
|
endmodule
|
@@ -20,7 +20,13 @@ TdlBuild.axi_stream_split_channel(__dir__) do
|
|
20
20
|
new_last <= 1.b0
|
21
21
|
end
|
22
22
|
ELSE do
|
23
|
-
|
23
|
+
IF origin_inf.vld_rdy do
|
24
|
+
new_last <= (origin_inf.axis_tcnt == (split_len - 2))
|
25
|
+
end
|
26
|
+
ELSE do
|
27
|
+
new_last <= new_last
|
28
|
+
end
|
29
|
+
# new_last <= (origin_inf.axis_tcnt == (split_len - 2)).and(origin_inf.vld_rdy)
|
24
30
|
|
25
31
|
IF origin_inf.vld_rdy_last do
|
26
32
|
addr <= 1.b0
|
@@ -34,11 +34,15 @@ always_ff@(posedge axis_in.aclk, negedge axis_in.aresetn)
|
|
34
34
|
if(axis_in.axis_tvalid && axis_in.axis_tready)begin
|
35
35
|
if(axis_in.axis_tlast)
|
36
36
|
ex_viliad <= 1'b0;
|
37
|
+
else if(length == 16'd0)
|
38
|
+
ex_viliad <= 1'b1;
|
37
39
|
else if(axis_in.axis_tcnt >= length - 1'b1)
|
38
40
|
ex_viliad <= 1'b1;
|
39
41
|
else ex_viliad <= ex_viliad;
|
40
|
-
end else begin
|
41
|
-
|
42
|
+
end else begin
|
43
|
+
if(axis_in.axis_tcnt == '0 && length == 16'd0)
|
44
|
+
ex_viliad <= 1'b1;
|
45
|
+
else ex_viliad <= ex_viliad;
|
42
46
|
end
|
43
47
|
end
|
44
48
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_hdl 'axis_connect_pipe.sv'
|
2
2
|
|
3
3
|
TdlBuild.axis_insert_copy(__dir__) do
|
4
4
|
input[16] - 'insert_seed' ## 0 need first
|
@@ -37,15 +37,29 @@ TdlBuild.axis_insert_copy(__dir__) do
|
|
37
37
|
IF in_inf.vld_rdy_last do
|
38
38
|
insert_tri <= 1.b1
|
39
39
|
end
|
40
|
-
ELSIF
|
41
|
-
insert_tri <= (in_inf_valve.axis_tcnt
|
40
|
+
ELSIF in_inf_valve.vld_rdy do
|
41
|
+
insert_tri <= (in_inf_valve.axis_tcnt < insert_len - 1.b1 )
|
42
|
+
end
|
43
|
+
ELSIF (in_inf_valve.axis_tcnt == 0.A).and( "~(#{in_inf.vld_rdy})".to_nq ) do
|
44
|
+
insert_tri <= 1.b1
|
42
45
|
end
|
43
46
|
ELSE do
|
44
47
|
insert_tri <= insert_tri
|
45
48
|
end
|
46
49
|
end
|
47
50
|
ELSE do
|
48
|
-
|
51
|
+
IF in_inf_valve.vld_rdy do
|
52
|
+
IF (in_inf_valve.axis_tcnt >= insert_seed - 1.b1 ).and(in_inf_valve.axis_tcnt < insert_seed + insert_len - 1.b1).and( ~in_inf.axis_tlast) do
|
53
|
+
insert_tri <= 1.b1
|
54
|
+
end
|
55
|
+
ELSE do
|
56
|
+
insert_tri <= 1.b0
|
57
|
+
end
|
58
|
+
end
|
59
|
+
ELSE do
|
60
|
+
insert_tri <= insert_tri
|
61
|
+
end
|
62
|
+
# insert_tri <= (in_inf_valve.axis_tcnt >= insert_seed - 1.b1 ).and(in_inf_valve.vld_rdy).and(in_inf_valve.axis_tcnt < insert_seed + insert_len - 1.b1).and( ~in_inf.axis_tlast)
|
49
63
|
end
|
50
64
|
end
|
51
65
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require_hdl 'data_c_sim_master_model.sv'
|
2
|
+
|
3
|
+
TdlBuild.axis_sim_master_model(__dir__) do
|
4
|
+
parameter.LOOP "TRUE"
|
5
|
+
parameter.RAM_DEPTH 10000
|
6
|
+
input - 'load_trigger'
|
7
|
+
input[32] - 'total_length'
|
8
|
+
input[512*8] - 'mem_file' # {axis_tvalid, axis_tuser, axis_tkeep, axis_tlast, axis_tdata}
|
9
|
+
port.axis.master - 'out_inf'
|
10
|
+
|
11
|
+
data_inf_c(clock: out_inf.aclk, reset: out_inf.aresetn, dsize: "out_inf.DSIZE + out_inf.KSIZE + out_inf.USIZE + 1".to_nq) - 'out_inf_dc'
|
12
|
+
|
13
|
+
data_c_sim_master_model.data_c_sim_master_model_inst do |h| #(
|
14
|
+
h.param.LOOP param.LOOP
|
15
|
+
h.param.RAM_DEPTH param.RAM_DEPTH
|
16
|
+
h.input.load_trigger load_trigger
|
17
|
+
h.input[32].total_length total_length
|
18
|
+
h.input[512*8].mem_file mem_file
|
19
|
+
h.port.data_inf_c.master.out_inf out_inf_dc
|
20
|
+
end
|
21
|
+
|
22
|
+
Assign do
|
23
|
+
out_inf.axis_tvalid <= out_inf_dc.valid
|
24
|
+
out_inf_dc.ready <= out_inf.axis_tready
|
25
|
+
|
26
|
+
self.>>(out_inf.axis_tuser, out_inf.axis_tkeep, out_inf.axis_tlast, out_inf.axis_tdata) <= out_inf_dc.data
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_hdl 'data_c_sim_slaver_model.sv'
|
2
|
+
TdlBuild.axis_sim_slaver_model(__dir__) do
|
3
|
+
parameter.RAM_DEPTH 10000
|
4
|
+
input - 'load_trigger'
|
5
|
+
input[32] - 'total_length'
|
6
|
+
input[512*8] - 'mem_file' #
|
7
|
+
port.axis.slaver - 'in_inf'
|
8
|
+
|
9
|
+
data_inf_c(clock: in_inf.aclk, reset: in_inf.aresetn, dsize: "in_inf.DSIZE + in_inf.KSIZE + in_inf.USIZE + 1 + 1".to_nq) - 'in_inf_dc'
|
10
|
+
|
11
|
+
data_c_sim_slaver_model.data_c_sim_slaver_model_inst do |h|
|
12
|
+
h.param.RAM_DEPTH param.RAM_DEPTH
|
13
|
+
h.input.load_trigger load_trigger
|
14
|
+
h.input[32].total_length total_length
|
15
|
+
h.input[512*8].mem_file mem_file
|
16
|
+
h.port.data_inf_c.slaver.in_inf in_inf_dc
|
17
|
+
end
|
18
|
+
|
19
|
+
Assign do
|
20
|
+
in_inf.axis_tready <= in_inf_dc.ready
|
21
|
+
in_inf_dc.valid <= in_inf.axis_tvalid
|
22
|
+
|
23
|
+
in_inf_dc.data <+ self.>>(in_inf.axis_tuser, in_inf.axis_tkeep, in_inf.axis_tlast, in_inf.axis_tdata)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
/**********************************************
|
2
|
+
_______________________________________
|
3
|
+
___________ Cook Darwin __________
|
4
|
+
_______________________________________
|
5
|
+
descript:
|
6
|
+
author : Cook.Darwin
|
7
|
+
Version: VERA.0.0
|
8
|
+
created: xxxx.xx.xx
|
9
|
+
madified:
|
10
|
+
***********************************************/
|
11
|
+
`timescale 1ns/1ps
|
12
|
+
module axis_sim_verify_by_coe #(
|
13
|
+
parameter RAM_DEPTH = 10000,
|
14
|
+
parameter VERIFY_KEEP = "OFF",
|
15
|
+
parameter VERIFY_USER = "OFF"
|
16
|
+
)(
|
17
|
+
input load_trigger,
|
18
|
+
input [31:0] total_length,
|
19
|
+
input [4095:0] mem_file,
|
20
|
+
axi_stream_inf.mirror mirror_inf
|
21
|
+
);
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
logic [mirror_inf.DSIZE+mirror_inf.USIZE+mirror_inf.KSIZE+1-1:0] BRAM [RAM_DEPTH-1:0];
|
26
|
+
int total_length_lock;
|
27
|
+
initial begin
|
28
|
+
#(1ns);
|
29
|
+
total_length_lock = RAM_DEPTH;
|
30
|
+
$readmemh(mem_file, BRAM, 0, RAM_DEPTH-1);
|
31
|
+
end
|
32
|
+
|
33
|
+
always@(posedge load_trigger)begin
|
34
|
+
total_length_lock = total_length;
|
35
|
+
$readmemh(mem_file, BRAM, 0, RAM_DEPTH-1);
|
36
|
+
end
|
37
|
+
|
38
|
+
int index;
|
39
|
+
initial begin
|
40
|
+
index = 0;
|
41
|
+
end
|
42
|
+
|
43
|
+
always@(posedge mirror_inf.aclk) begin
|
44
|
+
if(~mirror_inf.aresetn) index <= 0;
|
45
|
+
else begin
|
46
|
+
if(mirror_inf.axis_tready && mirror_inf.axis_tvalid) begin
|
47
|
+
if(index >= total_length_lock-1)begin
|
48
|
+
// index <= 0;
|
49
|
+
index <= total_length_lock;
|
50
|
+
if(index != total_length_lock)
|
51
|
+
$display(" COE READ VERIFY DONE. \n %0s\n",mem_file);
|
52
|
+
end else begin
|
53
|
+
index <= index + 1;
|
54
|
+
end
|
55
|
+
end else begin
|
56
|
+
index <= index;
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
logic[mirror_inf.DSIZE-1:0] axis_tdata;
|
62
|
+
logic[mirror_inf.KSIZE-1:0] axis_tkeep;
|
63
|
+
logic[mirror_inf.USIZE-1:0] axis_tuser;
|
64
|
+
logic axis_tlast;
|
65
|
+
|
66
|
+
assign {axis_tuser,axis_tkeep,axis_tlast,axis_tdata} = BRAM[index];
|
67
|
+
// assign mirror_inf.data = BRAM[index][mirror_inf.DSIZE-1:0];
|
68
|
+
// assign mirror_inf.valid = BRAM[index][mirror_inf.DSIZE];
|
69
|
+
|
70
|
+
always@(negedge mirror_inf.aclk)begin
|
71
|
+
if(mirror_inf.axis_tvalid && mirror_inf.axis_tready && index < total_length_lock)begin
|
72
|
+
assert(axis_tdata == mirror_inf.axis_tdata)
|
73
|
+
else begin
|
74
|
+
$error("coe axis_tdata<%0h> != mirror_inf.axis_tdata<%0h>",axis_tdata, mirror_inf.axis_tdata);
|
75
|
+
$stop();
|
76
|
+
end
|
77
|
+
|
78
|
+
assert(axis_tlast == mirror_inf.axis_tlast)
|
79
|
+
else begin
|
80
|
+
$error("coe axis_tlast<%0h> != mirror_inf.axis_tlast<%0h>",axis_tlast, mirror_inf.axis_tlast);
|
81
|
+
$stop();
|
82
|
+
end
|
83
|
+
|
84
|
+
if(VERIFY_KEEP=="ON" || VERIFY_KEEP=="TRUE")begin
|
85
|
+
assert(axis_tkeep == mirror_inf.axis_tkeep)
|
86
|
+
else begin
|
87
|
+
$error("coe axis_tkeep<%0h> != mirror_inf.axis_tkeep<%0h>",axis_tkeep, mirror_inf.axis_tkeep);
|
88
|
+
$stop();
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
if(VERIFY_USER=="ON" || VERIFY_USER=="TRUE")begin
|
93
|
+
assert(axis_tuser == mirror_inf.axis_tuser)
|
94
|
+
else begin
|
95
|
+
$error("coe axis_tuser<%0h> != mirror_inf.axis_tuser<%0h>",axis_tuser, mirror_inf.axis_tuser);
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
endmodule
|
@@ -1,6 +1,8 @@
|
|
1
1
|
## VERB
|
2
2
|
## - insert copy first
|
3
3
|
require_sdl 'axis_insert_copy.rb'
|
4
|
+
require_hdl 'common_fifo.sv'
|
5
|
+
require_sdl 'axi_stream_split_channel.rb'
|
4
6
|
TdlBuild.axis_split_channel_verb(__dir__) do
|
5
7
|
input[16] - 'split_len' # 1:need 1 size ; split len must large than 2
|
6
8
|
port.axis.slaver - 'origin_inf'
|
@@ -13,7 +13,7 @@ madified:
|
|
13
13
|
module common_ram_sim_wrapper #(
|
14
14
|
parameter FNUM = 8
|
15
15
|
)(
|
16
|
-
input [
|
16
|
+
input [FNUM-1:0] load_files,
|
17
17
|
input [4095:0] init_files [FNUM-1:0],
|
18
18
|
cm_ram_inf.slaver ram_inf
|
19
19
|
);
|
@@ -59,17 +59,17 @@ xilinx_hdl_dpram_sim #(
|
|
59
59
|
);
|
60
60
|
//==========================================================================
|
61
61
|
//-------- expression ------------------------------------------------------
|
62
|
-
assign
|
63
|
-
assign
|
64
|
-
assign
|
65
|
-
assign
|
62
|
+
assign addra = ram_inf.addra;
|
63
|
+
assign dina = ram_inf.dia;
|
64
|
+
assign addrb = ram_inf.addrb;
|
65
|
+
assign dinb = ram_inf.dib;
|
66
66
|
|
67
|
-
|
68
|
-
|
67
|
+
always@(posedge ram_inf.clka) begin
|
68
|
+
ram_inf.doa <= douta[ram_inf.DSIZE-1:0];
|
69
69
|
end
|
70
70
|
|
71
|
-
|
72
|
-
|
71
|
+
always@(posedge ram_inf.clkb) begin
|
72
|
+
ram_inf.dob <= doutb[ram_inf.DSIZE-1:0];
|
73
73
|
end
|
74
74
|
|
75
75
|
endmodule
|
@@ -56,26 +56,26 @@ xilinx_hdl_dpram #(
|
|
56
56
|
);
|
57
57
|
//==========================================================================
|
58
58
|
//-------- expression ------------------------------------------------------
|
59
|
-
assign
|
60
|
-
assign
|
61
|
-
assign
|
62
|
-
assign
|
59
|
+
assign addra = ram_inf.addra;
|
60
|
+
assign dina = ram_inf.dia;
|
61
|
+
assign addrb = ram_inf.addrb;
|
62
|
+
assign dinb = ram_inf.dib;
|
63
63
|
|
64
|
-
|
65
|
-
if(
|
66
|
-
|
64
|
+
always@(posedge ram_inf.clka) begin
|
65
|
+
if(ram_inf.DSIZE<34)begin
|
66
|
+
ram_inf.doa <= douta[32:0];
|
67
67
|
end
|
68
68
|
else begin
|
69
|
-
|
69
|
+
ram_inf.doa <= douta;
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
|
74
|
-
if(
|
75
|
-
|
73
|
+
always@(posedge ram_inf.clkb) begin
|
74
|
+
if(ram_inf.DSIZE<34)begin
|
75
|
+
ram_inf.dob <= doutb[32:0];
|
76
76
|
end
|
77
77
|
else begin
|
78
|
-
|
78
|
+
ram_inf.dob <= doutb;
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
@@ -14,8 +14,8 @@ module data_c_pipe_sync_seam #(
|
|
14
14
|
parameter LAT = 4,
|
15
15
|
parameter DSIZE = 32
|
16
16
|
)(
|
17
|
-
input [
|
18
|
-
output [
|
17
|
+
input [DSIZE-1:0] in_datas [LAT-1:0],
|
18
|
+
output [DSIZE-1:0] out_datas [LAT-1:0],
|
19
19
|
data_inf_c.slaver in_inf,
|
20
20
|
data_inf_c.master out_inf
|
21
21
|
);
|
@@ -35,35 +35,35 @@ for(genvar KK0=0;KK0 < LAT;KK0++)begin
|
|
35
35
|
data_c_pipe_sync #(
|
36
36
|
.DSIZE (DSIZE )
|
37
37
|
)data_c_pipe_sync_inst(
|
38
|
-
/* input */.in_data (in_datas[
|
39
|
-
/* output */.out_data (out_datas[
|
40
|
-
/* data_inf_c.slaver */.in_inf (in_inf_array[
|
41
|
-
/* data_inf_c.master */.out_inf (out_inf_array[
|
38
|
+
/* input */.in_data (in_datas[KK0] ),
|
39
|
+
/* output */.out_data (out_datas[KK0] ),
|
40
|
+
/* data_inf_c.slaver */.in_inf (in_inf_array[KK0] ),
|
41
|
+
/* data_inf_c.master */.out_inf (out_inf_array[KK0] )
|
42
42
|
);
|
43
|
-
if(
|
44
|
-
assign
|
45
|
-
assign
|
46
|
-
assign
|
43
|
+
if(KK0!=0)begin
|
44
|
+
assign in_inf_array[KK0].valid = out_inf_array[KK0-1].valid;
|
45
|
+
assign in_inf_array[KK0].data = out_inf_array[KK0-1].data;
|
46
|
+
assign out_inf_array[KK0-1].ready = in_inf_array[KK0].ready;
|
47
47
|
end end
|
48
48
|
endgenerate
|
49
49
|
//-------- CLOCKs Total 2 ----------------------
|
50
50
|
//--->> CheckClock <<----------------
|
51
|
-
logic
|
52
|
-
integer
|
53
|
-
ClockSameDomain
|
51
|
+
logic cc_done_7,cc_same_7;
|
52
|
+
integer cc_afreq_7,cc_bfreq_7;
|
53
|
+
ClockSameDomain CheckPClock_inst_7(
|
54
54
|
/* input */ .aclk (in_inf.clock ),
|
55
55
|
/* input */ .bclk (out_inf.clock ),
|
56
|
-
/* output logic */ .done (
|
57
|
-
/* output logic */ .same (
|
58
|
-
/* output integer */ .aFreqK (
|
59
|
-
/* output integer */ .bFreqK (
|
56
|
+
/* output logic */ .done (cc_done_7),
|
57
|
+
/* output logic */ .same (cc_same_7),
|
58
|
+
/* output integer */ .aFreqK (cc_afreq_7),
|
59
|
+
/* output integer */ .bFreqK (cc_bfreq_7)
|
60
60
|
);
|
61
61
|
|
62
62
|
initial begin
|
63
|
-
wait(
|
64
|
-
assert(
|
63
|
+
wait(cc_done_7);
|
64
|
+
assert(cc_same_7)
|
65
65
|
else begin
|
66
|
-
$error("--- Error : `data_c_pipe_sync_seam` clock is not same, in_inf.clock< %0f M> != out_inf.clock<%0f M>",1000000.0/
|
66
|
+
$error("--- Error : `data_c_pipe_sync_seam` clock is not same, in_inf.clock< %0f M> != out_inf.clock<%0f M>",1000000.0/cc_afreq_7, 1000000.0/cc_bfreq_7);
|
67
67
|
repeat(10)begin
|
68
68
|
@(posedge in_inf.clock);
|
69
69
|
end
|
@@ -73,12 +73,12 @@ end
|
|
73
73
|
//---<< CheckClock >>----------------
|
74
74
|
|
75
75
|
//======== CLOCKs Total 2 ======================
|
76
|
-
assign
|
77
|
-
assign
|
78
|
-
assign
|
76
|
+
assign in_inf_array[0].valid = in_inf.valid;
|
77
|
+
assign in_inf_array[0].data = in_inf.data;
|
78
|
+
assign in_inf.ready = in_inf_array[0].ready;
|
79
79
|
|
80
|
-
assign
|
81
|
-
assign
|
82
|
-
assign
|
80
|
+
assign out_inf.data = out_inf_array[LAT-1].data;
|
81
|
+
assign out_inf.valid = out_inf_array[LAT-1].valid;
|
82
|
+
assign out_inf_array[LAT-1].ready = out_inf.ready;
|
83
83
|
|
84
84
|
endmodule
|