de.upb.hni.vmagic.expression
Class Expressions

java.lang.Object
  extended by de.upb.hni.vmagic.expression.Expressions

public class Expressions
extends java.lang.Object

Methods for expression creation.


Method Summary
static Expression fallingEdge(Signal clock)
          Creates a falling edge clock condition.
static Expression fallingEdge(Signal clock, boolean useFunction)
          Creates a falling edge clock condition with or without using a function call.
static Signal getEdgeConditionClock(Expression expression)
          Returns the clock signal in an edge condition.
static Expression risingEdge(Signal clock)
          Creates a rising edge clock condition.
static Expression risingEdge(Signal clock, boolean useFunction)
          Creates a rising edge clock condition with or without using a function call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

risingEdge

public static Expression risingEdge(Signal clock)
Creates a rising edge clock condition. Generated VHDL: clock'event and clock = '1'

Parameters:
clock - the clock signal
Returns:
the risign edge clock condition

risingEdge

public static Expression risingEdge(Signal clock,
                                    boolean useFunction)
Creates a rising edge clock condition with or without using a function call. Generated VHDL: clock'event and clock = '1' or rising_edge(clock)

Parameters:
clock - the clock signal
useFunction - true, if the rising_edge should be used
Returns:
the risign edge clock condition

fallingEdge

public static Expression fallingEdge(Signal clock)
Creates a falling edge clock condition. Generated VHDL: clock'event and clock = '0'

Parameters:
clock - the clock signal
Returns:
the risign edge clock condition

fallingEdge

public static Expression fallingEdge(Signal clock,
                                     boolean useFunction)
Creates a falling edge clock condition with or without using a function call. Generated VHDL: clock'event and clock = '0' or falling_edge(clock)

Parameters:
clock - the clock signal
useFunction - true, if the falling_edge should be used
Returns:
the risign edge clock condition

getEdgeConditionClock

public static Signal getEdgeConditionClock(Expression expression)
Returns the clock signal in an edge condition. If the expression is no edge condition null is returned.

Recognized expressions:

Parameters:
expression - the expression
Returns:
the clock signal or null