Waveform Editors

The four tab pages following the Block Diagram page present graphical editors for defining four distinct GPIF waveforms (i.e. state machines).
Each of the four waveforms may be configured for a specific type of data transaction. For instance, the waveform depicted below is for iterative reading of data from a connected FIFO device. The second waveform (on the tab labeled "FIFOWr") is for iterative writing of data to a connected FIFO device.
Each of the waveforms can be configured for any IO task (i.e. Single Read, Single Write, Multi Read, Multi Write, etc.) That is, the first waveform could be created for Single Write operation, rather than the FIFO Read operation shown below.
The label of each waveform tab can be modified by right-clicking on the page tab.

Each waveform tab page contains certain graphic elements which are used in the design of a waveform. The thick, horizontal lines are called bands. The States band shows the GPIF states that are implied by Action Points of the other bands. Action Points, placed on the several bands, define the state machine that is the waveform.

The DeltaT displayed in the lower left corner of each Waveform Editor tab shows the time, in ns, from the cursor to the nearest Action Point left of the cursor.

Action Points

Action Points are the vehicle for imposing state and line transitions in a waveform. To place an action point on a band, left-click on the band. Action points can be dragged to different positions on the band in which they reside.
Each type of band has a corresponding specific type of action point associated with it. And, each type of action point has a different set of behaviors or properties that can be configured. To set the properties of an action point, right-click the action point. (The Addr action points are not configurable. They have a single function which is to increment the address.)

To delete an action point, right-click the action point and select "Delete" from the pop-up menu. To delete all the user-placed action points from a waveform, right-click the waveform tab and select "Clear waveform" from the pop-up menu.
An "empty" waveform contains the permanent action points shown below. These permanent action points cannot be deleted or moved. However, their properties can be modified by right-clicking on them.

To copy all the action points from one waveform to another, right-click on the current waveform tab and select "Copy waveform . . ." from the pop-up menu. A dialog box will pop-up, prompting for the destination tab page to receive the new action points. The "Copy waveform" function erases all existing action points from the destination waveform before copying the new action points to that location. So, the destination waveform becomes an exact copy of the source.

DATA Action Points

Data action points control two parameters of the data bus. First, the action point controls whether to keep the same data on the bus or place new data onto the bus. Second, the action point controls whether to activate or de-activate the data bus.
Same vs Next status of the bus is depicted by the COLOR of the data trace. A change in color depicts Next data. Constant color connotes Same data.
Active vs Inactive status of the bus is depicted by the POSITION of the data trace. A trace running along the bottom of the band represents inactive. A trace along the top connotes an active bus.

In the waveform above, the first data action point keeps the same data (trace color stays the same) on the bus and de-activates the data (trace moves to bottom of band). The next data action point places Next data on the bus (trace color changes) and activates the data (trace moves to top of band). The third data action point keeps the same data (trace color stays yellow) on the bus and de-activates the data (trace moves to bottom of the band). Finally, the last data action point keeps the same data (trace stays yellow) and activates the bus (trace moves to top of band).
Data action points, for the FX2 series chips, also have two variations on the "Next Data" theme. These are SGLDATAH/L and UDMA_CRCH/L. Either of those selection has the same effect as Next FIFO Data on the displayed data trace. SGLDATAH/L and UDMA_CRCH/L merely specify alternate sources of the next data.
When a new Data action point is placed on the Data band, the initial state of the action point is Same Data with opposite activity to the last (rightmost) action point on the band.
Data action points located on the left edge of the IDLE state cannot present any form of "Next Data". Such Data action points are limited to Activate / De-activate as their functional domain.
HINT: Rather than clicking on the Data action points directly, it is also possible to modify the state of the Data trace by right-clicking on the Data band in the region of the trace. This action simply modifies the properties of the nearest Data action point left of the mouse. When you click on the band, rather than an action point, the "Delete" menu item will not appear.

ADDR Action Points

Addr action points are represented as a plus symbol (+) on the Addr band. Placing an Addr action point causes the value of the address bus to be incremented at that point.
Addr action points have no other functionality. So, the pop-up menu for these action points only provides the mechanism for deletion of the point. Of course, like all action points, Addr action points can be dragged.
Addr action points cannot be placed on the left boundary of the IDLE state because the IDLE state does not have the capability of incrementing the address.

Status Action Points

Status action points are also referred to as Decision Points. These action points are used to cause the GPIF to remain in a given state until (or branch to a different state when) some condition of the RDY lines is achieved.
Status action points create states of indefinite length. (The state will last until the decision causes a branch away from the state.) To indicate this, the clock trace at the top of each waveform diagram is "broken" above any status action point.
After a Status action point has been placed, the Specify Decision Point dialog box will automatically be displayed to allow specification of the branching / exit condition for the state. (Note that the Status action point has already been placed when the dialog pops-up. Clicking the Cancel button of the dialog will not delete the action point.) The Specify Decision Point dialog box can be accessed later by right-clicking on the decision point and selecting Edit from the pop-up menu.
The exit / branch decision is a logic operation between any two of the enabled RDY lines (including internal status lines) as specified on the block diagram . When the GPIF enters a state containing a decision point, any other actions indicated by action points at the start of the state are executed. Then, the logic condition is evaluated. If the condition is satisfied, the GPIF will branch to (GOTO) the first state specified. Otherwise, it will branch to the second (ELSE) state specified.

The decision point, displayed above, is of interest. It specifies that, on entry into state S3, the transaction counter (TCXpire) should be tested. (Note that TCXpire is compared against itself, causing the decision to be based on a single input.) If TCXpire = 1 the GPIF will branch to the IDLE state, concluding the waveform. If TCXpire = 0, the GPIF will branch to state S3 (the current state). This decision point essentially says "Stay in S3 until the transaction counter expires. Then exit the waveform."
For instructions on how to make the transaction counter (TC) an input to decision points, see the discussion of RDY Line Configuration in the Block Diagram section.
Status action points are not allowed on the left boundary of the IDLE state because the IDLE state is not able to execute the conditional branching mechanism of a decision point. If you attempt to place a Status action point on the IDLE state boundary, the waveform editor will automatically insert a buffer state between the action point and the IDLE state.
Because the input arguments for a decision point depend on the RDY line configuration of the Block Diagram, all decision points of each waveform should be edited and verified for correctness whenever the configuration of the RDY lines is changed.

LOOP / Re-Execute

The LOOP (Re-execute) checkbox in the Specify Decision Point dialog, controls whether or not the other actions of the state are repeated when the decision branches to the same state. For instance, at the beginning of S3 in the below waveform, the Data bus is asserted and next data is placed on the bus, the address is incremented, and CTL lines REN# and OE# are sent high.

If TCXpire is not 1, the GPIF will branch back to S3, the current state. Because the LOOP (Re-execute) box is checked, next data will again be placed on the data bus and the address again be incremented These activities will repeat each time the decision point branches back into S3.
[If LOOP (Re-execute) is checked, the Re-Execute bit (b7) of the Length/Branch register of the state instruction is set to 1.]

CTRL Action Points

Depending on the CTL line Configuration of the Block diagram, up to 6 CTL bands will be displayed in the waveform editors. Each CTL action point can be configured as High (1), Low (0), or Tri-state (z) if the CTL lines have been configured to allow tri-state.
Whenever a new CTL line is dropped onto a CTL band, it's initial state is opposite to that of the last (rightmost) action point on the band. (In deciding this initial status tri-state is considered to be Low (0).)
HINT: Rather than clicking on the CTL action points directly, it is also possible to modify the state of the CTL traces by right-clicking on the CTL bands in the region of the traces. This action simply modifies the properties of the nearest CTL action point left of the mouse. When you click on the band, rather than an action point, the "Delete" menu item will not appear.

States

The FX/FX2 GPIF is implemented as a state machine, capable of 8 distinct states (including the IDLE) state. Each waveform editor contains a States band that displays the states implied by the action points of the waveform.
New states cannot be created directly, by left-clicking on the state band. Rather, they are created by placing action points on other bands. Whenever an action point is placed on a band, the waveform editor checks to see if the action point has been placed on an existing state boundary. If not, a new state is created. When the GPIF state machine enters one of the states of a waveform, it will execute those action points found along the state's left boundary.
By default, state durations are calculated from their displayed length in the waveform. (See Set State Duration , to learn about setting the duration to a fixed length.) When the cursor moves over a state, the duration of the state will be briefly pop-up just below the cursor.
[The IDLE state has no specific duration and is only defined by the action points of the Data and CTL bands.]

State Properties

There are some state properties that are not implied by action points. These are configured by right-clicking on the state to bring up a State Properties dialog box.

The State Properties dialog for non-decision point states (such as S2, above) do not allow configuration of Flow State.
The State Properties dialog for state S3 (a decision point state) has the Flow State configuration controls enabled, below.

[The IDLE state does not have properties that can be configured via the State Properties dialog box. Right clicking on the IDLE state has no effect.]

Generate Interrupt

On entry to a given state, the GPIF can generate a GPIFWF interrupt on the INT4 line. To enable the interrupt, bring-up the State Properties dialog box by right-clicking on the state. Then, check the Generate Interrupt box in the dialog.
[Checking the Generate Interrupt box will set the GINT bit (b4) of the OPCODE register of the state instruction to 1.]

Set State Duration

Non-decision point states can range in duration from 1 to 256 clock cycles. However, the waveform editors only display 20 clock cycles. In order to create states with longer durations, the state must be designated as a "fixed duration", rather than a calculated duration state. Once this is done, there is no correlation between the states visible length and its duration.
To set a fixed state duration, bring-up the State Properties dialog by right-clicking on the state of interest. (Only non-decision point states can have their duration set.) Then click the Set State Duration button. The dialog box, shown below, will appear.

Un-check the Calculate Duration from Waveform Diagram box. This will cause the duration to stay at the value of the Duration (Clock Cycles) field, regardless of how long the state is made to appear on the waveform diagram.
When viewing a waveform, the only way to be sure of a state's duration is to move the mouse over the state and read the duration shown in the pop-up hint.
Note that the need to make a state's duration fixed is somewhat uncommon.

Use as the Flow State

Decision point states can also be designated as a Flow State. To designate a decision point state as the flow state, right-click on the decision point state to bring-up the State Properties dialog box. Then, check the Use as the Flow State box.
Only one Flow State can exist in a given waveform. When a state has been designated as the flow state for a waveform, the state will be colored yellow.

Configure Flow State

If the Use as the Flow State box of the State Properties dialog is checked, the Configure Flow State button will be enabled, allowing configuration of the flow-state parameters. Click on the Configure Flow State button to bring-up the Flow State Parameters dialog box, below.

Flow Logic

The Flow Logic tab of the Flow State Parameters dialog is used to define the state of CTL lines, based on the state of RDY lines. This is similar to the configuration of Status action points , except that the flow logic does not control exit conditions of the state. Rather, the flow logic test is repeatedly performed and the configuration of the CTL lines repeatedly changed based on the outcome of the test. This repeated functionality persists until the branching conditions of the state's decision point cause the GPIF to exit the state.
To cause a CTL line to be set High (1) when the condition of the test is satisfied, check the box for the CTL line in the THEN section. Un-check the box to make the line go Low (0). Similarly, when the condition is not satisfied, the state of the CTL lines can be explicitly controlled using the checkboxes of the ELSE section.

If Tri-state has been enabled in the Configure CTL lines dialog of the block diagram, the Enable output checkboxes will be enabled.
[The THEN section of checkboxes controls the contents of the FLOWEQ1CTL register. The ELSE section of checkboxes controls the FLOWEQ0CTL register.]

Strobe

The Strobe tab configures a Master Strobe Pin to be used in causing data to be read or written during the flow state. [Most of the settings on this tab control bits of the FLOWSTB register.]
The Slave checkbox should be checked if the GPIF is acting as a slave on the bus. In this condition, the Master Strobe Pin can be selected from a list of the available RDY lines . Also, in this condition, check the RDYASYNC box to make the selected Master Strobe Pin synchronous to IFCLK.

Un-check the Slave checkbox if the GPIF is acting as the bus master. In this condition, the Master Strobe Pin can be selected from a list of the available CTL lines . Also, in this condition, check the CTLTOGL box to cause the THEN (i.e. satisfied) condition of the Flow Logic to toggle the Master Strobe Pin. Un-check the CTLTOGL box to cause the ELSE (i.e. not satisfied) condition of the Flow Logic to toggle the Master Strobe Pin.

Uncheck the SUSTAIN box to allow the Master Strobe Pin CTL line to be restored to its waveform-defined state when the GPIF exits the flow state.
C heck the RISING EDGE DATA XFER box to transfer data on the rising edge of the clock when Master Strobe Pin is toggled. C heck the Falling EDGE DATA XFER box to transfer data on the falling edge of the clock when Master Strobe Pin is toggled. Both RISING EDGE and FALLING EDGE can be selected to cause double-edge data transfers when Master Strobe Pin is toggled. [The DATA XFER check boxes control bits 0 and 1 of the FLOWSTBEDGE register.]
The Master Strobe Half Period field defines the half period of the Master Strobe Pin toggling frequency. The minimum value is 2 (or 1 clock pulse). A value of 3 would cause the Master Strobe Pin to toggle every 1.5 clock pulses.

Hold-Off

The Hold-Off tab contains controls to configure the FLOWHOLDOFF register and the GPIFHOLDTIME register.
These settings are only useful in certain conditions. If the GPIF is acting as a slave on the bus (Slave box on the Strobe tab is checked) and the Master Strobe is asynchronous to the IFCLK signal (RDYASYNC box on the Strobe tab is not checked), the Hold-Off settings will be used when data is written to the GPIF.
Check the HOCTL pin is asserted when Not Ready (HOSTATE) box to cause the Hold-off CTL bin to be sent High (1) when not ready. [Checking this box causes the HOSTATE bit (b3) of the FLOWHOLDOFF register to be set to 1.]
Select the CTL pin that will be used to indicate a Hold-off condition from the CTL Pin Used to indicate Hold-Off drop-down list. [The line selected determines the value of the HOCTL bits (2:0) of FLOWHOLDOFF register.]
The Hold-Off Period (clocks) field indicates how long to keep the CTL Pin Used to indicate Hold-Off in the Hold-Off State in order to allow the external bus master to catch-up. [This value is placed in the HOPERIOD field (bits 7:4) of the FLOWHOLDOFF register.]
The Hold Time (clocks) field determines how long data is held on the DATA bus when written by the GPIF. This value can be set to 0, 1/2 or 1 clock cycle. [The Hold Time (clocks) setting controls the value of the GPIFHOLDTIME register.]