174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
# File 'lib/base_chip/project.rb', line 174
def dereference_workload(targets)
configure
fault "project '#{name}' has no blocks defined" unless @blocks
targets ||= ['all']
out = []
workload_hash = Hash.new
targets.each do |t|
case t
when 'gate', 'diffgate', 'all'
self.block_names.each do |b|
out += block_dereference(b,[t],true)
end
when /^all:(.*)$/
self.block_names.each do |b|
out += block_dereference(b,[$1],true)
end
when /:/
tmp = t.split(/:/)
b = tmp.shift
out += block_dereference(b,[tmp.join(':')],true)
else
fault "Cannot determine block in order to run #{t}."
end
end
out.uniq!
out
end
|