Class: HRP2CyclicHandlerPlugin

Inherits:
HRP2KernelObjectPlugin show all
Defined in:
lib/tecsgen/plugin/HRP2CyclicHandlerPlugin.rb

Overview

celltype プラグインの共通の親クラス

Constant Summary collapse

@@ep =
[:eStartCyclic, :eStopCyclic, :eManageCyclic, :eReferCyclic]

Constants inherited from Plugin

Plugin::PluginArgProc

Instance Method Summary collapse

Methods inherited from HRP2KernelObjectPlugin

check_referenced_cells, #gen_factory, get_celltype_list, include_celltype?, include_region, #initialize, isChecked, set_celltype, set_region_list, #string_cfg_cre

Methods inherited from CelltypePlugin

#gen_factory, gen_post_code, #initialize, #new_cell

Methods inherited from Plugin

#cdl_error, #check_plugin_arg, #gen_cdl_file, #gen_ep_func?, #gen_postamble, #gen_preamble, #initialize, #new_cell, #parse_plugin_arg, #print_msg, #set_locale, #set_silent

Methods inherited from Node

#cdl_error, #cdl_error2, #cdl_error3, #cdl_info, #cdl_info2, #cdl_warning, #cdl_warning2, #get_locale, #initialize, #locale_str, #set_locale

Constructor Details

This class inherits a constructor from HRP2KernelObjectPlugin

Instance Method Details

#get_entry_ports_name_listObject

tCyclicHandlerの受け口リスト



72
73
74
# File 'lib/tecsgen/plugin/HRP2CyclicHandlerPlugin.rb', line 72

def get_entry_ports_name_list
  @@ep
end

file : output file (ex.tecsgen.cfg) cell : val : tab :



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/tecsgen/plugin/HRP2CyclicHandlerPlugin.rb', line 51

def print_cfg_cre(file, cell, val, tab)
  val[:id] = val[:id].gsub(/(^|[^\$])\$id\$/, "\\1#{@celltype.get_name}_#{cell.get_name}")
    # $cbp$  #983
    name_array = @celltype.get_name_array cell
    cell_CBP = name_array[8] # CBP
    # CRE_XXXの生成
    if (cell.get_region.get_region_type != :DOMAIN) || (cell.get_region.get_param != :KERNEL_DOMAIN)
        # 無所属 or ユーザドメインに属する場合
      raise "cyclic handler #{val[:id]} must belong to kernel domain."
    else
      file.print <<EOT
#{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, #{cell_CBP}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} });
EOT
    end
end


67
68
69
# File 'lib/tecsgen/plugin/HRP2CyclicHandlerPlugin.rb', line 67

def print_cfg_sac(file, val, acv)
  file.puts "SAC_CYC(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });"
end