byucc.jhdl.Logic
Class BasicTechMapper

java.lang.Object
  extended bybyucc.jhdl.Logic.BasicTechMapper
Direct Known Subclasses:
TechMapper

public abstract class BasicTechMapper
extends java.lang.Object

This is the abstract TechMapper class. It defines all the things that a TechMapper must do to successfully interface with the Logic class. The implementation of each of these methods provides the back-end specific gate instantiation and tech-mapping annotation.


Constructor Summary
protected BasicTechMapper()
          Default constructor, enables tech-mapping.
protected BasicTechMapper(boolean enabled)
          Sets the techmapping enabled flag.
 
Method Summary
 void add(Cell parent, Wire a, Wire b, Wire s, java.lang.String name)
           
 void add(Cell parent, Wire a, Wire b, Wire ci, Wire s, Wire co, java.lang.String name)
           
 void addsub(Cell parent, Wire a, Wire b, Wire ci, Wire add, Wire s, java.lang.String name)
           
 void addsub(Cell parent, Wire a, Wire b, Wire ci, Wire add, Wire s, Wire co, java.lang.String name)
           
 void and(Cell parent, Wire[] in, Wire out, java.lang.String name)
           
 Wire ashiftr(Cell parent, Wire in, int shift, Wire out)
           
 void buf(Cell parent, Wire in, Wire out, java.lang.String name)
           
 void clockDriver(Cell parent, Wire clock, java.lang.String schedule, java.lang.String name)
           
 Wire concat(Cell parent, Wire[] list, java.lang.String name)
           
 Wire concat(Cell parent, WireList wl, java.lang.String name)
           
 void constant(Cell parent, Wire out, BV value, java.lang.String name)
           
 void constant(Cell parent, Wire out, int value, java.lang.String name)
           
abstract  Netlister createDefaultNetlister()
          Create an instance of the netlister of choice for this library.
abstract  java.lang.String getLibName()
          Returns the name of the library targetted by the particular techmapper.
static java.lang.String getTechnology()
          Returns the name of the technology targeted by the techmapper.
 void gnd(Cell parent, Wire o, java.lang.String name)
           
 void mux(Cell parent, Wire[] d, Wire sel, Wire out, java.lang.String name)
           
 void nand(Cell parent, Wire[] in, Wire out, java.lang.String name)
           
 void netlist(Cell cell)
          Netlists the given cell downward hierarchically into the given file, using the netlister's choice of default filename.
 void netlist(Cell cell, boolean flat)
          Netlists the given cell downward hierarchically into the given file, using the netlister's choice of default filename.
 void netlist(Cell cell, boolean flat, NetlistWriter nw)
          Netlists the given cell downward hierarchically into the given file.
 void netlist(Cell cell, boolean flat, java.lang.String filename)
          Netlists the given cell downward hierarchically into the given file.
 void netlist(Cell cell, java.lang.String filename)
          Netlists the given cell downward hierarchically into the given file.
 void nor(Cell parent, Wire[] in, Wire out, java.lang.String name)
           
 void not(Cell parent, Wire in, Wire out, java.lang.String name)
           
 void or(Cell parent, Wire[] in, Wire out, java.lang.String name)
           
 void padClock(Cell parent, Wire pad, Wire in, java.lang.String[] mods, java.lang.String name)
           
 void padIn(Cell parent, boolean clocked, Wire pad, Wire in, java.lang.String[] mods, java.lang.String name)
           
 void padInout(Cell parent, boolean clockedIn, Wire in, boolean clockedOut, Wire out, Wire ctl, Wire pad, java.lang.String[] mods, java.lang.String name)
           
 void padOut(Cell parent, boolean clocked, Wire out, Wire pad, java.lang.String[] mods, java.lang.String name)
           
 void padOutT(Cell parent, boolean clocked, Wire out, Wire ctl, Wire pad, java.lang.String[] mods, java.lang.String name)
           
 void pulldown(Cell parent, Wire out, java.lang.String name)
           
 void pullup(Cell parent, Wire out, java.lang.String name)
           
 Wire range(Cell parent, Wire in, int hi, int lo)
           
 void reg(Cell parent, Wire in, Wire out, java.lang.String name)
           
 void reg(Cell parent, Wire clk, Wire in, Wire out, java.lang.String name)
           
static void setTechnology(java.lang.String tech)
          Allows the user to set the desired technology to be used during netlisting
 Wire shiftl(Cell parent, Wire in, int shift, Wire out)
           
 Wire shiftr(Cell parent, Wire in, int shift, Wire out)
           
 void sub(Cell parent, Wire a, Wire b, Wire s, java.lang.String name)
           
 void sub(Cell parent, Wire a, Wire b, Wire ci, Wire s, Wire co, java.lang.String name)
           
 void tbuf(Cell parent, Wire in, Wire en, Wire out, java.lang.String name)
           
abstract  void techmap(Logic parent, java.lang.Object arg)
          Used to change whether a techmapper inserts placement hints before netlisting.
protected  void unsupportedComponent(java.lang.String name)
          Convenience method for derived classes.
 void vcc(Cell parent, Wire o, java.lang.String name)
           
 Wire wire(Cell parent, int width, java.lang.String name)
           
 Wire wire(Cell parent, java.lang.String name)
           
 void xnor(Cell parent, Wire[] in, Wire out, java.lang.String name)
           
 void xor(Cell parent, Wire[] in, Wire out, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicTechMapper

protected BasicTechMapper()
Default constructor, enables tech-mapping.


BasicTechMapper

protected BasicTechMapper(boolean enabled)
Sets the techmapping enabled flag.

Parameters:
enabled - The new state of Logic.techMappingEnabled().
Method Detail

getTechnology

public static java.lang.String getTechnology()
Returns the name of the technology targeted by the techmapper. Default tech is "Virtex."

Returns:
A String holding the technology name

setTechnology

public static void setTechnology(java.lang.String tech)
Allows the user to set the desired technology to be used during netlisting

Parameters:
tech - The String name of the desired technology currently "Virtex", "Virtex2", or "XC4000"

getLibName

public abstract java.lang.String getLibName()
Returns the name of the library targetted by the particular techmapper.

Returns:
A String holding the library name.

netlist

public final void netlist(Cell cell)
Netlists the given cell downward hierarchically into the given file, using the netlister's choice of default filename.

Parameters:
cell - the root node of the netlist

netlist

public void netlist(Cell cell,
                    java.lang.String filename)
Netlists the given cell downward hierarchically into the given file.

Parameters:
cell - the root node of the netlist
filename - A String with the name of the target file.

netlist

public final void netlist(Cell cell,
                          boolean flat)
Netlists the given cell downward hierarchically into the given file, using the netlister's choice of default filename.

Parameters:
cell - the root node of the netlist
flat - whether the netlist should be flat

netlist

public void netlist(Cell cell,
                    boolean flat,
                    java.lang.String filename)
Netlists the given cell downward hierarchically into the given file. Override this for more pre- or post-netlist behavior

Parameters:
cell - the root node of the netlist
flat - whether the netlist should be flat
filename - A String with the name of the target file.

netlist

public void netlist(Cell cell,
                    boolean flat,
                    NetlistWriter nw)
Netlists the given cell downward hierarchically into the given file. Override this for more pre- or post-netlist behavior

Parameters:
cell - the root node of the netlist
flat - whether the netlist should be flat

createDefaultNetlister

public abstract Netlister createDefaultNetlister()
Create an instance of the netlister of choice for this library.

Returns:
the library's default Netlister

techmap

public abstract void techmap(Logic parent,
                             java.lang.Object arg)
Used to change whether a techmapper inserts placement hints before netlisting.


clockDriver

public void clockDriver(Cell parent,
                        Wire clock,
                        java.lang.String schedule,
                        java.lang.String name)

buf

public void buf(Cell parent,
                Wire in,
                Wire out,
                java.lang.String name)

tbuf

public void tbuf(Cell parent,
                 Wire in,
                 Wire en,
                 Wire out,
                 java.lang.String name)

pullup

public void pullup(Cell parent,
                   Wire out,
                   java.lang.String name)

pulldown

public void pulldown(Cell parent,
                     Wire out,
                     java.lang.String name)

and

public void and(Cell parent,
                Wire[] in,
                Wire out,
                java.lang.String name)

or

public void or(Cell parent,
               Wire[] in,
               Wire out,
               java.lang.String name)

mux

public void mux(Cell parent,
                Wire[] d,
                Wire sel,
                Wire out,
                java.lang.String name)

xor

public void xor(Cell parent,
                Wire[] in,
                Wire out,
                java.lang.String name)

nand

public void nand(Cell parent,
                 Wire[] in,
                 Wire out,
                 java.lang.String name)

nor

public void nor(Cell parent,
                Wire[] in,
                Wire out,
                java.lang.String name)

xnor

public void xnor(Cell parent,
                 Wire[] in,
                 Wire out,
                 java.lang.String name)

not

public void not(Cell parent,
                Wire in,
                Wire out,
                java.lang.String name)

reg

public void reg(Cell parent,
                Wire in,
                Wire out,
                java.lang.String name)

reg

public void reg(Cell parent,
                Wire clk,
                Wire in,
                Wire out,
                java.lang.String name)

vcc

public void vcc(Cell parent,
                Wire o,
                java.lang.String name)

gnd

public void gnd(Cell parent,
                Wire o,
                java.lang.String name)

add

public void add(Cell parent,
                Wire a,
                Wire b,
                Wire ci,
                Wire s,
                Wire co,
                java.lang.String name)

add

public void add(Cell parent,
                Wire a,
                Wire b,
                Wire s,
                java.lang.String name)

sub

public void sub(Cell parent,
                Wire a,
                Wire b,
                Wire s,
                java.lang.String name)

sub

public void sub(Cell parent,
                Wire a,
                Wire b,
                Wire ci,
                Wire s,
                Wire co,
                java.lang.String name)

addsub

public void addsub(Cell parent,
                   Wire a,
                   Wire b,
                   Wire ci,
                   Wire add,
                   Wire s,
                   Wire co,
                   java.lang.String name)

addsub

public void addsub(Cell parent,
                   Wire a,
                   Wire b,
                   Wire ci,
                   Wire add,
                   Wire s,
                   java.lang.String name)

wire

public Wire wire(Cell parent,
                 java.lang.String name)

wire

public Wire wire(Cell parent,
                 int width,
                 java.lang.String name)

concat

public Wire concat(Cell parent,
                   WireList wl,
                   java.lang.String name)

concat

public Wire concat(Cell parent,
                   Wire[] list,
                   java.lang.String name)

range

public Wire range(Cell parent,
                  Wire in,
                  int hi,
                  int lo)

ashiftr

public Wire ashiftr(Cell parent,
                    Wire in,
                    int shift,
                    Wire out)

shiftr

public Wire shiftr(Cell parent,
                   Wire in,
                   int shift,
                   Wire out)

shiftl

public Wire shiftl(Cell parent,
                   Wire in,
                   int shift,
                   Wire out)

constant

public void constant(Cell parent,
                     Wire out,
                     int value,
                     java.lang.String name)

constant

public void constant(Cell parent,
                     Wire out,
                     BV value,
                     java.lang.String name)

padClock

public void padClock(Cell parent,
                     Wire pad,
                     Wire in,
                     java.lang.String[] mods,
                     java.lang.String name)

padIn

public void padIn(Cell parent,
                  boolean clocked,
                  Wire pad,
                  Wire in,
                  java.lang.String[] mods,
                  java.lang.String name)

padInout

public void padInout(Cell parent,
                     boolean clockedIn,
                     Wire in,
                     boolean clockedOut,
                     Wire out,
                     Wire ctl,
                     Wire pad,
                     java.lang.String[] mods,
                     java.lang.String name)

padOut

public void padOut(Cell parent,
                   boolean clocked,
                   Wire out,
                   Wire pad,
                   java.lang.String[] mods,
                   java.lang.String name)

padOutT

public void padOutT(Cell parent,
                    boolean clocked,
                    Wire out,
                    Wire ctl,
                    Wire pad,
                    java.lang.String[] mods,
                    java.lang.String name)

unsupportedComponent

protected void unsupportedComponent(java.lang.String name)
Convenience method for derived classes. If by chance one of the above methods cannot be supported by a particular TechMapper, for architectural reasons, it can use this method to report the lack of support.

Parameters:
name - the name of the unsupported component
Throws:
TechMapException - stating that the component is unsupported


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