"Standard Binaries for FPGAs" & "eBlocks" Frank Vahid Professor Department of Computer Science and Engineering University of California, Riverside Associate.

Slides:



Advertisements
Similar presentations
Frank Vahid, UC Riverside 1 First Results with eBlocks: Embedded Systems Building Blocks Susan Cotterell, Frank Vahid*, Walid Najjar and Harry Hsieh Department.
Advertisements

Digitally-Bypassed Transducers: Interfacing Digital Mockups to Real-Time Medical Equipment Scott Sirowy*, Tony Givargis and Frank Vahid* This work was.
© 2003 Xilinx, Inc. All Rights Reserved Course Wrap Up DSP Design Flow.
Digital Design Copyright © 2006 Frank Vahid 1 FPGA Internals: Lookup Tables (LUTs) Basic idea: Memory can implement combinational logic –e.g., 2-address.
The Warp Processor Dynamic SW/HW Partitioning David Mirabito A presentation based on the published works of Dr. Frank Vahid - Principal Investigator Dr.
Automated Generation of Basic Custom Sensor-Based Embedded Computing Systems Guided by End-User Optimization Criteria Susan Lysecky Dept. of Electrical.
ENGIN112 L38: Programmable Logic December 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 38 Programmable Logic.
Application-Specific Customization of Parameterized FPGA Soft-Core Processors David Sheldon a, Rakesh Kumar b, Roman Lysecky c, Frank Vahid a*, Dean Tullsen.
Traffic Light Behavior IF A=1 AND B=0 Car Sensors B A.
A Configurable Logic Architecture for Dynamic Hardware/Software Partitioning Roman Lysecky, Frank Vahid* Department of Computer Science and Engineering.
A Study of the Speedups and Competitiveness of FPGA Soft Processor Cores using Dynamic Hardware/Software Partitioning Roman Lysecky, Frank Vahid* Department.
Dynamic FPGA Routing for Just-in-Time Compilation Roman Lysecky a, Frank Vahid a*, Sheldon X.-D. Tan b a Department of Computer Science and Engineering.
The New Software: Invisible Ubiquitous FPGAs that Enable Next-Generation Embedded Systems Frank Vahid Professor Department of Computer Science and Engineering.
Frank Vahid, UC Riverside 1 First Results with eBlocks: Embedded Systems Building Blocks Susan Cotterell, Frank Vahid*, Walid Najjar and Harry Hsieh Department.
EBlocks: Enabling Design of Basic Embedded Systems by Novice Users Susan Lysecky Dept. of Electrical and Computer Engineering University of Arizona
"Standard Binaries for FPGAs" & "eBlocks" Frank Vahid Professor Department of Computer Science and Engineering University of California, Riverside Associate.
Warp Processing – Towards FPGA Ubiquity Frank Vahid Professor Department of Computer Science and Engineering University of California, Riverside Associate.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
System Synthesis for Networks of Programmable Blocks Ryan Mannion, Harry Hsieh, Susan Cotterell, Frank Vahid * Department of Computer Science and Engineering.
CS 300 – Lecture 2 Intro to Computer Architecture / Assembly Language History.
Application-Specific Customization of Microblaze Processors, and other UCR FPGA Research Frank Vahid Professor Department of Computer Science and Engineering.
SensorBlocks: The Wood-and-Nails of the Electronic Sensor World Frank Vahid* Department of Computer Science and Engineering University of California, Riverside.
Embedded Systems: Supercomputing in a Pencil Tip Frank Vahid* Department of Computer Science and Engineering University of California, Riverside
A Logic Block Enabling Logic Configuration by Non-Experts in Sensor Networks Susan Cotterell and Frank Vahid * Department of Computer Science and Engineering.
Thread Warping: A Framework for Dynamic Synthesis of Thread Accelerators Greg Stitt Dept. of ECE University of Florida This research was supported in part.
1 Introduction A digital circuit design is just an idea, perhaps drawn on paper We eventually need to implement the circuit on a physical device –How do.
EBlocks – Electronic Building Blocks for Sensor-Based Systems Frank Vahid Professor Dept. of Computer Science and Engineering University of California,
Self-Improving Computer Chips – Warp Processing Contributing Ph.D. Students Roman Lysecky (Ph.D. 2005, now Asst. Prof. at Univ. of Arizona Greg Stitt (Ph.D.
Frank Vahid, UC Riverside 1 Self-Improving Configurable IC Platforms Frank Vahid Associate Professor Dept. of Computer Science and Engineering University.
CS 151 Digital Systems Design Lecture 38 Programmable Logic.
Railway Foundation Electronic, Electrical and Processor Engineering.
Dynamic Hardware/Software Partitioning: A First Approach Greg Stitt, Roman Lysecky, Frank Vahid* Department of Computer Science and Engineering University.
You Can Do It – eBlocks Enabling Regular People to Build Useful Customized Sensor-Based Systems Frank Vahid Professor Dept. of Computer Science and Engineering.
Dynamic Hardware Software Partitioning A First Approach Komal Kasat Nalini Kumar Gaurav Chitroda.
Dr. Konstantinos Tatas ACOE201 – Computer Architecture I – Laboratory Exercises Background and Introduction.
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
CS 1308 – Computer Literacy and the Internet. It’s Not Magic  The goal of the next series of lectures is to show you exactly how a computer works. 
 eBlock is an electronics block.  It can define as embedded system building block used in sensor based system.  Enable non-experts to build basic small-scale.
A Fast On-Chip Profiler Memory Roman Lysecky, Susan Cotterell, Frank Vahid* Department of Computer Science and Engineering University of California, Riverside.
Usability of State Based Boolean eBlocks Susan Cotterell and Frank Vahid * Department of Computer Science and Engineering University of California, Riverside.
COMPUTER SCIENCE &ENGINEERING Compiled code acceleration on FPGAs W. Najjar, B.Buyukkurt, Z.Guo, J. Villareal, J. Cortes, A. Mitra Computer Science & Engineering.
1 Computer Architecture Research Overview Rajeev Balasubramonian School of Computing, University of Utah
Finite State Machines (FSMs) and RAMs and inner workings of CPUs COS 116, Spring 2010 Guest: Szymon Rusinkiewicz.
J. Christiansen, CERN - EP/MIC
Introduction to FPGA Created & Presented By Ali Masoudi For Advanced Digital Communication Lab (ADC-Lab) At Isfahan University Of technology (IUT) Department.
Finite State Machines (FSMs) and RAMs and CPUs COS 116, Spring 2011 Sanjeev Arora.
EE3A1 Computer Hardware and Digital Design
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
CS 1308 – Computer Literacy and the Internet Building the CPU.
EBlocks – An Enabling Technology for Basic Sensor Based Systems Susan Cotterell, Ryan Mannion, Frank Vahid *, Harry Hsieh Department of Computer Science.
Codesigned On-Chip Logic Minimization Roman Lysecky & Frank Vahid* Department of Computer Science and Engineering University of California, Riverside *Also.
WARP PROCESSORS ROMAN LYSECKY GREG STITT FRANK VAHID Presented by: Xin Guan Mar. 17, 2010.
Scott Sirowy, Chen Huang, and Frank Vahid † Department of Computer Science and Engineering University of California, Riverside {ssirowy,chuang,
On-Chip Logic Minimization Roman Lysecky & Frank Vahid* Department of Computer Science and Engineering University of California, Riverside *Also with the.
Warp Processing: Making FPGAs Ubiquitous via Invisible Synthesis Greg Stitt Department of Electrical and Computer Engineering University of Florida.
A Study of the Scalability of On-Chip Routing for Just-in-Time FPGA Compilation Roman Lysecky a, Frank Vahid a*, Sheldon X.-D. Tan b a Department of Computer.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Introduction to the FPGA and Labs
Installing Java on a Home machine
Floating-Point FPGA (FPFPGA)
ECE354 Embedded Systems Introduction C Andras Moritz.
CSCI-100 Introduction to Computing
Installing Java on a Home machine
Autonomously Adaptive Computing: Coping with Scalability, Reliability, and Dynamism in Future Generations of Computing Roman Lysecky Department of Electrical.
Chapter 1 Introduction.
Dynamic FPGA Routing for Just-in-Time Compilation
Dynamic Hardware/Software Partitioning: A First Approach
Warp Processor: A Dynamically Reconfigurable Coprocessor
Portable SystemC-on-a-Chip
System Synthesis for Networks of Programmable Blocks
Presentation transcript:

"Standard Binaries for FPGAs" & "eBlocks" Frank Vahid Professor Department of Computer Science and Engineering University of California, Riverside Associate Director, Center for Embedded Computer Systems, UC Irvine Work supported by the National Science Foundation, the Semiconductor Research Corporation, Xilinx, Intel, and Freescale Contributing Students: FPGAs: Roman Lysecky (PhD 2005, Asst. Prof. at U. Arizona), Greg Stitt (PhD 2007, Assistant Prof. at U. Florida), Ann Gordon-Ross (Ph.D. 2007, Asst. Prof. at U. Florida), David Sheldon (4th yr PhD), Scott Sirowy (3rd yr PhD) eBlocks: Susan Lysecky (PhD 2006, Asst. Prof. at U. Arizona), Ryan Mannion (3rd yr PhD), Shawn Nemetebakshi (MS 2005), plus numerous undergraduate students

Frank Vahid, UC Riverside2/31 Software is no longer just "instructions" The elephant of software has a (new) tail – FPGA circuits Microprocessor instructions FPGA circuits Software...

Frank Vahid, UC Riverside3/31 FPGAs: The Quietly Arriving New Software FPGA (Field-programmable gate array) – thousands of LUTs and switch matrices, plus flip-flops, multipliers, RAMs, etc. Tools automatically compile circuits into bits that program FPGA Multi-billion dollar growing industry Increasingly found in embedded system products – medical devices, basestations, set-top boxes, etc. ab a1a0a1a0 4x2 Memory abab d 1 d 0 F G LUT FG 2x2 switch matrix x y a b FPGA SM LUT SM LUT Circuit FPGAs implement circuits as software – bits downloaded into memory

Frank Vahid, UC Riverside4/31 for (i=0; i < 128; i++) y[i] += c[i] * x[i].. Why Circuits (Sometimes) Beat Instructions for (i=0; i < 128; i++) y[i] += c[i] * x[i].. ************ C Code for FIR Filter Processor 1000’s of instructions Several thousand cycles Circuit for FIR Filter Processor FPGA ~ 7 cycles Speedup > 100x In general, FPGA better due to circuit's concurrency, from bit-level to task level

Frank Vahid, UC Riverside5/31 Extensive Studies over Past Decade Large speedups on many important applications Numerous dedicated conferences (FPGA, FCCM, FPL,...)

Frank Vahid, UC Riverside6/31 New FPGA Compilers Start from Common Programming Languages Commercial products appearing in recent years Good news Binary C, C++, Java Profiling FPGA Compiler Binary Micro- processor FPGA Binary HDL Binary Bitstream Synthesis

Frank Vahid, UC Riverside7/31 Problem: Best Temporal/Spatial Algorithms Differ quicksort ( array, left, right){ if right > left: pivot= array[left] newpivot = partition(array, left, right, pivot) quicksort(array, left, newpivot -1) quicksort(array, newpivot + 1, right) } Processor Bitonic Sorting Network PlatformAlgorithm FPGA

Frank Vahid, UC Riverside8/31 Bigger Problem: Algorithms Matter Even More For portability, need algorithms that are efficient on both "Compromise programming" Processor FPGA Quicksort Bitonic Sort

Frank Vahid, UC Riverside9/31 New FPGA Compilers Start from Common Programming Langauges BUT – Standard tools/binaries important for "ecosystem" Countless ideas failed for not respecting the ecosystem Binary C, C++, Java Profiling FPGA Compiler Binary Micro- processor FPGA Binary Bitstream Languages ArchitecturesTools Standard binary

Frank Vahid, UC Riverside10/31 One Solution: Hide the FPGA Today's microprocessors use dynamic translation (e.g., x86) Different architectures hidden For FPGAs: Transparently translate standard microprocessor binaries to FPGAs Warp Processing Developed at UCR present Binary SW Profiling Standard Compiler Binary RISC architecture Translator VLIW architecture Translator FPGAProc. Translator

Frank Vahid, UC Riverside11/31 µP FPGA On-chip CAD Warp Processing Background: Basic Idea Profiler Initially, software binary loaded into instruction memory 1 I Mem D$ Mov reg3, 0 Mov reg4, 0 loop: Shl reg1, reg3, 1 Add reg5, reg2, reg1 Ld reg6, 0(reg5) Add reg4, reg4, reg6 Add reg3, reg3, 1 Beq reg3, 10, -5 Ret reg4 Software Binary

Frank Vahid, UC Riverside12/31 µP FPGA On-chip CAD Warp Processing Background: Basic Idea Profiler I Mem D$ Mov reg3, 0 Mov reg4, 0 loop: Shl reg1, reg3, 1 Add reg5, reg2, reg1 Ld reg6, 0(reg5) Add reg4, reg4, reg6 Add reg3, reg3, 1 Beq reg3, 10, -5 Ret reg4 Software Binary Microprocessor executes instructions in software binary 2 µP

Frank Vahid, UC Riverside13/31 µP FPGA On-chip CAD Warp Processing Background: Basic Idea Profiler µP I Mem D$ Mov reg3, 0 Mov reg4, 0 loop: Shl reg1, reg3, 1 Add reg5, reg2, reg1 Ld reg6, 0(reg5) Add reg4, reg4, reg6 Add reg3, reg3, 1 Beq reg3, 10, -5 Ret reg4 Software Binary Profiler monitors instructions and detects critical regions in binary 3 Profiler add beq Critical Loop Detected

Frank Vahid, UC Riverside14/31 µP FPGA On-chip CAD Warp Processing Background: Basic Idea Profiler µP I Mem D$ Mov reg3, 0 Mov reg4, 0 loop: Shl reg1, reg3, 1 Add reg5, reg2, reg1 Ld reg6, 0(reg5) Add reg4, reg4, reg6 Add reg3, reg3, 1 Beq reg3, 10, -5 Ret reg4 Software Binary On-chip CAD reads in critical region 4 Profiler On-chip CAD

Frank Vahid, UC Riverside15/31 µP FPGA Dynamic Part. Module (DPM) Warp Processing Background: Basic Idea Profiler µP I Mem D$ Mov reg3, 0 Mov reg4, 0 loop: Shl reg1, reg3, 1 Add reg5, reg2, reg1 Ld reg6, 0(reg5) Add reg4, reg4, reg6 Add reg3, reg3, 1 Beq reg3, 10, -5 Ret reg4 Software Binary On-chip CAD converts critical region into control data flow graph (CDFG) 5 Profiler On-chip CAD loop: reg4 := reg4 + mem[ reg2 + (reg3 << 1)] reg3 := reg3 + 1 if (reg3 < 10) goto loop ret reg4 reg3 := 0 reg4 := 0

Frank Vahid, UC Riverside16/31 µP FPGA Dynamic Part. Module (DPM) Warp Processing Background: Basic Idea Profiler µP I Mem D$ Mov reg3, 0 Mov reg4, 0 loop: Shl reg1, reg3, 1 Add reg5, reg2, reg1 Ld reg6, 0(reg5) Add reg4, reg4, reg6 Add reg3, reg3, 1 Beq reg3, 10, -5 Ret reg4 Software Binary On-chip CAD synthesizes decompiled CDFG to a custom (parallel) circuit 6 Profiler On-chip CAD loop: reg4 := reg4 + mem[ reg2 + (reg3 << 1)] reg3 := reg3 + 1 if (reg3 < 10) goto loop ret reg4 reg3 := 0 reg4 :=

Frank Vahid, UC Riverside17/31 µP FPGA Dynamic Part. Module (DPM) Warp Processing Background: Basic Idea Profiler µP I Mem D$ Mov reg3, 0 Mov reg4, 0 loop: Shl reg1, reg3, 1 Add reg5, reg2, reg1 Ld reg6, 0(reg5) Add reg4, reg4, reg6 Add reg3, reg3, 1 Beq reg3, 10, -5 Ret reg4 Software Binary On-chip CAD maps circuit onto FPGA 7 Profiler On-chip CAD loop: reg4 := reg4 + mem[ reg2 + (reg3 << 1)] reg3 := reg3 + 1 if (reg3 < 10) goto loop ret reg4 reg3 := 0 reg4 := CLB SM ++ FPGA

Frank Vahid, UC Riverside18/31 µP FPGA Dynamic Part. Module (DPM) Warp Processing Background: Basic Idea Profiler µP I Mem D$ Mov reg3, 0 Mov reg4, 0 loop: Shl reg1, reg3, 1 Add reg5, reg2, reg1 Ld reg6, 0(reg5) Add reg4, reg4, reg6 Add reg3, reg3, 1 Beq reg3, 10, -5 Ret reg4 Software Binary8 Profiler On-chip CAD loop: reg4 := reg4 + mem[ reg2 + (reg3 << 1)] reg3 := reg3 + 1 if (reg3 < 10) goto loop ret reg4 reg3 := 0 reg4 := CLB SM ++ FPGA On-chip CAD replaces instructions in binary to use hardware, causing performance and energy to “warp” by an order of magnitude or more Mov reg3, 0 Mov reg4, 0 loop: // instructions that interact with FPGA Ret reg4 FPGA Software-only “Warped” Feasible for repeating or long- running applications

Frank Vahid, UC Riverside19/31 Recent Warp Results on Multi-Threaded Benchmarks After translation (may take minutes), huge speedups Even compared to 64-microprocessor system [ Stitt/Vahid CODES/ISSS 2007] Translation results remembered for later execution

Frank Vahid, UC Riverside20/31 FPGAs as Software: Challenges and Opportunity Challenge – Broader definitions of... Compilation, OS, verification, certification, etc. Opportunity – Can create custom multi-processor architectures just by downloading bits After all, a processor is just another circuit Xilinx Virtex II Pro can hold dozens of "soft core" 32-bit processors, in addition to the four "hard core" PowerPCs

Frank Vahid, UC Riverside21/31 FPGAs and Cyber-Physical Systems Tough to predict future of computing "Victorian planners in 1830 predicted that by 1930 London street traffic would be bogged down under 25 feet of horse manure." Are FPGAs to microprocessors what cars were to horses? Probably not, but perhaps they are what tails are to horses? We might do well to keep FPGAs in mind as we consider software issues

eBlocks: The Wood-and-Nails of the Electronic Sensor World Frank Vahid* Department of Computer Science and Engineering University of California, Riverside * Also with the Center for Embedded Computer Systems at UC Irvine This work is being supported by the National Science Foundation Title suggested by a colleague: "eBlocks – Empowering the People"

Frank Vahid, UC Riverside23/31 Seen this Problem? Technology everywhere – Why no good solution? Not!Available

Frank Vahid, UC Riverside24/31 Shrinking Processor Size/Cost Enables New Solution Make sensors smarter By adding processor+battery Becomes a "block" easily connected to other blocks Courtesy of Joe Kahn

Frank Vahid, UC Riverside25/31 Shrinking Processor Size/Cost Enables New Solution – eBlocks Existing component viewNew "eBlock" view Button yes/no Light Sensor yes/no Magnetic Contact Switch yes/no LED yes/no Beeper Electric Relay yes/no

Frank Vahid, UC Riverside26/31 eBlocks Just connect blocks, and they work No programming knowledge, no electronics knowledge Button yes/no LED yes/no Beeper yes/no Light Sensor yes/no

Frank Vahid, UC Riverside27/31 What's Hard (The Research Part) (1) Finding right set of building blocks Toggle Splitter Tripper 2-Input Logic 3-Input Logic Splitter 4-Input Logic Splitter Prolong (short) Prolong (long) Combine AND OR yes no When A isyes no B is then the output is yes Too many – Overwhelming (too much choice) 2 Yes detector 2 No detector Too few – Overwhelming (too much configuration) SuperBlock AND OR yes no When A isB is then the output is yes : Splitter :...

Frank Vahid, UC Riverside28/31 What's Hard (The Research Part) (2) Making the blocks understandable People NOT likely to read directions Those that do are unlikely to understand ABOutput noyesno yesnoyes noyes no yes Logic Block configurable DIP switch A B Combine A is yes, B is yes A is yes, B is no A is no, B is yes A is no, B is no The output shouldbe yes when: yes no: Phrased truth table yes no the output should be AB When the input is out Combine A is yes, B is yes A is yes, B is no A is no, B is yes A is no, B is no Phrased truth table embedded in sentence yes no The output should be When the input is out AB AB AB AB AB Combine Colored truth table embedded in sentence Combine AND OR yes no When A is yes no B is then the output is yes Logic Sentence Example: Combine block Performed extensive user testing (over 500 students, kids, and adults) over two years Most success

Frank Vahid, UC Riverside29/31 What's Hard (The Research Part) (3) Batteries must last years, yet performance should appear continuous Blocks are off 99.9% of the time Mean time between corrupted packets (days) 1 0 F reliability Block latency (seconds) 1 0 F latency Disconnect response (seconds) 1 0 F responsiveness Connect response (seconds) 1 0 F responsiveness Latency Disconnect Responsiveness Reliability Connect Responsiveness time ft f (a) (b) (d) (c) error << ftfff << interpreted as Developed theory to map eBlock events to continuous time Developed custom CAD tool to automatically find the best block parameter settings out of the billions of possibilities

Frank Vahid, UC Riverside30/31 Built >100 Prototypes Size of deck of cards (eventually smaller) 2-3 years on 2 AA batteries (eventually longer) Can communicate via wire >1.5 miles, 150 ft wireless Hundreds of trial users Integer blocks too

Frank Vahid, UC Riverside31/31 eBlock technology nearly mature Possible early-adoption applications Hearing impaired home monitoring Aging parent non-intrusive monitoring Middle-school early engineering experience kits Trends work in favor each year Smaller, cheaper (<$5), longer battery life (or no battery?) Eventual applications General blocks for home, stores, office Blocks as front-end devices to "smart home" New blocks and tools for intermediate/advanced users Collaborators Ph.D students: Susan Lysecky, Ryan Mannion, David Sheldon; Profs. Harry Hsieh, Walid Najjar, Crista Lopes (UC Irvine); UG students: Andrea Coba, Margaret Ukwu, Caleb Leak, and several others eBlocks

Frank Vahid, UC Riverside32/31 Graphical Simulator 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.  User specifies and tests block design  Java-based simulator User chooses between pallets Blocks added by dragging 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 Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Light Sensor Available eBlocks Advanced ModeHide this panel Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Motion Sensor Yes/No Button Light Sensor Sensors Green/Red Light Beeper Output Beeper Combine AND OR yes no When A isyes no B is then the output is yes Light Sensor Button

Frank Vahid, UC Riverside33/31 Use virtual blocks in graphical simulator to describe desired sensor system behavior Intuitive due to spatial emphasis, not temporal emphasis Automatically compile to code on programmable eBlocks eBlocks as a Programming Paradigm Programmable eBlocks Partitions

Frank Vahid, UC Riverside34/31 eBlock Tool Generates Code Tool generates C code automatically #include #include “sci.h” #include “io.h” #include “constants.h” Unsigned char data_val = ERROR;... main(void) { unsigned I, j; TRISB = 0;... } main(void) { ORTA = 0xff; CMCON = 0x07; TRISA = 0x00; TRISB = 0x02; asm("CLRWDT");... } C Code 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 Programmable eBlock Type Average Success Rate Mindstor ms 0% eBlocks54%

Frank Vahid, UC Riverside35/31 eBlocks and Embedded Microprocessors Can greatly simplify coding Button yes/no Light Sensor yes/no 1/0 Micro- processor

Frank Vahid, UC Riverside36/31 Introduction 1998: Simple Problem Garage door open at night No simple solution Off-the-shelf solutions costly, hard to find, and/or not customizable Alarm system cost – overkill Connecting existing sensors, logic, transmit/receive, LEDs is hard Electronics, programming 2-week project: 70% EE/CS unable Countless similar applications go unrealized Why can't I just connect those components like "Lego TM " blocks? LED receive contact switch light sensor AND transmit

Frank Vahid, UC Riverside37/31 eBlocks Example "Garage Open at Night" detector <10 minutes to build Need to indicate garage open at night – use LED block LED Detect night-time – use Light Sensor block Light Sensor Detect garage door open – use Contact Switch block Magnetic Contact Switch Plug pieces together and the system is done! Use Combine block to combine light sensor and contact switch into one Combine AND OR yes no When A isyes no B is then the output is yes

Frank Vahid, UC Riverside38/31 Graphical Simulator 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.  User specifies and tests block design  Java-based simulator User chooses between pallets Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Motion Sensor Yes/No Button Light Sensor Sensors Green/Red Light Beeper Output Available eBlocks Advanced ModeHide this panel Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes

Frank Vahid, UC Riverside39/31 Graphical Simulator 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.  User specifies and tests block design  Java-based simulator User chooses between pallets Blocks added by dragging Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Available eBlocks Advanced ModeHide this panel Green/Red Light Beeper Output Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Motion Sensor Yes/No Button Light Sensor Sensors Button

Frank Vahid, UC Riverside40/31 Graphical Simulator 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.  User specifies and tests block design  Java-based simulator User chooses between pallets Blocks added by dragging Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Button Light Sensor

Frank Vahid, UC Riverside41/31 Graphical Simulator 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.  User specifies and tests block design  Java-based simulator User chooses between pallets Blocks added by dragging Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Button Light Sensor Available eBlocks Advanced ModeHide this panel Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Combine AND OR yes no When A isyes no B is then the output is yes

Frank Vahid, UC Riverside42/31 Graphical Simulator 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.  User specifies and tests block design  Java-based simulator User chooses between pallets Blocks added by dragging Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Button Light Sensor Available eBlocks Advanced ModeHide this panel Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Combine AND OR yes no When A isyes no B is then the output is yes Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Motion Sensor Yes/No Button Light Sensor Sensors Green/Red Light Beeper Output Beeper

Frank Vahid, UC Riverside43/31 Combine AND OR yes no When A isyes no B is then the output is yes Graphical Simulator 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.  User specifies and tests block design  Java-based simulator User chooses between pallets Blocks added by dragging User is able to configure various blocks by clicking on switches Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Button Light Sensor Available eBlocks Advanced ModeHide this panel Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Motion Sensor Yes/No Button Light Sensor Sensors Green/Red Light Beeper Output Beeper

Frank Vahid, UC Riverside44/31 Graphical Simulator 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.  User specifies and tests block design  Java-based simulator User chooses between pallets Blocks added by dragging User is able to configure various blocks by clicking on switches Connections created by drawing lines between blocks Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Button Light Sensor Available eBlocks Advanced ModeHide this panel Green/Red Light Beeper Output Motion Sensor Yes/No Button Light Sensor Sensors Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Available eBlocks Advanced ModeHide this panel Compute/Communications Prolonger seconds Once Yes, Stays Yes rst in Toggle Combine AND OR yes no When A isyes no B is then the output is yes Motion Sensor Yes/No Button Light Sensor Sensors Green/Red Light Beeper Output Beeper Combine AND OR yes no When A isyes no B is then the output is yes