Line 265... |
Line 265... |
|
|
# combine all sources
|
# combine all sources
|
tmp = "#{port_tmp_name} <= "
|
tmp = "#{port_tmp_name} <= "
|
# loop over instances
|
# loop over instances
|
src_inst_sel.each_with_index do |(inst_name, inst), i|
|
src_inst_sel.each_with_index do |(inst_name, inst), i|
|
( tmp_name, port) = inst.get_port( src_ifc_sel[ inst_name ], port_name )
|
( tmp_name, port) = inst.port( src_ifc_sel[ inst_name ], port_name )
|
if port != nil
|
if port != nil
|
if port[ :len ] < length[ port_name ]
|
if port[ :len ] < length[ port_name ]
|
tmp << "\"" + "0" * ( length[ port_name ] - port[ :len ] ) + "\" & "
|
tmp << "\"" + "0" * ( length[ port_name ] - port[ :len ] ) + "\" & "
|
end
|
end
|
tmp << "#{inst_name}_#{tmp_name}"
|
tmp << "#{inst_name}_#{tmp_name}"
|
Line 289... |
Line 289... |
tmp = ""
|
tmp = ""
|
assigned = false
|
assigned = false
|
# assign to destination
|
# assign to destination
|
dst_inst_sel.each_with_index do |(inst_name, inst), i|
|
dst_inst_sel.each_with_index do |(inst_name, inst), i|
|
if not inst == nil #TODO
|
if not inst == nil #TODO
|
( tmp_name, port) = inst.get_port( dst_ifc_sel[ inst_name ], port_name )
|
( tmp_name, port) = inst.port( dst_ifc_sel[ inst_name ], port_name )
|
if port != nil
|
if port != nil
|
tmp << "#{inst_name}_#{tmp_name} <= #{port_tmp_name}"
|
tmp << "#{inst_name}_#{tmp_name} <= #{port_tmp_name}"
|
tmp << "( #{port[ :len ]}-1 downto 0 )" if port[ :len ] > 1
|
tmp << "( #{port[ :len ]}-1 downto 0 )" if port[ :len ] > 1
|
tmp << ";\n"
|
tmp << ";\n"
|
assigned = true
|
assigned = true
|
Line 308... |
Line 308... |
# p dst_ifc
|
# p dst_ifc
|
# tmp = ""
|
# tmp = ""
|
# dst_inst_sel.each_with_index do |(inst_name, inst), i|
|
# dst_inst_sel.each_with_index do |(inst_name, inst), i|
|
# p inst_name
|
# p inst_name
|
# p port_name
|
# p port_name
|
# ( tmp_name, port) = inst.get_port( dst_ifc_sel[ inst_name ], port_name )
|
# ( tmp_name, port) = inst.port( dst_ifc_sel[ inst_name ], port_name )
|
# tmp << "#{inst_name}_#{tmp_name} <= ( others => 'X' );\n"
|
# tmp << "#{inst_name}_#{tmp_name} <= ( others => 'X' );\n"
|
# end
|
# end
|
# @asgn_part << tmp;
|
# @asgn_part << tmp;
|
end
|
end
|
|
|