Sha256: 37fee62edb185d0b87020ea2c3ffa214051320034142a4ff9bd5acc4c77fb381
Contents?: true
Size: 1.86 KB
Versions: 2
Compression:
Stored size: 1.86 KB
Contents
require 'pathname' module OrigenTesters module SmartestBasedTester class Base class PatternMaster include OrigenTesters::Generator attr_reader :flow, :paths attr_accessor :filename, :id def initialize(flow = nil) @flow = flow @paths = {} end def filename @filename || flow.filename.sub('.tf', '.pmfl') end def subdirectory 'vectors' end def paths { '.' => patterns } end # def add(name, options = {}) # name, subdir = extract_subdir(name, options) # name += '.binl.gz' unless name =~ /binl.gz$/ # # Don't want to ask Origen to compile these, but do want them in the v93k # # compile list # if name =~ /_part\d+\.binl\.gz$/ # Origen.interface.pattern_compiler.part_patterns << name # else # Origen.interface.referenced_patterns << name # end # paths[subdir] ||= [] # # Just add it, duplicates will be removed at render time # paths[subdir] << name unless paths[subdir].include?(name) # end def patterns (references[:subroutine][:all] + references[:subroutine][:ate] + references[:main][:all] + references[:main][:ate]).map do |p| p = p.strip p += '.binl.gz' unless p =~ /binl.gz$/ end.uniq end def references Origen.interface.all_pattern_references[id] end private def extract_subdir(name, options = {}) p = Pathname.new(name.to_s) name = p.basename.to_s subdir = p.dirname.to_s # if subdir == '.' # # In future may support setting a default subdir via the interface # end [name, subdir] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
origen_testers-0.7.9 | lib/origen_testers/smartest_based_tester/base/pattern_master.rb |
origen_testers-0.7.8 | lib/origen_testers/smartest_based_tester/base/pattern_master.rb |