eBlocks: Embedded Systems Building Blocks

Download Report

Transcript eBlocks: Embedded Systems Building Blocks

Embedded Systems:
Supercomputing in a Pencil Tip
Frank Vahid*
Department of Computer Science and Engineering
University of California, Riverside
[email protected]
http://www.cs.ucr.edu/~vahid
* Also with the Center for Embedded Computer Systems at UC Irvine
This work is being supported by the National Science Foundation
Key Trend: Moore’s Law
 Higher Performance
Source: Intel
• Transistors per chip double roughly every 18 months
•1980: ~10,000 transistors
•Today: ~1,000,000,000 (1 billion) transistors
• Means higher performance computers
Frank Vahid, UCR
Industry Day, 2005
2 of 21
Moore’s Law also means
Smaller & Cheaper
 Same chip shrinks to
half its size every 18
months
 Means we can put
powerful computers in
places never dreamed
of before
Frank Vahid, UCR
Industry Day, 2005
J. Wiley and Sons, 2006
3 of 21
Supercomputing in a Pencil Tip?
 Remember the Cray 1A
supercomputer?







Fastest computer in the
world in 1976
Cost about $10 million
dollars (1976 $)
Roughly 100 MHz
5.5 tons, freon cooled
$100,000 per month to
maintain
Used for atmospheric
research, physical
simulations, etc.
About 1 million transistors
Frank Vahid, UCR
Industry Day, 2005
Cray 1A
4 of 21
Today – A Supercomputer in a Pencil Tip
1 million
transistors
(Cray 1)
 Approaching 1 billion transistors per
square centimeter (65 nm)
 1 million transistors (Cray 1): 0.1
 1 million transistors approaching the
size of a speck of dust – literally


And often can use fewer transistors
ARM 32-bit processor only about
100,000 transistors
1 cm
millimeters2
Modern chip –
1 billion transistors
1 cm
Frank Vahid, UCR
Industry Day, 2005
Photo: Jason Hill
http://www.dustnetworks.com/
5 of 21
Tiny Embedded Computers
 Smart Dust (UCB)


Millimeter scale
Includes sensors,
microprocessors, wireless
communication, power
supply
Costs dollars, even just
cents, each
Potential uses
Image: "Smart
dust" particles selfassembled on

drops of oil in
water. The
 Weather/seismological
microscopic
monitoring on Mars
particles are
 Land/space comm. networks
nanostructured
 Chemical/biological sensors
flakes of porous
silicon that
 Defense-related sensor
spontaneously
networks
assemble, orient,
 Inventory Control
sense, and report
 Product quality monitoring
on their local
 Smart office spaces
environment.
Frank Vahid, UCR
UCSD, 2003.
Industry Day, 2005

6 of 21
Tiny Embedded Computers
 Smart Pills

Electronically tracked and
instructed to deliver medicine to
specific location


“Swallowing the pill and the
instrument”
iPills – micropump, sensors, and
medicine

Pump controls amount of
medicine based on body
temperature and pH
 Other uses of tiny computers?


Who knows 10 years from now?
See http://www.smalltimes.com
Frank Vahid, UCR
Industry Day, 2005
http://www.templehealth.org/capsule/april_
22_05/april2205_news03.htm
7 of 21
One Project at UCR – eBlocks
 NSF-funded project to empower non-engineers to build useful custom
sensor-based systems


Plug together blocks, configure, done!
Low-cost mass-produced block types:



Sensors – motion, light, contact, etc.
Output – led, electric relay, beeper, etc.
Compute – logic, prolong, toggle, etc.


Button
LED
Electric
Relay
Splitter
Basic configuration required (dials, switches)
Communicate – wireless point-to-point link
 Simple example: Garage open at night?
Light
Sensor
We want to detect night –
use light sensor
Magnetic
Contact
Switch
Motion
Sensor
Magnetic
Contact
Switch
Light
Sensor
LED
2-Input
Logic
A’B’
We want to know if garage door open –
use contact switch
2-Input
Logic
Toggle
Tripper
Need something to indicate garage open at
night – use led
Need a function of light sensor output and
contact switch output – use Logic Block
Configure Logic Block to turn led on when
it’s night and when door is open
Plug pieces together
and the system is done!
Frank Vahid, UCR
Industry Day, 2005
8 of 21
Building eBlocks Systems
 The same building blocks can be used in a variety of applications
Button
Light
Sensor
Motion
Sensor
Tripper
Beeper
2-Input
Logic
A’B
Sleepwalker at Night Alarm
Light
Sensor
123456789
LED
Magnetic
Contact
Switch
2-Input
Logic
2-Input
Logic
A’B’
Garage Door Open At Night Detector
Prolonger
Beeper
A+B
Motion
Sensor
Motion on Property Detector
Light
Sensor
123456789
Motion
Sensor
2-Input
Logic
Prolonger
eBlock to
Camera
Interface
A+B
Animal Videoing System
Frank Vahid, UCR
Industry Day, 2005
9 of 21
Design Entry/Simulation


User specifies and tests
block design
Java-based simulator

User can choose a
variety of blocks by
selecting between
pallets
Available eBlocks
Sensors Output Compute/Communications
When
A is
Button
Beeper
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UCR
Industry Day, 2005
10 of 21
Design Entry/Simulation


User specifies and tests
block design
Java-based simulator


User can choose a
variety of blocks by
selecting between
pallets
Blocks are added to
workspace by clicking
or dragging blocks
from “Available
eBlocks” tray
Available eBlocks
Sensors Output Compute/Communications
Button
When
A is
Beeper
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UCR
Industry Day, 2005
11 of 21
Design Entry/Simulation


User specifies and tests
block design
Java-based simulator


User can choose a
variety of blocks by
selecting between
pallets
Blocks are added to
workspace by clicking
or dragging blocks
from “Available
eBlocks” tray
Available eBlocks
Sensors Output Compute/Communications
Button
When
A is
Button
Beeper
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UCR
Industry Day, 2005
12 of 21
Design Entry/Simulation


User specifies and tests
block design
Java-based simulator


User can choose a
variety of blocks by
selecting between
pallets
Blocks are added to
workspace by clicking
or dragging blocks
from “Available
eBlocks” tray
Available eBlocks
Light
Sensor
Button
Sensors Output Compute/Communications
When
A is
Button
Beeper
yes
no
AND B is
OR
yes
no
then the output is yes
Motion
SensorCombine
Green/Red
Light
rst
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UCR
Industry Day, 2005
13 of 21
Design Entry/Simulation


User specifies and tests
block design
Java-based simulator


User can choose a
variety of blocks by
selecting between
pallets
Blocks are added to
workspace by clicking
or dragging blocks
from “Available
eBlocks” tray
Available eBlocks
Sensors Output Compute/Communications
Light
Sensor
When
A is
Button
Beeper
Button
yes
no
AND B is
OR
yes
no
then the output is yes
When A is
yes
no
AND B is
OR
yes
no
Motion
SensorCombine
Green/Red
Light
rst
then the output is yes
Combine
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UCR
Industry Day, 2005
14 of 21
Design Entry/Simulation


User specifies and tests
block design
Java-based simulator



User can choose a
variety of blocks by
selecting between
pallets
Blocks are added to
workspace by clicking
or dragging blocks
from “Available
eBlocks” tray
User is able to
configure various
blocks by clicking on
switches
Available eBlocks
Sensors Output Compute/Communications
Light
Sensor
When
A is
Button
Beeper
Button
yes
no
AND B is
OR
yes
no
then the output is yes
When A is
yes
no
AND B is
OR
Motion
SensorCombine
Green/Red
yes
no
Light
rst
then the output is yes
Combine
Beeper
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
Frank Vahid, UCR
Industry Day, 2005
15 of 21
Design Entry/Simulation


User specifies and tests
block design
Java-based simulator




User can choose a
variety of blocks by
selecting between
pallets
Blocks are added to
workspace by clicking
or dragging blocks
from “Available
eBlocks” tray
User is able to
configure various
blocks by clicking on
switches
Connections created
by drawing lines
between blocks
Frank Vahid, UCR
Industry Day, 2005
Available eBlocks
Sensors Output Compute/Communications
Light
Sensor
When
A is
Button
Beeper
Button
yes
no
AND B is
OR
yes
no
then the output is yes
When A is
yes
no
AND B is
OR
Motion
SensorCombine
Green/Red
yes
no
Light
rst
then the output is yes
Combine
Beeper
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
16 of 21
Design Entry/Simulation


User specifies and tests
block design
Java-based simulator





User can choose a
variety of blocks by
selecting between
pallets
Blocks are added to
workspace by clicking
or dragging blocks
from “Available
eBlocks” tray
User is able to
configure various
blocks by clicking on
switches
Connections created
by drawing lines
between blocks
User can create,
experiment, test and
configure design
Frank Vahid, UCR
Industry Day, 2005
Available eBlocks
Sensors Output Compute/Communications
Light
Sensor
When
A is
Button
Beeper
Button
yes
no
AND B is
OR
yes
no
then the output is yes
When A is
yes
no
AND B is
OR
Motion
SensorCombine
Green/Red
yes
no
Light
rst
then the output is yes
Combine
Beeper
Light
Sensor
Once Yes, Stays Yes
in
Toggle
Yes/No
123456789
seconds
Prolonger
Hide this panel
Advanced Mode
Welcome to the eBlocks Simulator! In this area, you’ll find helpful hints on creating your own designs.
Click and drag an eBlock off of the “Available eBlocks” panel to add it to your design.
To connect two blocks, click and drag from an output port (colored circle) to an input port (gray circle).
A connection can be destroyed by clicking on a connected port.
To move a block around the workspace, click and drag its orange area.
Blocks can be moved into the trash can to delete them.
Green circles indicate that the port is sending a yes, red circles indicate that the port is sending a no, yellow
Circles indicate that the port is sending an error signal, and gray circles denote an input port.
17 of 21
Usability of eBlocks
100
 eBlocks usability experiments
90


Success Rate
>500 participants, 2 years
Participants of various expertise
levels
None had previous eBlocks
experience

80
70
60
50
40
30
20
10
0
Simple
Intermediate
Complex
Overall
Categories of eBlock Systems
More than half of the students were
able to build these systems in less than
Days to weeks required by advanced
students to build similar systems
without benefit of eBlocks
10 minutes!
123456789
Motion
Sensor
Button
Motion
Sensor
Beeper
LED
Simple Systems – Sensor blocks
directly to output block
Frank Vahid, UCR
Industry Day, 2005
Prolonger
Beeper
Light
Sensor
Light
Sensor
Magnetic
Contact
Switch
123456789
2-Input
Logic
LED
A’B’
Intermediate Systems – Systems that require
intermediate logic OR state blocks
Motion
Sensor
2-Input
Logic
Prolonger
eBlock to
Camera
Interface
A+B
Complex Systems – Systems that require
intermediate logic AND state blocks
18 of 21
eBlocks as a Programming Paradigm
 Use virtual eBlocks in graphical simulator to describe desired
sensor system behavior

Intuitive due to spatial emphasis, not temporal emphasis
 Automatically compile to code on programmable eBlocks
Partitions
Frank Vahid, UCR
Industry Day, 2005
Programmable eBlocks
19 of 21
eBlock Synthesis Tool – Programming
 Tool generates C code
automatically
C Code
#include <pic.h>
#include “sci.h”
main(void) {
#include “io.h”
ORTA = 0xff;
#include “constants.h”
CMCON = 0x07;
Unsigned char data_val = ERROR;
TRISA = 0x00;
...
TRISB = 0x02;
main(void) {
asm("CLRWDT");
unsigned I, j;
TRISB = 0;
...
}
...
}
Programmable
eBlock
 Download code to block with click of a button

Ordinary users can “write” programs in minutes
 Spatial vs. temporally-oriented language

20 high school graduates: eBlocks (spatial) vs.
LEGO Mindstorms (temporal), 6 example
systems, 40 minutes to build
Frank Vahid, UCR
Industry Day, 2005
Type
Average Success
Rate
Mindstorms
0%
eBlocks
54%
20 of 21
Conclusions
 Low-cost powerful computer chips opening vast new territory




Sensors with compute and communication nearly free
Smart Dust, Smart Pills, RFID, …
What new useful applications will evolve?
eBlocks – Enables user-customized systems




Monitor home/office/school/store/etc.
Sample application: Monitor activity level and patterns of ageing parent – must be
customized, behaviors highly person-specific
 Detect unusual behavior  Response (phone call, visit, …)
 Monitor trends (w/ doctor)  Early detection and correction of problems
Other sensor-network projects happening at UCR too
Future is wide open!
 Collaborators

Ph.D students: Susan Lysecky, Ryan Mannion, David Sheldon; Profs. Harry Hsieh, Walid
Najjar, Crista Lopes (UC Irvine)
Frank Vahid, UCR
Industry Day, 2005
21 of 21