View01 Dataflow Intro
View01 Dataflow Intro
Objectives
• Parallel processing, distributed processing, multithreading
• Modular programming
• Call graphs,
• Flow charts,
• Data flow graphs,
• Device drivers: serial port,
• uVision4 compiler,
• Quality software
Open uart_echo
Draw a call graph
Draw a data flow graph
Open UART2_4F120
Draw a call graph
Draw a data flow graph
by Jonathan W. Valvano
Real Time Operating Systems Lecture 1.2
Channel 7
GPIOB
Flowcharts
Sequence Conditional While-loop
Block 1
Figure 2.1. Flowchart showing the basic building blocks of structured programming.
by Jonathan W. Valvano
Real Time Operating Systems Lecture 1.3
=PutPt
tempPt = PutPt GetPt
!= PutPt empty
Store data at tempPt Retreive data at GetPt
tempPt++ GetPt++ return(0)
=GetPt
tempPt return(1)
!= GetPt
PutPt = tempPt full
return(1) return(0)
by Jonathan W. Valvano
Real Time Operating Systems Lecture 1.4
by Jonathan W. Valvano
Real Time Operating Systems Lecture 1.5
main
Producer TxFifo_Get Consumer
TxFifo_Put
OutChar Tx UART
TxFifo ISR output
Figure 3.3. A data flow graph showing two FIFOs that buffer data between producers
and consumers.
by Jonathan W. Valvano
Real Time Operating Systems Lecture 1.6
Parallel processing:
multiple processors, shared memory
simultaneous execution of two or more software tasks
e.g., multicore Pentium
by Jonathan W. Valvano
Real Time Operating Systems Lecture 1.7
x>y x<y
max = x max = y
Distributed processing:
multiple computers, separate memory, I/O network link
simultaneous execution of two or more software tasks
e.g., Lab 6
Ethernet
A B A B C D
Ethernet switch
by Jonathan W. Valvano
Real Time Operating Systems Lecture 1.8
CAN
LM3S8962 bus
Switch CAN0_SendData ID=4
ID=2 CAN
CAN0_GetMail CAN
LED ISR
NonBlock
LM3S2110
Switch CAN0_SendData ID=2
ID=4 CAN
CAN0_GetMail CAN
LED ISR
NonBlock
Multithreading
One foreground and multiple background threads
Multiple foreground threads using a thread scheduler
RxFifo MailBox
ADC ADC Producer Consumer Display
If using a LM4F120/TM4C123
0) Use solid wires 22 or 24 gauge wire, attach to bottom
1) female-male connectors (my favorite)
https://www.adafruit.com/products/826
Digi-Key H1505-ND, Hirose DF11-2428SCA
by Jonathan W. Valvano
Real Time Operating Systems Lecture 1.9
Recap
Call graph
Data flow graph
Flow chart
Fifo queue, buffered I/O
Public versus private
by Jonathan W. Valvano