Professional Documents
Culture Documents
Computer For Future Devices Final ST Thomas July 7 2011
Computer For Future Devices Final ST Thomas July 7 2011
acakcs@caluniv.ac.in
1
Introductory Concepts
lens
• Common metrics
– Time-to-prototype: the time needed to build a working version of the
system
– Time-to-market: the time required to develop a system to the point that it
can be released and sold to customers
– Maintainability: the ability to modify the system after its initial release
– Correctness, safety, many more
• Technology
– A manner of accomplishing a task, especially using
technical processes, methods, or knowledge
• Three key technologies for embedded systems
– Processor technology
– IC technology
– Design technology
total = 0 total = 0
for i =1 to … for i =1 to …
General-purpose (“software”) Application-specific Single-purpose (“hardware”)
total = 0
for i = 1 to N loop
total += M[i]
end loop
Desired
functionality
general ALU
• User benefits Program
memory
Data
memory
– Low time-to-market and NRE costs
Assembly code
– High flexibility for:
• Benefits
– Fast
– Low power
– Small size
• Benefits total = 0
for i =1 to …
– Some flexibility, good performance, size and
power
gate
IC package IC oxide
source channel drain
Silicon substrate
To final implementation
• Hardware/software
Implementation
“codesign” Microprocessor plus
program bits: “software”
VLSI, ASIC, or PLD
implementation: “hardware”
The choice of hardware versus software for a particular function is simply a tradeoff among various
design metrics, like performance, power, size, NRE cost, and especially flexibility; there is no
fundamental difference between what hardware or software can implement.
General- Single-
purpose ASIP purpose
General, processor processor Customized,
providing improved: providing improved:
• Wires:
– Uni-directional or bi-directional
– One line may represent multiple wires
• Bus Processor
rd'/wr
Memory
enable
– Set of wires with a single function addr[0-11]
• Address bus, data bus data[0-7]
port enable
addr[0-11]
data[0-7]
bus
• Conducting device on periphery
• Connects bus to processor or memory
• Often referred to as a pin
– Actual pins on periphery of IC package that plug into socket on printed-circuit board
– Sometimes metallic balls instead of pins
– Today, metal “pads” connecting processors and memories within single IC
• Single wire or set of wires with single function
– E.g., 12-wire address port
req req
data 15:8 7:0 addr/data addr data
data
data
req 1 3 req 1 3
ack 2 4
data 2 4
data
taccess
1. Master asserts req to receive data 1. Master asserts req to receive data
2. Servant puts data on bus within time taccess 2. Servant puts data on bus and asserts ack
3. Master receives data and deasserts req 3. Master receives data and deasserts req
4. Servant ready for next request 4. Servant ready for next request
4(a): The ISR reads data from 0x8000, 4(b): After being read, P1 de-
modifies the data, and writes the resulting asserts Int.
data to 0x8001.
4(a): The ISR reads data from 0x8000, Program memory μP Data memory
modifies the data, and writes the ISR
resulting data to 0x8001. 16: MOV R0, 0x8000
17: # modifies R0 System bus
4(b): After being read, P1 deasserts Int. 18: MOV 0x8001, R0
19: RETI # ISR return
... Int P1 P2
Main program 0
... PC 0x8000 0x8001
100: instruction
101: instruction 100
5(a): PC jumps to the address on the bus Program memory μP Data memory
(16). The ISR there reads data from ISR
0x8000, modifies the data, and writes the 16: MOV R0, 0x8000
17: # modifies R0 System bus
resulting data to 0x8001.
18: MOV 0x8001, R0
19: RETI # ISR return
... Inta P1 P2
5(b): After being read, P1 deasserts Int. Int
Main program
... PC 0 16
100: instruction 0x8000 0x8001
101: instruction 100
6: The ISR returns, thus restoring the PC Program memory μP Data memory
to 100+1=101, where the μP resumes ISR
16: MOV R0, 0x8000
17: # modifies R0 System bus
18: MOV 0x8001, R0
19: RETI # ISR return
... Int P1 P2
Main program
... PC 0x8000 0x8001
100: instruction +1
101: instruction 100
No ISR needed!
1(b): P1 receives input data in a register with System bus
address 0x8000.
... Dack
Main program DMA ctrl P1
... Dreq
0x0001 ack
100: instruction PC 0x8000 req
101: instruction 0x8000
100
No ISR needed!
3: DMA ctrl asserts Dreq to request control of System bus
system bus
... Dack
Main program DMA ctrl P1
... Dreq
1 0x0001 ack
100: instruction PC 0x8000 req
101: instruction 0x8000
100 1
... 1
Dack DMA ctrl P1
Main program Dreq
... 0x0001 ack
100: instruction PC 0x8000 req
101: instruction 0x8000
100
No ISR needed!
System bus
... Dack
Main program DMA ctrl P1
... Dreq 0
0 0x0001 ack
100: instruction PC 0x8000 req
101: instruction 0x8000
100
Processor Memory
ISA-Bus
R A
R
DMA A I/O Device
CYCLE C1 C2 C3 C4 C5 C6 CYCLE C1 C2 C3 C4 C5 C6
C7 C7
CLOCK CLOCK
ALE ALE
/IOR /MEMR
/MEMW /IOW
CHRDY CHRDY
• Types of priority
• Fixed priority
– each peripheral has unique rank
– highest rank chosen first with simultaneous requests
– preferred when clear difference in rank between peripherals
• Rotating priority (round-robin)
– priority changed based on history of servicing
– better distribution of servicing especially among peripherals with
similar priority demands
P
System bus
Peripheral1 Peripheral2
Inta
Ack_in Ack_out Ack_in Ack_out
Int Req_out Req_in Req_out Req_in 0
• Pros/cons
– Easy to add/remove peripheral - no system redesign needed
– Does not support rotating priority
– One broken peripheral can cause loss of access to other
peripherals
Micro-
P
processor System bus
System bus
Inta
Priority Peripheral Peripheral Peripheral1 Peripheral2
Int arbiter 1 2 Inta
Ack_in Ack_out Ack_in Ack_out
Ireq1 Int Req_out Req_in Req_out Req_in 0
Iack1
Ireq2
Daisy-chain aware peripherals
Iack2
for portability
• Bridge
– Single-purpose processor converts communication between busses
• I2C (Inter-IC)
– Two-wire serial bus protocol developed by Philips Semiconductors
nearly 20 years ago
– Enables peripheral ICs to communicate using simple communication
hardware
– Data transfer rates up to 100 kbits/s and 7-bit addressing possible in
normal mode
– 3.4 Mbits/s and 10-bit addressing in fast-mode
– Common devices capable of interfacing to I2C bus:
• EPROMS, Flash, and some RAM memory, real-time clocks, watchdog
timers, and microcontrollers
From From
Servant receiver
D
C
S A A A A R A D D D A S O
T R 6 5 0 / C 8 7 0 C T P
T w K K
Typical read/write cycle
1. List all possible states 2. Declare all variables (none in this example)
3. For each state, list possible transitions, with conditions, to other states
4. For each state and/or transition, req > floor
list associated actions
5. For each state, ensure exclusive u,d,o, t = 1,0,0,0 GoingUp !(req > floor)
and complete exiting transition
conditions req > floor timer < 10
u,d,o,t = 0,0,1,0
• No two exiting conditions can Idle !(timer < 10) DoorOpen
be true at same time req == floor
req < floor
u,d,o,t = 0,0,1,1
– Otherwise nondeterministic
state machine u,d,o,t = 0,1,0,0
!(req<floor)
GoingDn
• One condition must be true at
any given time u is up, d is down, o is open
req < floor
– Reducing explicit transitions t is timer_start
• Design task
– Define system functionality
– Convert functionality to physical implementation while
• Satisfying constrained metrics
• Optimizing other design metrics
• Designing embedded systems is hard
– Complex functionality
• Millions of possible environment scenarios
• Competing, tightly constrained metrics
– Productivity gap
• As low as 10 lines of code or 100 transistors produced per day
• Synthesis
– Reuse Verification
Implementation
Reuse
• Predesigned components
• Cores
• General-purpose and single-purpose processors on single IC
– Verification
• Ensuring correctness/completeness of each design step
• Hardware/software co-simulation
Style
Full-custom Standard cell Gate array FPGA
Cell size Variable Fixed height Fixed Fixed
Cell type Variable Variable Fixed Programmable
Cell placement Variable In row Fixed Fixed
Interconnections Variable Variable Variable Programmable
Design cost High Medium Medium Low
Style
Full-custom Standard cell Gate array FPGA
Data path
Metal2
PLA I/O
Metal1
RAM
Random logic
(standard
A/D cell design)
[©Sherwani]
acakcs@caluniv.ac.in St Thomas’ College of Engineering and Technology, 7 th July, 112
2011
Standard Cell (Cell Based)
VDD Metal1 Cell Feedthrough GND
Metal2
C C C B
Cell 1 Cell 2
Cell library A B
Space/2 C D
acakcs@caluniv.ac.in St Thomas’ College of Engineering and Technology, 7 th July, 113
2011 Floorplan [©Sherwani]
Standard Cell (Cell Based) (Cont.)
Vertical Channel
• Design Process
– Design a number of identical
blocks
– Blocks cell assignment
Horizontal channel
problems
– Complete interconnection
between the cells
The number of available tracks in
each channel is fixed
– Fabrication process for routing
layers on the top of the wafer
• Benefit
– Low cost: Reduce the number of
masks, increasing yield, simplified
design process
– Simple CAD problems
• Limitation
– Design complexity
– Performance
Programmable
IO Pins or
Logic Block
Feedthrough
Routing
path
Channel
Antifuse
Cross fuse
• Code the application and optimize the code according to code optimization guidelines
abstraction (1960s,1970s)
Register transfers
implementation implementation
(a) (b)
System specification
Architecture exploration
Hardware/software partitioning
HW SW
Software
Hardware design compilation
Hardware/software
Within the vast range of implementation partitioning
choices, one has to
find the one that fits the requirements best.
HW SW
• low power
• low cost Hardware
Hardwaredesign
design Software
Requires design libraries. compilation
Hardware/software partitioning
Algorithm
{ HW SW
Code 1 Hardware design
Scheduling tasks in HW (possibly Software
Code 2 different HW blocks) and SW compilation
Code 3 (over different processors).
Code 4
} In real-time systems: assigning
Tasks during execution.
Architecture exploration
Hardware/software partitioning
HW SW
Hardware design Software
compilation
Currently: ASIPs
Estimates before
Architecture exploration
implementation details
are known!
Hardware/software partitioning
HW SW
Hardware design Software
compilation
High level synthesis
Component
Logic design
selection
Physical design
Hardware/software partitioning
HW SW
Hardware design Software
Communication compilation
High level synthesis
Component Interface
Logic design
selection synthesis
Physical design
Simulation and verification
acakcs@caluniv.ac.in St Thomas’ College of Engineering and Technology, 7 th July, 139
2011
Operating System For Embedded Application
• Modular
• Scalable
• Configurable
• Small footprint
• CPU support
• Device drivers
• etc, etc, etc...
- Donald Gillies
acakcs@caluniv.ac.in St Thomas’ College of Engineering and Technology, 7 th July, 143
2011
What is Real Time?
• Hard
– guaranteed worst-case response times
– absolutely, positively, first time every time
• Soft
– Kinda, sorta, usually
• Task Management
– create, delete, suspend, resume
• Time Management
– system clock, generate delay
• Inter Task Communication and Synchronization
– Multitasking
• No-OS disable interrupts / enable interrupts
• With-OS enter/exit critical section
static-priority dynamic-priority
scheduling scheduling
The best mobile enterprise platform for integration with Office, Exchange
andNew Security
for line & Device application
of business Improved Integration with
development. Faster Application
Management Options Microsoft Office System Development
•Security improvements make
it easier to protect corporate
data • Tighter integration between • Enabling Partner Differentiation
•Additional provisioning and Microsoft Office Outlook on the • Better support for mobile line-
support functionality makes it desktop and Windows Mobile of-business application
easier to deploy and update devices increases mobile workforce development.
Windows Mobile devices. productivity
• New Office Mobile for Pocket PC
provides immediate access to Office
attachments while mobile