byucc.jhdl.base
Interface Clockable

All Known Implementing Classes:
Structural, Synchronous

public interface Clockable

This interface must be implemented by any clockable cell.

Author:
Brad Hutchings

Method Summary
 void clock()
          Here is where the user implements the desired behavior.
 boolean isFallingEdgeTriggered()
          Whether something is falling edge triggered.
 boolean isRisingEdgeTriggered()
          Whether something is rising edge triggered.
 boolean needsToBeClocked()
          If something needs to be clocked, it returns true.
 void reset()
          When this method is called, the synchronous element must behave as would be expected when the reset pin of the hardware is pushed.
 boolean willUseHWUpdate()
          Just calling this method on a Clockable cell will return a boolean value that indicates whether the cell will use HWUpdate or not.
 boolean willUseHWUpdate(boolean flag)
          If the value for a Clockable will be read-back from the hardware, it does not need to be clocked (simulated).
 

Method Detail

clock

public void clock()
Here is where the user implements the desired behavior. This method is called by the simulator, and should generally not be called by the user.


reset

public void reset()
When this method is called, the synchronous element must behave as would be expected when the reset pin of the hardware is pushed. Note that this is not the same as a reset pin on a FF, for example. This is an implicit reset, similar to the asynchronous reset in an FPGA. Note that this method is called by the simulator once before simulation, and should generally not be called by the user.


needsToBeClocked

public boolean needsToBeClocked()
If something needs to be clocked, it returns true. Generally, this will only be true if the clocked node is being behaviorally modeled.

Returns:
true if the node needs to be clocked, false otherwise.

willUseHWUpdate

public boolean willUseHWUpdate(boolean flag)
If the value for a Clockable will be read-back from the hardware, it does not need to be clocked (simulated). This will be indicated by calling this method and passing the boolean value true.

Parameters:
flag - the new value of whether to use HWUpdate
Returns:
the prior value of the flag, useful for caching and restoring prior state

willUseHWUpdate

public boolean willUseHWUpdate()
Just calling this method on a Clockable cell will return a boolean value that indicates whether the cell will use HWUpdate or not.

Returns:
the current state of the HWUpdate flag

isRisingEdgeTriggered

public boolean isRisingEdgeTriggered()
Whether something is rising edge triggered.

Returns:
true if a rising clock edge (0 -> 1) can change output

isFallingEdgeTriggered

public boolean isFallingEdgeTriggered()
Whether something is falling edge triggered.

Returns:
true if a falling clock edge (1 -> 0) can change output


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