Download presentation
Presentation is loading. Please wait.
Published byBlaise Garrett Modified over 9 years ago
1
Tutorial Robot: an implementation of the Embedded Machine Daniel Jhin Yoo EECS (Senior) Alvin AuYoung EECS (Junior)
2
Overview Embedded Machine Design Demo TuteBot Implementation Following a Path
3
Kernel Structures TM.cEM.c... Kernel Subsystems: InterpreterTiggersEco + PortsTasks...
4
Life of an Emachine User Program Emachine eco[] Trigger List schedule trigger EInterpreter handle_trigger() return
5
E-Machine: Kernel 1ms Poll Subsystems Triggers? Synchronous Computation Einterpreter Scheduled Computation LegOS Scheduler Done YesNo EMP CAL
6
EMP and CAL EMP Trigger list is just a sorted list w.r.t deadline Only signal port allowed is CLK! CAL Uses already existing legOS Task Structure and execi priority = infinity - deadline (unsigned long) This results in an EDF scheduler w.r.t. deadline
7
DEMO 1: The EE40 Tutebot bump!
8
Theory of Operation GiottoHigh Level Description (Compiler) Ecode Distributed Code
9
High-Level Description Mode R Mode T Mode F If touch sensor pressed/ switch to Mode R If timer is up/ switch to Mode T If timer is up/ switch to Mode F {move motors, check touch sensors} {reverse motors, check timer} {change direction, check timer}
10
High Level Implementation: Giotto Start f() { mode f() period 200 ms entry freq 1{ taskfreq 2 do function_forward(); exitfreq 1 if TouchSensor then mode r(); } mode r() period 1000ms entry freq 1 taskfreq 10 do function_reverse(); exitfreq 1 if TimerUp() then mode t(); } mode t() period 1000ms entry freq 1 taskfreq 10 do function_turn(); exitfreq 1 if TimerUp() then mode f(); }
11
Distributed Code Generation: E code Mode_f: psh(0) emp(clk)(Invoke_forward:) add(200) emp(clk)(check_mode_f:) pop ret check_mode_f:red(read_touchSensor) prd(touchSensor_pressed) cmp(Mode_f:) jmp(Mode_r:) Invoke_forward:psh(0) neq(200) cmp(End:) cal(clk)(function_forward) add(100) jmp(Invoke_forward) End:pop ret
12
DEMO 2: Following a Path Mode R Mode L Mode F R light sensor: see path L light sensor: see path {move forward, check R and L sensors} {turn right, check R sensor} {turn left, check L sensor} R light sensor: no path L light sensor: no path
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.