OpenAccess Contributed ReUse Library
OA Contribution - Software - ReUse Code
Summary  |  Forums  |  News

 
Browse Library | New Contribution

Contribution Detail

Traits to assist oaObject processing
Author Forum Language License CoO
Si2 Browse - Post C++ Apache License, Version 2.0 (shrinkwrap) None Provided
Description:
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.

Versions of this Contribution:

ID Download Version(s) Downloads Date Posted
42 oa22.04 (22.04p007 DM4) 17 2008-08-21 16:07
  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         

Versions of a Contribution are set by the owner as the most recent OpenAccess release the contribution was successfully built or tested with.
A contributor can:
  • Update their contribution with a new OA release version of the code.
  • OR Delete a previous version. (Basically replace with a more recent version).




 
Copyright © 2005-2010
Silicon Integration Initiative, Inc (Si2)
All rights reserved
Site Map
How to Get an Account
Contact Si2
Contact Site Admin
Legal Notice/Disclaimer