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



294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/tdl/sdlmodule/test_unit_module.rb', line 294

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