axi_tdl 0.0.12 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/gem-push.yml +4 -2
  3. data/.gitignore +3 -1
  4. data/README.EN.md +7 -2
  5. data/README.md +6 -2
  6. data/Rakefile +8 -1
  7. data/axi_tdl.gemspec +1 -2
  8. data/lib/axi/AXI4/axi4_direct_A1.sv +1 -1
  9. data/lib/axi/AXI4/axi4_direct_B1.sv +23 -23
  10. data/lib/axi/AXI4/axi4_direct_verc.sv +54 -54
  11. data/lib/axi/AXI4/axi4_dpram_cache.sv +34 -34
  12. data/lib/axi/AXI4/axis_to_axi4_wr.rb +1 -0
  13. data/lib/axi/AXI4/axis_to_axi4_wr.sv +24 -24
  14. data/lib/axi/AXI4/odata_pool_axi4_A3.sv +7 -0
  15. data/lib/axi/AXI4/packet_partition/axi4_partition_rd_verb.sv +33 -33
  16. data/lib/axi/AXI4/packet_partition/data_inf_partition.rb +2 -0
  17. data/lib/axi/AXI4/packet_partition/data_inf_partition.sv +72 -72
  18. data/lib/axi/AXI4/wide_axis_to_axi4_wr.rb +2 -1
  19. data/lib/axi/AXI4/wide_axis_to_axi4_wr.sv +21 -21
  20. data/lib/axi/AXI_stream/axi_stream_split_channel.rb +7 -1
  21. data/lib/axi/AXI_stream/axi_stream_split_channel.sv +45 -40
  22. data/lib/axi/AXI_stream/axis_head_cut_verb.sv +6 -2
  23. data/lib/axi/AXI_stream/axis_head_cut_verc.sv +30 -30
  24. data/lib/axi/AXI_stream/axis_insert_copy.rb +18 -4
  25. data/lib/axi/AXI_stream/axis_insert_copy.sv +29 -16
  26. data/lib/axi/AXI_stream/axis_pipe_sync_seam.sv +9 -9
  27. data/lib/axi/AXI_stream/axis_rom_contect_sim.sv +38 -38
  28. data/lib/axi/AXI_stream/axis_sim_master_model.rb +30 -0
  29. data/lib/axi/AXI_stream/axis_sim_master_model.sv +46 -0
  30. data/lib/axi/AXI_stream/axis_sim_slaver_model.rb +26 -0
  31. data/lib/axi/AXI_stream/axis_sim_verify_by_coe.sv +101 -0
  32. data/lib/axi/AXI_stream/axis_split_channel_verb.rb +2 -0
  33. data/lib/axi/AXI_stream/axis_split_channel_verb.sv +4 -4
  34. data/lib/axi/common/common_ram_sim_wrapper.sv +10 -10
  35. data/lib/axi/common/common_ram_wrapper.sv +13 -13
  36. data/lib/axi/data_interface/data_inf_c/data_c_pipe_sync_seam.sv +27 -27
  37. data/lib/axi/data_interface/data_inf_c/data_c_sim_master_model.sv +72 -0
  38. data/lib/axi/data_interface/data_inf_c/data_c_sim_slaver_model.sv +58 -0
  39. data/lib/axi/data_interface/data_inf_c/logic_sim_model.sv +64 -0
  40. data/lib/axi/platform_ip/fifo_36kb_long.sv +1 -1
  41. data/lib/axi/techbench/tb_axi_stream_split_channel.rb +69 -0
  42. data/lib/axi/techbench/tb_axi_stream_split_channel.sv +150 -0
  43. data/lib/axi/techbench/tb_axis_split_channel_verb.rb +69 -0
  44. data/lib/axi/techbench/tb_axis_split_channel_verb.sv +125 -0
  45. data/lib/axi_tdl.rb +1 -0
  46. data/lib/axi_tdl/version.rb +1 -1
  47. data/lib/public_atom_module/CheckPClock.sv +53 -0
  48. data/lib/public_atom_module/LICENSE.md +674 -0
  49. data/lib/public_atom_module/altera_xilinx_always_block_sw.rb +57 -0
  50. data/lib/public_atom_module/bits_decode.sv +71 -0
  51. data/lib/public_atom_module/bits_decode_verb.sv +71 -0
  52. data/lib/public_atom_module/bits_decode_verb_sdl.rb +24 -0
  53. data/lib/public_atom_module/broaden.v +43 -0
  54. data/lib/public_atom_module/broaden_and_cross_clk.v +47 -0
  55. data/lib/public_atom_module/ceiling.v +39 -0
  56. data/lib/public_atom_module/ceiling_A1.v +42 -0
  57. data/lib/public_atom_module/clock_rst.sv +64 -0
  58. data/lib/public_atom_module/cross_clk_sync.v +37 -0
  59. data/lib/public_atom_module/edge_generator.v +50 -0
  60. data/lib/public_atom_module/flooring.v +36 -0
  61. data/lib/public_atom_module/latch_data.v +30 -0
  62. data/lib/public_atom_module/latency.v +48 -0
  63. data/lib/public_atom_module/latency_dynamic.v +83 -0
  64. data/lib/public_atom_module/latency_long.v +84 -0
  65. data/lib/public_atom_module/latency_verb.v +52 -0
  66. data/lib/public_atom_module/once_event.sv +65 -0
  67. data/lib/public_atom_module/pipe_reg.v +93 -0
  68. data/lib/public_atom_module/pipe_reg_2write_ports.v +84 -0
  69. data/lib/public_atom_module/sim/clock_rst_verb.sv +54 -0
  70. data/lib/public_atom_module/sim/latency_long_tb.sv +49 -0
  71. data/lib/public_atom_module/sim/latency_long_tb.sv.bak +49 -0
  72. data/lib/tdl/Logic/logic_edge.rb +1 -1
  73. data/lib/tdl/auto_script/autogensdl.rb +16 -5
  74. data/lib/tdl/axi4/axi4_interconnect_verb.rb +49 -10
  75. data/lib/tdl/basefunc.rb +1 -0
  76. data/lib/tdl/class_hdl/hdl_always_comb.rb +8 -4
  77. data/lib/tdl/class_hdl/hdl_always_ff.rb +49 -8
  78. data/lib/tdl/class_hdl/hdl_assign.rb +12 -4
  79. data/lib/tdl/class_hdl/hdl_block_ifelse.rb +18 -16
  80. data/lib/tdl/class_hdl/hdl_foreach.rb +4 -4
  81. data/lib/tdl/class_hdl/hdl_function.rb +8 -6
  82. data/lib/tdl/class_hdl/hdl_generate.rb +9 -5
  83. data/lib/tdl/class_hdl/hdl_initial.rb +36 -13
  84. data/lib/tdl/class_hdl/hdl_module_def.rb +27 -7
  85. data/lib/tdl/class_hdl/hdl_package.rb +45 -0
  86. data/lib/tdl/class_hdl/hdl_redefine_opertor.rb +117 -24
  87. data/lib/tdl/class_hdl/hdl_struct.rb +3 -3
  88. data/lib/tdl/class_hdl/hdl_verify.rb +1 -1
  89. data/lib/tdl/elements/Reset.rb +5 -9
  90. data/lib/tdl/elements/clock.rb +5 -9
  91. data/lib/tdl/elements/data_inf.rb +0 -17
  92. data/lib/tdl/elements/logic.rb +9 -31
  93. data/lib/tdl/elements/mail_box.rb +6 -1
  94. data/lib/tdl/elements/originclass.rb +23 -48
  95. data/lib/tdl/elements/parameter.rb +6 -7
  96. data/lib/tdl/examples/10_random/exp_random.sv +3 -3
  97. data/lib/tdl/examples/11_test_unit/dve.tcl +6 -0
  98. data/lib/tdl/examples/11_test_unit/exp_test_unit.rb +9 -8
  99. data/lib/tdl/examples/11_test_unit/exp_test_unit.sv +1 -1
  100. data/lib/tdl/examples/11_test_unit/exp_test_unit_sim.sv +9 -0
  101. data/lib/tdl/examples/11_test_unit/modules/sub_md0.rb +6 -3
  102. data/lib/tdl/examples/11_test_unit/modules/sub_md0.sv +5 -5
  103. data/lib/tdl/examples/11_test_unit/modules/sub_md1.rb +9 -4
  104. data/lib/tdl/examples/11_test_unit/modules/sub_md1.sv +5 -5
  105. data/lib/tdl/examples/11_test_unit/tb_exp_test_unit.sv +1 -2
  106. data/lib/tdl/examples/11_test_unit/tb_exp_test_unit_sim.sv +42 -0
  107. data/lib/tdl/examples/11_test_unit/tu0.sv +9 -9
  108. data/lib/tdl/examples/11_test_unit/tu1.sv +1 -1
  109. data/lib/tdl/examples/1_define_module/exmple_md.sv +13 -13
  110. data/lib/tdl/examples/2_hdl_class/tmp/always_comb_test.sv +60 -60
  111. data/lib/tdl/examples/2_hdl_class/tmp/always_ff_test.sv +2 -2
  112. data/lib/tdl/examples/2_hdl_class/tmp/case_test.sv +17 -17
  113. data/lib/tdl/examples/2_hdl_class/tmp/head_pkg_module.sv +9 -9
  114. data/lib/tdl/examples/2_hdl_class/tmp/module_instance_test.sv +1 -1
  115. data/lib/tdl/examples/2_hdl_class/tmp/simple_assign_test.sv +1 -1
  116. data/lib/tdl/examples/2_hdl_class/tmp/state_case_test.sv +10 -10
  117. data/lib/tdl/examples/2_hdl_class/tmp/test_foreach.sv +3 -3
  118. data/lib/tdl/examples/2_hdl_class/tmp/test_function.sv +7 -7
  119. data/lib/tdl/examples/2_hdl_class/tmp/test_initial_assert.sv +3 -3
  120. data/lib/tdl/examples/2_hdl_class/tmp/test_inst_sugar.sv +1 -1
  121. data/lib/tdl/examples/2_hdl_class/tmp/test_module.sv +3 -3
  122. data/lib/tdl/examples/2_hdl_class/tmp/test_module_port.sv +1 -1
  123. data/lib/tdl/examples/2_hdl_class/tmp/test_module_var.sv +1 -1
  124. data/lib/tdl/examples/2_hdl_class/tmp/test_package.sv +2 -2
  125. data/lib/tdl/examples/2_hdl_class/tmp/test_package2.sv +4 -4
  126. data/lib/tdl/examples/2_hdl_class/tmp/test_struct_function.sv +2 -2
  127. data/lib/tdl/examples/2_hdl_class/tmp/test_vcs_string.sv +1 -1
  128. data/lib/tdl/examples/2_hdl_class/tmp/text_generate.sv +7 -7
  129. data/lib/tdl/examples/3_hdl_sdl_instance/main_md.sv +1 -1
  130. data/lib/tdl/examples/3_hdl_sdl_instance/sdl_md.sv +1 -1
  131. data/lib/tdl/examples/4_generate/test_generate.sv +11 -11
  132. data/lib/tdl/examples/5_logic_combin/test_logic_combin.sv +3 -3
  133. data/lib/tdl/examples/6_module_with_interface/inf_collect.sv +1 -1
  134. data/lib/tdl/examples/7_module_with_package/body_package.sv +1 -1
  135. data/lib/tdl/examples/7_module_with_package/example_pkg.sv +5 -5
  136. data/lib/tdl/examples/7_module_with_package/head_package.sv +1 -1
  137. data/lib/tdl/examples/8_top_module/tb_test_top.sv +1 -2
  138. data/lib/tdl/examples/8_top_module/tb_test_top_sim.sv +29 -0
  139. data/lib/tdl/examples/8_top_module/test_top.sv +1 -1
  140. data/lib/tdl/examples/8_top_module/test_top_sim.sv +9 -0
  141. data/lib/tdl/examples/9_itegration/clock_manage/itgt_module_clock_manage.rb +13 -0
  142. data/lib/tdl/examples/9_itegration/clock_manage/test_clock_bb.sv +34 -0
  143. data/lib/tdl/examples/9_itegration/tb_test_top.sv +2 -2
  144. data/lib/tdl/examples/9_itegration/tb_test_tttop.sv +4 -2
  145. data/lib/tdl/examples/9_itegration/tb_test_tttop_sim.sv +39 -0
  146. data/lib/tdl/examples/9_itegration/test_top.sv +4 -4
  147. data/lib/tdl/examples/9_itegration/test_tttop.sv +4 -4
  148. data/lib/tdl/examples/9_itegration/test_tttop_sim.sv +9 -0
  149. data/lib/tdl/examples/9_itegration/top.rb +1 -0
  150. data/lib/tdl/exlib/axis_eth_ex.rb +95 -0
  151. data/lib/tdl/exlib/axis_verify.rb +265 -0
  152. data/lib/tdl/exlib/clock_reset_verify.rb +29 -0
  153. data/lib/tdl/exlib/dve_tcl.rb +30 -11
  154. data/lib/tdl/exlib/itegration.rb +15 -3
  155. data/lib/tdl/exlib/itegration_verb.rb +167 -130
  156. data/lib/tdl/exlib/logic_verify.rb +88 -0
  157. data/lib/tdl/exlib/test_point.rb +96 -94
  158. data/lib/tdl/exlib/test_point.rb.bak +293 -0
  159. data/lib/tdl/rebuild_ele/ele_base.rb +9 -9
  160. data/lib/tdl/sdlmodule/sdlmodlule_path_db.rb +34 -0
  161. data/lib/tdl/sdlmodule/sdlmodule.rb +79 -65
  162. data/lib/tdl/sdlmodule/sdlmodule_arraychain.rb +1 -1
  163. data/lib/tdl/sdlmodule/sdlmodule_draw.rb +81 -16
  164. data/lib/tdl/sdlmodule/sdlmodule_instance.rb +3 -0
  165. data/lib/tdl/sdlmodule/sdlmodule_port_define.rb +6 -6
  166. data/lib/tdl/sdlmodule/sdlmodule_varible.rb +6 -6
  167. data/lib/tdl/sdlmodule/test_unit_module.rb +283 -33
  168. data/lib/tdl/sdlmodule/test_unit_module.rb.bak +143 -0
  169. data/lib/tdl/sdlmodule/top_module.rb +62 -58
  170. data/lib/tdl/sdlmodule/top_module.rb.bak +547 -0
  171. data/lib/tdl/tdl.rb +18 -3
  172. data/lib/tdl/tdlerror/tdlerror.rb +1 -1
  173. metadata +54 -121
  174. data/CODE_OF_CONDUCT.md +0 -74
  175. data/lib/axi/AXI_stream/axis_length_split_writh_user.sv +0 -87
@@ -1,5 +1,6 @@
1
1
  # require_relative "../prj_lib"
2
- require_hdl File.join(__dir__,"../AXI_stream/axis_length_split_with_addr.sv")
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
 
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: xxxx.xx.xx
8
+ creaded: XXXX.XX.XX
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -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)) axi_wr_vcs_cp_R1842 (.axi_aclk(axi_wr.axi_aclk),.axi_aresetn(axi_wr.axi_aresetn)) ;
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_R1342 (.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 --------------------------------------------------------
@@ -93,13 +93,13 @@ independent_clock_fifo #(
93
93
  axi4_wr_auxiliary_gen_without_resp axi4_wr_auxiliary_gen_without_resp_inst(
94
94
  /* output */.stream_en (stream_en ),
95
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_R1842 )
96
+ /* axi_inf.master_wr_aux_no_resp */.axi_wr_aux (axi_wr_vcs_cp_R1342 )
97
97
  );
98
98
  vcs_axi4_comptable #(
99
99
  .ORIGIN ("master_wr_aux_no_resp" ),
100
100
  .TO ("master_wr" )
101
- )vcs_axi4_comptable_axi_wr_aux_R1910_axi_wr_inst(
102
- /* input */.origin (axi_wr_vcs_cp_R1842 ),
101
+ )vcs_axi4_comptable_axi_wr_aux_R700_axi_wr_inst(
102
+ /* input */.origin (axi_wr_vcs_cp_R1342 ),
103
103
  /* output */.to (axi_wr )
104
104
  );
105
105
  axis_valve_with_pipe #(
@@ -111,30 +111,30 @@ axis_valve_with_pipe #(
111
111
  );
112
112
  //==========================================================================
113
113
  //-------- expression ------------------------------------------------------
114
- always_ff@(posedge axis_in.aclk,negedge axis_in.aresetn) begin
114
+ always@(posedge axis_in.aclk,negedge axis_in.aresetn) begin
115
115
  if(~axis_in.aresetn)begin
116
- id <= 0;
116
+ id <= 0;
117
117
  end
118
118
  else if(split_out.axis_tvalid && split_out.axis_tready && split_out.axis_tlast)begin
119
- id <= ( id+1);
119
+ id <= (id+1);
120
120
  end
121
121
  else begin
122
- id <= id;
122
+ id <= id;
123
123
  end
124
124
  end
125
125
 
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;
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 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;
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
- new_last <= (origin_inf.axis_tcnt == (split_len - 2)).and(origin_inf.vld_rdy)
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
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: xxxx.xx.xx
8
+ created: 2021-04-03 12:04:15 +0800
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -55,22 +55,22 @@ axis_direct axis_direct_end_inf_inst0 (
55
55
  );
56
56
  //-------- CLOCKs Total 3 ----------------------
57
57
  //--->> CheckClock <<----------------
58
- logic cc_done_8,cc_same_8;
59
- integer cc_afreq_8,cc_bfreq_8;
60
- ClockSameDomain CheckPClock_inst_8(
61
- /* input */ .aclk (origin_inf.aclk ),
62
- /* input */ .bclk (first_inf.aclk ),
63
- /* output logic */ .done (cc_done_8),
64
- /* output logic */ .same (cc_same_8),
65
- /* output integer */ .aFreqK (cc_afreq_8),
66
- /* output integer */ .bFreqK (cc_bfreq_8)
58
+ logic cc_done_0,cc_same_0;
59
+ integer cc_afreq_0,cc_bfreq_0;
60
+ ClockSameDomain CheckPClock_inst_0(
61
+ /* input */ .aclk (origin_inf.aclk),
62
+ /* input */ .bclk (first_inf.aclk),
63
+ /* output logic */ .done (cc_done_0),
64
+ /* output logic */ .same (cc_same_0),
65
+ /* output integer */ .aFreqK (cc_afreq_0),
66
+ /* output integer */ .bFreqK (cc_bfreq_0)
67
67
  );
68
68
 
69
69
  initial begin
70
- wait(cc_done_8);
71
- assert(cc_same_8)
70
+ wait(cc_done_0);
71
+ assert(cc_same_0)
72
72
  else begin
73
- $error("--- Error : `axi_stream_split_channel` clock is not same, origin_inf.aclk< %0f M> != first_inf.aclk<%0f M>",1000000.0/cc_afreq_8, 1000000.0/cc_bfreq_8);
73
+ $error("--- Error : `axi_stream_split_channel` clock is not same, origin_inf.aclk< %0f M> != first_inf.aclk<%0f M>",1000000.0/cc_afreq_0, 1000000.0/cc_bfreq_0);
74
74
  repeat(10)begin
75
75
  @(posedge origin_inf.aclk);
76
76
  end
@@ -80,22 +80,22 @@ end
80
80
  //---<< CheckClock >>----------------
81
81
 
82
82
  //--->> CheckClock <<----------------
83
- logic cc_done_9,cc_same_9;
84
- integer cc_afreq_9,cc_bfreq_9;
85
- ClockSameDomain CheckPClock_inst_9(
86
- /* input */ .aclk (origin_inf.aclk ),
87
- /* input */ .bclk (end_inf.aclk ),
88
- /* output logic */ .done (cc_done_9),
89
- /* output logic */ .same (cc_same_9),
90
- /* output integer */ .aFreqK (cc_afreq_9),
91
- /* output integer */ .bFreqK (cc_bfreq_9)
83
+ logic cc_done_1,cc_same_1;
84
+ integer cc_afreq_1,cc_bfreq_1;
85
+ ClockSameDomain CheckPClock_inst_1(
86
+ /* input */ .aclk (origin_inf.aclk),
87
+ /* input */ .bclk (end_inf.aclk),
88
+ /* output logic */ .done (cc_done_1),
89
+ /* output logic */ .same (cc_same_1),
90
+ /* output integer */ .aFreqK (cc_afreq_1),
91
+ /* output integer */ .bFreqK (cc_bfreq_1)
92
92
  );
93
93
 
94
94
  initial begin
95
- wait(cc_done_9);
96
- assert(cc_same_9)
95
+ wait(cc_done_1);
96
+ assert(cc_same_1)
97
97
  else begin
98
- $error("--- Error : `axi_stream_split_channel` clock is not same, origin_inf.aclk< %0f M> != end_inf.aclk<%0f M>",1000000.0/cc_afreq_9, 1000000.0/cc_bfreq_9);
98
+ $error("--- Error : `axi_stream_split_channel` clock is not same, origin_inf.aclk< %0f M> != end_inf.aclk<%0f M>",1000000.0/cc_afreq_1, 1000000.0/cc_bfreq_1);
99
99
  repeat(10)begin
100
100
  @(posedge origin_inf.aclk);
101
101
  end
@@ -105,34 +105,39 @@ end
105
105
  //---<< CheckClock >>----------------
106
106
 
107
107
  //======== CLOCKs Total 3 ======================
108
- assign clock = origin_inf.aclk;
109
- assign rst_n = origin_inf.aresetn;
108
+ assign clock = origin_inf.aclk;
109
+ assign rst_n = origin_inf.aresetn;
110
110
 
111
111
  always_ff@(posedge clock,negedge rst_n) begin
112
112
  if(~rst_n)begin
113
- addr <= 1'b0;
114
- new_last <= 1'b0;
113
+ addr <= 1'b0;
114
+ new_last <= 1'b0;
115
115
  end
116
116
  else begin
117
- new_last <= ( origin_inf.axis_tcnt==( split_len-2)&& origin_inf.axis_tvalid && origin_inf.axis_tready);
117
+ if(origin_inf.axis_tvalid && origin_inf.axis_tready)begin
118
+ new_last <= origin_inf.axis_tcnt==(split_len-2);
119
+ end
120
+ else begin
121
+ new_last <= new_last;
122
+ end
118
123
  if(origin_inf.axis_tvalid && origin_inf.axis_tready && origin_inf.axis_tlast)begin
119
- addr <= 1'b0;
124
+ addr <= 1'b0;
120
125
  end
121
- else if( origin_inf.axis_tcnt==( split_len-1)&& origin_inf.axis_tvalid && origin_inf.axis_tready)begin
122
- addr <= 1'b1;
126
+ else if(origin_inf.axis_tcnt==(split_len-1)&&origin_inf.axis_tvalid && origin_inf.axis_tready)begin
127
+ addr <= 1'b1;
123
128
  end
124
129
  else begin
125
- addr <= addr;
130
+ addr <= addr;
126
131
  end
127
132
  end
128
133
  end
129
134
 
130
- assign origin_inf_add_last.axis_tdata = origin_inf.axis_tdata;
131
- assign origin_inf_add_last.axis_tvalid = origin_inf.axis_tvalid;
132
- assign origin_inf_add_last.axis_tuser = origin_inf.axis_tuser;
133
- assign origin_inf_add_last.axis_tkeep = origin_inf.axis_tkeep;
134
- assign origin_inf_add_last.axis_tlast = ( origin_inf.axis_tlast|new_last);
135
- assign origin_inf.axis_tready = origin_inf_add_last.axis_tready;
135
+ assign origin_inf_add_last.axis_tdata = origin_inf.axis_tdata;
136
+ assign origin_inf_add_last.axis_tvalid = origin_inf.axis_tvalid;
137
+ assign origin_inf_add_last.axis_tuser = origin_inf.axis_tuser;
138
+ assign origin_inf_add_last.axis_tkeep = origin_inf.axis_tkeep;
139
+ assign origin_inf_add_last.axis_tlast = origin_inf.axis_tlast|new_last;
140
+ assign origin_inf.axis_tready = origin_inf_add_last.axis_tready;
136
141
 
137
142
 
138
143
  axis_direct axis_direct_first_inf_instMM (
@@ -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
- ex_viliad <= ex_viliad;
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
 
@@ -5,14 +5,14 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: xxxx.xx.xx
8
+ creaded: XXXX.XX.XX
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
12
12
 
13
13
  module axis_head_cut_verc #(
14
14
  parameter BYTE_BITS = 8,
15
- parameter DX = origin_inf.DSIZE/BYTE_BITS
15
+ parameter DX = (origin_inf.DSIZE / BYTE_BITS)
16
16
  )(
17
17
  input [9:0] bytes,
18
18
  axi_stream_inf.slaver origin_inf,
@@ -45,7 +45,7 @@ axi_stream_inf #(.DSIZE(origin_inf.DSIZE),.USIZE(1)) origin_inf_ss (.aclk(origin
45
45
  axi_stream_inf #(.DSIZE(origin_inf.DSIZE),.USIZE(1)) origin_inf_cut_mix (.aclk(origin_inf.aclk),.aresetn(origin_inf.aresetn),.aclken(1'b1)) ;
46
46
  axi_stream_inf #(.DSIZE(origin_inf.DSIZE),.USIZE(1)) origin_inf_ss_E0 (.aclk(origin_inf.aclk),.aresetn(origin_inf.aresetn),.aclken(1'b1)) ;
47
47
  axi_stream_inf #(.DSIZE(origin_inf.DSIZE),.USIZE(1)) origin_inf_ss_E0_CH (.aclk(origin_inf.aclk),.aresetn(origin_inf.aresetn),.aclken(1'b1)) ;
48
- axi_stream_inf #(.DSIZE(out_inf.DSIZE),.USIZE(1)) out_inf_branchR671 (.aclk(out_inf.aclk),.aresetn(out_inf.aresetn),.aclken(1'b1)) ;
48
+ axi_stream_inf #(.DSIZE(out_inf.DSIZE),.USIZE(1)) out_inf_branchR774 (.aclk(out_inf.aclk),.aresetn(out_inf.aresetn),.aclken(1'b1)) ;
49
49
  //==========================================================================
50
50
  //-------- instance --------------------------------------------------------
51
51
  axis_pipe_sync_seam #(
@@ -122,7 +122,7 @@ axis_connect_pipe_right_shift_verb #(
122
122
  axis_head_cut_verb last_cut_inst(
123
123
  /* input */.length (16'd1 ),
124
124
  /* axi_stream_inf.slaver */.axis_in (origin_inf_ss_E0_CH ),
125
- /* axi_stream_inf.master */.axis_out (out_inf_branchR671 )
125
+ /* axi_stream_inf.master */.axis_out (out_inf_branchR774 )
126
126
  );
127
127
  //==========================================================================
128
128
  //-------- expression ------------------------------------------------------
@@ -136,7 +136,7 @@ axis_direct axis_direct_out_inf_inst0 (
136
136
  );
137
137
 
138
138
  axis_direct axis_direct_out_inf_inst1 (
139
- /* axi_stream_inf.slaver*/ .slaver (out_inf_branchR671),
139
+ /* axi_stream_inf.slaver*/ .slaver (out_inf_branchR774),
140
140
  /* axi_stream_inf.master*/ .master (sub_out_inf[1])
141
141
  );
142
142
 
@@ -154,57 +154,57 @@ axis_direct axis_direct_origin_inf_cut_mix_inst1 (
154
154
  /* axi_stream_inf.master*/ .master (sub_origin_inf_cut_mix[1])
155
155
  );
156
156
  initial begin
157
- assert( DX<17)else begin
158
- $error("param.DX<%0d> !< 17",DX);
159
- $stop;
157
+ assert(DX<17)else begin
158
+ $error("param.DX<%0d> !< 17",DX);
159
+ $stop;
160
160
  end
161
161
  end
162
162
 
163
- assign clock = origin_inf.aclk;
164
- assign rst_n = origin_inf.aresetn;
163
+ assign clock = origin_inf.aclk;
164
+ assign rst_n = origin_inf.aresetn;
165
165
 
166
166
  always_comb begin
167
- bytes_x_tmp = '0;
167
+ bytes_x_tmp = '0;
168
168
  for(integer gvar_cc_1=0;gvar_cc_1<10;gvar_cc_1=gvar_cc_1+1)begin
169
- if( bytes<DX*(10-gvar_cc_1))begin
170
- bytes_x_tmp = ( ( 10-1)-gvar_cc_1);
169
+ if(bytes<DX*(10-gvar_cc_1))begin
170
+ bytes_x_tmp = (10-1)-gvar_cc_1;
171
171
  end
172
172
  end
173
173
  end
174
174
 
175
- assign origin_sync_info[0] = {bytes_x_tmp,bytes_x_tmp,bytes};
176
- assign {bytes_x,bytes_Q} = {origin_sync_info_out[0][13:10],origin_sync_info_out[0][9:0]};
177
- assign bytes_x_sub_nDx_tmp = ( bytes_Q-( bytes_x*DX));
178
- assign origin_sync_info[1] = {bytes_x_sub_nDx_tmp,bytes_x,bytes_Q};
179
- assign {bytes_x_sub_nDx,bytes_x_Q,bytes_QQ} = {origin_sync_info_out[1][17:14],origin_sync_info_out[1][13:10],origin_sync_info_out[1][9:0]};
180
- assign origin_sync_info[2] = {10'd0,route_addr_tmp};
181
- assign route_addr = origin_sync_info_out[2][1:0];
175
+ assign origin_sync_info[0] = {bytes_x_tmp,bytes_x_tmp,bytes};
176
+ assign {bytes_x,bytes_Q} = {origin_sync_info_out[0][13:10],origin_sync_info_out[0][9:0]};
177
+ assign bytes_x_sub_nDx_tmp = bytes_Q-(bytes_x*DX);
178
+ assign origin_sync_info[1] = {bytes_x_sub_nDx_tmp,bytes_x,bytes_Q};
179
+ assign {bytes_x_sub_nDx,bytes_x_Q,bytes_QQ} = {origin_sync_info_out[1][17:14],origin_sync_info_out[1][13:10],origin_sync_info_out[1][9:0]};
180
+ assign origin_sync_info[2] = {10'd0,route_addr_tmp};
181
+ assign route_addr = origin_sync_info_out[2][1:0];
182
182
 
183
183
  always_comb begin
184
- if( bytes_QQ=='0)begin
185
- route_addr_tmp = 2'd0;
184
+ if(bytes_QQ=='0)begin
185
+ route_addr_tmp = 2'd0;
186
186
  end
187
- else if( bytes_x_Q=='0)begin
188
- route_addr_tmp = 2'd2;
187
+ else if(bytes_x_Q=='0)begin
188
+ route_addr_tmp = 2'd2;
189
189
  end
190
- else if( bytes_x_sub_nDx=='0)begin
191
- route_addr_tmp = 2'd1;
190
+ else if(bytes_x_sub_nDx=='0)begin
191
+ route_addr_tmp = 2'd1;
192
192
  end
193
193
  else begin
194
- route_addr_tmp = 2'd1;
194
+ route_addr_tmp = 2'd1;
195
195
  end
196
196
  end
197
197
 
198
198
  always_ff@(posedge clock,negedge rst_n) begin
199
199
  if(~rst_n)begin
200
- fifo_wr_en <= 1'b0;
200
+ fifo_wr_en <= 1'b0;
201
201
  end
202
202
  else begin
203
- fifo_wr_en <= ( origin_inf.axis_tcnt=='0&& origin_inf.axis_tvalid && origin_inf.axis_tready);
203
+ fifo_wr_en <= (origin_inf.axis_tcnt=='0&&origin_inf.axis_tvalid && origin_inf.axis_tready);
204
204
  end
205
205
  end
206
206
 
207
- assign shift_sel_pre = ( DX-bytes_x_sub_nDx);
207
+ assign shift_sel_pre = DX-bytes_x_sub_nDx;
208
208
 
209
209
 
210
210
  //----->> fifo_wr_en LAST DELAY <<------------------
@@ -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 in_inf.vld_rdy do
41
- insert_tri <= (in_inf_valve.axis_tcnt >= insert_len - 1.b1 )
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
- 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)
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
@@ -5,7 +5,7 @@ _______________________________________
5
5
  descript:
6
6
  author : Cook.Darwin
7
7
  Version: VERA.0.0
8
- created: xxxx.xx.xx
8
+ creaded: XXXX.XX.XX
9
9
  madified:
10
10
  ***********************************************/
11
11
  `timescale 1ns/1ps
@@ -31,34 +31,47 @@ axis_connect_pipe axis_connect_pipe_inst(
31
31
  );
32
32
  //==========================================================================
33
33
  //-------- expression ------------------------------------------------------
34
- assign clock = in_inf.aclk;
35
- assign rst_n = in_inf.aresetn;
34
+ assign clock = in_inf.aclk;
35
+ assign rst_n = in_inf.aresetn;
36
36
 
37
- assign in_inf_valve.axis_tdata = in_inf.axis_tdata;
38
- assign in_inf_valve.axis_tvalid = ( in_inf.axis_tvalid|insert_tri);
39
- assign in_inf_valve.axis_tuser = in_inf.axis_tuser;
40
- assign in_inf_valve.axis_tkeep = in_inf.axis_tkeep;
41
- assign in_inf.axis_tready = ( in_inf_valve.axis_tready&~insert_tri);
42
- assign in_inf_valve.axis_tlast = ( in_inf.axis_tlast&~insert_tri);
37
+ assign in_inf_valve.axis_tdata = in_inf.axis_tdata;
38
+ assign in_inf_valve.axis_tvalid = in_inf.axis_tvalid|insert_tri;
39
+ assign in_inf_valve.axis_tuser = in_inf.axis_tuser;
40
+ assign in_inf_valve.axis_tkeep = in_inf.axis_tkeep;
41
+ assign in_inf.axis_tready = in_inf_valve.axis_tready&~insert_tri;
42
+ assign in_inf_valve.axis_tlast = in_inf.axis_tlast&~insert_tri;
43
43
 
44
44
  always_ff@(posedge clock,negedge rst_n) begin
45
45
  if(~rst_n)begin
46
- insert_tri <= 1'b0;
46
+ insert_tri <= 1'b0;
47
47
  end
48
48
  else begin
49
- if( insert_seed=='0)begin
49
+ if(insert_seed=='0)begin
50
50
  if(in_inf.axis_tvalid && in_inf.axis_tready && in_inf.axis_tlast)begin
51
- insert_tri <= 1'b1;
51
+ insert_tri <= 1'b1;
52
52
  end
53
- else if(in_inf.axis_tvalid && in_inf.axis_tready)begin
54
- insert_tri <= ( in_inf_valve.axis_tcnt>=( insert_len-1'b1));
53
+ else if(in_inf_valve.axis_tvalid && in_inf_valve.axis_tready)begin
54
+ insert_tri <= (in_inf_valve.axis_tcnt<(insert_len-1'b1));
55
+ end
56
+ else if(in_inf_valve.axis_tcnt=='0&&~(in_inf.axis_tvalid && in_inf.axis_tready))begin
57
+ insert_tri <= 1'b1;
55
58
  end
56
59
  else begin
57
- insert_tri <= insert_tri;
60
+ insert_tri <= insert_tri;
58
61
  end
59
62
  end
60
63
  else begin
61
- insert_tri <= ( in_inf_valve.axis_tcnt>=( insert_seed-1'b1)&& in_inf_valve.axis_tvalid && in_inf_valve.axis_tready && ( in_inf_valve.axis_tcnt<( ( insert_seed+insert_len)-1'b1))&& ~in_inf.axis_tlast);
64
+ if(in_inf_valve.axis_tvalid && in_inf_valve.axis_tready)begin
65
+ if(in_inf_valve.axis_tcnt>=(insert_seed-1'b1) &&(in_inf_valve.axis_tcnt<((insert_seed+insert_len)-1'b1))&&~in_inf.axis_tlast)begin
66
+ insert_tri <= 1'b1;
67
+ end
68
+ else begin
69
+ insert_tri <= 1'b0;
70
+ end
71
+ end
72
+ else begin
73
+ insert_tri <= insert_tri;
74
+ end
62
75
  end
63
76
  end
64
77
  end