270: def method_missing aMeth, *aArgs, &aBlockArg
271: if child = vpi_handle_by_name(aMeth.to_s, self)
272:
273:
274: (class << self; self; end).class_eval do
275: define_method aMeth do
276: child
277: end
278: end
279:
280: child
281:
282: else
283: prop = @@propCache[aMeth]
284:
285: if prop.operation
286: self.send(prop.operation, prop.type, *aArgs, &aBlockArg)
287:
288: else
289: case prop.accessor
290: when :d
291: raise NotImplementedError, 'processing of delay values is not yet implemented.'
292:
293:
294:
295: when :l
296: if prop.assignment
297: value = aArgs.shift
298: put_value(value, prop.type, *aArgs)
299: else
300: get_value(prop.type)
301: end
302:
303: when :i
304: vpi_get(prop.type, self) unless prop.assignment
305:
306: when :b
307: unless prop.assignment
308: value = vpi_get(prop, self)
309: value && (value != 0)
310: end
311:
312: when :s
313: vpi_get_str(prop.type, self) unless prop.assignment
314:
315: when :h
316: vpi_handle(prop.type, self) unless prop.assignment
317:
318: else
319: raise NoMethodError, "unable to access VPI property #{prop.name.inspect} through method #{aMeth.inspect} with arguments #{aArgs.inspect} for handle #{self}"
320: end
321: end
322: end
323: end