OpenCores
URL https://opencores.org/ocsvn/soc_maker/soc_maker/trunk

Subversion Repositories soc_maker

[/] [soc_maker/] [trunk/] [lib/] [soc_maker/] [hdl_coder.rb] - Diff between revs 8 and 9

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 8 Rev 9
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
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.