class DataInf_C

2017-07-31 13:06:50 +0800 require_relative “.././tdl”

require_relative '..\..\tdl\tdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

2018-05-04 14:40:11 +0800 require_relative “.././tdl” require_relative '....tdltdl'

Constants

PORT_REP
Synth_REP

parse text for autogen method and constant ###

UP_STREAM_REP

Attributes

dsize[RW]
ghost[RW]
id[RW]
interconnect_mid[RW]
m2s_interconnect_addr[RW]
name[RW]
port[RW]

Public Class Methods

data_bind(num:2,data_in:"data_in",data_out:"data_out") click to toggle source
# File lib/tdl/data_inf/bak/data_bind_auto.rb, line 38
def self.data_bind(num:2,data_in:"data_in",data_out:"data_out")
    return_stream = nil
    
    
    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 ) click to toggle source
# 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) click to toggle source
# File lib/tdl/data_inf/bak/data_c_direct_auto.rb, line 41
def self.data_c_direct(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil)
    return_stream = nil
    
    if down_stream==nil && master=="master"
        if up_stream.is_a? DataInf_C
            down_stream = up_stream.copy(name:"master")
        else
            down_stream = slaver.copy(name:"master")
        end
        return_stream = down_stream
    end

    
    if up_stream==nil && slaver=="slaver"
        if down_stream.is_a? DataInf_C
            up_stream = down_stream.copy(name:"slaver")
        else
            up_stream = master.copy(name:"slaver")
        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
        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) click to toggle source
# File lib/tdl/data_inf/bak/data_c_direct_mirror_auto.rb, line 41
def self.data_c_direct_mirror(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil)
    return_stream = nil
    
    if down_stream==nil && master=="master"
        if up_stream.is_a? DataInf_C
            down_stream = up_stream.copy(name:"master")
        else
            down_stream = slaver.copy(name:"master")
        end
        return_stream = down_stream
    end

    
    if up_stream==nil && slaver=="slaver"
        if down_stream.is_a? DataInf_C
            up_stream = down_stream.copy(name:"slaver")
        else
            up_stream = master.copy(name:"slaver")
        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
        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 ) click to toggle source
# 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 ) click to toggle source
# 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 ) click to toggle source
# 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) click to toggle source
# File lib/tdl/data_inf/bak/data_c_tmp_cache_auto.rb, line 41
def self.data_c_tmp_cache(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil)
    return_stream = nil
    
    if down_stream==nil && master=="master"
        if up_stream.is_a? DataInf_C
            down_stream = up_stream.copy(name:"master")
        else
            down_stream = slaver.copy(name:"master")
        end
        return_stream = down_stream
    end

    
    if up_stream==nil && slaver=="slaver"
        if down_stream.is_a? DataInf_C
            up_stream = down_stream.copy(name:"slaver")
        else
            up_stream = master.copy(name:"slaver")
        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
        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) click to toggle source
# File lib/tdl/data_inf/bak/data_condition_mirror_auto.rb, line 47
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)
    return_stream = nil
    
    if down_stream==nil && data_out=="data_out"
        if up_stream.is_a? DataInf_C
            down_stream = up_stream.copy(name:"data_out")
        else
            down_stream = data_in.copy(name:"data_out")
        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_out.copy(name:"data_in")
        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
        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) click to toggle source
# File lib/tdl/data_inf/bak/data_condition_valve_auto.rb, line 46
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)
    return_stream = nil
    
    if down_stream==nil && data_out=="data_out"
        if up_stream.is_a? DataInf_C
            down_stream = up_stream.copy(name:"data_out")
        else
            down_stream = data_in.copy(name:"data_out")
        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_out.copy(name:"data_in")
        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_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_button,condition_data:condition_data,data_in:data_in,data_out:data_out,up_stream:up_stream,down_stream:down_stream)
    else
        DataInf_C.NC.data_condition_valve(h:h,l:l,condition_button: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) click to toggle source
# File lib/tdl/data_inf/bak/data_connect_pipe_inf_auto.rb, line 41
def self.data_connect_pipe_inf(indata:"indata",outdata:"outdata",up_stream:nil,down_stream:nil)
    return_stream = nil
    
    if down_stream==nil && outdata=="outdata"
        if up_stream.is_a? DataInf_C
            down_stream = up_stream.copy(name:"outdata")
        else
            down_stream = indata.copy(name:"outdata")
        end
        return_stream = down_stream
    end

    
    if up_stream==nil && indata=="indata"
        if down_stream.is_a? DataInf_C
            up_stream = down_stream.copy(name:"indata")
        else
            up_stream = outdata.copy(name:"indata")
        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
        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) click to toggle source
# File lib/tdl/data_inf/bak/data_inf_c_pipe_condition_auto.rb, line 42
def self.data_inf_c_pipe_condition(and_condition:"and_condition",indata:"indata",outdata:"outdata",up_stream:nil,down_stream:nil)
    return_stream = nil
    
    if down_stream==nil && outdata=="outdata"
        if up_stream.is_a? DataInf_C
            down_stream = up_stream.copy(name:"outdata")
        else
            down_stream = indata.copy(name:"outdata")
        end
        return_stream = down_stream
    end

    
    if up_stream==nil && indata=="indata"
        if down_stream.is_a? DataInf_C
            up_stream = down_stream.copy(name:"indata")
        else
            up_stream = outdata.copy(name:"indata")
        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
        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,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) click to toggle source
# 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) click to toggle source
# File lib/tdl/data_inf/bak/data_mirrors_verb.sv_auto.rb, line 47
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)
    return_stream = nil
    
    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_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
        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) click to toggle source
# File lib/tdl/data_inf/bak/data_uncompress_auto.rb, line 44
def self.data_uncompress(asize:8,lsize:8,data_zip:"data_zip",data_unzip:"data_unzip",up_stream:nil,down_stream:nil)
    return_stream = nil
    
    if down_stream==nil && data_unzip=="data_unzip"
        if up_stream.is_a? DataInf_C
            down_stream = up_stream.copy(name:"data_unzip")
        else
            down_stream = data_zip.copy(name:"data_unzip")
        end
        return_stream = down_stream
    end

    
    if up_stream==nil && data_zip=="data_zip"
        if down_stream.is_a? DataInf_C
            up_stream = down_stream.copy(name:"data_zip")
        else
            up_stream = data_unzip.copy(name:"data_zip")
        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
        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") click to toggle source
# File lib/tdl/data_inf/bak/data_valve_auto.rb, line 37
def self.data_valve(button:"button",data_in:"data_in",data_out:"data_out")
    return_stream = nil
    
    
    DataInf_C.NC._data_valve(button:button,data_in:data_in,data_out:data_out)
    return return_stream
end
datainf_c_master_empty(master:"master",down_stream:nil) click to toggle source
# File lib/tdl/axi_stream/bak/datainf_c_master_empty_auto.rb, line 29
def self.datainf_c_master_empty(master:"master",down_stream:nil)
    return_stream = nil
    
    
    
    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
        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) click to toggle source
# File lib/tdl/axi_stream/bak/datainf_c_slaver_empty_auto.rb, line 29
def self.datainf_c_slaver_empty(slaver:"slaver",up_stream:nil)
    return_stream = nil
    
    
    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) click to toggle source
# 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) click to toggle source

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

# 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
new(name:"data_inf",dsize:8,clock:nil,reset:nil,port:false,dimension:[],freqM:nil) click to toggle source
Calls superclass method CLKInfElm::new
# 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
parse_ports(port_array=nil) { |h| ... } click to toggle source
# 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") click to toggle source
# File lib/tdl/axi_stream/bak/part_data_pair_map_auto.rb, line 41
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")
    return_stream = nil
    
    
    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) click to toggle source
# 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

Public Instance Methods

&(*a) click to toggle source
# 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) click to toggle source
# File lib/tdl/data_inf/bak/data_inf_c_interconnect.rb, line 6
def <<(*up_streams)
    up_streams.each do |e|

        if e.is_a? DataInf
            @interconnect_up_streams << e.to_data_inf_c()
        elsif e.is_a? DataInf_C
            @interconnect_up_streams << e
        elsif e.is_a? String
            @interconnect_up_streams << e
        else
            raise TdlError.new("\nDATA INF INTERCONNECT UP_STREAMS ERROR\n")
        end
    end
    unless @_execed_mix
        @@pre_inst << method(:sub_inst).to_proc
    end
    @_execed_mix = true
    return self
end
>>(down_stream) click to toggle source
# File lib/tdl/data_inf/data_c_interconnect.rb, line 29
def >>(down_stream)
    down_stream.<< self
end
DSIZE(index=nil) click to toggle source
# 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
[]=(a,b) click to toggle source

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

# 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") click to toggle source
# File lib/tdl/data_inf/bak/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'])
    return_stream = self
    
    data_in = DataInf_C.same_name_socket(:from_up,mix=false,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_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") click to toggle source
# File lib/tdl/data_inf/bak/data_bind_auto.rb, line 24
    def _data_bind_draw(num:2,data_in:"data_in",data_out:"data_out")

        large_name_len(num,data_in,data_out)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_bind.sv
data_bind#(
    .NUM    (#{align_signal(num)})
) data_bind_#{signal}_inst(
/*  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") click to toggle source
# 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: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") click to toggle source
# 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(button,data_in,data_out)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_valve.sv
data_valve data_valve_#{signal}_inst(
/*  input            */ .button   (#{align_signal(button,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) click to toggle source
# File lib/tdl/axi_stream/bak/datainf_c_slaver_empty_auto.rb, line 9
def _datainf_c_slaver_empty(slaver:"slaver",up_stream:nil)
    return_stream = self
    
    slaver = up_stream if up_stream
    

    $_draw = lambda { _datainf_c_slaver_empty_draw(slaver:slaver,up_stream:up_stream) }
    @correlation_proc += $_draw.call
    return return_stream
end
_datainf_c_slaver_empty_draw(slaver:"slaver",up_stream:nil) click to toggle source
# File lib/tdl/axi_stream/bak/datainf_c_slaver_empty_auto.rb, line 20
    def _datainf_c_slaver_empty_draw(slaver:"slaver",up_stream:nil)
        large_name_len(slaver)
"
datainf_c_slaver_empty datainf_c_slaver_empty_#{signal}_inst(
/*  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") click to toggle source
# File lib/tdl/axi_stream/bak/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")
    return_stream = self
    
    
    

    $_draw = lambda { _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) }
    @correlation_proc += $_draw.call
    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") click to toggle source
# File lib/tdl/axi_stream/bak/part_data_pair_map_auto.rb, line 20
    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)
"
part_data_pair_map#(
    .NUM      (#{align_signal(num)}),
    .ISIZE    (#{align_signal(isize)}),
    .OSIZE    (#{align_signal(osize)})
) part_data_pair_map_#{signal}_inst(
/*  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) click to toggle source
# 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:@name,clock:@clock,reset:@reset,dsize:@dsize,freqM:nil) click to toggle source
# 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) click to toggle source
# File lib/tdl/elements/data_inf.rb, line 635
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) click to toggle source
Calls superclass method CLKInfElm#clock_reset_taps
# 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
copy(name:@name.to_s,clock: @clock,reset: @reset,dsize: @dsize,dimension:@dimension,freqM:nil) click to toggle source

def copy(name:@name,clock:ref_signal(:clock),reset:ref_signal(:reset),dsize:ref_signal(:dsize),dimension:@dimension,freqM:nil)

append_name = name_copy(name)
_freqM = use_which_freq_when_copy(clock,freqM)
belong_to_module.Def.datainf_c(name:append_name,clock:clock,reset:reset,dsize:dsize,dimension:dimension,freqM:_freqM)

end

# File lib/tdl/elements/data_inf.rb, line 409
def copy(name:@name.to_s,clock: @clock,reset: @reset,dsize: @dsize,dimension:@dimension,freqM:nil)
    append_name = name_copy(name)
    _freqM = use_which_freq_when_copy(clock,freqM)
    belong_to_module.Def.datainf_c(name:append_name,clock:clock,reset:reset,dsize:dsize,dimension:dimension,freqM:_freqM)
end
data_c_cache( data_in:"data_in", data_out:"data_out", up_stream:nil, down_stream:nil ) click to toggle source
# 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) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    return_stream = self
    
    slaver = DataInf_C.same_name_socket(:from_up,mix=true,slaver) unless slaver.is_a? String
    master = DataInf_C.same_name_socket(:to_down,mix=true,master) unless master.is_a? String
    
    if up_stream==nil && slaver=="slaver"
        up_stream = self.copy(name:"slaver")
        return_stream = up_stream
    end

    slaver = up_stream if up_stream
    master = self unless self==DataInf_C.NC

     @instance_draw_stack << lambda { 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) click to toggle source
# File lib/tdl/data_inf/bak/data_c_direct_auto.rb, line 29
    def data_c_direct_draw(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil)

        large_name_len(slaver,master)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_c_direct.sv
data_c_direct data_c_direct_#{signal}_inst(
/*  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) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    return_stream = self
    
    slaver = DataInf_C.same_name_socket(:mirror,mix=true,slaver) unless slaver.is_a? String
    master = DataInf_C.same_name_socket(:mirror,mix=true,master) unless master.is_a? String
    
    if up_stream==nil && slaver=="slaver"
        up_stream = self.copy(name:"slaver")
        return_stream = up_stream
    end

    slaver = up_stream if up_stream
    master = self unless self==DataInf_C.NC

     @instance_draw_stack << lambda { 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) click to toggle source
# File lib/tdl/data_inf/bak/data_c_direct_mirror_auto.rb, line 29
    def data_c_direct_mirror_draw(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil)

        large_name_len(slaver,master)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_c_direct_mirror.sv
data_c_direct_mirror data_c_direct_mirror_#{signal}_inst(
/*  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 ) click to toggle source
# 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 ) click to toggle source
# 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 ) click to toggle source
# 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) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    return_stream = self
    
    slaver = DataInf_C.same_name_socket(:from_up,mix=true,slaver) unless slaver.is_a? String
    master = DataInf_C.same_name_socket(:to_down,mix=true,master) unless master.is_a? String
    
    if up_stream==nil && slaver=="slaver"
        up_stream = self.copy(name:"slaver")
        return_stream = up_stream
    end

    slaver = up_stream if up_stream
    master = self unless self==DataInf_C.NC

     @instance_draw_stack << lambda { 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) click to toggle source
# File lib/tdl/data_inf/bak/data_c_tmp_cache_auto.rb, line 29
    def data_c_tmp_cache_draw(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil)

        large_name_len(slaver,master)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_c_tmp_cache.sv
data_c_tmp_cache data_c_tmp_cache_#{signal}_inst(
/*  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) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    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
    data_mirror = DataInf_C.same_name_socket(:to_down,mix=true,data_mirror) unless data_mirror.is_a? String
    
    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_out = self unless self==DataInf_C.NC

     @instance_draw_stack << lambda { 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) click to toggle source
# File lib/tdl/data_inf/bak/data_condition_mirror_auto.rb, line 30
    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)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_condition_mirror.sv
data_condition_mirror#(
    .H    (#{align_signal(h)}),
    .L    (#{align_signal(l)})
) data_condition_mirror_#{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_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) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    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
    
    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_out = self unless self==DataInf_C.NC

     @instance_draw_stack << lambda { data_condition_valve_draw(h:h,l:l,condition_button: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) click to toggle source
# File lib/tdl/data_inf/bak/data_condition_valve_auto.rb, line 29
    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_button,condition_data,data_in,data_out)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_condition_valve.sv
data_condition_valve#(
    .H    (#{align_signal(h)}),
    .L    (#{align_signal(l)})
) data_condition_valve_#{signal}_inst(
/*  input            */ .condition_button (#{align_signal(condition_button,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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    return_stream = self
    
    indata = DataInf_C.same_name_socket(:from_up,mix=true,indata) unless indata.is_a? String
    outdata = DataInf_C.same_name_socket(:to_down,mix=true,outdata) unless outdata.is_a? String
    
    if up_stream==nil && indata=="indata"
        up_stream = self.copy(name:"indata")
        return_stream = up_stream
    end

    indata = up_stream if up_stream
    outdata = self unless self==DataInf_C.NC

     @instance_draw_stack << lambda { 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) click to toggle source
# File lib/tdl/data_inf/bak/data_connect_pipe_inf_auto.rb, line 29
    def data_connect_pipe_inf_draw(indata:"indata",outdata:"outdata",up_stream:nil,down_stream:nil)

        large_name_len(indata,outdata)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_connect_pipe_inf.sv
data_connect_pipe_inf data_connect_pipe_inf_#{signal}_inst(
/*  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) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    return_stream = self
    
    indata = DataInf_C.same_name_socket(:from_up,mix=true,indata) unless indata.is_a? String
    outdata = DataInf_C.same_name_socket(:to_down,mix=true,outdata) unless outdata.is_a? String
    
    if up_stream==nil && indata=="indata"
        up_stream = self.copy(name:"indata")
        return_stream = up_stream
    end

    indata = up_stream if up_stream
    outdata = self unless self==DataInf_C.NC

     @instance_draw_stack << lambda { 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) click to toggle source
# File lib/tdl/data_inf/bak/data_inf_c_pipe_condition_auto.rb, line 29
    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)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_inf_c_pipe_condition.sv
data_inf_c_pipe_condition data_inf_c_pipe_condition_#{signal}_inst(
/*  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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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,mode:"CDS_MODE",condition_data:"condition_data",data_in:"data_in",data_mirror:"data_mirror",up_stream:nil,down_stream:nil) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    return_stream = self
    
    data_in = DataInf_C.same_name_socket(:from_up,mix=true,data_in) unless data_in.is_a? String
    data_mirror = DataInf_C.same_name_socket(:to_down,mix=false,data_mirror) unless data_mirror.is_a? String
    
    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==DataInf_C.NC

     @instance_draw_stack << lambda { 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) click to toggle source
# File lib/tdl/data_inf/bak/data_mirrors_verb.sv_auto.rb, line 29
    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)
"
// 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)})
) data_mirrors_verb_#{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_uncompress(asize:8,lsize:8,data_zip:"data_zip",data_unzip:"data_unzip",up_stream:nil,down_stream:nil) click to toggle source
# File lib/tdl/data_inf/bak/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'])
    return_stream = self
    
    data_zip = DataInf_C.same_name_socket(:from_up,mix=true,data_zip) unless data_zip.is_a? String
    data_unzip = DataInf_C.same_name_socket(:to_down,mix=true,data_unzip) unless data_unzip.is_a? String
    
    if up_stream==nil && data_zip=="data_zip"
        up_stream = self.copy(name:"data_zip")
        return_stream = up_stream
    end

    data_zip = up_stream if up_stream
    data_unzip = self unless self==DataInf_C.NC

     @instance_draw_stack << lambda { 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) click to toggle source
# File lib/tdl/data_inf/bak/data_uncompress_auto.rb, line 29
    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)
"
// FilePath:::../../axi/data_interface/data_inf_c/data_uncompress.sv
data_uncompress#(
    .ASIZE    (#{align_signal(asize)}),
    .LSIZE    (#{align_signal(lsize)})
) data_uncompress_#{signal}_inst(
/*  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 ) click to toggle source
# 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: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) click to toggle source
# File lib/tdl/axi_stream/bak/datainf_c_master_empty_auto.rb, line 9
def datainf_c_master_empty(master:"master",down_stream:nil)
    return_stream = self
    
    
    master = self

    $_draw = lambda { datainf_c_master_empty_draw(master:master,down_stream:down_stream) }
    @correlation_proc += $_draw.call
    return return_stream
end
datainf_c_master_empty_draw(master:"master",down_stream:nil) click to toggle source
# File lib/tdl/axi_stream/bak/datainf_c_master_empty_auto.rb, line 20
    def datainf_c_master_empty_draw(master:"master",down_stream:nil)
        large_name_len(master)
"
datainf_c_master_empty datainf_c_master_empty_#{signal}_inst(
/*  data_inf_c.master*/ .master (#{align_signal(master,q_mark=false)})
);
"
    end
direct(slaver:"slaver",master:"master",up_stream:nil,down_stream:nil) click to toggle source

@@pre_inst << lambda {

alias_method :direct,:data_c_direct
return ""

}

# 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() click to toggle source

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

Calls superclass method InfElm#draw
# 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
from_data_inf() click to toggle source
# 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) click to toggle source
# 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:@name.to_s,clock: nil,reset: nil,dsize: nil,freqM: nil,dimension:[]) click to toggle source
# 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
Also aliased as: copy
inst() click to toggle source
# 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() click to toggle source

def port_length

("data_inf_c." + @port.to_s + " ").length

end

# 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") click to toggle source
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
# File lib/tdl/data_inf/bak/data_inf_c_interconnect.rb, line 50
    def interconnect_draw(prio:"ROBIN")
        # sub_inst
        num = @interconnect_up_streams.length
        large_name_len(@interconnect_sub_set,self)
        # p @interconnect_sub_set
"data_c_pipe_intc_M2S_verc #(
    .PRIO   (#{align_signal(prio)}),   //BEST_ROBIN BEST_LAST ROBIN LAST WAIT_IDLE
    .NUM    (#{align_signal(num)})
)M2S_noaddr_#{signal}_inst(
/*  input [NUM-1:0]    */     .last     ('1),             //ctrl prio
/*  data_inf_c.slaver  */     .s00      (#{align_signal(@interconnect_sub_set)}),//[NUM-1:0],
/*  data_inf_c.master  */     .m00      (#{align_signal(self)})
);
"
    end
rst_n(index=nil) click to toggle source
# 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() click to toggle source
# File lib/tdl/data_inf/bak/data_inf_c_interconnect.rb, line 26
def sub_inst
    return '' if @interconnect_up_streams.empty?
    # "data_inf_c #(.DSIZE(#{dsize}))  sub_#{signal} [#{@interconnect_up_streams.length-1}:0](#{align_signal(clock)},#{align_signal(reset)});\n"+sub_direct
     @interconnect_sub_set = DataInf_C.same_name_socket(:from_up,mix=false,@interconnect_up_streams,self.copy(name:"sub_#{@name}"))
     return ""
end
to_data_inf() click to toggle source

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

# 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) click to toggle source
# 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() click to toggle source
rh = super(port_array,rep,"data_inf_c",up_stream_rep) do |h|
    h[:type]   = DataInf_C
    yield h
end

end

# 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) click to toggle source

def copy()

# 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

Private Instance Methods

_bind_interconnect_draw() click to toggle source
# File lib/tdl/elements/data_inf.rb, line 540
    def _bind_interconnect_draw
"
data_bind #(
    .NUM        (#{@_bind_up_streams.length})
)data_bind_#{signal}_inst(
/*  data_inf_c.slaver  */   .data_in     (#{align_signal("bind_#{signal}",false)})//[NUM-1:0],
/*  data_inf_c.master  */   .data_out    (#{align_signal(@_bind_down_stream)})//[data_NUM]...[data_0]
);
"
    end
_sub_band_inst() click to toggle source
# File lib/tdl/elements/data_inf.rb, line 520
def _sub_band_inst
    "data_inf_c #(.DSIZE(#{dsize}))  bind_#{signal} [#{@_bind_down_stream.length-1}:0](#{align_signal(clock)},#{align_signal(reset)});\n"
end
_sub_bind_direct() click to toggle source
# File lib/tdl/elements/data_inf.rb, line 525
    def _sub_bind_direct
        str = ""
        @_bind_up_streams.each_index do |index|
            str +=
"
data_valve bind_#{signal}_inst#{index}(
/*  input              */       .button     (1'b1),          //[1] OPEN ; [0] CLOSE
/*  data_inf_c.slaver  */       .data_in    (#{align_signal(@_bind_up_streams[index])}),
/*  data_inf_c.master  */       .data_out   (#{align_signal("bind_#{signal}",false)}[#{index}])
);
"
        end
        return str
    end
addr_interconnect_draw() click to toggle source
# File lib/tdl/data_inf/data_c_interconnect.rb, line 93
def addr_interconnect_draw
    raise TdlError.new("Don't define `addr_interconnect_draw` for DataInf_C yet")
end
data_c_cache_draw( data_in:"data_in", data_out:"data_out", up_stream:nil, down_stream:nil ) click to toggle source
# File lib/tdl/data_inf/data_c_cache_auto.rb, line 50
    def data_c_cache_draw(
        data_in:"data_in",
        data_out:"data_out",
        up_stream:nil,
        down_stream:nil
    )

        large_name_len(
            data_in,
            data_out
        )
        instance_name = "data_c_cache_#{signal}_inst"
"
// FilePath:::../../axi/data_interface/data_inf_c/data_c_cache.sv
data_c_cache #{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_c_pipe_force_vld_draw( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) click to toggle source
# File lib/tdl/data_inf/data_c_pipe_force_vld_auto.rb, line 50
    def data_c_pipe_force_vld_draw(
        slaver:"slaver",
        master:"master",
        up_stream:nil,
        down_stream:nil
    )

        large_name_len(
            slaver,
            master
        )
        instance_name = "data_c_pipe_force_vld_#{signal}_inst"
"
// FilePath:::../../axi/data_interface/data_inf_c/data_c_pipe_force_vld.sv
data_c_pipe_force_vld #{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_pipe_inf_draw( slaver:"slaver", master:"master", up_stream:nil, down_stream:nil ) click to toggle source
# File lib/tdl/data_inf/data_c_pipe_inf_auto.rb, line 50
    def data_c_pipe_inf_draw(
        slaver:"slaver",
        master:"master",
        up_stream:nil,
        down_stream:nil
    )

        large_name_len(
            slaver,
            master
        )
        instance_name = "data_c_pipe_inf_#{signal}_inst"
"
// FilePath:::../../axi/data_interface/data_inf_c/data_c_pipe_inf.sv
data_c_pipe_inf #{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_pipe_intc_m2s_verc_draw( prio:"BEST_ROBIN", num:8, last:"last", s00:"s00", m00:"m00", down_stream:nil ) click to toggle source
# File lib/tdl/data_inf/data_c_pipe_intc_M2S_verc_auto.rb, line 47
    def data_c_pipe_intc_m2s_verc_draw(
        prio:"BEST_ROBIN",
        num:8,
        last:"last",
        s00:"s00",
        m00:"m00",
        down_stream:nil
    )

        large_name_len(
            prio,
            num,
            last,
            s00,
            m00
        )
        instance_name = "data_c_pipe_intc_M2S_verc_#{signal}_inst"
"
// FilePath:::../../axi/data_interface/data_inf_c/data_c_pipe_intc_M2S_verc.sv
data_c_pipe_intc_M2S_verc#(
    .PRIO    (#{align_signal(prio)}),
    .NUM     (#{align_signal(num)})
) #{instance_name}(
/*  input  [NUM-1:0] */ .last (#{align_signal(last,q_mark=false)}),
/*  data_inf_c.slaver*/ .s00  (#{align_signal(s00,q_mark=false)}),
/*  data_inf_c.master*/ .m00  (#{align_signal(m00,q_mark=false)})
);
"
    end
data_valve_draw( button:"button", data_in:"data_in", data_out:"data_out", down_stream:nil ) click to toggle source
# File lib/tdl/data_inf/data_valve_auto.rb, line 43
    def data_valve_draw(
        button:"button",
        data_in:"data_in",
        data_out:"data_out",
        down_stream:nil
    )

        large_name_len(
            button,
            data_in,
            data_out
        )
        instance_name = "data_valve_#{signal}_inst"
"
// FilePath:::../../axi/data_interface/data_inf_c/data_valve.sv
data_valve #{instance_name}(
/*  input            */ .button   (#{align_signal(button,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
dimension_num(e) click to toggle source
# File lib/tdl/data_inf/data_c_interconnect.rb, line 6
def dimension_num(e)
    if e.is_a? Array
        return e.size
    else
        if e.respond_to?(:dimension) && e.dimension && e.dimension.any?
            return e.dimension.last
        else
            return 1
        end
    end
end
noaddr_interconnect_draw() click to toggle source
# File lib/tdl/data_inf/data_c_interconnect.rb, line 79
    def noaddr_interconnect_draw
"
//data_c_pipe_intc_M2S_verc #(
data_c_pipe_intc_M2S_best_last #(
//   .PRIO   (\"BEST_ROBIN\"),   //BEST_ROBIN BEST_LAST ROBIN LAST WAIT_IDLE FORCE_ROBIN
    .NUM    (#{@interconnect_up_streams.length})
)#{name}_M2S_noaddr_inst(
/*  input [NUM-1:0]    */         .last     ({(#{@interconnect_up_streams.length}){1'b1}}),             //ctrl prio
/*  data_inf_c.slaver  */         .s00      (sub_#{(name)}),//[NUM-1:0],
/*  data_inf_c.master  */         .m00      (#{name})
);
"
    end
push_to_stack() click to toggle source
# File lib/tdl/data_inf/data_c_interconnect.rb, line 35
def push_to_stack
    unless @_record_inter_
        belong_to_module.ExOther_pre_inst_stack << method(:sub_inst)
        belong_to_module.ExOther_pre_inst_stack << method(:interconnect_draw)
        @_record_inter_ = true
    end
end
ref_signal(m) click to toggle source
# File lib/tdl/elements/data_inf.rb, line 452
def ref_signal(m)
    if @dimension.empty?
        case m
        when :clock
            "#{signal}.clock"
        when :reset
            "#{signal}.rst_n"
        when :dsize
            "#{signal}.DSIZE"
        else
            ""
        end
    else
        method(m).call
    end
end
sub_direct() click to toggle source
# File lib/tdl/data_inf/data_c_interconnect.rb, line 67
    def sub_direct
        str = ""
        for i in 0...(@interconnect_up_streams.length)
            str +=
"\data_c_direct  data_c_direct_#{name}_inst#{i} (
/*  data_inf_c.slaver  */ .slaver (#{@interconnect_up_streams[i].name}),
/*  data_inf_c.master  */ .master (sub_#{(name)}[#{i}])
);\n"
        end
        return str
    end