| |
README Notes:
Version 1.0 2008aug21
Example test of traits to process InstTerms. This code illustrates
the use of traits declarations to simplify processing of InstTerm
attribute information across a range of different Types. Traits are
used to enable a simple call interface, regardless of the whether
the InstTerm is in the Block or Module Domain.
The traits declarations handle
- semantics differences: ModInstTerms have no getPins() method
- function name differences: The ModInstTerm container is a Module
The InstTerm container is a Block
transparently to the caller, who simply need call the function with
the InstTerm handle: getMasterInfo( BlockOrModInstTerm )
without having to know the details of the Term and Container Type
differences among different InstTerm Types.
1. Unpack the tarball.
2. cd to the resulting directory.
3. Edit the Makefile to set up the environment
4. Type: make run
5. Verify output looks like this:
ASSERT [PASS] SUCCESS_SYS == system("rm -rf LibDir; mkdir LibDir")
ASSERT [PASS] (lib = oaLib::create(scNameLib, "LibDir", oacSharedLibMode, "oaDMFileSys"))->isValid()
ASSERT [PASS] (desInv = oaDesign::open(scNameLib, scNameInv, scNameView, vt, 'w' ))->isValid()
ASSERT [PASS] (desTop = oaDesign::open(scNameLib, scNameTop, scNameView, vt, 'w' ))->isValid()
ASSERT [PASS] iti->isValid()
ASSERT [PASS] ito->isValid()
ASSERT [PASS] miti->isValid()
ASSERT [PASS] mito->isValid()
OBJECT TYPE CONTAINER #PINS TERM POS TERM NAME
ScalarTerm Block 0 N/A termIn
ModScalarTerm Module 0 N/A termIn
ScalarTerm Block 0 N/A TermOut
ModScalarTerm Module 0 N/A TermOut
|