URL
https://opencores.org/ocsvn/soc_maker/soc_maker/trunk
Show entire file |
Details |
Blame |
View Log
Rev 9 |
Rev 10 |
Line 197... |
Line 197... |
end
|
end
|
@inst_part << "port map( \n#{port_str} );\n\n\n" if port_str.size > 0
|
@inst_part << "port map( \n#{port_str} );\n\n\n" if port_str.size > 0
|
|
|
end
|
end
|
|
|
def add_ifc_default_assignment( inst, inst_name, ifc_name, default )
|
def add_ifc_default_assignment( inst, inst_name, ifc_name )
|
|
|
|
|
tmp = ""
|
tmp = ""
|
inst.ports( ifc_name.to_s ) do |port_name, dir, length, default, is_last|
|
inst.ports( ifc_name.to_s ) do |port_name, dir, length, default_val, is_last|
|
if dir == 1 # assign default value only if it is an input
|
if dir == 1 # assign default value only if it is an input
|
if length > 1
|
if length > 1
|
tmp << "#{inst_name}_#{port_name} <= ( others => '#{default}' );\n"
|
tmp << "#{inst_name}_#{port_name} <= ( others => '#{default_val}' );\n"
|
else
|
else
|
tmp << "#{inst_name}_#{port_name} <= '#{default}';\n"
|
tmp << "#{inst_name}_#{port_name} <= '#{default_val}';\n"
|
end
|
end
|
end
|
end
|
end
|
end
|
@asgn_part << tmp
|
@asgn_part << tmp
|
|
|
Line 273... |
Line 273... |
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}"
|
tmp << " and \n" unless i == src_inst_sel.size-1
|
tmp << " and \n" unless i == src_inst_sel.size-1
|
else
|
else
|
puts "#{port_tmp_name}: #{length[port_name] > 1}"
|
|
if length[ port_name ] > 1
|
if length[ port_name ] > 1
|
tmp << "( others => '0' )"
|
tmp << "( others => '0' )"
|
else
|
else
|
tmp << "'0'"
|
tmp << "'0'"
|
end
|
end
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.