Module: TdlSpace::ExCreateTP

Included in:
BaseElm, ClassHDL::EnumStruct, ClassHDL::StructVar, TdlBaseInterface
Defined in:
lib/tdl/exlib/test_point.rb

Instance Method Summary collapse

Instance Method Details

#create_tp(desc = '', file = nil, line = nil) ⇒ Object



107
108
109
110
# File 'lib/tdl/exlib/test_point.rb', line 107

def create_tp(desc='',file=nil,line=nil)
    # TdlTestPoint.new(target: self, name: name, descript: desc, file: file, line: line)
    ExCreateTPSurge.new(target: self, descript: desc, file: file, line: line)
end

#root_ref(&block) ⇒ Object

定义获取 信号的绝对路径



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/tdl/exlib/test_point.rb', line 113

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