edu.byu.ece.edif.util.export.jhdl
Class JHDLWrapper

java.lang.Object
  extended by edu.byu.ece.edif.util.export.jhdl.JHDLWrapper
Direct Known Subclasses:
BuildWrapper

public class JHDLWrapper
extends java.lang.Object

Builds a JHDL Wrapper circuit from an EDIF file with a passed technology and file name as arguments to main.

Version:
$Id: JHDLWrapper.java 44 2008-05-10 14:08:30Z mrspud $
Author:
Welson Sun, Tyler Anderson

Field Summary
static java.lang.String[] VALID_TECHNOLOGY
          This public array of Strings contains all of the valid technologies supported by the JHDL translator.
 
Constructor Summary
JHDLWrapper()
           
 
Method Summary
static byucc.jhdl.base.Cell buildWrapper(byucc.jhdl.base.HWSystem parent, EdifCellInstance instance, java.lang.String technology)
           
static byucc.jhdl.base.Cell buildWrapper(byucc.jhdl.base.HWSystem parent, EdifCellInstance instance, java.lang.String technology, boolean addEdifCellInstanceAsProperty)
           Dynamically create a top-level "test-bench" cell is a "Logic" object Create the cell interface (see BuildWrapper code for figuring out how to decide) Create all the wires owned by this new cell (see BuildWrapper) (connect them to the ports using the connect call).
static boolean checkTechnologyValidity(java.lang.String technology)
          This method will check the validity of a given technology string.
static byucc.jhdl.base.Wire[] createWiresFromPorts(SimpleTestBench testbench, EdifCellInstance eci, boolean addEdifCellInstanceAsProperty)
          Takes the EdifPorts, and make wires for the CellInterface.
static java.lang.String JHDL_ID(java.lang.String id)
          Returns a JHDL-valid Identifier.
static java.lang.String listValidTechnologies()
          Returns a String representing the valid/supported technologies.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALID_TECHNOLOGY

public static final java.lang.String[] VALID_TECHNOLOGY
This public array of Strings contains all of the valid technologies supported by the JHDL translator.

Constructor Detail

JHDLWrapper

public JHDLWrapper()
Method Detail

checkTechnologyValidity

public static boolean checkTechnologyValidity(java.lang.String technology)
This method will check the validity of a given technology string. This method return a false if the technology is not valid and true if it is valid.

Parameters:
technology - The technology name to check against the valid ones
Returns:
True if the passed-in name matches a valid technology

listValidTechnologies

public static java.lang.String listValidTechnologies()
Returns a String representing the valid/supported technologies.

Returns:
a String representing valid/supported technologies

JHDL_ID

public static java.lang.String JHDL_ID(java.lang.String id)
Returns a JHDL-valid Identifier.

Parameters:
id - The String to make JHDL-valid
Returns:
A JHDL-valid String

buildWrapper

public static byucc.jhdl.base.Cell buildWrapper(byucc.jhdl.base.HWSystem parent,
                                                EdifCellInstance instance,
                                                java.lang.String technology)

buildWrapper

public static byucc.jhdl.base.Cell buildWrapper(byucc.jhdl.base.HWSystem parent,
                                                EdifCellInstance instance,
                                                java.lang.String technology,
                                                boolean addEdifCellInstanceAsProperty)
  1. Dynamically create a top-level "test-bench" cell
    • is a "Logic" object
    • Create the cell interface (see BuildWrapper code for figuring out how to decide)
    • Create all the wires owned by this new cell (see BuildWrapper) (connect them to the ports using the connect call).
  2. Call Parser
    • Create a new Edi2JHDL object with proper technology
    • Generate sub-cell using toJHDLCircuit method of Edi2JHDL
    • You can now call the CLI thing with the new top-level cell

Parameters:
parent - The parent HWSystem for the new cell.
instance - EdifCellInstance of the top EDIF cell to build the JHDL cell off of.
technology - The technology to base the circuit off of.
Returns:
The JHDL version of the EDIF Cell.

createWiresFromPorts

public static byucc.jhdl.base.Wire[] createWiresFromPorts(SimpleTestBench testbench,
                                                          EdifCellInstance eci,
                                                          boolean addEdifCellInstanceAsProperty)
Takes the EdifPorts, and make wires for the CellInterface.

Parameters:
testbench - The testbench to add wires to for each top-level port
edifCell - The EdifCell to get the ports from, in order to make the wires
Returns:
A Wire Array of top-level Wires Objects for the CellInterface

main

public static void main(java.lang.String[] args)