Class: TdlSpace::DefPortEleBaseArrayChain
- Inherits:
-
Object
- Object
- TdlSpace::DefPortEleBaseArrayChain
- Defined in:
- lib/tdl/rebuild_ele/ele_base.rb
Instance Method Summary collapse
-
#initialize(ele_class, sdlmodule) ⇒ DefPortEleBaseArrayChain
constructor
A new instance of DefPortEleBaseArrayChain.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(ele_class, sdlmodule) ⇒ DefPortEleBaseArrayChain
Returns a new instance of DefPortEleBaseArrayChain.
762 763 764 765 |
# File 'lib/tdl/rebuild_ele/ele_base.rb', line 762 def initialize(ele_class,sdlmodule) @ele_class = ele_class @sdlmodule = sdlmodule end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 |
# File 'lib/tdl/rebuild_ele/ele_base.rb', line 767 def method_missing(name,*args,&block) ## 检查有没有 modports modports = @ele_class.get_class_var('interface_modports') || [] if !( modports.include?(name.to_sym) || modports.map{ |e| e.to_s }.include?(name.to_s) ) raise TdlError.new("#{@ele_class.get_class_var('hdl_name')} dont have modport #{name}") end hash = args[0] || {} hash[:belong_to_module] = @sdlmodule rel = TdlSpace::DefEleBaseArrayChain.new(hash) rel.tclass = @ele_class rel.modport_type = name return rel end |