Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/optimize.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    178178
    179179  def set_domain
     180    domain_cells = {}
    180181    @cell_list.each{ |c|
    181182      if c.is_generate? then
     
    191192          @domain_roots[ dn ] = [ dr ]
    192193        end
     194        if domain_cells[ dr ]  then
     195          domain_cells[ dr ] << c
     196        else
     197          domain_cells[ dr ] = [ c ]
     198        end
    193199      end
    194200    }
     
    196202    @domain_roots.each{ |dn, drs|
    197203      drs.uniq!
    198       if ! $debug then
    199         dbgPrint "domains celltype:#{@name} domain=#{dn} "
     204      if $verbose && dn then
     205        print "[domain] celltype=#{@name} domainType=#{dn} domainRootRegions={"
     206        delim = ""
    200207        drs.each{ |r|
    201           dbgPrint " region=#{r.get_name}"
     208          print delim, r.get_name
     209          delim = ", "
    202210        }
    203         dbgPrint "\n"
     211        print "}\n"
     212        drs.each{ |r|
     213          print "[domain] celltype=#{@name} domainRootRegion=#{r.get_name} domainType=#{dn} domainKind=#{r.get_domain_root.get_domain_type.get_kind} domainCells={"
     214          delim = ""
     215          domain_cells[r].each{ |c|
     216            print delim, c.get_name
     217            delim = ", "
     218          }
     219          print "}\n"
     220        }
    204221      end
    205222    }
     
    212229      # domain_type は一つのノードに一つしかないので、一つの要素を無条件で取り出す
    213230      if regions.length > 1 then
    214         cdl_info( "celltype:#{@name} has cells in multi domain.\n" )
    215         if @idx_is_id == false then
    216           cdl_info( "celltype:#{@name} forcely set idx_is_id\n" )
    217         end
    218         @idx_is_id_act = true
     231        if $verbose then
     232          cdl_info( "I9999 celltype '$1' has cells in multi-domain.\n", @name )
     233        end
     234        # if @idx_is_id == false then
     235        #   cdl_info( "I9999 celltype '$1' forcely set idx_is_id\n", @name )
     236        # end
     237        @b_need_ptab = true
     238        # @idx_is_id_act = true
    219239      end
    220240    }
     
    228248    end
    229249
     250    optimize_call
     251    if $unopt_entry == false then
     252      optimize_entry
     253    end
     254  end
     255
     256  #=== Celltype#呼び口最適化
     257  def optimize_call
    230258    @port.each{ |port|
    231259      next if port.get_port_type != :CALL
     
    238266        if $verbose then
    239267          print "optimized by omit: port: #{port.get_name} : o\n"
     268        end
     269        next
     270      elsif port.is_dynamic? then
     271        if $verbose then
     272          print "unoptimized by dynamic: port: #{port.get_name}\n"
     273        end
     274        next
     275      elsif port.is_ref_desc? then
     276        if $verbose then
     277          print "unoptimized by ref_desc: port: #{port.get_name}\n"
    240278        end
    241279        next
     
    351389      dbgPrint "#{port.get_name} : # of cells : #{port_cells.length}  # of ports : #{port_ports.length}\n"
    352390    }
    353 
     391  end
     392
     393  #=== Celltype#受け口最適化
     394  # optimize_entry は、呼び口最適化の結果を使用している
     395  def optimize_entry
    354396    # 受け口最適化の設定
    355397    @port.each{ |port|
Note: See TracChangeset for help on using the changeset viewer.