byucc.jhdl.Xilinx
Class TechMapper

java.lang.Object
  extended bybyucc.jhdl.Logic.BasicTechMapper
      extended bybyucc.jhdl.Logic.TechMapper
          extended bybyucc.jhdl.Xilinx.TechMapper
All Implemented Interfaces:
TechMapPadInterface, TechMapPortInterface
Direct Known Subclasses:
Virtex2TechMapper, VirtexTechMapper, XilinxTechMapper, XilinxTechMapper

public abstract class TechMapper
extends TechMapper
implements TechMapPadInterface, TechMapPortInterface

Simple extension of TechMapper class. Forces all Xilinx tech-mappers to have an insertPads method -- used by netlister to add IO pads & bufs and all that good stuff.


Field Summary
 java.util.Hashtable addedPadsTable
           
protected  boolean insertTopLevelClockPad
           
 
Fields inherited from class byucc.jhdl.Logic.TechMapper
_ignore_placement_calls
 
Fields inherited from interface byucc.jhdl.Logic.TechMapPadInterface
DEFAULT_INSERT_PADS
 
Constructor Summary
TechMapper()
           
TechMapper(boolean tme)
           
TechMapper(boolean tme, int reporting_policy)
           
TechMapper(int reporting_policy)
           
 
Method Summary
 java.awt.Dimension checkAllPlacement(Cell c)
           
 void checkCellnameCoherency(Cell c)
           
protected  void checkGenericWidths(Wire[] in, Wire out, java.lang.String gate)
           
protected  void checkGenericWidths(Wire in1, Wire out, java.lang.String gate)
           
protected  void checkGenericWidths(Wire in1, Wire in2, Wire out, java.lang.String gate)
           
protected  void checkGenericWidths(Wire in1, Wire in2, Wire in3, Wire out, java.lang.String gate)
           
protected  void checkGenericWidths(Wire in1, Wire in2, Wire in3, Wire in4, Wire out, java.lang.String gate)
           
 void clockDriver(Cell parent, Wire clock, java.lang.String schedule, java.lang.String name)
           
 Netlister createDefaultNetlister()
          Returns an EDIFNetlister
protected  boolean defaultNetlistIsFlat()
          As EDIF can be hierarchical, this returns false.
 void deleteAddedPads()
           
 java.lang.String getCellName(Cell c)
           
static int getGenericWidth(Wire[] in)
          Checks a Wire array and returns the 'generic' width of the wires.
static int getGenericWidth(Wire[] in, int[] widths)
          Checks a Wire array and returns the 'generic' width of the wires.
 boolean getInsertPads()
          Returns the current setting of insertPads.
 java.lang.String getParentCellName(Cell c)
           
 java.lang.String getRLOCFromPlacementInfo(Cell cell)
           
 java.lang.String getUniqueParentName(Cell c)
           
 void insertPads(Cell top)
          Called by the netlister to add I/O pads to all inputs and outputs to the "top" cell.
protected  void insertTechMapHints(Cell c)
          Adds the hints to the tree - recurses through all cells and puts RLOC properties on placed cells
 void netlist(Cell c, boolean flat, java.lang.String file)
          Netlists the given cell downward hierarchically into the given file.
 void netlist(Cell c, java.lang.String file)
          Netlists the given cell downward hierarchically into the given file.
protected  boolean[] processParams(java.lang.String[] names, java.lang.String[] mods)
          Evaluates which modifiers in a valid list were specified.
static void setErrorReportingPolicy(int policy)
           
 void setInsertPads(boolean b)
          Inserting pads is a convenience method for Xilinx parts for the moment.
 void setInsertTopLevelClockPad(boolean b)
          Set a flag indicating whether a top level clock pad is inserted
 void setInsertTopLevelPorts(boolean b)
          Inserting top level ports is simply a convenience method passed on to the netlister created by the techmapper
 void techmap(Logic parent, java.lang.Object arg)
          Used to change whether a techmapper inserts placement hints before netlisting.
static boolean useBehavioralModel()
           
static void useBehavioralModel(boolean b)
           
 
Methods inherited from class byucc.jhdl.Logic.TechMapper
ALIGN_BOTTOM, ALIGN_LEFT, ALIGN_LSB, ALIGN_MSB, ALIGN_RIGHT, ALIGN_TOP, createPlacementInfo, DOWN, getIgnorePlacementCalls, getInsertTechMapHints, getLibName, getSinkLeafCell, getSourceLeafCell, getSourcePlaceable, getSourcePlaceableLeaf, getTechMapHint, getTechMapHint, map, netlist, place, place, place, regc, regc, regce, regce, regp, regp, regpe, regpe, regr, regr, regre, regre, regs, regs, regse, regse, setIgnorePlacementCalls, setInsertTechMapHints, TOLEFT, TORIGHT, UP
 
Methods inherited from class byucc.jhdl.Logic.BasicTechMapper
add, add, addsub, addsub, and, ashiftr, buf, concat, concat, constant, constant, getTechnology, gnd, mux, nand, netlist, netlist, nor, not, or, padClock, padIn, padInout, padOut, padOutT, pulldown, pullup, range, reg, reg, setTechnology, shiftl, shiftr, sub, sub, tbuf, unsupportedComponent, vcc, wire, wire, xnor, xor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addedPadsTable

public java.util.Hashtable addedPadsTable

insertTopLevelClockPad

protected boolean insertTopLevelClockPad
Constructor Detail

TechMapper

public TechMapper()

TechMapper

public TechMapper(int reporting_policy)

TechMapper

public TechMapper(boolean tme)

TechMapper

public TechMapper(boolean tme,
                  int reporting_policy)
Method Detail

setErrorReportingPolicy

public static void setErrorReportingPolicy(int policy)

checkCellnameCoherency

public void checkCellnameCoherency(Cell c)

checkAllPlacement

public java.awt.Dimension checkAllPlacement(Cell c)

getRLOCFromPlacementInfo

public java.lang.String getRLOCFromPlacementInfo(Cell cell)

insertPads

public void insertPads(Cell top)
Called by the netlister to add I/O pads to all inputs and outputs to the "top" cell. Note that inout ports are NOT given a pad - this is the user's responsibility.

Specified by:
insertPads in interface TechMapPadInterface
Parameters:
top - the top-level cell to insert I/O pads into

processParams

protected final boolean[] processParams(java.lang.String[] names,
                                        java.lang.String[] mods)
Evaluates which modifiers in a valid list were specified.

Parameters:
names - The list of valid modifiers
mods - The list of modifiers to evaluate
Returns:
a boolean array with true in each index corresponding to a found name, false in each index not found in mods
Throws:
BuildException - if a modifier not listed in name is encountered.

insertTechMapHints

protected void insertTechMapHints(Cell c)
Adds the hints to the tree - recurses through all cells and puts RLOC properties on placed cells

Overrides:
insertTechMapHints in class TechMapper
Parameters:
c - the cell (and possibly its subtree) to add techmap hints to.

setInsertPads

public void setInsertPads(boolean b)
Inserting pads is a convenience method for Xilinx parts for the moment. For actually downloading a design to a board, the boardmodel should take care of pads, but for a quick check that the M1 tools can parse a circuit, the user can have a pad and buffer attached to each top-level signal.

Specified by:
setInsertPads in interface TechMapPadInterface
Parameters:
b - boolean flag

getInsertPads

public boolean getInsertPads()
Returns the current setting of insertPads.

Specified by:
getInsertPads in interface TechMapPadInterface
Returns:
returns true if the netlister is set to insert pads, otherwise returns false.

setInsertTopLevelClockPad

public void setInsertTopLevelClockPad(boolean b)
Description copied from interface: TechMapPadInterface
Set a flag indicating whether a top level clock pad is inserted

Specified by:
setInsertTopLevelClockPad in interface TechMapPadInterface
Parameters:
b - boolean flag

setInsertTopLevelPorts

public void setInsertTopLevelPorts(boolean b)
Inserting top level ports is simply a convenience method passed on to the netlister created by the techmapper

Specified by:
setInsertTopLevelPorts in interface TechMapPortInterface
Parameters:
b - boolean flag

createDefaultNetlister

public Netlister createDefaultNetlister()
Returns an EDIFNetlister

Specified by:
createDefaultNetlister in class BasicTechMapper
Returns:
a new EDIFNetlister set for hierarchical netlisting

defaultNetlistIsFlat

protected final boolean defaultNetlistIsFlat()
As EDIF can be hierarchical, this returns false.

Returns:
false, since the default netlist is hierarchical

netlist

public void netlist(Cell c,
                    java.lang.String file)
Description copied from class: TechMapper
Netlists the given cell downward hierarchically into the given file.

Overrides:
netlist in class TechMapper
Parameters:
c - the root node of the netlist
file - A String with the name of the target file.

netlist

public void netlist(Cell c,
                    boolean flat,
                    java.lang.String file)
Description copied from class: TechMapper
Netlists the given cell downward hierarchically into the given file. Override this for more pre- or post-netlist behavior

Overrides:
netlist in class TechMapper
Parameters:
c - the root node of the netlist
flat - whether the netlist should be flat
file - A String with the name of the target file.

deleteAddedPads

public void deleteAddedPads()

useBehavioralModel

public static boolean useBehavioralModel()

useBehavioralModel

public static void useBehavioralModel(boolean b)

getGenericWidth

public static int getGenericWidth(Wire[] in)
Checks a Wire array and returns the 'generic' width of the wires. If all wires are N-bit and 1-bit, this function returns N. If all wires are one bit, it returns 1. If there is more than one wire width > 1, this functions returns -1.

Parameters:
in - the array of wires to determine the generic width of
Returns:
the common width of all non-atomic-wires, 1 if all atomic wires, or -1 if different non-atomic widths

getGenericWidth

public static int getGenericWidth(Wire[] in,
                                  int[] widths)
Checks a Wire array and returns the 'generic' width of the wires. If all wires are N-bit and 1-bit, this function returns N. If all wires are one bit, it returns 1. If there is more than one wire width > 1, this functions returns -1. The widths of all wires are returned in widths[].

Parameters:
in - the array of wires to determine the generic width of
widths - the array to modify to list the width of each wire
Returns:
the common width of all non-atomic-wires, 1 if all atomic wires, or -1 if different non-atomic widths

checkGenericWidths

protected void checkGenericWidths(Wire[] in,
                                  Wire out,
                                  java.lang.String gate)

checkGenericWidths

protected void checkGenericWidths(Wire in1,
                                  Wire in2,
                                  Wire in3,
                                  Wire in4,
                                  Wire out,
                                  java.lang.String gate)

checkGenericWidths

protected void checkGenericWidths(Wire in1,
                                  Wire in2,
                                  Wire in3,
                                  Wire out,
                                  java.lang.String gate)

checkGenericWidths

protected void checkGenericWidths(Wire in1,
                                  Wire in2,
                                  Wire out,
                                  java.lang.String gate)

checkGenericWidths

protected void checkGenericWidths(Wire in1,
                                  Wire out,
                                  java.lang.String gate)

clockDriver

public final void clockDriver(Cell parent,
                              Wire clock,
                              java.lang.String schedule,
                              java.lang.String name)
Overrides:
clockDriver in class BasicTechMapper

techmap

public final void techmap(Logic parent,
                          java.lang.Object arg)
Description copied from class: BasicTechMapper
Used to change whether a techmapper inserts placement hints before netlisting.

Specified by:
techmap in class TechMapper

getCellName

public java.lang.String getCellName(Cell c)

getParentCellName

public java.lang.String getParentCellName(Cell c)

getUniqueParentName

public java.lang.String getUniqueParentName(Cell c)


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.