Class: TdlTestUnit

Inherits:
TdlBuild show all
Defined in:
lib/tdl/sdlmodule/test_unit_module.rb

Class Method Summary collapse

Methods inherited from TdlBuild

with_package

Class Method Details

.method_missing(method, *args, &block) ⇒ Object

return ClassHDL::AnonyModule.new



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/tdl/sdlmodule/test_unit_module.rb', line 34

def self.method_missing(method,*args,&block)
    
    sdlm = TestUnitModule.new(name: method,out_sv_path: args[0])

    si = sdlm.input - "from_up_pass"
    so = sdlm.output.logic - "to_down_pass"

    @@package_names ||= []
    sdlm.head_import_packages = []
    sdlm.head_import_packages += @@package_names

    @@package_names.each do |e|
        sdlm.require_package(e,false) if e
    end
    @@package_names = []
    sdlm.instance_exec(&block)

    if args[0] && File.exist?(args[0])
        sdlm.gen_sv_module
    else 
        sdlm.origin_sv = true 
    end
    sdlm
end