Class: HRPObjectPlugin

Inherits:
HRPKernelObjectPlugin show all
Defined in:
lib/tecsgen/plugin/HRPObjectPlugin.rb

Constant Summary collapse

@@api =
{
    "SEMAPHORE" => ["SEM", :id, :attribute, :initialCount, :maxCount],
    "EVENTFLAG" => ["FLG", :id, :attribute, :flagPattern],
    "DATAQUEUE" => ["DTQ", :id, :attribute, :dataCount, :dataqueueManagementBuffer],
    "PRIORITY_DATAQUEUE" => ["PDQ", :id, :attribute, :dataCount, :maxDataPriority, :priorityDataqueueManagementBuffer],
    "FIXED_SIZE_MEMORYPOOL" => ["MPF", :id, :attribute, :blockCount, :blockSize, :memoryPool, :memoryPoolManagementBuffer],
    "KERNEL" => ["SYS"],
    "MESSAGE_BUFFER" => ["MBF", :id, :attribute, :maxMessageSize, :bufferSize, :mbfmb],
    "MUTEX" => ["MTX", :id, :attribute, :ceilingPriority]
}

Constants inherited from Plugin

Plugin::PluginArgProc

Instance Method Summary collapse

Methods inherited from HRPKernelObjectPlugin

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

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 HRPKernelObjectPlugin

Instance Method Details

HRPObjectPlugin#print_cfg_cre

CRE_XXXの出力

file

FILE: 出力先ファイル

val

string: カーネルオブジェクトの属性の解析結果

tab

string: インデント用のtab



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/tecsgen/plugin/HRPObjectPlugin.rb', line 59

def print_cfg_cre(file, cell, val, tab)
  if @@api.has_key?(@plugin_arg_str) == false
    raise "#{@plugin_arg_str} is unknown"
  elsif @plugin_arg_str != "KERNEL"
    arg_list = []
      params = @@api[@plugin_arg_str]
      if @plugin_arg_str == "MUTEX" && (val[:attribute] =~ /\bTA_CEILING\b/).nil?
        slice_end = -2 # :ceilingPriority を外す
      else
        slice_end = -1
      end
      # p @plugin_arg_str, slice_end, val[:attribute], (val[:attribute] =~ /\bTA_CEILING\b/)
      params.slice(2..slice_end).each {|attr|
        arg_list << val[attr].to_s
      }
      file.print tab
      file.puts "CRE_#{@@api[@plugin_arg_str].at(0)}(#{val[:id]}, { #{arg_list.join(", ")} });"
  end
end

HRPObjectPlugin#print_cfg_sac

SAC_XXXの出力

file

FILE: 出力先ファイル

val

string: カーネルオブジェクトの属性の解析結果

acv

string: アクセスベクタ



84
85
86
87
88
89
90
91
92
# File 'lib/tecsgen/plugin/HRPObjectPlugin.rb', line 84

def print_cfg_sac(file, val, acv)
  if @@api.has_key?(@plugin_arg_str) == false
    raise "#{@plugin_arg_str} is unknown"
  elsif @plugin_arg_str != "KERNEL"
    file.puts "SAC_#{@@api[@plugin_arg_str].at(0)}(#{val[:id]}, { #{acv[:accessPattern1]}, #{acv[:accessPattern2]}, #{acv[:accessPattern3]}, #{acv[:accessPattern4]} });"
  else
    file.puts "SAC_#{@@api[@plugin_arg_str].at(0)}({ #{acv[:accessPattern1]}, #{acv[:accessPattern2]}, #{acv[:accessPattern3]}, #{acv[:accessPattern4]} });"
  end
end