byucc.jhdl.synth.operators
Class LogicSynthesizer

java.lang.Object
  extended bybyucc.jhdl.synth.operators.LogicSynthesizer
All Implemented Interfaces:
OperatorSynthesizer
Direct Known Subclasses:
EqSynthesizer, MuxSynthesizer, ShiftSynthesizer, WidthAdjustSynthesizer

public class LogicSynthesizer
extends java.lang.Object
implements OperatorSynthesizer

A class responsible for synthesizing operators in a DataFlowGraph that correspond to Logic calls. This class will use reflection to find a Logic call with the same name as the operation of the operator and as many parameters as input and output wires passed to createCell.


Constructor Summary
LogicSynthesizer()
           
 
Method Summary
 Wire createCell(Logic parent, DFVertex operator, Wire[] inputWires)
          Create a cell from the given DFVertex operator.
 void resolveInputWidths(DFVertex operator)
          Determine the widths for one or more inputs to the given operator vertex based on the output width and other inputs with established widths.
 void resolveOutputWidth(DFVertex operator)
          Determine the width for the output of the given operator based on one or more of the inputs with established widths.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicSynthesizer

public LogicSynthesizer()
Method Detail

resolveOutputWidth

public void resolveOutputWidth(DFVertex operator)
Determine the width for the output of the given operator based on one or more of the inputs with established widths. For LogicSynthesizer, we simply find the maximum width on all inputs and apply that maximum width to the output.

Specified by:
resolveOutputWidth in interface OperatorSynthesizer
Parameters:
operator - The operator vertex whose output width is to be resolved.

resolveInputWidths

public void resolveInputWidths(DFVertex operator)
Determine the widths for one or more inputs to the given operator vertex based on the output width and other inputs with established widths.

Specified by:
resolveInputWidths in interface OperatorSynthesizer
Parameters:
operator - The operator vertex whose input widths are to be resolved.

createCell

public Wire createCell(Logic parent,
                       DFVertex operator,
                       Wire[] inputWires)
Create a cell from the given DFVertex operator. This method will create the appropriate cell with parent as its parent, input wires from inputWires and outputWire as its output wire. The new cell should implement the function defined by operator.getOperation()

Specifically LogicSynthesizer will use operator.getOperation() to reflect on a Logic method with that name and the appropriate number of Wire parameters.

Specified by:
createCell in interface OperatorSynthesizer
Parameters:
operator - an operator in a DataFlowGraph specifying the operation to be performed by the new cell.
inputWires - an array of wires to be used as inputs for the new cells
Returns:
the output wire of the newly created cell.


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