Module: TdlSpace::ExCreateTP
- Included in:
- BaseElm, ClassHDL::EnumStruct, ClassHDL::StructVar, TdlBaseInterface
- Defined in:
- lib/tdl/exlib/test_point.rb
Overview
def method_missing(method,*args,&block)
if method.to_s !~ /[a-z]\w+/
raise TdlError.new "Test point name<#{method}> is illegal"
end
self - method
end
end
Instance Method Summary collapse
-
#root_ref(&block) ⇒ Object
定义获取 信号的绝对路径.
Instance Method Details
#root_ref(&block) ⇒ Object
定义获取 信号的绝对路径
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/tdl/exlib/test_point.rb', line 115 def root_ref(&block) ClassHDL::AssignDefOpertor.with_rollback_opertors(:old) do rels = path_refs(&block) if block_given? sst = "block given" else sst = "no block" end if rels.size == 1 rels[0] elsif rels.size == 0 raise TdlError.new "#{self} Cant find root ref {#{sst}}" else raise TdlError.new "#{self} Find multi root refs {#{sst}} \n#{rels.join("\n")}\n" end end end |