Class: ATK1ResourcePlugin

Inherits:
CelltypePlugin show all
Defined in:
lib/tecsgen/plugin/ATK1ResourcePlugin.rb

Overview

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

Constant Summary

Constants inherited from Plugin

Plugin::PluginArgProc

Instance Method Summary collapse

Methods inherited from CelltypePlugin

gen_post_code

Methods inherited from Plugin

#cdl_error, #check_plugin_arg, #gen_cdl_file, #gen_ep_func?, #gen_postamble, #gen_preamble, #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, #locale_str, #set_locale

Constructor Details

#initialize(celltype, option) ⇒ ATK1ResourcePlugin

signature

Celltype シグニチャ(インスタンス)


45
46
47
# File 'lib/tecsgen/plugin/ATK1ResourcePlugin.rb', line 45

def initialize(celltype, option)
  super
end

Instance Method Details

#gen_factory(file) ⇒ Object

def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )

end

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/tecsgen/plugin/ATK1ResourcePlugin.rb', line 76

def gen_factory(file)
  file2 = CFile.open("#{$gen}/RESOURCE_tecsgen.oil", "w")
file3 = CFile.open("#{$gen}/#{@celltype.get_name}_factory.#{$h_suffix}", "w")

# RESOURCE
@celltype.get_cell_list.each {|cell|

  if cell.is_generate?

    str = cell.get_name

    if str.to_s == "RES_SCHEDULER"

      cell.set_specified_id(1)

    else

      file3.print "DeclareResource( #{cell.get_name} );\n"

      file2.print "\tRESOURCE #{cell.get_name} {\n"

      # PROPERTY
      join = cell.get_join_list.get_item(:property)
      if join
        str = join.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')

        if str == "LINKED"
          file2.print "\t\tRESOURCEPROPERTY = #{str} {\n"
          join2 = cell.get_join_list.get_item(:linkedResource)
          str2 = join2.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
          file2.print "\t\t\tLINKEDRESOURCE = #{str2};\n"
          file2.print "\t\t};\n"
        else
          file2.print "\t\tRESOURCEPROPERTY = #{str};\n"
        end
      end

      file2.print "\t};\n"
      file2.print "\n"

    end

  end
}

file2.close
file3.close
end

#new_cell(cell) ⇒ Object

def gen_cdl_file file

end

58
59
# File 'lib/tecsgen/plugin/ATK1ResourcePlugin.rb', line 58

def new_cell(cell)
end