Class: DataInf_C
- Inherits:
-
TdlSpace::TdlBaseInterface
- Object
- AxiTdl::SdlModuleActiveBaseElm
- TdlSpace::TdlBaseInterface
- DataInf_C
- Extended by:
- BaseFunc
- Includes:
- BaseModule
- Defined in:
- lib/tdl/elements/data_inf.rb,
lib/tdl/elements/data_inf.rb,
lib/tdl/elements/data_inf.rb,
lib/tdl/elements/data_inf.rb,
lib/tdl/elements/data_inf.rb,
lib/tdl/data_inf/_data_mirrors.rb,
lib/tdl/rebuild_ele/data_inf_c.rb,
lib/tdl/data_inf/data_bind_auto.rb,
lib/tdl/data_inf/data_valve_auto.rb,
lib/tdl/data_inf/bak/_data_mirrors.rb,
lib/tdl/data_inf/data_c_cache_auto.rb,
lib/tdl/data_inf/data_mirrors_auto.rb,
lib/tdl/data_inf/bak/data_bind_auto.rb,
lib/tdl/data_inf/data_c_direct_auto.rb,
lib/tdl/data_inf/bak/data_inf_planer.rb,
lib/tdl/data_inf/bak/data_valve_auto.rb,
lib/tdl/data_inf/data_c_interconnect.rb,
lib/tdl/data_inf/data_c_pipe_inf_auto.rb,
lib/tdl/data_inf/data_uncompress_auto.rb,
lib/tdl/data_inf/bak/data_connect_pipe.rb,
lib/tdl/data_inf/bak/data_inf_ticktack.rb,
lib/tdl/data_inf/bak/data_mirrors_auto.rb,
lib/tdl/data_inf/data_c_tmp_cache_auto.rb,
lib/tdl/data_inf/bak/data_c_direct_auto.rb,
lib/tdl/data_inf/bak/data_inf_cross_clk.rb,
lib/tdl/data_inf/part_data_pair_map_auto.rb,
lib/tdl/data_inf/bak/data_uncompress_auto.rb,
lib/tdl/data_inf/bak/data_c_tmp_cache_auto.rb,
lib/tdl/data_inf/data_c_direct_mirror_auto.rb,
lib/tdl/data_inf/data_condition_valve_auto.rb,
lib/tdl/data_inf/data_mirrors_verb.sv_auto.rb,
lib/tdl/data_inf/data_c_pipe_force_vld_auto.rb,
lib/tdl/data_inf/data_condition_mirror_auto.rb,
lib/tdl/data_inf/data_connect_pipe_inf_auto.rb,
lib/tdl/data_inf/bak/data_inf_c_interconnect.rb,
lib/tdl/data_inf/bak/part_data_pair_map_auto.rb,
lib/tdl/data_inf/datainf_c_master_empty_auto.rb,
lib/tdl/data_inf/datainf_c_slaver_empty_auto.rb,
lib/tdl/axi_stream/bak/part_data_pair_map_auto.rb,
lib/tdl/data_inf/bak/data_c_direct_mirror_auto.rb,
lib/tdl/data_inf/bak/data_condition_valve_auto.rb,
lib/tdl/data_inf/bak/data_mirrors_verb.sv_auto.rb,
lib/tdl/data_inf/bak/data_condition_mirror_auto.rb,
lib/tdl/data_inf/bak/data_connect_pipe_inf_auto.rb,
lib/tdl/data_inf/data_c_pipe_intc_M2S_verc_auto.rb,
lib/tdl/data_inf/data_inf_c_pipe_condition_auto.rb,
lib/tdl/data_inf/bak/datainf_c_master_empty_auto.rb,
lib/tdl/data_inf/bak/datainf_c_slaver_empty_auto.rb,
lib/tdl/axi_stream/bak/datainf_c_master_empty_auto.rb,
lib/tdl/axi_stream/bak/datainf_c_slaver_empty_auto.rb,
lib/tdl/data_inf/bak/data_inf_c_pipe_condition_auto.rb
Overview
2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative ‘....tdltdl’
Constant Summary collapse
- Synth_REP =
parse text for autogen method and constant ###
Regexp.union(/\(\*\s+datainf_c\s*=\s*"true"\s+\*\)/, /\(\*\s+data_inf_c\s*=\s*"true"\s+\*\)/)
- PORT_REP =
/(?<up_down>\(\*\s+(?<ud_name>data_up|data_down|up_stream|down_stream)\s*=\s*"true"\s+\*\))?\s*(data_inf_c\.)(?<modport>master|slaver|mirror|out_mirror)\s+(?<name>\w+)\s*(?<vector>\[.*?\])?/m
- UP_STREAM_REP =
/data_up/
Instance Attribute Summary collapse
-
#dsize ⇒ Object
<tdl_key><hdl_key><default_value>.
-
#ghost ⇒ Object
Returns the value of attribute ghost.
-
#id ⇒ Object
Returns the value of attribute id.
-
#interconnect_mid ⇒ Object
Returns the value of attribute interconnect_mid.
-
#m2s_interconnect_addr ⇒ Object
Returns the value of attribute m2s_interconnect_addr.
-
#name ⇒ Object
Returns the value of attribute name.
-
#port ⇒ Object
Returns the value of attribute port.
Attributes inherited from TdlSpace::TdlBaseInterface
Attributes included from TdlSpace::VarElemenCore
#dimension, #inst_name, #logic_type
Class Method Summary collapse
- .data_bind(num: 2, data_in: "data_in", data_out: "data_out") ⇒ Object
- .data_c_cache(data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil, belong_to_module: nil) ⇒ Object
- .data_c_direct(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- .data_c_direct_mirror(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- .data_c_pipe_force_vld(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil, belong_to_module: nil) ⇒ Object
- .data_c_pipe_inf(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil, belong_to_module: nil) ⇒ Object
- .data_c_pipe_intc_m2s_verc(prio: "BEST_ROBIN", num: 8, last: "last", s00: "s00", m00: "m00", down_stream: nil, belong_to_module: nil) ⇒ Object
- .data_c_tmp_cache(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- .data_condition_mirror(h: 0, l: 0, condition_data: "condition_data", data_in: "data_in", data_out: "data_out", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- .data_condition_valve(h: 0, l: 0, condition_button: "condition_button", condition_data: "condition_data", data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil) ⇒ Object
- .data_connect_pipe_inf(indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
- .data_inf_c_pipe_condition(and_condition: "and_condition", indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
- .data_mirrors(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- .data_mirrors_verb(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- .data_uncompress(asize: 8, lsize: 8, data_zip: "data_zip", data_unzip: "data_unzip", up_stream: nil, down_stream: nil) ⇒ Object
- .data_valve(button: "button", data_in: "data_in", data_out: "data_out") ⇒ Object
- .datainf_c_master_empty(master: "master", down_stream: nil) ⇒ Object
- .datainf_c_slaver_empty(slaver: "slaver", up_stream: nil) ⇒ Object
- .direct(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
-
.master_empty(*ms) ⇒ Object
def self.NC GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.nc end.
- .parse_ports(port_array = nil) ⇒ Object
- .part_data_pair_map(num: 8, isize: 8, osize: 8, write_inf: "write_inf", ipart_inf: "ipart_inf", opart_inf: "opart_inf", idel_inf: "idel_inf", odel_inf: "odel_inf", oipart_inf: "oipart_inf", oopart_inf: "oopart_inf", ierr_inf: "ierr_inf", oerr_inf: "oerr_inf") ⇒ Object
- .slaver_empty(*ss) ⇒ Object
Instance Method Summary collapse
- #&(*a) ⇒ Object
- #<<(*up_streams) ⇒ Object
- #>>(down_stream) ⇒ Object
-
#[]=(a, b) ⇒ Object
def signal(index=nil) # “data_#@id_inf_c” square_str = super(index) if @port String.new(@name.to_s).concat square_str else String.new(“#@name_#@id_inf”).concat square_str end end.
- #_data_bind(num: 2, data_in: "data_in", data_out: "data_out") ⇒ Object
- #_data_bind_draw(num: 2, data_in: "data_in", data_out: "data_out") ⇒ Object
- #_data_valve(button: "button", data_in: "data_in", data_out: "data_out") ⇒ Object
- #_data_valve_draw(button: "button", data_in: "data_in", data_out: "data_out") ⇒ Object
- #_datainf_c_slaver_empty(slaver: "slaver", up_stream: nil) ⇒ Object
- #_datainf_c_slaver_empty_draw(slaver: "slaver", up_stream: nil) ⇒ Object
- #_part_data_pair_map(num: 8, isize: 8, osize: 8, write_inf: "write_inf", ipart_inf: "ipart_inf", opart_inf: "opart_inf", idel_inf: "idel_inf", odel_inf: "odel_inf", oipart_inf: "oipart_inf", oopart_inf: "oopart_inf", ierr_inf: "ierr_inf", oerr_inf: "oerr_inf") ⇒ Object
- #_part_data_pair_map_draw(num: 8, isize: 8, osize: 8, write_inf: "write_inf", ipart_inf: "ipart_inf", opart_inf: "opart_inf", idel_inf: "idel_inf", odel_inf: "odel_inf", oipart_inf: "oipart_inf", oopart_inf: "oopart_inf", ierr_inf: "ierr_inf", oerr_inf: "oerr_inf") ⇒ Object
- #array_chain_vld_rdy_inst(pre_str) ⇒ Object
- #branch(name: nil, clock: @clock, reset: @reset, dsize: @dsize, freqM: nil) ⇒ Object
-
#clock(index = nil) ⇒ Object
<tdl_key><hdl_key><default_freqM>.
- #clock_reset_taps(def_clock_name, def_reset_name) ⇒ Object
- #data_c_cache(data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil) ⇒ Object
- #data_c_direct(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- #data_c_direct_draw(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- #data_c_direct_mirror(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- #data_c_direct_mirror_draw(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- #data_c_pipe_force_vld(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- #data_c_pipe_inf(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- #data_c_pipe_intc_m2s_verc(prio: "BEST_ROBIN", num: 8, last: "last", s00: "s00", m00: "m00", down_stream: nil) ⇒ Object
- #data_c_tmp_cache(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- #data_c_tmp_cache_draw(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
- #data_condition_mirror(h: 0, l: 0, condition_data: "condition_data", data_in: "data_in", data_out: "data_out", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- #data_condition_mirror_draw(h: 0, l: 0, condition_data: "condition_data", data_in: "data_in", data_out: "data_out", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- #data_condition_valve(h: 0, l: 0, condition_button: "condition_button", condition_data: "condition_data", data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil) ⇒ Object
- #data_condition_valve_draw(h: 0, l: 0, condition_button: "condition_button", condition_data: "condition_data", data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil) ⇒ Object
- #data_connect_pipe(up_stream: nil, down_stream: nil) ⇒ Object
- #data_connect_pipe_draw(clock: nil, reset: nil, up_stream: nil, down_stream: nil) ⇒ Object
- #data_connect_pipe_inf(indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
- #data_connect_pipe_inf_draw(indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
- #data_inf_c_pipe_condition(and_condition: "and_condition", indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
- #data_inf_c_pipe_condition_draw(and_condition: "and_condition", indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
- #data_inf_cross_clk(up_stream: nil, down_stream: nil) ⇒ Object
- #data_inf_cross_clk_draw(up_stream: nil, down_stream: nil) ⇒ Object
- #data_inf_planer(latency: 3, pack_data: nil, up_stream: nil, down_stream: nil) ⇒ Object
- #data_inf_ticktack(sub_hbit: @dsize-1, sub_lbit: 0, mode: "COMPARE:<", index_data: nil, compare_data: nil, up_stream: nil, down_stream: self) ⇒ Object
- #data_mirrors(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- #data_mirrors_draw(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- #data_mirrors_verb(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- #data_mirrors_verb_draw(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
- #data_uncompress(asize: 8, lsize: 8, data_zip: "data_zip", data_unzip: "data_unzip", up_stream: nil, down_stream: nil) ⇒ Object
- #data_uncompress_draw(asize: 8, lsize: 8, data_zip: "data_zip", data_unzip: "data_unzip", up_stream: nil, down_stream: nil) ⇒ Object
- #data_valve(button: "button", data_in: "data_in", data_out: "data_out", down_stream: nil) ⇒ Object
- #datainf_c_master_empty(master: "master", down_stream: nil) ⇒ Object
- #datainf_c_master_empty_draw(master: "master", down_stream: nil) ⇒ Object
-
#direct(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
@@pre_inst << lambda { alias_method :direct,:data_c_direct return “” }.
-
#draw ⇒ Object
def left_port_length (“/* data_inf_c.” + @port.to_s + “ */ ”).length end.
- #DSIZE(index = nil) ⇒ Object
- #from_data_inf ⇒ Object
- #from_data_inf_draw(up_stream: nil, down_stream: nil) ⇒ Object
- #inherited(name: nil, clock: nil, reset: nil, dsize: nil, freqM: nil, dimension: []) ⇒ Object (also: #copy)
-
#initialize(name: "data_inf", dsize: 8, clock: nil, reset: nil, port: false, dimension: [], freqM: nil) ⇒ DataInf_C
constructor
A new instance of DataInf_C.
- #inst ⇒ Object
-
#inst_port ⇒ Object
def port_length (“data_inf_c.” + @port.to_s + “ ”).length end.
-
#interconnect_draw(prio: "ROBIN") ⇒ Object
def interconnect_draw(prio:“OFF”) # sub_inst num = @interconnect_up_streams.length large_name_len(@interconnect_sub_set,self) # p @interconnect_sub_set.
- #rst_n(index = nil) ⇒ Object
- #sub_inst ⇒ Object
-
#to_data_inf ⇒ Object
def self.inst.
- #to_data_inf_draw(up_stream: nil, down_stream: nil) ⇒ Object
-
#vld_rdy ⇒ Object
rh = super(port_array,rep,“data_inf_c”,up_stream_rep) do |h| h = DataInf_C yield h end end.
-
#|(a) ⇒ Object
def copy().
Methods included from BaseFunc
check_same, check_same_class, check_same_clock, check_same_dsize
Methods included from BaseModule
Methods inherited from TdlSpace::TdlBaseInterface
#element_to_module, inherited, #name_copy, #path_refs, subclass, #use_which_freq_when_copy
Methods included from TdlSpace::VarElemenAttr
#_io_map, #clock_io_map, #comm_io_map, #comm_io_maps_same, #gen_sv_interface, #get_class_var, #hdl_name, #modports, #param_map, #pdata_map, #reset_io_map, #sdata_maps, #set_class_var
Methods included from TdlSpace::VarElemenCore
#[], #_inner_inst, #instance, #modport_type, #modport_type=, #to_s
Methods included from TdlSpace::ExCreateTP
Methods included from AxiTdl::TestUnitTrack
Constructor Details
#initialize(name: "data_inf", dsize: 8, clock: nil, reset: nil, port: false, dimension: [], freqM: nil) ⇒ DataInf_C
Returns a new instance of DataInf_C.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/tdl/elements/data_inf.rb', line 195 def initialize(name:"data_inf",dsize:8,clock:nil,reset:nil,port:false,dimension:[],freqM:nil) name_legal?(name) super(dimension:dimension,clock:clock,reset:reset,freqM:freqM) # unless port # raise TdlError.new("\nRESET can not be nil\n") unless reset # raise TdlError.new("\nCLOCK can not be nil\n") unless clock # end if clock && reset @clock = clock @reset = reset end @port = port @dsize = dsize @name = name @dimension = dimension # @id = GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.id # # if @port # GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.ports << self # else # GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.inst_stack << method(:inst).to_proc # end # @correlation_proc = "" @_to_data_inf = "" # GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.draw_stack << method(:draw).to_proc @interconnect_up_streams = [] end |
Instance Attribute Details
#dsize ⇒ Object
<tdl_key><hdl_key><default_value>
9 10 11 |
# File 'lib/tdl/rebuild_ele/data_inf_c.rb', line 9 def dsize @dsize end |
#ghost ⇒ Object
Returns the value of attribute ghost.
194 195 196 |
# File 'lib/tdl/elements/data_inf.rb', line 194 def ghost @ghost end |
#id ⇒ Object
Returns the value of attribute id.
194 195 196 |
# File 'lib/tdl/elements/data_inf.rb', line 194 def id @id end |
#interconnect_mid ⇒ Object
Returns the value of attribute interconnect_mid.
5 6 7 |
# File 'lib/tdl/data_inf/bak/data_inf_c_interconnect.rb', line 5 def interconnect_mid @interconnect_mid end |
#m2s_interconnect_addr ⇒ Object
Returns the value of attribute m2s_interconnect_addr.
4 5 6 |
# File 'lib/tdl/data_inf/data_c_interconnect.rb', line 4 def m2s_interconnect_addr @m2s_interconnect_addr end |
#name ⇒ Object
Returns the value of attribute name.
194 195 196 |
# File 'lib/tdl/elements/data_inf.rb', line 194 def name @name end |
#port ⇒ Object
Returns the value of attribute port.
194 195 196 |
# File 'lib/tdl/elements/data_inf.rb', line 194 def port @port end |
Class Method Details
.data_bind(num: 2, data_in: "data_in", data_out: "data_out") ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/tdl/data_inf/data_bind_auto.rb', line 60 def self.data_bind( num:2, data_in:"data_in", data_out:"data_out", belong_to_module:nil ) return_stream = nil belong_to_module = [data_in,data_out].first.belong_to_module unless belong_to_module belong_to_module.DataInf_C_NC._data_bind( num:num, data_in:data_in, data_out:data_out) return return_stream end |
.data_c_cache(data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil, belong_to_module: nil) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/tdl/data_inf/data_c_cache_auto.rb', line 73 def self.data_c_cache( data_in:"data_in", data_out:"data_out", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil ms = [data_in,data_out,up_stream,down_stream].map do |e| if e.respond_to? :belong_to_module e.belong_to_module else nil end end belong_to_module = ms.compact.first unless belong_to_module if down_stream.nil? && data_out.eql?("data_out") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = data_in.copy end return_stream = down_stream end if up_stream.nil? && data_in.eql?("data_in") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = data_out.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_c_cache( data_in:data_in, data_out:data_out, up_stream:up_stream, down_stream:down_stream) elsif data_out.is_a? DataInf_C data_out.data_c_cache( data_in:data_in, data_out:data_out, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_c_cache( data_in:data_in, data_out:data_out, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_c_direct(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/tdl/data_inf/data_c_direct_auto.rb', line 73 def self.data_c_direct( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [slaver,master].first.belong_to_module unless belong_to_module if down_stream.nil? && master.eql?("master") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = slaver.copy end return_stream = down_stream end if up_stream.nil? && slaver.eql?("slaver") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = master.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_c_direct( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) elsif master.is_a? DataInf_C master.data_c_direct( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_c_direct( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_c_direct_mirror(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/tdl/data_inf/data_c_direct_mirror_auto.rb', line 73 def self.data_c_direct_mirror( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [slaver,master].first.belong_to_module unless belong_to_module if down_stream.nil? && master.eql?("master") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = slaver.copy end return_stream = down_stream end if up_stream.nil? && slaver.eql?("slaver") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = master.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_c_direct_mirror( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) elsif master.is_a? DataInf_C master.data_c_direct_mirror( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_c_direct_mirror( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_c_pipe_force_vld(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil, belong_to_module: nil) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/tdl/data_inf/data_c_pipe_force_vld_auto.rb', line 73 def self.data_c_pipe_force_vld( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [slaver,master].first.belong_to_module unless belong_to_module if down_stream.nil? && master.eql?("master") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = slaver.copy end return_stream = down_stream end if up_stream.nil? && slaver.eql?("slaver") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = master.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_c_pipe_force_vld( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) elsif master.is_a? DataInf_C master.data_c_pipe_force_vld( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_c_pipe_force_vld( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_c_pipe_inf(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil, belong_to_module: nil) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/tdl/data_inf/data_c_pipe_inf_auto.rb', line 73 def self.data_c_pipe_inf( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [slaver,master].first.belong_to_module unless belong_to_module if down_stream.nil? && master.eql?("master") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = slaver.copy end return_stream = down_stream end if up_stream.nil? && slaver.eql?("slaver") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = master.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_c_pipe_inf( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) elsif master.is_a? DataInf_C master.data_c_pipe_inf( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_c_pipe_inf( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_c_pipe_intc_m2s_verc(prio: "BEST_ROBIN", num: 8, last: "last", s00: "s00", m00: "m00", down_stream: nil, belong_to_module: nil) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/tdl/data_inf/data_c_pipe_intc_M2S_verc_auto.rb', line 79 def self.data_c_pipe_intc_m2s_verc( prio:"BEST_ROBIN", num:8, last:"last", s00:"s00", m00:"m00", down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [s00,m00].first.belong_to_module unless belong_to_module if down_stream.is_a? DataInf_C down_stream.data_c_pipe_intc_m2s_verc( prio:prio, num:num, last:last, s00:s00, m00:m00, down_stream:down_stream) elsif m00.is_a? DataInf_C m00.data_c_pipe_intc_m2s_verc( prio:prio, num:num, last:last, s00:s00, m00:m00, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_c_pipe_intc_m2s_verc( prio:prio, num:num, last:last, s00:s00, m00:m00, down_stream:down_stream) end return return_stream end |
.data_c_tmp_cache(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/tdl/data_inf/data_c_tmp_cache_auto.rb', line 73 def self.data_c_tmp_cache( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [slaver,master].first.belong_to_module unless belong_to_module if down_stream.nil? && master.eql?("master") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = slaver.copy end return_stream = down_stream end if up_stream.nil? && slaver.eql?("slaver") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = master.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_c_tmp_cache( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) elsif master.is_a? DataInf_C master.data_c_tmp_cache( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_c_tmp_cache( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_condition_mirror(h: 0, l: 0, condition_data: "condition_data", data_in: "data_in", data_out: "data_out", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/tdl/data_inf/data_condition_mirror_auto.rb', line 95 def self.data_condition_mirror( h:0, l:0, condition_data:"condition_data", data_in:"data_in", data_out:"data_out", data_mirror:"data_mirror", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [data_in,data_out,data_mirror].first.belong_to_module unless belong_to_module if down_stream.nil? && data_out.eql?("data_out") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = data_in.copy end return_stream = down_stream end if up_stream.nil? && data_in.eql?("data_in") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = data_out.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_condition_mirror( h:h, l:l, condition_data:condition_data, data_in:data_in, data_out:data_out, data_mirror:data_mirror, up_stream:up_stream, down_stream:down_stream) elsif data_out.is_a? DataInf_C data_out.data_condition_mirror( h:h, l:l, condition_data:condition_data, data_in:data_in, data_out:data_out, data_mirror:data_mirror, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_condition_mirror( h:h, l:l, condition_data:condition_data, data_in:data_in, data_out:data_out, data_mirror:data_mirror, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_condition_valve(h: 0, l: 0, condition_button: "condition_button", condition_data: "condition_data", data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/tdl/data_inf/data_condition_valve_auto.rb', line 94 def self.data_condition_valve( h:0, l:0, condition_button:"condition_button", condition_data:"condition_data", data_in:"data_in", data_out:"data_out", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [data_in,data_out].first.belong_to_module unless belong_to_module if down_stream.nil? && data_out.eql?("data_out") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = data_in.copy end return_stream = down_stream end if up_stream.nil? && data_in.eql?("data_in") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = data_out.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_condition_valve( h:h, l:l, condition_button:, condition_data:condition_data, data_in:data_in, data_out:data_out, up_stream:up_stream, down_stream:down_stream) elsif data_out.is_a? DataInf_C data_out.data_condition_valve( h:h, l:l, condition_button:, condition_data:condition_data, data_in:data_in, data_out:data_out, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_condition_valve( h:h, l:l, condition_button:, condition_data:condition_data, data_in:data_in, data_out:data_out, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_connect_pipe_inf(indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/tdl/data_inf/data_connect_pipe_inf_auto.rb', line 73 def self.data_connect_pipe_inf( indata:"indata", outdata:"outdata", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [indata,outdata].first.belong_to_module unless belong_to_module if down_stream.nil? && outdata.eql?("outdata") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = indata.copy end return_stream = down_stream end if up_stream.nil? && indata.eql?("indata") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = outdata.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_connect_pipe_inf( indata:indata, outdata:outdata, up_stream:up_stream, down_stream:down_stream) elsif outdata.is_a? DataInf_C outdata.data_connect_pipe_inf( indata:indata, outdata:outdata, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_connect_pipe_inf( indata:indata, outdata:outdata, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_inf_c_pipe_condition(and_condition: "and_condition", indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/tdl/data_inf/data_inf_c_pipe_condition_auto.rb', line 78 def self.data_inf_c_pipe_condition( and_condition:"and_condition", indata:"indata", outdata:"outdata", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [indata,outdata].first.belong_to_module unless belong_to_module if down_stream.nil? && outdata.eql?("outdata") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = indata.copy end return_stream = down_stream end if up_stream.nil? && indata.eql?("indata") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = outdata.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_inf_c_pipe_condition( and_condition:and_condition, indata:indata, outdata:outdata, up_stream:up_stream, down_stream:down_stream) elsif outdata.is_a? DataInf_C outdata.data_inf_c_pipe_condition( and_condition:and_condition, indata:indata, outdata:outdata, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_inf_c_pipe_condition( and_condition:and_condition, indata:indata, outdata:outdata, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_mirrors(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/tdl/data_inf/_data_mirrors.rb', line 58 def self.data_mirrors(h:0,l:0,mode:"CDS_MODE",condition_data:"condition_data",data_in:"data_in",data_mirror:"data_mirror",up_stream:nil,down_stream:nil,belong_to_module:nil) return_stream = nil belong_to_module = [data_in,data_mirror].first.belong_to_module unless belong_to_module # p data_mirror if down_stream==nil && data_mirror=="data_mirror" if up_stream.is_a? DataInf_C down_stream = up_stream.copy(name:"data_mirror") else down_stream = data_in.copy(name:"data_mirror") end return_stream = down_stream end if up_stream==nil && data_in=="data_in" if down_stream.is_a? DataInf_C up_stream = down_stream.copy(name:"data_in") else up_stream = data_mirror.copy(name:"data_in") end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_mirrors(h:h,l:l,mode:mode,condition_data:condition_data,data_in:data_in,data_mirror:data_mirror,up_stream:up_stream,down_stream:down_stream) elsif data_mirror.is_a? DataInf_C data_mirror.data_mirrors(h:h,l:l,mode:mode,condition_data:condition_data,data_in:data_in,data_mirror:data_mirror,up_stream:up_stream,down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_mirrors(h:h,l:l,mode:mode,condition_data:condition_data,data_in:data_in,data_mirror:data_mirror,up_stream:up_stream,down_stream:down_stream) end return return_stream end |
.data_mirrors_verb(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/tdl/data_inf/data_mirrors_verb.sv_auto.rb', line 99 def self.data_mirrors_verb( h:0, l:0, num:8, mode:"CDS_MODE", condition_data:"condition_data", data_in:"data_in", data_mirror:"data_mirror", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [data_in,data_mirror].first.belong_to_module unless belong_to_module if down_stream.nil? && data_mirror.eql?("data_mirror") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = data_in.copy end return_stream = down_stream end if up_stream.nil? && data_in.eql?("data_in") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = data_mirror.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_mirrors_verb( h:h, l:l, num:num, mode:mode, condition_data:condition_data, data_in:data_in, data_mirror:data_mirror, up_stream:up_stream, down_stream:down_stream) elsif data_mirror.is_a? DataInf_C data_mirror.data_mirrors_verb( h:h, l:l, num:num, mode:mode, condition_data:condition_data, data_in:data_in, data_mirror:data_mirror, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_mirrors_verb( h:h, l:l, num:num, mode:mode, condition_data:condition_data, data_in:data_in, data_mirror:data_mirror, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_uncompress(asize: 8, lsize: 8, data_zip: "data_zip", data_unzip: "data_unzip", up_stream: nil, down_stream: nil) ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/tdl/data_inf/data_uncompress_auto.rb', line 84 def self.data_uncompress( asize:8, lsize:8, data_zip:"data_zip", data_unzip:"data_unzip", up_stream:nil, down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [data_zip,data_unzip].first.belong_to_module unless belong_to_module if down_stream.nil? && data_unzip.eql?("data_unzip") if up_stream.is_a? DataInf_C down_stream = up_stream.copy else down_stream = data_zip.copy end return_stream = down_stream end if up_stream.nil? && data_zip.eql?("data_zip") if down_stream.is_a? DataInf_C up_stream = down_stream.copy else up_stream = data_unzip.copy end return_stream = up_stream end if down_stream.is_a? DataInf_C down_stream.data_uncompress( asize:asize, lsize:lsize, data_zip:data_zip, data_unzip:data_unzip, up_stream:up_stream, down_stream:down_stream) elsif data_unzip.is_a? DataInf_C data_unzip.data_uncompress( asize:asize, lsize:lsize, data_zip:data_zip, data_unzip:data_unzip, up_stream:up_stream, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_uncompress( asize:asize, lsize:lsize, data_zip:data_zip, data_unzip:data_unzip, up_stream:up_stream, down_stream:down_stream) end return return_stream end |
.data_valve(button: "button", data_in: "data_in", data_out: "data_out") ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/tdl/data_inf/data_valve_auto.rb', line 68 def self.data_valve( button:"button", data_in:"data_in", data_out:"data_out", down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [data_in,data_out].first.belong_to_module unless belong_to_module if down_stream.is_a? DataInf_C down_stream.data_valve( button:, data_in:data_in, data_out:data_out, down_stream:down_stream) elsif data_out.is_a? DataInf_C data_out.data_valve( button:, data_in:data_in, data_out:data_out, down_stream:down_stream) else belong_to_module.DataInf_C_NC.data_valve( button:, data_in:data_in, data_out:data_out, down_stream:down_stream) end return return_stream end |
.datainf_c_master_empty(master: "master", down_stream: nil) ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/tdl/data_inf/datainf_c_master_empty_auto.rb', line 57 def self.datainf_c_master_empty( master:"master", down_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [master].first.belong_to_module unless belong_to_module if down_stream.is_a? DataInf_C down_stream.datainf_c_master_empty( master:master, down_stream:down_stream) elsif master.is_a? DataInf_C master.datainf_c_master_empty( master:master, down_stream:down_stream) else belong_to_module.DataInf_C_NC.datainf_c_master_empty( master:master, down_stream:down_stream) end return return_stream end |
.datainf_c_slaver_empty(slaver: "slaver", up_stream: nil) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/tdl/data_inf/datainf_c_slaver_empty_auto.rb', line 51 def self.datainf_c_slaver_empty( slaver:"slaver", up_stream:nil, belong_to_module:nil ) return_stream = nil belong_to_module = [slaver].first.belong_to_module unless belong_to_module belong_to_module.DataInf_C_NC._datainf_c_slaver_empty( slaver:slaver, up_stream:up_stream) return return_stream end |
.direct(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
563 564 565 |
# File 'lib/tdl/elements/data_inf.rb', line 563 def self.direct(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil) self.data_c_direct(slaver:slaver,master:master,up_stream:up_stream,down_stream:up_stream) end |
.master_empty(*ms) ⇒ Object
def self.NC
GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.nc
end
def self.nc_create
DataInf_C.new(name:"implicit",clock:Clock.NC,reset:Reset.NC,dsize:1)
end
390 391 392 393 394 |
# File 'lib/tdl/elements/data_inf.rb', line 390 def self.master_empty(*ms) ms.each do |e| self.datainf_c_master_empty(master:e) end end |
.parse_ports(port_array = nil) ⇒ Object
473 474 475 476 477 478 479 480 481 |
# File 'lib/tdl/elements/data_inf.rb', line 473 def self.parse_ports(port_array=nil) rep = /(?<up_down>\(\*\s+(?<ud_name>data_up|data_down|up_stream|down_stream)\s*=\s*"true"\s+\*\))?\s*(data_inf_c\.)(?<modport>master|slaver|mirror|out_mirror)\s+(?<name>\w+)\s*(?<vector>\[.*?\])?/m up_stream_rep = /data_up/ rh = InfElm.parse_ports(port_array,rep,"data_inf_c",up_stream_rep) do |h| h[:type] = DataInf_C yield h end end |
.part_data_pair_map(num: 8, isize: 8, osize: 8, write_inf: "write_inf", ipart_inf: "ipart_inf", opart_inf: "opart_inf", idel_inf: "idel_inf", odel_inf: "odel_inf", oipart_inf: "oipart_inf", oopart_inf: "oopart_inf", ierr_inf: "ierr_inf", oerr_inf: "oerr_inf") ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/tdl/data_inf/part_data_pair_map_auto.rb', line 112 def self.part_data_pair_map( num:8, isize:8, osize:8, write_inf:"write_inf", ipart_inf:"ipart_inf", opart_inf:"opart_inf", idel_inf:"idel_inf", odel_inf:"odel_inf", oipart_inf:"oipart_inf", oopart_inf:"oopart_inf", ierr_inf:"ierr_inf", oerr_inf:"oerr_inf", belong_to_module:nil ) return_stream = nil belong_to_module = [write_inf,ipart_inf,opart_inf,idel_inf,odel_inf,oipart_inf,oopart_inf,ierr_inf,oerr_inf].first.belong_to_module unless belong_to_module belong_to_module.DataInf_C_NC._part_data_pair_map( num:num, isize:isize, osize:osize, write_inf:write_inf, ipart_inf:ipart_inf, opart_inf:opart_inf, idel_inf:idel_inf, odel_inf:odel_inf, oipart_inf:oipart_inf, oopart_inf:oopart_inf, ierr_inf:ierr_inf, oerr_inf:oerr_inf) return return_stream end |
.slaver_empty(*ss) ⇒ Object
396 397 398 399 400 |
# File 'lib/tdl/elements/data_inf.rb', line 396 def self.slaver_empty(*ss) ss.each do |e| self.datainf_c_slaver_empty(slaver:e) end end |
Instance Method Details
#&(*a) ⇒ Object
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/tdl/elements/data_inf.rb', line 500 def &(*a) return nil if a.empty? @_bind_up_streams = [] a.each do |e| raise TdlError.new(" PIPE STREAM is not a DataInf_C or DataInf") if( !(e.is_a? DataInf_C) || !(e.is_a? DataInf)) if e.is_a? DataInf b = e.to_data_inf_c else b = e end @_bind_up_streams << b end @_bind_down_stream = @_bind_up_streams[0].copy() # GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.pre_inst = lambda {_sub_band_inst() + _sub_bind_direct() + _bind_interconnect_draw() } belong_to_module.DataInf_C_inst << (_sub_band_inst() + _sub_bind_direct() + _bind_interconnect_draw()) return @_bind_down_stream end |
#<<(*up_streams) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/tdl/data_inf/data_c_interconnect.rb', line 19 def <<(*up_streams) @interconnect_up_streams ||= [] push_to_stack up_streams.each do |e| next unless e.is_a? DataInf_C raise TdlError.new("DataInf_C << [sub..] sub.dimension must 1") unless dimension_num(e).eql?(1) @interconnect_up_streams << e end end |
#>>(down_stream) ⇒ Object
29 30 31 |
# File 'lib/tdl/data_inf/data_c_interconnect.rb', line 29 def >>(down_stream) down_stream.<< self end |
#[]=(a, b) ⇒ Object
233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/tdl/elements/data_inf.rb', line 233 def []=(a,b) if a.is_a? ClassHDL::OpertorChain a.slaver = true end if b.is_a? ClassHDL::OpertorChain b.slaver = true end DataInf_C.data_c_direct(up_stream:b,down_stream:signal(a)) return nil end |
#_data_bind(num: 2, data_in: "data_in", data_out: "data_out") ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/tdl/data_inf/data_bind_auto.rb', line 9 def _data_bind( num:2, data_in:"data_in", data_out:"data_out" ) Tdl.add_to_all_file_paths('data_bind','../../axi/data_interface/data_inf_c/data_bind.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_bind','../../axi/data_interface/data_inf_c/data_bind.sv']) return_stream = self data_in = DataInf_C.same_name_socket(:from_up,mix=false,data_in,nil,belong_to_module) unless data_in.is_a? String data_out = DataInf_C.same_name_socket(:to_down,mix=true,data_out,nil,belong_to_module) unless data_out.is_a? String belong_to_module.DataInf_C_draw << _data_bind_draw( num:num, data_in:data_in, data_out:data_out) return return_stream end |
#_data_bind_draw(num: 2, data_in: "data_in", data_out: "data_out") ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/tdl/data_inf/data_bind_auto.rb', line 35 def _data_bind_draw( num:2, data_in:"data_in", data_out:"data_out" ) large_name_len( num, data_in, data_out ) instance_name = "data_bind_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_bind.sv data_bind#( .NUM (#{align_signal(num)}) ) #{instance_name}( /* data_inf_c.slaver*/ .data_in (#{align_signal(data_in,q_mark=false)}), /* data_inf_c.master*/ .data_out (#{align_signal(data_out,q_mark=false)}) ); " end |
#_data_valve(button: "button", data_in: "data_in", data_out: "data_out") ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/tdl/data_inf/bak/data_valve_auto.rb', line 9 def _data_valve(button:"button",data_in:"data_in",data_out:"data_out") Tdl.add_to_all_file_paths(['data_valve','../../axi/data_interface/data_inf_c/data_valve.sv']) return_stream = self data_in = DataInf_C.same_name_socket(:from_up,mix=true,data_in) unless data_in.is_a? String data_out = DataInf_C.same_name_socket(:to_down,mix=true,data_out) unless data_out.is_a? String @instance_draw_stack << lambda { _data_valve_draw(button:,data_in:data_in,data_out:data_out) } return return_stream end |
#_data_valve_draw(button: "button", data_in: "data_in", data_out: "data_out") ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/tdl/data_inf/bak/data_valve_auto.rb', line 24 def _data_valve_draw(button:"button",data_in:"data_in",data_out:"data_out") large_name_len(,data_in,data_out) " // FilePath:::../../axi/data_interface/data_inf_c/data_valve.sv data_valve data_valve_#{signal}_inst( /* input */ .button (#{align_signal(,q_mark=false)}), /* data_inf_c.slaver*/ .data_in (#{align_signal(data_in,q_mark=false)}), /* data_inf_c.master*/ .data_out (#{align_signal(data_out,q_mark=false)}) ); " end |
#_datainf_c_slaver_empty(slaver: "slaver", up_stream: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tdl/data_inf/datainf_c_slaver_empty_auto.rb', line 9 def _datainf_c_slaver_empty( slaver:"slaver", up_stream:nil ) Tdl.add_to_all_file_paths('datainf_c_slaver_empty','../../axi/data_interface/datainf_c_slaver_empty.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['datainf_c_slaver_empty','../../axi/data_interface/datainf_c_slaver_empty.sv']) return_stream = self slaver = DataInf_C.same_name_socket(:from_up,mix=true,slaver,nil,belong_to_module) unless slaver.is_a? String slaver = up_stream if up_stream belong_to_module.DataInf_C_draw << _datainf_c_slaver_empty_draw( slaver:slaver, up_stream:up_stream) return return_stream end |
#_datainf_c_slaver_empty_draw(slaver: "slaver", up_stream: nil) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/tdl/data_inf/datainf_c_slaver_empty_auto.rb', line 32 def _datainf_c_slaver_empty_draw( slaver:"slaver", up_stream:nil ) large_name_len( slaver ) instance_name = "datainf_c_slaver_empty_#{signal}_inst" " // FilePath:::../../axi/data_interface/datainf_c_slaver_empty.sv datainf_c_slaver_empty #{instance_name}( /* data_inf_c.slaver*/ .slaver (#{align_signal(slaver,q_mark=false)}) ); " end |
#_part_data_pair_map(num: 8, isize: 8, osize: 8, write_inf: "write_inf", ipart_inf: "ipart_inf", opart_inf: "opart_inf", idel_inf: "idel_inf", odel_inf: "odel_inf", oipart_inf: "oipart_inf", oopart_inf: "oopart_inf", ierr_inf: "ierr_inf", oerr_inf: "oerr_inf") ⇒ Object
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 |
# File 'lib/tdl/data_inf/part_data_pair_map_auto.rb', line 9 def _part_data_pair_map( num:8, isize:8, osize:8, write_inf:"write_inf", ipart_inf:"ipart_inf", opart_inf:"opart_inf", idel_inf:"idel_inf", odel_inf:"odel_inf", oipart_inf:"oipart_inf", oopart_inf:"oopart_inf", ierr_inf:"ierr_inf", oerr_inf:"oerr_inf" ) Tdl.add_to_all_file_paths('part_data_pair_map','../../axi/data_interface/part_data_pair_map.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['part_data_pair_map','../../axi/data_interface/part_data_pair_map.sv']) return_stream = self write_inf = DataInf_C.same_name_socket(:from_up,mix=true,write_inf,nil,belong_to_module) unless write_inf.is_a? String ipart_inf = DataInf_C.same_name_socket(:from_up,mix=true,ipart_inf,nil,belong_to_module) unless ipart_inf.is_a? String opart_inf = DataInf_C.same_name_socket(:from_up,mix=true,opart_inf,nil,belong_to_module) unless opart_inf.is_a? String idel_inf = DataInf_C.same_name_socket(:from_up,mix=true,idel_inf,nil,belong_to_module) unless idel_inf.is_a? String odel_inf = DataInf_C.same_name_socket(:from_up,mix=true,odel_inf,nil,belong_to_module) unless odel_inf.is_a? String oipart_inf = DataInf_C.same_name_socket(:to_down,mix=true,oipart_inf,nil,belong_to_module) unless oipart_inf.is_a? String oopart_inf = DataInf_C.same_name_socket(:to_down,mix=true,oopart_inf,nil,belong_to_module) unless oopart_inf.is_a? String ierr_inf = DataInf_C.same_name_socket(:to_down,mix=true,ierr_inf,nil,belong_to_module) unless ierr_inf.is_a? String oerr_inf = DataInf_C.same_name_socket(:to_down,mix=true,oerr_inf,nil,belong_to_module) unless oerr_inf.is_a? String belong_to_module.DataInf_C_draw << _part_data_pair_map_draw( num:num, isize:isize, osize:osize, write_inf:write_inf, ipart_inf:ipart_inf, opart_inf:opart_inf, idel_inf:idel_inf, odel_inf:odel_inf, oipart_inf:oipart_inf, oopart_inf:oopart_inf, ierr_inf:ierr_inf, oerr_inf:oerr_inf) return return_stream end |
#_part_data_pair_map_draw(num: 8, isize: 8, osize: 8, write_inf: "write_inf", ipart_inf: "ipart_inf", opart_inf: "opart_inf", idel_inf: "idel_inf", odel_inf: "odel_inf", oipart_inf: "oipart_inf", oopart_inf: "oopart_inf", ierr_inf: "ierr_inf", oerr_inf: "oerr_inf") ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/tdl/data_inf/part_data_pair_map_auto.rb', line 60 def _part_data_pair_map_draw( num:8, isize:8, osize:8, write_inf:"write_inf", ipart_inf:"ipart_inf", opart_inf:"opart_inf", idel_inf:"idel_inf", odel_inf:"odel_inf", oipart_inf:"oipart_inf", oopart_inf:"oopart_inf", ierr_inf:"ierr_inf", oerr_inf:"oerr_inf" ) large_name_len( num, isize, osize, write_inf, ipart_inf, opart_inf, idel_inf, odel_inf, oipart_inf, oopart_inf, ierr_inf, oerr_inf ) instance_name = "part_data_pair_map_#{signal}_inst" " // FilePath:::../../axi/data_interface/part_data_pair_map.sv part_data_pair_map#( .NUM (#{align_signal(num)}), .ISIZE (#{align_signal(isize)}), .OSIZE (#{align_signal(osize)}) ) #{instance_name}( /* data_inf_c.slaver*/ .write_inf (#{align_signal(write_inf,q_mark=false)}), /* data_inf_c.slaver*/ .ipart_inf (#{align_signal(ipart_inf,q_mark=false)}), /* data_inf_c.slaver*/ .opart_inf (#{align_signal(opart_inf,q_mark=false)}), /* data_inf_c.slaver*/ .idel_inf (#{align_signal(idel_inf,q_mark=false)}), /* data_inf_c.slaver*/ .odel_inf (#{align_signal(odel_inf,q_mark=false)}), /* data_inf_c.master*/ .Oipart_inf (#{align_signal(oipart_inf,q_mark=false)}), /* data_inf_c.master*/ .Oopart_inf (#{align_signal(oopart_inf,q_mark=false)}), /* data_inf_c.master*/ .ierr_inf (#{align_signal(ierr_inf,q_mark=false)}), /* data_inf_c.master*/ .oerr_inf (#{align_signal(oerr_inf,q_mark=false)}) ); " end |
#array_chain_vld_rdy_inst(pre_str) ⇒ Object
37 38 39 |
# File 'lib/tdl/rebuild_ele/data_inf_c.rb', line 37 def array_chain_vld_rdy_inst(pre_str) "(#{pre_str}.valid && #{pre_str}.ready)".to_nq end |
#branch(name: nil, clock: @clock, reset: @reset, dsize: @dsize, freqM: nil) ⇒ Object
415 416 417 418 419 |
# File 'lib/tdl/elements/data_inf.rb', line 415 def branch(name:@name,clock:@clock,reset:@reset,dsize:@dsize,freqM:nil) a = copy(name:name,clock:clock,reset:reset,dsize:dsize,freqM:freqM) self << a return a end |
#clock(index = nil) ⇒ Object
<tdl_key><hdl_key><default_freqM>
7 8 9 10 11 12 13 |
# File 'lib/tdl/rebuild_ele/data_inf_c.rb', line 7 def clock(index=nil) if dimension.empty? && !port @clock else "#{signal(index)}.clock".to_nq end end |
#clock_reset_taps(def_clock_name, def_reset_name) ⇒ Object
421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/tdl/elements/data_inf.rb', line 421 def clock_reset_taps(def_clock_name,def_reset_name) # new_clk = belong_to_module.logic.clock(self.FreqM) - def_clock_name # new_reset = belong_to_module.logic.reset('low') - def_reset_name # belong_to_module.Assign do # new_clk <= self.clock # new_reset <= self.rst_n # end # [new_clk,new_reset] super(def_clock_name,def_reset_name,self.clock,self.rst_n) end |
#data_c_cache(data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_c_cache_auto.rb', line 9 def data_c_cache( data_in:"data_in", data_out:"data_out", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_c_cache','../../axi/data_interface/data_inf_c/data_c_cache.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_c_cache','../../axi/data_interface/data_inf_c/data_c_cache.sv']) return_stream = self data_in = DataInf_C.same_name_socket(:from_up,mix=true,data_in,nil,belong_to_module) unless data_in.is_a? String data_out = DataInf_C.same_name_socket(:to_down,mix=true,data_out,nil,belong_to_module) unless data_out.is_a? String if up_stream.nil? && data_in.eql?("data_in") && (!(data_out.eql?("data_out")) || !down_stream.nil?) # up_stream = self.copy(name:"data_in") # return_stream = up_stream data_out = down_stream if down_stream return down_stream.data_c_cache(data_in:self) end data_in = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC data_out = self else if down_stream data_out = down_stream end end belong_to_module.DataInf_C_draw << data_c_cache_draw( data_in:data_in, data_out:data_out, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_c_direct(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_c_direct_auto.rb', line 9 def data_c_direct( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_c_direct','../../axi/data_interface/data_inf_c/data_c_direct.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_c_direct','../../axi/data_interface/data_inf_c/data_c_direct.sv']) return_stream = self slaver = DataInf_C.same_name_socket(:from_up,mix=true,slaver,nil,belong_to_module) unless slaver.is_a? String master = DataInf_C.same_name_socket(:to_down,mix=true,master,nil,belong_to_module) unless master.is_a? String if up_stream.nil? && slaver.eql?("slaver") && (!(master.eql?("master")) || !down_stream.nil?) # up_stream = self.copy(name:"slaver") # return_stream = up_stream master = down_stream if down_stream return down_stream.data_c_direct(slaver:self) end slaver = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC master = self else if down_stream master = down_stream end end belong_to_module.DataInf_C_draw << data_c_direct_draw( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_c_direct_draw(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/tdl/data_inf/data_c_direct_auto.rb', line 50 def data_c_direct_draw( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) large_name_len( slaver, master ) instance_name = "data_c_direct_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_c_direct.sv data_c_direct #{instance_name}( /* data_inf_c.slaver*/ .slaver (#{align_signal(slaver,q_mark=false)}), /* data_inf_c.master*/ .master (#{align_signal(master,q_mark=false)}) ); " end |
#data_c_direct_mirror(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_c_direct_mirror_auto.rb', line 9 def data_c_direct_mirror( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_c_direct_mirror','../../axi/data_interface/data_inf_c/data_c_direct_mirror.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_c_direct_mirror','../../axi/data_interface/data_inf_c/data_c_direct_mirror.sv']) return_stream = self slaver = DataInf_C.same_name_socket(:mirror,mix=true,slaver,nil,belong_to_module) unless slaver.is_a? String master = DataInf_C.same_name_socket(:mirror,mix=true,master,nil,belong_to_module) unless master.is_a? String if up_stream.nil? && slaver.eql?("slaver") && (!(master.eql?("master")) || !down_stream.nil?) # up_stream = self.copy(name:"slaver") # return_stream = up_stream master = down_stream if down_stream return down_stream.data_c_direct_mirror(slaver:self) end slaver = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC master = self else if down_stream master = down_stream end end belong_to_module.DataInf_C_draw << data_c_direct_mirror_draw( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_c_direct_mirror_draw(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/tdl/data_inf/data_c_direct_mirror_auto.rb', line 50 def data_c_direct_mirror_draw( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) large_name_len( slaver, master ) instance_name = "data_c_direct_mirror_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_c_direct_mirror.sv data_c_direct_mirror #{instance_name}( /* data_inf_c.mirror */ .slaver (#{align_signal(slaver,q_mark=false)}), /* data_inf_c.out_mirror*/ .master (#{align_signal(master,q_mark=false)}) ); " end |
#data_c_pipe_force_vld(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_c_pipe_force_vld_auto.rb', line 9 def data_c_pipe_force_vld( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_c_pipe_force_vld','../../axi/data_interface/data_inf_c/data_c_pipe_force_vld.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_c_pipe_force_vld','../../axi/data_interface/data_inf_c/data_c_pipe_force_vld.sv']) return_stream = self slaver = DataInf_C.same_name_socket(:from_up,mix=true,slaver,nil,belong_to_module) unless slaver.is_a? String master = DataInf_C.same_name_socket(:to_down,mix=true,master,nil,belong_to_module) unless master.is_a? String if up_stream.nil? && slaver.eql?("slaver") && (!(master.eql?("master")) || !down_stream.nil?) # up_stream = self.copy(name:"slaver") # return_stream = up_stream master = down_stream if down_stream return down_stream.data_c_pipe_force_vld(slaver:self) end slaver = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC master = self else if down_stream master = down_stream end end belong_to_module.DataInf_C_draw << data_c_pipe_force_vld_draw( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_c_pipe_inf(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_c_pipe_inf_auto.rb', line 9 def data_c_pipe_inf( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_c_pipe_inf','../../axi/data_interface/data_inf_c/data_c_pipe_inf.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_c_pipe_inf','../../axi/data_interface/data_inf_c/data_c_pipe_inf.sv']) return_stream = self slaver = DataInf_C.same_name_socket(:from_up,mix=true,slaver,nil,belong_to_module) unless slaver.is_a? String master = DataInf_C.same_name_socket(:to_down,mix=true,master,nil,belong_to_module) unless master.is_a? String if up_stream.nil? && slaver.eql?("slaver") && (!(master.eql?("master")) || !down_stream.nil?) # up_stream = self.copy(name:"slaver") # return_stream = up_stream master = down_stream if down_stream return down_stream.data_c_pipe_inf(slaver:self) end slaver = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC master = self else if down_stream master = down_stream end end belong_to_module.DataInf_C_draw << data_c_pipe_inf_draw( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_c_pipe_intc_m2s_verc(prio: "BEST_ROBIN", num: 8, last: "last", s00: "s00", m00: "m00", down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_c_pipe_intc_M2S_verc_auto.rb', line 9 def data_c_pipe_intc_m2s_verc( prio:"BEST_ROBIN", num:8, last:"last", s00:"s00", m00:"m00", down_stream:nil ) Tdl.add_to_all_file_paths('data_c_pipe_intc_m2s_verc','../../axi/data_interface/data_inf_c/data_c_pipe_intc_M2S_verc.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_c_pipe_intc_m2s_verc','../../axi/data_interface/data_inf_c/data_c_pipe_intc_M2S_verc.sv']) return_stream = self s00 = DataInf_C.same_name_socket(:from_up,mix=false,s00,nil,belong_to_module) unless s00.is_a? String m00 = DataInf_C.same_name_socket(:to_down,mix=true,m00,nil,belong_to_module) unless m00.is_a? String unless self.eql? belong_to_module.DataInf_C_NC m00 = self else if down_stream m00 = down_stream end end belong_to_module.DataInf_C_draw << data_c_pipe_intc_m2s_verc_draw( prio:prio, num:num, last:last, s00:s00, m00:m00, down_stream:down_stream) return return_stream end |
#data_c_tmp_cache(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_c_tmp_cache_auto.rb', line 9 def data_c_tmp_cache( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_c_tmp_cache','../../axi/data_interface/data_inf_c/data_c_tmp_cache.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_c_tmp_cache','../../axi/data_interface/data_inf_c/data_c_tmp_cache.sv']) return_stream = self slaver = DataInf_C.same_name_socket(:from_up,mix=true,slaver,nil,belong_to_module) unless slaver.is_a? String master = DataInf_C.same_name_socket(:to_down,mix=true,master,nil,belong_to_module) unless master.is_a? String if up_stream.nil? && slaver.eql?("slaver") && (!(master.eql?("master")) || !down_stream.nil?) # up_stream = self.copy(name:"slaver") # return_stream = up_stream master = down_stream if down_stream return down_stream.data_c_tmp_cache(slaver:self) end slaver = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC master = self else if down_stream master = down_stream end end belong_to_module.DataInf_C_draw << data_c_tmp_cache_draw( slaver:slaver, master:master, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_c_tmp_cache_draw(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/tdl/data_inf/data_c_tmp_cache_auto.rb', line 50 def data_c_tmp_cache_draw( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) large_name_len( slaver, master ) instance_name = "data_c_tmp_cache_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_c_tmp_cache.sv data_c_tmp_cache #{instance_name}( /* data_inf_c.slaver*/ .slaver (#{align_signal(slaver,q_mark=false)}), /* data_inf_c.master*/ .master (#{align_signal(master,q_mark=false)}) ); " end |
#data_condition_mirror(h: 0, l: 0, condition_data: "condition_data", data_in: "data_in", data_out: "data_out", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_condition_mirror_auto.rb', line 9 def data_condition_mirror( h:0, l:0, condition_data:"condition_data", data_in:"data_in", data_out:"data_out", data_mirror:"data_mirror", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_condition_mirror','../../axi/data_interface/data_inf_c/data_condition_mirror.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_condition_mirror','../../axi/data_interface/data_inf_c/data_condition_mirror.sv']) return_stream = self data_in = DataInf_C.same_name_socket(:from_up,mix=true,data_in,nil,belong_to_module) unless data_in.is_a? String data_out = DataInf_C.same_name_socket(:to_down,mix=true,data_out,nil,belong_to_module) unless data_out.is_a? String data_mirror = DataInf_C.same_name_socket(:to_down,mix=true,data_mirror,nil,belong_to_module) unless data_mirror.is_a? String if up_stream.nil? && data_in.eql?("data_in") && (!(data_out.eql?("data_out")) || !down_stream.nil?) # up_stream = self.copy(name:"data_in") # return_stream = up_stream data_out = down_stream if down_stream return down_stream.data_condition_mirror(data_in:self) end data_in = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC data_out = self else if down_stream data_out = down_stream end end belong_to_module.DataInf_C_draw << data_condition_mirror_draw( h:h, l:l, condition_data:condition_data, data_in:data_in, data_out:data_out, data_mirror:data_mirror, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_condition_mirror_draw(h: 0, l: 0, condition_data: "condition_data", data_in: "data_in", data_out: "data_out", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/tdl/data_inf/data_condition_mirror_auto.rb', line 59 def data_condition_mirror_draw( h:0, l:0, condition_data:"condition_data", data_in:"data_in", data_out:"data_out", data_mirror:"data_mirror", up_stream:nil, down_stream:nil ) large_name_len( h, l, condition_data, data_in, data_out, data_mirror ) instance_name = "data_condition_mirror_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_condition_mirror.sv data_condition_mirror#( .H (#{align_signal(h)}), .L (#{align_signal(l)}) ) #{instance_name}( /* input [H:L] */ .condition_data (#{align_signal(condition_data,q_mark=false)}), /* data_inf_c.slaver*/ .data_in (#{align_signal(data_in,q_mark=false)}), /* data_inf_c.master*/ .data_out (#{align_signal(data_out,q_mark=false)}), /* data_inf_c.master*/ .data_mirror (#{align_signal(data_mirror,q_mark=false)}) ); " end |
#data_condition_valve(h: 0, l: 0, condition_button: "condition_button", condition_data: "condition_data", data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_condition_valve_auto.rb', line 9 def data_condition_valve( h:0, l:0, condition_button:"condition_button", condition_data:"condition_data", data_in:"data_in", data_out:"data_out", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_condition_valve','../../axi/data_interface/data_inf_c/data_condition_valve.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_condition_valve','../../axi/data_interface/data_inf_c/data_condition_valve.sv']) return_stream = self data_in = DataInf_C.same_name_socket(:from_up,mix=true,data_in,nil,belong_to_module) unless data_in.is_a? String data_out = DataInf_C.same_name_socket(:to_down,mix=true,data_out,nil,belong_to_module) unless data_out.is_a? String if up_stream.nil? && data_in.eql?("data_in") && (!(data_out.eql?("data_out")) || !down_stream.nil?) # up_stream = self.copy(name:"data_in") # return_stream = up_stream data_out = down_stream if down_stream return down_stream.data_condition_valve(data_in:self) end data_in = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC data_out = self else if down_stream data_out = down_stream end end belong_to_module.DataInf_C_draw << data_condition_valve_draw( h:h, l:l, condition_button:, condition_data:condition_data, data_in:data_in, data_out:data_out, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_condition_valve_draw(h: 0, l: 0, condition_button: "condition_button", condition_data: "condition_data", data_in: "data_in", data_out: "data_out", up_stream: nil, down_stream: nil) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/tdl/data_inf/data_condition_valve_auto.rb', line 58 def data_condition_valve_draw( h:0, l:0, condition_button:"condition_button", condition_data:"condition_data", data_in:"data_in", data_out:"data_out", up_stream:nil, down_stream:nil ) large_name_len( h, l, , condition_data, data_in, data_out ) instance_name = "data_condition_valve_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_condition_valve.sv data_condition_valve#( .H (#{align_signal(h)}), .L (#{align_signal(l)}) ) #{instance_name}( /* input */ .condition_button (#{align_signal(,q_mark=false)}), /* input [H:L] */ .condition_data (#{align_signal(condition_data,q_mark=false)}), /* data_inf_c.slaver*/ .data_in (#{align_signal(data_in,q_mark=false)}), /* data_inf_c.master*/ .data_out (#{align_signal(data_out,q_mark=false)}) ); " end |
#data_connect_pipe(up_stream: nil, down_stream: nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/tdl/data_inf/bak/data_connect_pipe.rb', line 11 def data_connect_pipe(up_stream:nil,down_stream:nil) if down_stream && !up_stream down_stream.data_connect_pipe(up_stream:self,down_stream:down_stream) return down_stream end if (@reset.is_a? Reset) && (@reset.active != 'low') reset_str = "~"+reset.signal else reset_str = @reset; end $_draw = lambda { data_connect_pipe_draw(clock:@clock,reset:reset_str,up_stream:up_stream,down_stream:self) } @correlation_proc +=$_draw.call return self end |
#data_connect_pipe_draw(clock: nil, reset: nil, up_stream: nil, down_stream: nil) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/tdl/data_inf/bak/data_connect_pipe.rb', line 28 def data_connect_pipe_draw(clock:nil,reset:nil,up_stream:nil,down_stream:nil) large_name_len(clock,reset,up_stream,down_stream,up_stream.signal+'"valid"') "data_connect_pipe #( .DSIZE (#{align_signal("#{signal}.DSIZE",false)}) )data_connect_pipe_#{signal}inst( /* input */ .clock (#{align_signal(clock)}), /* input */ .rst_n (#{align_signal(reset)}), /* input */ .clk_en (#{align_signal("1'b1")}), /* input */ .from_up_vld (#{align_signal("#{up_stream.signal}.valid",false)}), /* input [DSIZE-1:0] */ .from_up_data (#{align_signal("#{up_stream.signal}.data",false)}), /* output */ .to_up_ready (#{align_signal("#{up_stream.signal}.ready",false)}), /* input */ .from_down_ready (#{align_signal("#{down_stream.signal}.ready",false)}), /* output */ .to_down_vld (#{align_signal("#{down_stream.signal}.valid",false)}), /* output[DSIZE-1:0] */ .to_down_data (#{align_signal("#{down_stream.signal}.data",false)}) );" end |
#data_connect_pipe_inf(indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_connect_pipe_inf_auto.rb', line 9 def data_connect_pipe_inf( indata:"indata", outdata:"outdata", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_connect_pipe_inf','../../axi/data_interface/data_inf_c/data_connect_pipe_inf.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_connect_pipe_inf','../../axi/data_interface/data_inf_c/data_connect_pipe_inf.sv']) return_stream = self indata = DataInf_C.same_name_socket(:from_up,mix=true,indata,nil,belong_to_module) unless indata.is_a? String outdata = DataInf_C.same_name_socket(:to_down,mix=true,outdata,nil,belong_to_module) unless outdata.is_a? String if up_stream.nil? && indata.eql?("indata") && (!(outdata.eql?("outdata")) || !down_stream.nil?) # up_stream = self.copy(name:"indata") # return_stream = up_stream outdata = down_stream if down_stream return down_stream.data_connect_pipe_inf(indata:self) end indata = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC outdata = self else if down_stream outdata = down_stream end end belong_to_module.DataInf_C_draw << data_connect_pipe_inf_draw( indata:indata, outdata:outdata, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_connect_pipe_inf_draw(indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/tdl/data_inf/data_connect_pipe_inf_auto.rb', line 50 def data_connect_pipe_inf_draw( indata:"indata", outdata:"outdata", up_stream:nil, down_stream:nil ) large_name_len( indata, outdata ) instance_name = "data_connect_pipe_inf_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_connect_pipe_inf.sv data_connect_pipe_inf #{instance_name}( /* data_inf_c.slaver*/ .indata (#{align_signal(indata,q_mark=false)}), /* data_inf_c.master*/ .outdata (#{align_signal(outdata,q_mark=false)}) ); " end |
#data_inf_c_pipe_condition(and_condition: "and_condition", indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_inf_c_pipe_condition_auto.rb', line 9 def data_inf_c_pipe_condition( and_condition:"and_condition", indata:"indata", outdata:"outdata", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_inf_c_pipe_condition','../../axi/data_interface/data_inf_c/data_inf_c_pipe_condition.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_inf_c_pipe_condition','../../axi/data_interface/data_inf_c/data_inf_c_pipe_condition.sv']) return_stream = self indata = DataInf_C.same_name_socket(:from_up,mix=true,indata,nil,belong_to_module) unless indata.is_a? String outdata = DataInf_C.same_name_socket(:to_down,mix=true,outdata,nil,belong_to_module) unless outdata.is_a? String if up_stream.nil? && indata.eql?("indata") && (!(outdata.eql?("outdata")) || !down_stream.nil?) # up_stream = self.copy(name:"indata") # return_stream = up_stream outdata = down_stream if down_stream return down_stream.data_inf_c_pipe_condition(indata:self) end indata = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC outdata = self else if down_stream outdata = down_stream end end belong_to_module.DataInf_C_draw << data_inf_c_pipe_condition_draw( and_condition:and_condition, indata:indata, outdata:outdata, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_inf_c_pipe_condition_draw(and_condition: "and_condition", indata: "indata", outdata: "outdata", up_stream: nil, down_stream: nil) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/tdl/data_inf/data_inf_c_pipe_condition_auto.rb', line 52 def data_inf_c_pipe_condition_draw( and_condition:"and_condition", indata:"indata", outdata:"outdata", up_stream:nil, down_stream:nil ) large_name_len( and_condition, indata, outdata ) instance_name = "data_inf_c_pipe_condition_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_inf_c_pipe_condition.sv data_inf_c_pipe_condition #{instance_name}( /* input */ .and_condition (#{align_signal(and_condition,q_mark=false)}), /* data_inf_c.slaver*/ .indata (#{align_signal(indata,q_mark=false)}), /* data_inf_c.master*/ .outdata (#{align_signal(outdata,q_mark=false)}) ); " end |
#data_inf_cross_clk(up_stream: nil, down_stream: nil) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/tdl/data_inf/bak/data_inf_cross_clk.rb', line 6 def data_inf_cross_clk(up_stream:nil,down_stream:nil) if down_stream && !up_stream down_stream.data_inf_cross_clk(up_stream:self,down_stream:down_stream) return down_stream end down_stream = self $_draw = lambda { data_inf_cross_clk_draw(up_stream:up_stream,down_stream:down_stream) } @correlation_proc +=$_draw.call return self end |
#data_inf_cross_clk_draw(up_stream: nil, down_stream: nil) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/tdl/data_inf/bak/data_inf_cross_clk.rb', line 18 def data_inf_cross_clk_draw(up_stream:nil,down_stream:nil) large_name_len(up_stream,down_stream) "data_inf_cross_clk data_inf_cross_clk_#{signal}_inst( /* data_inf_c.slaver */ .slaver (#{align_signal(up_stream)}), /* data_inf_c.master */ .master (#{align_signal(down_stream)}) );" end |
#data_inf_planer(latency: 3, pack_data: nil, up_stream: nil, down_stream: nil) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/tdl/data_inf/bak/data_inf_planer.rb', line 45 def data_inf_planer(latency:3,pack_data:nil,up_stream:nil,down_stream:nil) if down_stream && !up_stream down_stream.data_inf_planer(latency:latency,pack_data:pack_data,up_stream:self,down_stream:down_stream) return down_stream end down_stream_nc = self.from_data_inf up_stream_nc = up_stream.to_data_inf down_stream_nc.data_inf_planer(latency:latency,clock:@clock,reset:@reset,pack_data:pack_data,up_stream:up_stream_nc,down_stream:down_stream_nc) return up_stream end |
#data_inf_ticktack(sub_hbit: @dsize-1, sub_lbit: 0, mode: "COMPARE:<", index_data: nil, compare_data: nil, up_stream: nil, down_stream: self) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/tdl/data_inf/bak/data_inf_ticktack.rb', line 47 def data_inf_ticktack(sub_hbit:@dsize-1,sub_lbit:0,mode:"COMPARE:<",index_data:nil,compare_data:nil,up_stream:nil,down_stream:self) if down_stream && !up_stream down_stream.data_inf_ticktack(sub_hbit:sub_hbit,sub_lbit:sub_lbit,mode:mode,index_data:index_data,compare_data:compare_data,up_stream:self,down_stream:down_stream) return down_stream end down_stream_nc = self.from_data_inf up_stream_nc = up_stream.to_data_inf down_stream_nc.data_inf_ticktack(sub_hbit:sub_hbit,sub_lbit:sub_lbit,mode:mode,index_data:index_data,compare_data:compare_data,up_stream:self,down_stream:down_stream,clock:@clock,reset:@reset) return up_stream end |
#data_mirrors(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/_data_mirrors.rb', line 9 def data_mirrors(h:0,l:0,mode:"CDS_MODE",condition_data:"condition_data",data_in:"data_in",data_mirror:"data_mirror",up_stream:nil,down_stream:nil) return_stream = self if data_mirror.is_a? DataInf_C data_mirror = [data_mirror] elsif data_mirror.is_a? DataInf data_mirror = [data_mirror.to_data_inf_c()] end unless data_mirror.is_a? Array raise TdlError.new("DATA_MIRROR must a Array") end num = data_mirror.length data_in = DataInf_C.same_name_socket(:from_up,mix=true,data_in) data_mirror = DataInf_C.same_name_socket(:to_down,mix=false,data_mirror) # puts data_mirror.signal if up_stream==nil && data_in=="data_in" up_stream = self.copy(name:"data_in") return_stream = up_stream end data_in = up_stream if up_stream data_mirror = self unless self==belong_to_module.DataInf_C_NC belong_to_module.DataInf_C_draw << data_mirrors_draw(h:h,l:l,num:num,mode:mode,condition_data:condition_data,data_in:data_in,data_mirror:data_mirror,up_stream:up_stream,down_stream:down_stream) return return_stream end |
#data_mirrors_draw(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/tdl/data_inf/_data_mirrors.rb', line 42 def data_mirrors_draw(h:0,l:0,num:8,mode:"CDS_MODE",condition_data:"condition_data",data_in:"data_in",data_mirror:"data_mirror",up_stream:nil,down_stream:nil) large_name_len(h,l,num,mode,condition_data,data_in,data_mirror) " data_mirrors#( .H (#{align_signal(h)}), .L (#{align_signal(l)}), .NUM (#{align_signal(num)}), .MODE (#{align_signal(mode)}) ) data_mirrors_#{signal}_inst( /* input [H:L] */ .condition_data (#{align_signal(condition_data,q_mark=false)}), /* data_inf_c.slaver*/ .data_in (#{align_signal(data_in,q_mark=false)}), /* data_inf_c.master*/ .data_mirror (#{align_signal(data_mirror,q_mark=false)}) ); " end |
#data_mirrors_verb(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_mirrors_verb.sv_auto.rb', line 9 def data_mirrors_verb( h:0, l:0, num:8, mode:"CDS_MODE", condition_data:"condition_data", data_in:"data_in", data_mirror:"data_mirror", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_mirrors_verb','../../axi/data_interface/data_inf_c/data_mirrors_verb.sv.bak') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_mirrors_verb','../../axi/data_interface/data_inf_c/data_mirrors_verb.sv.bak']) return_stream = self data_in = DataInf_C.same_name_socket(:from_up,mix=true,data_in,nil,belong_to_module) unless data_in.is_a? String data_mirror = DataInf_C.same_name_socket(:to_down,mix=false,data_mirror,nil,belong_to_module) unless data_mirror.is_a? String if up_stream.nil? && data_in.eql?("data_in") && (!(data_mirror.eql?("data_mirror")) || !down_stream.nil?) # up_stream = self.copy(name:"data_in") # return_stream = up_stream data_mirror = down_stream if down_stream return down_stream.data_mirrors_verb(data_in:self) end data_in = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC data_mirror = self else if down_stream data_mirror = down_stream end end belong_to_module.DataInf_C_draw << data_mirrors_verb_draw( h:h, l:l, num:num, mode:mode, condition_data:condition_data, data_in:data_in, data_mirror:data_mirror, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_mirrors_verb_draw(h: 0, l: 0, num: 8, mode: "CDS_MODE", condition_data: "condition_data", data_in: "data_in", data_mirror: "data_mirror", up_stream: nil, down_stream: nil) ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/tdl/data_inf/data_mirrors_verb.sv_auto.rb', line 60 def data_mirrors_verb_draw( h:0, l:0, num:8, mode:"CDS_MODE", condition_data:"condition_data", data_in:"data_in", data_mirror:"data_mirror", up_stream:nil, down_stream:nil ) large_name_len( h, l, num, mode, condition_data, data_in, data_mirror ) instance_name = "data_mirrors_verb_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_mirrors_verb.sv.bak data_mirrors_verb#( .H (#{align_signal(h)}), .L (#{align_signal(l)}), .NUM (#{align_signal(num)}), .MODE (#{align_signal(mode)}) ) #{instance_name}( /* input [H:L] */ .condition_data (#{align_signal(condition_data,q_mark=false)}), /* data_inf_c.slaver*/ .data_in (#{align_signal(data_in,q_mark=false)}), /* data_inf_c.master*/ .data_mirror (#{align_signal(data_mirror,q_mark=false)}) ); " end |
#data_uncompress(asize: 8, lsize: 8, data_zip: "data_zip", data_unzip: "data_unzip", up_stream: nil, down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_uncompress_auto.rb', line 9 def data_uncompress( asize:8, lsize:8, data_zip:"data_zip", data_unzip:"data_unzip", up_stream:nil, down_stream:nil ) Tdl.add_to_all_file_paths('data_uncompress','../../axi/data_interface/data_inf_c/data_uncompress.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_uncompress','../../axi/data_interface/data_inf_c/data_uncompress.sv']) return_stream = self data_zip = DataInf_C.same_name_socket(:from_up,mix=true,data_zip,nil,belong_to_module) unless data_zip.is_a? String data_unzip = DataInf_C.same_name_socket(:to_down,mix=true,data_unzip,nil,belong_to_module) unless data_unzip.is_a? String if up_stream.nil? && data_zip.eql?("data_zip") && (!(data_unzip.eql?("data_unzip")) || !down_stream.nil?) # up_stream = self.copy(name:"data_zip") # return_stream = up_stream data_unzip = down_stream if down_stream return down_stream.data_uncompress(data_zip:self) end data_zip = up_stream if up_stream unless self.eql? belong_to_module.DataInf_C_NC data_unzip = self else if down_stream data_unzip = down_stream end end belong_to_module.DataInf_C_draw << data_uncompress_draw( asize:asize, lsize:lsize, data_zip:data_zip, data_unzip:data_unzip, up_stream:up_stream, down_stream:down_stream) return return_stream end |
#data_uncompress_draw(asize: 8, lsize: 8, data_zip: "data_zip", data_unzip: "data_unzip", up_stream: nil, down_stream: nil) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/tdl/data_inf/data_uncompress_auto.rb', line 54 def data_uncompress_draw( asize:8, lsize:8, data_zip:"data_zip", data_unzip:"data_unzip", up_stream:nil, down_stream:nil ) large_name_len( asize, lsize, data_zip, data_unzip ) instance_name = "data_uncompress_#{signal}_inst" " // FilePath:::../../axi/data_interface/data_inf_c/data_uncompress.sv data_uncompress#( .ASIZE (#{align_signal(asize)}), .LSIZE (#{align_signal(lsize)}) ) #{instance_name}( /* data_inf_c.slaver*/ .data_zip (#{align_signal(data_zip,q_mark=false)}), /* data_inf_c.master*/ .data_unzip (#{align_signal(data_unzip,q_mark=false)}) ); " end |
#data_valve(button: "button", data_in: "data_in", data_out: "data_out", down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/data_valve_auto.rb', line 9 def data_valve( button:"button", data_in:"data_in", data_out:"data_out", down_stream:nil ) Tdl.add_to_all_file_paths('data_valve','../../axi/data_interface/data_inf_c/data_valve.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['data_valve','../../axi/data_interface/data_inf_c/data_valve.sv']) return_stream = self data_in = DataInf_C.same_name_socket(:from_up,mix=true,data_in,nil,belong_to_module) unless data_in.is_a? String data_out = DataInf_C.same_name_socket(:to_down,mix=true,data_out,nil,belong_to_module) unless data_out.is_a? String unless self.eql? belong_to_module.DataInf_C_NC data_out = self else if down_stream data_out = down_stream end end belong_to_module.DataInf_C_draw << data_valve_draw( button:, data_in:data_in, data_out:data_out, down_stream:down_stream) return return_stream end |
#datainf_c_master_empty(master: "master", down_stream: nil) ⇒ Object
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 |
# File 'lib/tdl/data_inf/datainf_c_master_empty_auto.rb', line 9 def datainf_c_master_empty( master:"master", down_stream:nil ) Tdl.add_to_all_file_paths('datainf_c_master_empty','../../axi/data_interface/datainf_c_master_empty.sv') # GlobalParam.CurrTdlModule.add_to_all_file_paths(['datainf_c_master_empty','../../axi/data_interface/datainf_c_master_empty.sv']) return_stream = self master = DataInf_C.same_name_socket(:to_down,mix=true,master,nil,belong_to_module) unless master.is_a? String unless self.eql? belong_to_module.DataInf_C_NC master = self else if down_stream master = down_stream end end belong_to_module.DataInf_C_draw << datainf_c_master_empty_draw( master:master, down_stream:down_stream) return return_stream end |
#datainf_c_master_empty_draw(master: "master", down_stream: nil) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/tdl/data_inf/datainf_c_master_empty_auto.rb', line 38 def datainf_c_master_empty_draw( master:"master", down_stream:nil ) large_name_len( master ) instance_name = "datainf_c_master_empty_#{signal}_inst" " // FilePath:::../../axi/data_interface/datainf_c_master_empty.sv datainf_c_master_empty #{instance_name}( /* data_inf_c.master*/ .master (#{align_signal(master,q_mark=false)}) ); " end |
#direct(slaver: "slaver", master: "master", up_stream: nil, down_stream: nil) ⇒ Object
@@pre_inst << lambda
alias_method :direct,:data_c_direct
return ""
559 560 561 |
# File 'lib/tdl/elements/data_inf.rb', line 559 def direct(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil) data_c_direct(slaver:slaver,master:master,up_stream:up_stream,down_stream:up_stream) end |
#draw ⇒ Object
def left_port_length
("/* data_inf_c." + @port.to_s + " */ ").length
end
def right_port_length
(".#{@name.to_s}#{array_inst} ").length
end
def ex_port(left_align_len = 7,right_align_len = 7)
if left_align_len >= left_port_length
sub_left_len = left_align_len - left_port_length
else
sub_left_len = 0
end
if right_align_len >= right_port_length
sub_right_len = right_align_len - right_port_length
else
sub_right_len = 0
end
if @port
("/* data_inf_c." + @port.to_s + " "*sub_left_len + "*/ " + "."+@name.to_s + array_inst + " "*sub_right_len)
end
end
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/tdl/elements/data_inf.rb', line 300 def draw super return '' if @_to_data_inf.empty? && @correlation_proc.empty? && @interconnect_up_streams.empty? unless @interconnect_up_streams.empty? @correlation_proc += interconnect_draw(prio:"WAIT_IDLE") end # return head_str+@_to_data_inf+@correlation_proc+end_str if @name == "implicit" tag = "DATA_INF_C NC" else tag = signal end page(tag:tag,body:@_to_data_inf+@correlation_proc) end |
#DSIZE(index = nil) ⇒ Object
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 |
# File 'lib/tdl/elements/data_inf.rb', line 610 def DSIZE(index=nil) if dimension.empty? && !port @dsize else unless index "#{signal(index)}.DSIZE".to_nq else dimension_size = dimension.size zstr = '' ClassHDL::AssignDefOpertor.with_rollback_opertors(:old) do zstr = "[0]"*dimension_size end "#{signal}#{zstr}.DSIZE".to_nq end end end |
#from_data_inf ⇒ Object
348 349 350 351 352 |
# File 'lib/tdl/elements/data_inf.rb', line 348 def from_data_inf() new_obj = belong_to_module.Def.datainf(name:@name+"_nc",dsize:@dsize) belong_to_module.DataInf_C_draw << from_data_inf_draw(up_stream:new_obj,down_stream:self) return new_obj end |
#from_data_inf_draw(up_stream: nil, down_stream: nil) ⇒ Object
354 355 356 357 358 359 360 |
# File 'lib/tdl/elements/data_inf.rb', line 354 def from_data_inf_draw(up_stream:nil,down_stream:nil) large_name_len(up_stream,down_stream) "data_inf_A2B data_inf_A2B_#{signal}_inst ( /* data_inf.slaver */ .slaver (#{align_signal(up_stream)}), /* data_inf_c.master */ .master (#{align_signal(down_stream)}) );" end |
#inherited(name: nil, clock: nil, reset: nil, dsize: nil, freqM: nil, dimension: []) ⇒ Object Also known as: copy
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/tdl/elements/data_inf.rb', line 435 def inherited(name:@name.to_s,clock: nil,reset: nil,dsize: nil,freqM: nil,dimension:[]) a = nil ClassHDL::AssignDefOpertor.with_rollback_opertors(:old) do append_name = name_copy(name) _freqM = use_which_freq_when_copy(clock,freqM) a = belong_to_module.Def.datainf_c( name:append_name, clock: clock || self.clock, reset: reset || self.rst_n, dsize: dsize || self.DSIZE, freqM: _freqM, dimension: dimension) end a end |
#inst ⇒ Object
246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/tdl/elements/data_inf.rb', line 246 def inst return "" if @ghost || @port with_new_align(0) do if @reset.is_a? SignalElm if @reset.active.casecmp("LOW") == 0 "data_inf_c #(.DSIZE(#{dsize}),.FreqM(#{intf_def_freqM})) #{signal} #{array_inst}(.clock(#{align_signal(@clock,false)}),.rst_n(#{align_signal(@reset,false)}));" else "data_inf_c #(.DSIZE(#{dsize}),.FreqM(#{intf_def_freqM})) #{signal} #{array_inst}(.clock(#{align_signal(@clock,false)}),.rst_n(!#{align_signal(@reset,false)}));" end else "data_inf_c #(.DSIZE(#{dsize}),.FreqM(#{intf_def_freqM})) #{signal} #{array_inst}(.clock(#{align_signal(@clock,false)}),.rst_n(#{align_signal(@reset,false)}));" end end end |
#inst_port ⇒ Object
def port_length
("data_inf_c." + @port.to_s + " ").length
end
265 266 267 268 269 270 271 272 |
# File 'lib/tdl/elements/data_inf.rb', line 265 def inst_port # if @port # ("data_inf_c." + @port.to_s + " " + " "*sub_len + @name.to_s + array_inst) # end return ["data_inf_c." + @port.to_s,@name.to_s,array_inst] end |
#interconnect_draw(prio: "ROBIN") ⇒ Object
def interconnect_draw(prio:“OFF”)
# sub_inst
num = @interconnect_up_streams.length
large_name_len(@interconnect_sub_set,self)
# p @interconnect_sub_set
“data_inf_c_interconnect_M2S #(
.NUM (#{align_signal(num)}),
.PRIO (#{align_signal(prio)})
)M2S_noaddr_#signal_inst( /* data_inf_c.slaver */ .s00 (#align_signal(@interconnect_sub_set)),//[NUM-1:0], /* data_inf_c.master */ .m00 (#align_signal(self)) );“
end
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/tdl/data_inf/bak/data_inf_c_interconnect.rb', line 50 def interconnect_draw if @interconnect_up_streams.length == 1 belong_to_module.ExOther_draw << ( " data_c_direct data_c_direct_#{name}_instMM( /* data_inf_c.slaver */ .slaver (sub_#{(name)}[0]), /* data_inf_c.master */ .master (#{name}) ); ") elsif @m2s_interconnect_addr belong_to_module.ExOther_draw << addr_interconnect_draw() else belong_to_module.ExOther_draw << noaddr_interconnect_draw() end end |
#rst_n(index = nil) ⇒ Object
627 628 629 630 631 632 633 |
# File 'lib/tdl/elements/data_inf.rb', line 627 def rst_n(index=nil) if dimension.empty? && !port @reset else "#{signal(index)}.rst_n".to_nq end end |
#sub_inst ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/tdl/data_inf/data_c_interconnect.rb', line 43 def sub_inst return '' if @interconnect_up_streams.empty? belong_to_module.ExOther_inst << ( " data_inf_c #(.DSIZE(#{name}.DSIZE)) sub_#{(name)}[#{@interconnect_up_streams.length}-1:0](.clock(#{name}.clock),.rst_n(#{name}.rst_n));\n " + sub_direct) end |
#to_data_inf ⇒ Object
def self.inst
port_str = GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.pre_inst.map { |e| e.call }.join("\n")
# puts @@inst_stack[0].call
# puts port_str
GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.inst_stack.map { |e| e.call }.join("")+page(tag:"DATA_INF_C POST",body:port_str)
end
def self.draw
str = ""
GlobalParam.CurrTdlModule.BindEleClassVars.DataInf_C.draw_stack.each do |e|
str += e.call
end
return str
end
334 335 336 337 338 |
# File 'lib/tdl/elements/data_inf.rb', line 334 def to_data_inf() new_obj = belong_to_module.Def.datainf(name:@name+"_nc",dsize:@dsize) belong_to_module.DataInf_C_draw << to_data_inf_draw(up_stream:self,down_stream:new_obj) return new_obj end |
#to_data_inf_draw(up_stream: nil, down_stream: nil) ⇒ Object
340 341 342 343 344 345 346 |
# File 'lib/tdl/elements/data_inf.rb', line 340 def to_data_inf_draw(up_stream:nil,down_stream:nil) large_name_len(up_stream,down_stream) "data_inf_B2A data_inf_B2A_#{signal}_inst ( /* data_inf_c.slaver */ .slaver (#{align_signal(up_stream)}), /* data_inf.master */ .master (#{align_signal(down_stream)}) );" end |
#vld_rdy ⇒ Object
rh = super(port_array,rep,“data_inf_c”,up_stream_rep) do |h|
h[:type] = DataInf_C
yield h
end
end
27 28 29 30 31 32 33 34 35 |
# File 'lib/tdl/rebuild_ele/data_inf_c.rb', line 27 def vld_rdy # puts method(:valid).source_location # puts method(:ready).source_location # puts (valid & ready ).class # puts valid.method("&").source_location valid.to_s.concat(" && ").concat(ready.to_s).to_nq # (valid & ready).brackets # valid & ready end |
#|(a) ⇒ Object
def copy()
490 491 492 493 494 495 496 497 498 |
# File 'lib/tdl/elements/data_inf.rb', line 490 def |(a) raise TdlError.new(" PIPE STREAM is not a DataInf_C or DataInf") if( !(a.is_a? DataInf_C) || !(a.is_a? DataInf)) if a.is_a? DataInf b = a.to_data_inf_c else b = a end data_connect_pipe_inf(up_stream:b) end |