axi_tdl 0.1.0 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -0
- data/lib/axi/AXI4/axi4_direct_A1.sv +1 -1
- data/lib/axi/AXI4/axi4_direct_verc.sv +54 -54
- data/lib/axi/AXI4/axi4_dpram_cache.rb +1 -0
- data/lib/axi/AXI4/axi4_dpram_cache.sv +10 -10
- data/lib/axi/AXI4/axi4_rd_burst_track.sv +2 -1
- data/lib/axi/AXI4/axi4_wr_burst_track.sv +2 -1
- data/lib/axi/AXI4/axis_to_axi4_wr.sv +9 -9
- data/lib/axi/AXI4/odata_pool_axi4_A3.sv +7 -0
- data/lib/axi/AXI4/packet_partition/axi4_partition_rd_verb.sv +5 -5
- data/lib/axi/AXI4/packet_partition/data_inf_partition.rb +8 -4
- data/lib/axi/AXI4/packet_partition/data_inf_partition.sv +6 -6
- data/lib/axi/AXI4/wide_axis_to_axi4_wr.sv +12 -12
- data/lib/axi/AXI_stream/axi_stream_split_channel.sv +154 -0
- data/lib/axi/AXI_stream/axis_head_cut_verc.sv +242 -0
- data/lib/axi/AXI_stream/axis_insert_copy.sv +79 -0
- data/lib/axi/AXI_stream/axis_pipe_sync_seam.sv +48 -0
- data/lib/axi/AXI_stream/axis_rom_contect_sim.sv +113 -0
- data/lib/axi/AXI_stream/axis_sim_master_model.rb +2 -0
- data/lib/axi/AXI_stream/axis_sim_master_model.sv +46 -0
- data/lib/axi/AXI_stream/axis_split_channel_verb.sv +62 -0
- data/lib/axi/AXI_stream/data_width/axis_width_convert_verb.sv +50 -0
- data/lib/axi/AXI_stream/packet_fifo/axi_stream_packet_long_fifo.sv +2 -0
- data/lib/axi/AXI_stream/parse_big_field_table_verb.sv +5 -3
- data/lib/axi/common/common_ram_sim_wrapper.sv +1 -1
- data/lib/axi/common/common_ram_wrapper.sv +1 -1
- data/lib/axi/common/test_write_mem.sv +1 -1
- data/lib/axi/data_interface/data_inf_c/data_c_pipe_sync_seam.sv +13 -13
- data/lib/axi/data_interface/data_inf_c/data_c_sim_master_model.sv +14 -11
- data/lib/axi/platform_ip/fifo_36kb_long.sv +1 -1
- data/lib/axi/platform_ip/long_fifo_verb.sv +1 -1
- data/lib/axi/platform_ip/wide_fifo.sv +1 -1
- data/lib/axi/platform_ip/xilinx_fifo_verb.sv +1 -1
- data/lib/axi/platform_ip/xilinx_fifo_verc.sv +2 -1
- data/lib/axi/techbench/tb_axi_stream_split_channel.rb +2 -1
- data/lib/axi/techbench/tb_axi_stream_split_channel.sv +46 -45
- data/lib/axi_tdl.rb +31 -1
- data/lib/axi_tdl/version.rb +1 -1
- data/lib/public_atom_module/CheckPClock.sv +53 -0
- data/lib/public_atom_module/LICENSE.md +674 -0
- data/lib/public_atom_module/altera_xilinx_always_block_sw.rb +57 -0
- data/lib/public_atom_module/bits_decode.sv +71 -0
- data/lib/public_atom_module/bits_decode_verb.sv +71 -0
- data/lib/public_atom_module/bits_decode_verb_sdl.rb +24 -0
- data/lib/public_atom_module/broaden.v +43 -0
- data/lib/public_atom_module/broaden_and_cross_clk.v +47 -0
- data/lib/public_atom_module/ceiling.v +39 -0
- data/lib/public_atom_module/ceiling_A1.v +42 -0
- data/lib/public_atom_module/clock_rst.sv +64 -0
- data/lib/public_atom_module/cross_clk_sync.v +37 -0
- data/lib/public_atom_module/edge_generator.v +50 -0
- data/lib/public_atom_module/flooring.v +36 -0
- data/lib/public_atom_module/latch_data.v +30 -0
- data/lib/public_atom_module/latency.v +48 -0
- data/lib/public_atom_module/latency_dynamic.v +83 -0
- data/lib/public_atom_module/latency_long.v +84 -0
- data/lib/public_atom_module/latency_verb.v +52 -0
- data/lib/public_atom_module/once_event.sv +65 -0
- data/lib/public_atom_module/pipe_reg.v +93 -0
- data/lib/public_atom_module/pipe_reg_2write_ports.v +84 -0
- data/lib/public_atom_module/sim/clock_rst_verb.sv +54 -0
- data/lib/public_atom_module/sim/clock_rst_verc.sv +69 -0
- data/lib/public_atom_module/sim/latency_long_tb.sv +49 -0
- data/lib/public_atom_module/sim/latency_long_tb.sv.bak +49 -0
- data/lib/public_atom_module/sim_system_pkg.sv +4 -0
- data/lib/public_atom_module/synth_system_pkg.sv +4 -0
- data/lib/tdl/Logic/logic_edge.rb +1 -1
- data/lib/tdl/auto_script/autogensdl.rb +2 -3
- data/lib/tdl/auto_script/import_hdl.rb +40 -5
- data/lib/tdl/axi4/axi4_interconnect_verb.rb +47 -10
- data/lib/tdl/class_hdl/hdl_always_comb.rb +4 -1
- data/lib/tdl/class_hdl/hdl_always_ff.rb +3 -3
- data/lib/tdl/class_hdl/hdl_assign.rb +7 -1
- data/lib/tdl/class_hdl/hdl_block_ifelse.rb +7 -7
- data/lib/tdl/class_hdl/hdl_foreach.rb +2 -2
- data/lib/tdl/class_hdl/hdl_function.rb +4 -4
- data/lib/tdl/class_hdl/hdl_generate.rb +5 -2
- data/lib/tdl/class_hdl/hdl_initial.rb +25 -3
- data/lib/tdl/class_hdl/hdl_module_def.rb +9 -6
- data/lib/tdl/class_hdl/hdl_package.rb +45 -0
- data/lib/tdl/class_hdl/hdl_redefine_opertor.rb +99 -27
- data/lib/tdl/class_hdl/hdl_struct.rb +2 -2
- data/lib/tdl/elements/Reset.rb +5 -9
- data/lib/tdl/elements/clock.rb +5 -9
- data/lib/tdl/elements/data_inf.rb +0 -17
- data/lib/tdl/elements/logic.rb +9 -31
- data/lib/tdl/elements/mail_box.rb +6 -1
- data/lib/tdl/elements/originclass.rb +17 -47
- data/lib/tdl/elements/parameter.rb +5 -6
- data/lib/tdl/examples/11_test_unit/dve.tcl +6 -153
- data/lib/tdl/examples/11_test_unit/exp_test_unit.sv +2 -2
- data/lib/tdl/examples/11_test_unit/exp_test_unit_sim.sv +9 -0
- data/lib/tdl/examples/11_test_unit/modules/sub_md0.sv +2 -2
- data/lib/tdl/examples/11_test_unit/modules/sub_md1.sv +2 -2
- data/lib/tdl/examples/11_test_unit/tb_exp_test_unit.sv +1 -1
- data/lib/tdl/examples/11_test_unit/tb_exp_test_unit_sim.sv +41 -0
- data/lib/tdl/examples/11_test_unit/tu0.sv +2 -1
- data/lib/tdl/examples/1_define_module/exmple_md.sv +1 -1
- data/lib/tdl/examples/2_hdl_class/tmp/always_comb_test.sv +3 -3
- data/lib/tdl/examples/2_hdl_class/tmp/always_ff_test.sv +3 -3
- data/lib/tdl/examples/2_hdl_class/tmp/case_test.sv +3 -3
- data/lib/tdl/examples/2_hdl_class/tmp/module_instance_test.sv +1 -1
- data/lib/tdl/examples/2_hdl_class/tmp/simple_assign_test.sv +3 -3
- data/lib/tdl/examples/2_hdl_class/tmp/state_case_test.sv +3 -3
- data/lib/tdl/examples/2_hdl_class/tmp/test_inst_sugar.sv +1 -1
- data/lib/tdl/examples/2_hdl_class/tmp/test_module.sv +3 -3
- data/lib/tdl/examples/2_hdl_class/tmp/test_module_port.sv +2 -2
- data/lib/tdl/examples/2_hdl_class/tmp/test_module_var.sv +7 -7
- data/lib/tdl/examples/2_hdl_class/tmp/test_package.sv +4 -3
- data/lib/tdl/examples/2_hdl_class/tmp/test_vcs_string.sv +1 -1
- data/lib/tdl/examples/3_hdl_sdl_instance/main_md.sv +2 -2
- data/lib/tdl/examples/3_hdl_sdl_instance/sdl_md.sv +1 -1
- data/lib/tdl/examples/6_module_with_interface/example_interface.sv +8 -8
- data/lib/tdl/examples/6_module_with_interface/inf_collect.sv +9 -9
- data/lib/tdl/examples/7_module_with_package/body_package.sv +4 -3
- data/lib/tdl/examples/7_module_with_package/example_pkg.sv +1 -1
- data/lib/tdl/examples/7_module_with_package/head_package.sv +4 -3
- data/lib/tdl/examples/8_top_module/dve.tcl +6 -0
- data/lib/tdl/examples/8_top_module/tb_test_top.sv +1 -1
- data/lib/tdl/examples/8_top_module/tb_test_top_sim.sv +29 -0
- data/lib/tdl/examples/8_top_module/test_top.sv +1 -1
- data/lib/tdl/examples/8_top_module/test_top_sim.sv +9 -0
- data/lib/tdl/examples/9_itegration/clock_manage/test_clock_bb.sv +2 -1
- data/lib/tdl/examples/9_itegration/dve.tcl +155 -2
- data/lib/tdl/examples/9_itegration/tb_test_tttop.sv +1 -1
- data/lib/tdl/examples/9_itegration/tb_test_tttop_sim.sv +1 -1
- data/lib/tdl/examples/9_itegration/test_tttop.sv +7 -38
- data/lib/tdl/examples/9_itegration/test_tttop_sim.sv +38 -7
- data/lib/tdl/exlib/axis_verify.rb +4 -3
- data/lib/tdl/exlib/constraints_verb.rb +1 -0
- data/lib/tdl/exlib/itegration_verb.rb +47 -41
- data/lib/tdl/rebuild_ele/ele_base.rb +15 -10
- data/lib/tdl/sdlmodule/sdlmodule.rb +117 -51
- data/lib/tdl/sdlmodule/sdlmodule_arraychain.rb +1 -1
- data/lib/tdl/sdlmodule/sdlmodule_draw.rb +2 -2
- data/lib/tdl/sdlmodule/sdlmodule_instance.rb +3 -0
- data/lib/tdl/sdlmodule/sdlmodule_port_define.rb +6 -6
- data/lib/tdl/sdlmodule/sdlmodule_varible.rb +6 -6
- data/lib/tdl/sdlmodule/test_unit_module.rb +6 -0
- data/lib/tdl/sdlmodule/top_module.rb +4 -0
- data/lib/tdl/tdl.rb +1 -11
- data/lib/tdl/tdlerror/tdlerror.rb +1 -1
- metadata +43 -5
- data/CODE_OF_CONDUCT.md +0 -74
- data/lib/axi/AXI_stream/axis_length_split_writh_user.sv +0 -87
@@ -88,7 +88,7 @@ module TdlSpace
|
|
88
88
|
dimension = []
|
89
89
|
end
|
90
90
|
name = to_inp(name)
|
91
|
-
belong_to_module.Def.logic(name: name,dsize: @chain.last || 1,dimension: dimension,type: @type || 'logic')
|
91
|
+
rel = belong_to_module.Def.logic(name: name,dsize: @chain.last || 1,dimension: dimension,type: @type || 'logic')
|
92
92
|
end
|
93
93
|
|
94
94
|
def wire
|
@@ -52,12 +52,12 @@ class SdlModule
|
|
52
52
|
pre_inst_stack_call
|
53
53
|
@out_sv_path ||= '..\..\tdl\test_sdlmodule'
|
54
54
|
if File.exist?(File.join(@out_sv_path,"#{module_name}.sv"))
|
55
|
-
old_str = File.open(File.join(@out_sv_path,"#{module_name}.sv")).read.
|
55
|
+
old_str = File.open(File.join(@out_sv_path,"#{module_name}.sv")).read.sub(/\/\*.*?\*\//m,"").gsub(/\/\/.*/,"").sub(/^`timescale .*/,"").strip
|
56
56
|
|
57
57
|
|
58
58
|
head_str,body_str = build_module_verb(ex_param:ex_param,ex_port:ex_port,ex_up_code:ex_up_code,ex_down_code:ex_down_code)
|
59
59
|
new_str = head_str+body_str
|
60
|
-
if body_str.gsub(
|
60
|
+
if body_str.gsub(/\/\/.*/,"").strip != old_str
|
61
61
|
File.open(File.join(@out_sv_path,"#{module_name}.sv"),"w") do |f|
|
62
62
|
f.print new_str
|
63
63
|
end
|
@@ -448,6 +448,9 @@ class SdlModule
|
|
448
448
|
# @ports = (@port_clocks + @port_resets + @port_logics + @port_datainfs + @port_datainf_c_s + @port_videoinfs + @port_axisinfs + @port_axi4infs + @port_axilinfs)
|
449
449
|
@instance_cnt ||= 0
|
450
450
|
inst_p = SdlInst.new(origin:self,name:name)
|
451
|
+
|
452
|
+
@instances ||= []
|
453
|
+
@instances << inst_p
|
451
454
|
|
452
455
|
@port_params.each do |k,v|
|
453
456
|
inst_p.inst_param_hash[k.to_s] = nil
|
@@ -65,7 +65,7 @@ class SdlModule
|
|
65
65
|
if value.is_a? Float
|
66
66
|
type = :real
|
67
67
|
end
|
68
|
-
tmp = Parameter.new(name:name.to_s,value:value,port:true,type:type,show:show)
|
68
|
+
tmp = Parameter.new(name:name.to_s,value:value,port:true,type:type,show:show, belong_to_module: self)
|
69
69
|
add_to_new_module("@port_params",tmp)
|
70
70
|
add_method_to_itgt(name,tmp)
|
71
71
|
tmp
|
@@ -87,7 +87,7 @@ class SdlModule
|
|
87
87
|
# tmp
|
88
88
|
# end
|
89
89
|
ClassHDL::AssignDefOpertor.with_rollback_opertors(:old) do
|
90
|
-
tmp = Logic.new(name:name,dsize:dsize,port:"input",dimension:dimension)
|
90
|
+
tmp = Logic.new(name:name,dsize:dsize,port:"input",dimension:dimension, belong_to_module: self)
|
91
91
|
add_to_new_module("@port_logics",tmp)
|
92
92
|
add_method_to_itgt(name,tmp)
|
93
93
|
tmp
|
@@ -109,7 +109,7 @@ class SdlModule
|
|
109
109
|
# tmp
|
110
110
|
# end
|
111
111
|
ClassHDL::AssignDefOpertor.with_rollback_opertors(:old) do
|
112
|
-
tmp = Logic.new(name:name,dsize:dsize,port:"output",dimension:dimension,type: 'logic')
|
112
|
+
tmp = Logic.new(name:name,dsize:dsize,port:"output",dimension:dimension,type: 'logic', belong_to_module: self)
|
113
113
|
add_to_new_module("@port_logics",tmp)
|
114
114
|
|
115
115
|
if block_given?
|
@@ -136,7 +136,7 @@ class SdlModule
|
|
136
136
|
# tmp
|
137
137
|
# end
|
138
138
|
ClassHDL::AssignDefOpertor.with_rollback_opertors(:old) do
|
139
|
-
tmp = Logic.new(name:name,dsize:dsize,port:"inout",dimension:dimension,type: '' )
|
139
|
+
tmp = Logic.new(name:name,dsize:dsize,port:"inout",dimension:dimension,type: '' , belong_to_module: self)
|
140
140
|
add_to_new_module("@port_logics",tmp)
|
141
141
|
|
142
142
|
if block_given?
|
@@ -150,7 +150,7 @@ class SdlModule
|
|
150
150
|
def Clock(name,freqM:100,port: :input,pin:[],iostd:[],dsize:1,pin_prop:nil)
|
151
151
|
port_name_chk(name)
|
152
152
|
pin,iostd = parse_pin_prop(pin_prop) if pin_prop
|
153
|
-
a = Clock.new(name:name,freqM:freqM,port:port,dsize:dsize)
|
153
|
+
a = Clock.new(name:name,freqM:freqM,port:port,dsize:dsize, belong_to_module: self)
|
154
154
|
add_to_new_module("@port_clocks",a)
|
155
155
|
|
156
156
|
if block_given?
|
@@ -164,7 +164,7 @@ class SdlModule
|
|
164
164
|
def Reset(name,port: :input,active:"low",pin:[],iostd:[],dsize:1,pin_prop:nil)
|
165
165
|
port_name_chk(name)
|
166
166
|
pin,iostd = parse_pin_prop(pin_prop) if pin_prop
|
167
|
-
a = Reset.new(name:name,active:active.to_s.downcase,port:port,dsize:dsize)
|
167
|
+
a = Reset.new(name:name,active:active.to_s.downcase,port:port,dsize:dsize, belong_to_module: self)
|
168
168
|
add_to_new_module("@port_resets",a)
|
169
169
|
# define_method(name){ a }
|
170
170
|
add_method_to_itgt(name,a)
|
@@ -13,25 +13,25 @@ class DefXp
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def logic(name:"tmp",dsize:1,port:false,default:nil,msb_high:true,dimension:[],type:"logic",&block)
|
16
|
-
lg = Logic.new(name:name,dsize:dsize,port:port,default:default,msb_high:msb_high,dimension:dimension,type:type)
|
16
|
+
lg = Logic.new(name:name,dsize:dsize,port:port,default:default,msb_high:msb_high,dimension:dimension,type:type, belong_to_module: @sdlmodule)
|
17
17
|
var_common(lg,&block)
|
18
18
|
add_method_to_itgt(name,lg)
|
19
19
|
end
|
20
20
|
|
21
21
|
def clock(name:"",freqM:100,dsize:1,&block)
|
22
|
-
a = Clock.new(name:name,freqM:freqM,dsize:dsize)
|
22
|
+
a = Clock.new(name:name,freqM:freqM,dsize:dsize, belong_to_module: @sdlmodule)
|
23
23
|
var_common(a,&block)
|
24
24
|
add_method_to_itgt(name,a)
|
25
25
|
end
|
26
26
|
|
27
27
|
def reset(name:"",active:"low",dsize:1,&block)
|
28
|
-
a = Reset.new(name:name,active:active,dsize:dsize)
|
28
|
+
a = Reset.new(name:name,active:active,dsize:dsize, belong_to_module: @sdlmodule)
|
29
29
|
var_common(a,&block)
|
30
30
|
add_method_to_itgt(name,a)
|
31
31
|
end
|
32
32
|
|
33
33
|
def parameter(name:"P",value:100,local:false,type:nil,&block)
|
34
|
-
a = Parameter.new(name:name,value:value,local:local,port:false,show:true,type:type)
|
34
|
+
a = Parameter.new(name:name,value:value,local:local,port:false,show:true,type:type, belong_to_module: @sdlmodule)
|
35
35
|
var_common(a,&block)
|
36
36
|
add_method_to_itgt(name,a)
|
37
37
|
end
|
@@ -77,12 +77,12 @@ class DefXp
|
|
77
77
|
# end
|
78
78
|
|
79
79
|
def mailbox(name:'mbox',depth:100,&block)
|
80
|
-
a = MailBox.new(name:name,depth:depth)
|
80
|
+
a = MailBox.new(name:name,depth:depth, belong_to_module: @sdlmodule)
|
81
81
|
var_common(a,&block)
|
82
82
|
end
|
83
83
|
|
84
84
|
def debuglogic(name:"tmp",dsize:1,port:false,default:nil,msb_high:true,dimension:[],type:"logic",&block)
|
85
|
-
lg = DebugLogic.new(name:name,dsize:dsize,port:port,default:default,msb_high:msb_high,dimension:dimension,type:type)
|
85
|
+
lg = DebugLogic.new(name:name,dsize:dsize,port:port,default:default,msb_high:msb_high,dimension:dimension,type:type, belong_to_module: @sdlmodule)
|
86
86
|
var_common(lg,&block)
|
87
87
|
add_method_to_itgt(name,lg)
|
88
88
|
end
|
@@ -43,6 +43,8 @@ class SdlModule
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def gen_dev_wave_tcl ## 返回一个[]
|
46
|
+
return ['','',''] unless TopModule.sim
|
47
|
+
|
46
48
|
dve_tcl_hash = {}
|
47
49
|
track_signals_hash.each do |flag, base_ele_bhash|
|
48
50
|
base_elms = []
|
@@ -50,6 +52,7 @@ class SdlModule
|
|
50
52
|
intf_elms_name = []
|
51
53
|
base_ele_bhash.each do |ele, sub_filter_block|
|
52
54
|
_ref_paths = ele.path_refs(&@__track_filter_block__)
|
55
|
+
_ref_paths.uniq!
|
53
56
|
|
54
57
|
if sub_filter_block
|
55
58
|
_ref_paths = _ref_paths.select do |e|
|
@@ -143,6 +146,8 @@ class SdlModule
|
|
143
146
|
|
144
147
|
sub_hash.each do |ele, sub_filter_block|
|
145
148
|
_root_refs = ele.path_refs(&filter_block)
|
149
|
+
_root_refs.uniq!
|
150
|
+
|
146
151
|
if sub_filter_block
|
147
152
|
_root_refs.select! do |e| sub_filter_block.call(e) end
|
148
153
|
end
|
@@ -210,6 +215,7 @@ class TestUnitModule < SdlModule ##TestUnitModule 是在编译完 TopModule TB
|
|
210
215
|
to_down_pass <= 1.b0
|
211
216
|
initial_exec("wait(from_up_pass)")
|
212
217
|
initial_exec("$root.#{TopModule.current.techbench.module_name}.test_unit_region = \"#{module_name}\"")
|
218
|
+
initial_exec("$display(\"--------------- Current test_unit <%0s> --------------------\", \"#{module_name}\")")
|
213
219
|
block.call ## collect __root_ref_eles__ at here
|
214
220
|
to_down_pass <= 1.b1
|
215
221
|
end
|
@@ -340,6 +340,7 @@ endmodule\n"
|
|
340
340
|
end
|
341
341
|
|
342
342
|
define_global("sim",nil)
|
343
|
+
define_global("itgt_implicit_reject",nil)
|
343
344
|
|
344
345
|
end
|
345
346
|
## 添加 itegration verb
|
@@ -437,6 +438,9 @@ class TopModule
|
|
437
438
|
SdlModule.gen_dev_wave_tcl File.join(sdlm.vcs_path,"dve.tcl")
|
438
439
|
end
|
439
440
|
sdlm.create_xdc
|
441
|
+
|
442
|
+
## 全局contain_hdl 引入到 TopModule
|
443
|
+
sdlm.contain_hdl(*$__contain_hdl__)
|
440
444
|
else
|
441
445
|
sdlm.origin_sv = true
|
442
446
|
end
|
data/lib/tdl/tdl.rb
CHANGED
@@ -138,7 +138,7 @@ require_relative "./exlib/logic_verify.rb"
|
|
138
138
|
$argvs_hash = {}
|
139
139
|
$argvs_hash = Parser.parse($TdlARGV || ARGV)
|
140
140
|
TopModule.sim = $argvs_hash[:sim]
|
141
|
-
|
141
|
+
TopModule.itgt_implicit_reject = $argvs_hash[:itgt_implicit_reject]
|
142
142
|
class Tdl
|
143
143
|
|
144
144
|
def self.comment(c="-",info="_____")
|
@@ -271,16 +271,6 @@ class Tdl
|
|
271
271
|
puts(pagination("SUMMARY"))
|
272
272
|
puts "#{TopModule.sim ? 'SIM' : 'SYNTH'} RUN SPEND #{Time.now - $__start_time__} sec @ TIME : #{Time.now}"
|
273
273
|
|
274
|
-
## -----------
|
275
|
-
# TopModule.current.ref_modules.uniq.each do |e|
|
276
|
-
# unless e.is_a? ClassHDL::ClearSdlModule
|
277
|
-
# puts "#{e.real_sv_path}: #{e.module_name}"
|
278
|
-
# end
|
279
|
-
# end
|
280
|
-
## ===========
|
281
|
-
# File.open("/home/myw357/work/FPGA/mammo_tcp_20210315/tmp.tcl", "w") do |f|
|
282
|
-
# f.puts SdlModule.call_module('test_mac_1g_verb').gen_dev_wave_tcl
|
283
|
-
# end
|
284
274
|
end
|
285
275
|
|
286
276
|
end
|
@@ -4,6 +4,6 @@ class TdlError < ScriptError
|
|
4
4
|
head_str0 = String.new("\n+_____________________________________________+\n")
|
5
5
|
head_str1 = "\n|----------------TDL ERROR--------------------|\n"
|
6
6
|
end_str0 = "\n+================TDL ERROR====================+\n"
|
7
|
-
super(head_str0.concat(head_str1).concat(arge.to_s[0,255]
|
7
|
+
super(head_str0.concat(head_str1).concat(arge.to_s[0,255]).concat(end_str0))
|
8
8
|
end
|
9
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axi_tdl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cook.Darwin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -64,7 +64,6 @@ files:
|
|
64
64
|
- ".github/workflows/ruby.yml"
|
65
65
|
- ".gitignore"
|
66
66
|
- ".travis.yml"
|
67
|
-
- CODE_OF_CONDUCT.md
|
68
67
|
- Gemfile
|
69
68
|
- LICENSE
|
70
69
|
- README.EN.md
|
@@ -209,6 +208,7 @@ files:
|
|
209
208
|
- lib/axi/AXI_stream/axi_stream_partition_A1.sv
|
210
209
|
- lib/axi/AXI_stream/axi_stream_planer.sv
|
211
210
|
- lib/axi/AXI_stream/axi_stream_split_channel.rb
|
211
|
+
- lib/axi/AXI_stream/axi_stream_split_channel.sv
|
212
212
|
- lib/axi/AXI_stream/axi_streams_combin.sv
|
213
213
|
- lib/axi/AXI_stream/axi_streams_combin_A1.sv
|
214
214
|
- lib/axi/AXI_stream/axi_streams_scaler.sv
|
@@ -230,8 +230,10 @@ files:
|
|
230
230
|
- lib/axi/AXI_stream/axis_head_cut.sv
|
231
231
|
- lib/axi/AXI_stream/axis_head_cut_verb.sv
|
232
232
|
- lib/axi/AXI_stream/axis_head_cut_verc.rb
|
233
|
+
- lib/axi/AXI_stream/axis_head_cut_verc.sv
|
233
234
|
- lib/axi/AXI_stream/axis_inct_s2m_with_flag.sv
|
234
235
|
- lib/axi/AXI_stream/axis_insert_copy.rb
|
236
|
+
- lib/axi/AXI_stream/axis_insert_copy.sv
|
235
237
|
- lib/axi/AXI_stream/axis_intc_M2S_with_addr_inf.sv
|
236
238
|
- lib/axi/AXI_stream/axis_intc_S2M_with_addr_inf.sv
|
237
239
|
- lib/axi/AXI_stream/axis_interconnect_S2M_pipe.sv
|
@@ -240,18 +242,20 @@ files:
|
|
240
242
|
- lib/axi/AXI_stream/axis_length_split.sv
|
241
243
|
- lib/axi/AXI_stream/axis_length_split_with_addr.sv
|
242
244
|
- lib/axi/AXI_stream/axis_length_split_with_user.sv
|
243
|
-
- lib/axi/AXI_stream/axis_length_split_writh_user.sv
|
244
245
|
- lib/axi/AXI_stream/axis_link_trigger.sv
|
245
246
|
- lib/axi/AXI_stream/axis_master_empty.sv
|
246
247
|
- lib/axi/AXI_stream/axis_mirror_to_master.sv
|
247
248
|
- lib/axi/AXI_stream/axis_mirrors.sv
|
248
249
|
- lib/axi/AXI_stream/axis_orthogonal.sv
|
249
250
|
- lib/axi/AXI_stream/axis_pipe_sync_seam.rb
|
251
|
+
- lib/axi/AXI_stream/axis_pipe_sync_seam.sv
|
250
252
|
- lib/axi/AXI_stream/axis_ram_buffer.sv
|
251
253
|
- lib/axi/AXI_stream/axis_rom_contect.rb
|
252
254
|
- lib/axi/AXI_stream/axis_rom_contect.sv
|
253
255
|
- lib/axi/AXI_stream/axis_rom_contect_sim.rb
|
256
|
+
- lib/axi/AXI_stream/axis_rom_contect_sim.sv
|
254
257
|
- lib/axi/AXI_stream/axis_sim_master_model.rb
|
258
|
+
- lib/axi/AXI_stream/axis_sim_master_model.sv
|
255
259
|
- lib/axi/AXI_stream/axis_sim_slaver_model.rb
|
256
260
|
- lib/axi/AXI_stream/axis_sim_verify_by_coe.sv
|
257
261
|
- lib/axi/AXI_stream/axis_slaver_empty.sv
|
@@ -259,6 +263,7 @@ files:
|
|
259
263
|
- lib/axi/AXI_stream/axis_slaver_pipe_A1.sv
|
260
264
|
- lib/axi/AXI_stream/axis_slaver_vector_empty.sv
|
261
265
|
- lib/axi/AXI_stream/axis_split_channel_verb.rb
|
266
|
+
- lib/axi/AXI_stream/axis_split_channel_verb.sv
|
262
267
|
- lib/axi/AXI_stream/axis_to_axi4_or_lite.rb
|
263
268
|
- lib/axi/AXI_stream/axis_to_axi4_or_lite.sv
|
264
269
|
- lib/axi/AXI_stream/axis_to_data_inf.sv
|
@@ -281,6 +286,7 @@ files:
|
|
281
286
|
- lib/axi/AXI_stream/data_width/axis_width_combin.sv
|
282
287
|
- lib/axi/AXI_stream/data_width/axis_width_combin_A1.sv
|
283
288
|
- lib/axi/AXI_stream/data_width/axis_width_convert.sv
|
289
|
+
- lib/axi/AXI_stream/data_width/axis_width_convert_verb.sv
|
284
290
|
- lib/axi/AXI_stream/data_width/axis_width_destruct.sv
|
285
291
|
- lib/axi/AXI_stream/data_width/axis_width_destruct_A1.sv
|
286
292
|
- lib/axi/AXI_stream/ex_status/axis_ex_status.sv
|
@@ -547,6 +553,34 @@ files:
|
|
547
553
|
- lib/axi/video_interface/video_interface.sv
|
548
554
|
- lib/axi_tdl.rb
|
549
555
|
- lib/axi_tdl/version.rb
|
556
|
+
- lib/public_atom_module/CheckPClock.sv
|
557
|
+
- lib/public_atom_module/LICENSE.md
|
558
|
+
- lib/public_atom_module/altera_xilinx_always_block_sw.rb
|
559
|
+
- lib/public_atom_module/bits_decode.sv
|
560
|
+
- lib/public_atom_module/bits_decode_verb.sv
|
561
|
+
- lib/public_atom_module/bits_decode_verb_sdl.rb
|
562
|
+
- lib/public_atom_module/broaden.v
|
563
|
+
- lib/public_atom_module/broaden_and_cross_clk.v
|
564
|
+
- lib/public_atom_module/ceiling.v
|
565
|
+
- lib/public_atom_module/ceiling_A1.v
|
566
|
+
- lib/public_atom_module/clock_rst.sv
|
567
|
+
- lib/public_atom_module/cross_clk_sync.v
|
568
|
+
- lib/public_atom_module/edge_generator.v
|
569
|
+
- lib/public_atom_module/flooring.v
|
570
|
+
- lib/public_atom_module/latch_data.v
|
571
|
+
- lib/public_atom_module/latency.v
|
572
|
+
- lib/public_atom_module/latency_dynamic.v
|
573
|
+
- lib/public_atom_module/latency_long.v
|
574
|
+
- lib/public_atom_module/latency_verb.v
|
575
|
+
- lib/public_atom_module/once_event.sv
|
576
|
+
- lib/public_atom_module/pipe_reg.v
|
577
|
+
- lib/public_atom_module/pipe_reg_2write_ports.v
|
578
|
+
- lib/public_atom_module/sim/clock_rst_verb.sv
|
579
|
+
- lib/public_atom_module/sim/clock_rst_verc.sv
|
580
|
+
- lib/public_atom_module/sim/latency_long_tb.sv
|
581
|
+
- lib/public_atom_module/sim/latency_long_tb.sv.bak
|
582
|
+
- lib/public_atom_module/sim_system_pkg.sv
|
583
|
+
- lib/public_atom_module/synth_system_pkg.sv
|
550
584
|
- lib/spec/spec_helper.rb
|
551
585
|
- lib/tdl/LICENSE
|
552
586
|
- lib/tdl/Logic/Logic.tar.gz
|
@@ -1120,11 +1154,13 @@ files:
|
|
1120
1154
|
- lib/tdl/examples/11_test_unit/exp_test_unit.rb
|
1121
1155
|
- lib/tdl/examples/11_test_unit/exp_test_unit.sv
|
1122
1156
|
- lib/tdl/examples/11_test_unit/exp_test_unit_constraints.xdc
|
1157
|
+
- lib/tdl/examples/11_test_unit/exp_test_unit_sim.sv
|
1123
1158
|
- lib/tdl/examples/11_test_unit/modules/sub_md0.rb
|
1124
1159
|
- lib/tdl/examples/11_test_unit/modules/sub_md0.sv
|
1125
1160
|
- lib/tdl/examples/11_test_unit/modules/sub_md1.rb
|
1126
1161
|
- lib/tdl/examples/11_test_unit/modules/sub_md1.sv
|
1127
1162
|
- lib/tdl/examples/11_test_unit/tb_exp_test_unit.sv
|
1163
|
+
- lib/tdl/examples/11_test_unit/tb_exp_test_unit_sim.sv
|
1128
1164
|
- lib/tdl/examples/11_test_unit/tu0.sv
|
1129
1165
|
- lib/tdl/examples/11_test_unit/tu1.sv
|
1130
1166
|
- lib/tdl/examples/1_define_module/example1.rb
|
@@ -1196,8 +1232,10 @@ files:
|
|
1196
1232
|
- lib/tdl/examples/8_top_module/example.rb
|
1197
1233
|
- lib/tdl/examples/8_top_module/pins.yml
|
1198
1234
|
- lib/tdl/examples/8_top_module/tb_test_top.sv
|
1235
|
+
- lib/tdl/examples/8_top_module/tb_test_top_sim.sv
|
1199
1236
|
- lib/tdl/examples/8_top_module/test_top.sv
|
1200
1237
|
- lib/tdl/examples/8_top_module/test_top_constraints.xdc
|
1238
|
+
- lib/tdl/examples/8_top_module/test_top_sim.sv
|
1201
1239
|
- lib/tdl/examples/9_itegration/A_itgt/a_test_md.sv
|
1202
1240
|
- lib/tdl/examples/9_itegration/A_itgt/a_test_module.rb
|
1203
1241
|
- lib/tdl/examples/9_itegration/A_itgt/itgt_module_a_block.rb
|
@@ -1293,7 +1331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1293
1331
|
- !ruby/object:Gem::Version
|
1294
1332
|
version: '0'
|
1295
1333
|
requirements: []
|
1296
|
-
rubygems_version: 3.0.3
|
1334
|
+
rubygems_version: 3.0.3.1
|
1297
1335
|
signing_key:
|
1298
1336
|
specification_version: 4
|
1299
1337
|
summary: Axi 是一个轻量级的AXI4库. Tdl 是一种硬件构造语言
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at cook_darwin@hotmail.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
@@ -1,87 +0,0 @@
|
|
1
|
-
/**********************************************
|
2
|
-
______________ ______________
|
3
|
-
______________ X ______________
|
4
|
-
______________ ______________
|
5
|
-
|
6
|
-
descript:
|
7
|
-
author : Cook.Darwin
|
8
|
-
Version: VERA.0.X 2018/1/25
|
9
|
-
use axis_user to detect last
|
10
|
-
creaded: 2017/5/19
|
11
|
-
madified:
|
12
|
-
***********************************************/
|
13
|
-
`timescale 1ns/1ps
|
14
|
-
(* axi_stream = "true" *)
|
15
|
-
module axis_length_split_with_user (
|
16
|
-
input [31:0] length, ////[0] mean 0 len
|
17
|
-
(* up_stream = "true" *)
|
18
|
-
axi_stream_inf.slaver axis_in,
|
19
|
-
(* down_stream = "true" *)
|
20
|
-
axi_stream_inf.master axis_out
|
21
|
-
);
|
22
|
-
|
23
|
-
wire clock,rst_n,clken;
|
24
|
-
|
25
|
-
assign clock = axis_in.aclk;
|
26
|
-
assign rst_n = axis_in.aresetn;
|
27
|
-
assign clken = axis_in.aclken;
|
28
|
-
|
29
|
-
axi_stream_inf #(.DSIZE(axis_in.DSIZE)) axis_pre (.aclk(clock),.aresetn(rst_n),.aclken(clken));
|
30
|
-
|
31
|
-
|
32
|
-
logic [31:0] cnt;
|
33
|
-
|
34
|
-
always@(posedge clock,negedge rst_n)
|
35
|
-
if(~rst_n) cnt <= '0;
|
36
|
-
else begin
|
37
|
-
if(axis_in.axis_tvalid && axis_in.axis_tready && axis_in.axis_tlast)
|
38
|
-
cnt <= '0;
|
39
|
-
else if(axis_in.axis_tvalid && axis_in.axis_tready && (cnt >= (length-1)))
|
40
|
-
cnt <= '0;
|
41
|
-
else if(axis_in.axis_tvalid && axis_in.axis_tready)
|
42
|
-
cnt <= cnt + 1'b1;
|
43
|
-
else cnt <= cnt;
|
44
|
-
end
|
45
|
-
|
46
|
-
logic new_last;
|
47
|
-
|
48
|
-
always@(posedge clock,negedge rst_n)
|
49
|
-
if(~rst_n) new_last <= 1'b0;
|
50
|
-
else begin
|
51
|
-
if(axis_in.axis_tvalid && axis_in.axis_tready && (new_last||axis_in.axis_tlast))
|
52
|
-
new_last <= 1'b0;
|
53
|
-
else if(axis_in.axis_tvalid && axis_in.axis_tready && cnt==(length-2))
|
54
|
-
new_last <= 1'b1;
|
55
|
-
else new_last <= new_last;
|
56
|
-
end
|
57
|
-
|
58
|
-
// logic mark_tail;
|
59
|
-
//
|
60
|
-
// always@(posedge clock,negedge rst_n)
|
61
|
-
// if(~rst_n) mark_tail <= 1'b0;
|
62
|
-
// else begin
|
63
|
-
// if(axis_in.axis_tvalid && axis_in.axis_tready && axis_in.axis_tlast)
|
64
|
-
// mark_tail <= 1'b0;
|
65
|
-
// else if(axis_in.axis_tvalid && axis_in.axis_tready && axis_in.axis_tcnt==(length-1))
|
66
|
-
// mark_tail <= 1'b1;
|
67
|
-
// else mark_tail <= mark_tail;
|
68
|
-
// end
|
69
|
-
|
70
|
-
assign axis_pre.axis_tvalid = axis_in.axis_tvalid;
|
71
|
-
assign axis_pre.axis_tdata = axis_in.axis_tdata;
|
72
|
-
assign axis_pre.axis_tlast = new_last || axis_in.axis_tlast;
|
73
|
-
assign axis_pre.axis_tkeep = axis_in.axis_tkeep;
|
74
|
-
// assign axis_pre.axis_tuser = axis_in.axis_tuser;
|
75
|
-
assign axis_pre.axis_tuser = axis_in.axis_tlast;
|
76
|
-
assign axis_in.axis_tready = axis_pre.axis_tready;
|
77
|
-
|
78
|
-
axis_connect_pipe axis_connect_pipe_inst(
|
79
|
-
/* axi_stream_inf.slaver */ .axis_in (axis_pre ),
|
80
|
-
/* axi_stream_inf.master */ .axis_out (axis_out )
|
81
|
-
);
|
82
|
-
|
83
|
-
int out_cnt;
|
84
|
-
|
85
|
-
assign out_cnt = axis_out.axis_tcnt;
|
86
|
-
|
87
|
-
endmodule
|