Skip to content

State Machine

Nicolas Peschke edited this page Aug 26, 2020 · 8 revisions

The FADS State Machine

To implement the droplet sorting functionality a so called state machine was used. The concept relies on states that perform actions and specific conditions that determine when a transition from one state into another should happen.

The FADS state machine has the following six states depicted in the UML diagram.

State 0 - Base State

  • On fads_reset
    • regardless of the current state, fads_reset will always land here.
    • resets all counters to 0
  • Waits for droplet_acquisition_enable

State 1 - Waiting for Droplet

  • Waits until intensity rises over min_intensity_threshold
  • Starts droplet acquisition once intensity is reached

State 2 - Droplet Acquisition

  • Updates droplet_intensity_max with new maximum intensity values for this droplet
  • Continually increments droplet_width_counter for this droplet
  • Until intensity falls again below min_intensity_threshold

State 3 - Droplet Evaluation

  • increments the respective counters for positive/negative, long/short and high/low intensity droplets
  • updates the output registers with droplet_id, cur_droplet_intensity and cur_droplet_width
  • starts sorting delay

State 4 - Sorting Delay

  • Variable delay (sort_delay) until droplet reaches sorting junction

State 5 - Sorting

  • Activates sort_trig for a variable duration (sort_duration)

The sort_trig signal can be used by the asgs widget as a trigger source called fads to turn on the signal generator for the duration.

Clone this wiki locally