User Tools

Site Tools


state_machine_interlocks_and_global_variables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

state_machine_interlocks_and_global_variables [2015/11/03 07:26]
hutch
state_machine_interlocks_and_global_variables [2015/11/03 07:26] (current)
hutch
Line 1: Line 1:
 ===== Interlocked State Machines and Shared Variables ===== ===== Interlocked State Machines and Shared Variables =====
  
-This page provides an example of a simple interlocked state machine. It will also discuss best practices for sharing variables between state machines. The tutorial has been completed implemented. You can paste the source-code shown below into actual files in the Xilinx SDK and run the tutorial, if you like. There is a [[https://​www.youtube.com/​watch?​v=R02LG_sSjFk|video]] of this demonstration project on the ECEN 330 youtube channel.+This page provides an example of a simple interlocked state machine. It will also discuss best practices for sharing variables between state machines. The tutorial has been completed implemented. You can paste the source-code shown below into actual files in the Xilinx SDK and run the tutorial, if you like. There is a [[https://​www.youtube.com/​watch?​v=R02LG_sSjFk|video]] of this demonstration project on the [[https://​www.youtube.com/​channel/​UC2DAqectVGE6DIT-b8N2dJg|ECEN 330 youtube channel]].
  
 The example depicted below consists of two state machines: flashControl and flashLed. The flashControl state machine reads the slide switches and sets a global variable accordingly. Each slide switch (SW0 - SW3) is associated with a delay value. SW0 is associated with a shorter value and the delay values increase with switch number with SW3 being associated with the longest delay. The shortest delay is selected with none of the slide switches is slid up. Next, flashControl enables the flashLed state machine. It then waits until the flashLed state machine indicates that it has completed its task. The state diagram for flashControl is shown directly below. The example depicted below consists of two state machines: flashControl and flashLed. The flashControl state machine reads the slide switches and sets a global variable accordingly. Each slide switch (SW0 - SW3) is associated with a delay value. SW0 is associated with a shorter value and the delay values increase with switch number with SW3 being associated with the longest delay. The shortest delay is selected with none of the slide switches is slid up. Next, flashControl enables the flashLed state machine. It then waits until the flashLed state machine indicates that it has completed its task. The state diagram for flashControl is shown directly below.
state_machine_interlocks_and_global_variables.txt ยท Last modified: 2015/11/03 07:26 by hutch