Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bus-Based Computer Systems

Similar presentations


Presentation on theme: "Bus-Based Computer Systems"— Presentation transcript:

1 Bus-Based Computer Systems
Designing with microprocessors. Development and debugging. System-level performance analysis. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

2 Overheads for Computers as Components 2nd ed.
System architectures Architectures and components: software; hardware. Some software is very hardware-dependent. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

3 Hardware platform architecture
Contains several elements: CPU; bus; memory; I/O devices: networking, sensors, actuators, etc. How big/fast much each one be? © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

4 Software architecture
Functional description must be broken into pieces: division among people; conceptual organization; performance; testability; maintenance. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

5 Hardware and software architectures
Hardware and software are intimately related: software doesn’t run without hardware; how much hardware you need is determined by the software requirements: speed; memory. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

6 Overheads for Computers as Components 2nd ed.
Evaluation boards Designed by CPU manufacturer or others. Includes CPU, memory, some I/O devices. May include prototyping section. CPU manufacturer often gives out evaluation board netlist---can be used as starting point for your custom board design. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

7 Overheads for Computers as Components 2nd ed.
Adding logic to a board Programmable logic devices (PLDs) provide low/medium density logic. Field-programmable gate arrays (FPGAs) provide more logic and multi-level logic. Application-specific integrated circuits (ASICs) are manufactured for a single purpose. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

8 Overheads for Computers as Components 2nd ed.
The PC as a platform Advantages: cheap and easy to get; rich and familiar software environment. Disadvantages: requires a lot of hardware resources; not well-adapted to real-time. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

9 Typical PC hardware platform
CPU memory device CPU bus interface bus high-speed bus DMA controller intr ctrl timers low-speed bus bus interface device © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

10 Overheads for Computers as Components 2nd ed.
Typical busses PCI: standard for high-speed interfacing 33 or 66 MHz. PCI Express. USB (Universal Serial Bus), Firewire (IEEE 1394): relatively low-cost serial interface with high speed. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

11 Overheads for Computers as Components 2nd ed.
Software elements IBM PC uses BIOS (Basic I/O System) to implement low-level functions: boot-up; minimal device drivers. BIOS has become a generic term for the lowest-level system software. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

12 Overheads for Computers as Components 2nd ed.
Example: StrongARM StrongARM system includes: CPU chip (3.686 MHz clock) system control module ( kHz clock). Real-time clock; operating system timer general-purpose I/O; interrupt controller; power manager controller; reset controller. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

13 Debugging embedded systems
Challenges: target system may be hard to observe; target may be hard to control; may be hard to generate realistic inputs; setup sequence may be complex. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

14 Overheads for Computers as Components 2nd ed.
Host/target design Use a host system to prepare software for target system: target system serial line host system © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

15 Overheads for Computers as Components 2nd ed.
Host-based tools Cross compiler: compiles code on host for target system. Cross debugger: displays target state, allows target system to be controlled. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

16 Overheads for Computers as Components 2nd ed.
Software debuggers A monitor program residing on the target provides basic debugger functions. Debugger should have a minimal footprint in memory. User program must be careful not to destroy debugger program, but , should be able to recover from some damage caused by user code. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

17 Overheads for Computers as Components 2nd ed.
Breakpoints A breakpoint allows the user to stop execution, examine system state, and change state. Replace the breakpointed instruction with a subroutine call to the monitor program. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

18 Overheads for Computers as Components 2nd ed.
ARM breakpoints 0x400 MUL r4,r6,r6 0x404 ADD r2,r2,r4 0x408 ADD r0,r0,#1 0x40c B loop uninstrumented code 0x400 MUL r4,r6,r6 0x404 ADD r2,r2,r4 0x408 ADD r0,r0,#1 0x40c BL bkpoint code with breakpoint © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

19 Breakpoint handler actions
Save registers. Allow user to examine machine. Before returning, restore system state. Safest way to execute the instruction is to replace it and execute in place. Put another breakpoint after the replaced breakpoint to allow restoring the original breakpoint. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

20 Overheads for Computers as Components 2nd ed.
In-circuit emulators A microprocessor in-circuit emulator is a specially-instrumented microprocessor. Allows you to stop execution, examine CPU state, modify registers. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

21 Overheads for Computers as Components 2nd ed.
Logic analyzers A logic analyzer is an array of low-grade oscilloscopes: © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

22 Logic analyzer architecture
UUT sample memory microprocessor system clock vector address controller state or timing mode clock gen keypad display © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

23 Overheads for Computers as Components
Boundary scan Simplifies testing of multiple chips on a board. Registers on pins can be configured as a scan chain. Used for debuggers, in-circuit emulators. © 2008 Wayne Wolf Overheads for Computers as Components

24 Overheads for Computers as Components 2nd ed.
How to exercise code Run on host system. Run on target system. Run in instruction-level simulator. Run on cycle-accurate simulator. Run in hardware/software co-simulation environment. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

25 Debugging real-time code
Bugs in drivers can cause non-deterministic behavior in the foreground problem. Bugs may be timing-dependent. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

26 System-level performance analysis
Performance depends on all the elements of the system: CPU. Cache. Bus. Main memory. I/O device. CPU memory cache © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

27 Bandwidth as performance
Bandwidth applies to several components: Memory. Bus. CPU fetches. Different parts of the system run at different clock rates. Different components may have different widths (bus, memory). © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

28 Bandwidth and data transfers
Video frame: 320 x 240 x 3 = 230,400 bytes. Transfer in 1/30 sec. Transfer 1 byte/msec, 0.23 sec per frame. Too slow. Increase bandwidth: Increase bus width. Increase bus clock rate. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

29 Overheads for Computers as Components 2nd ed.
Bus bandwidth T: # bus cycles. P: time/bus cycle. Total time for transfer: t = TP. D: data payload length. O1 + O2 = overhead O. O1 D O2 W Tbasic(N) = (D+O)N/W © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

30 Bus burst transfer bandwidth
T: # bus cycles. P: time/bus cycle. Total time for transfer: t = TP. D: data payload length. O1 + O2 = overhead O. 1 2 B O W Tburst(N) = (BD+O)N/(BW) © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

31 Overheads for Computers as Components 2nd ed.
Memory aspect ratios 16 M 64 M 8 M 8 1 4 © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

32 Overheads for Computers as Components 2nd ed.
Memory access times Memory component access times comes from chip data sheet. Page modes allow faster access for successive transfers on same page. If data doesn’t fit naturally into physical words: A = [(E/w)mod W]+1 © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

33 Bus performance bottlenecks
Transfer 320 x 240 video 30 frames/sec = 612,000 bytes/sec. Is performance bottleneck bus or memory? CPU memory © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

34 Bus performance bottlenecks, cont’d.
Bus: assume 1 MHz bus, D=1, O=3: Tbasic = (1+3)612,000/2 = 1,224,000 cycles = sec. Memory: try burst mode B=4, width w=0.5. Tmem = (4*1+4)612,000/(4*0.5) = 2,448,000 cycles = sec. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

35 Performance spreadsheet
© 2000 Morgan Kaufman Overheads for Computers as Components

36 Overheads for Computers as Components 2nd ed.
Parallelism Speed things up by running several units at once. DMA provides parallelism if CPU doesn’t need the bus: DMA + bus. CPU. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.


Download ppt "Bus-Based Computer Systems"

Similar presentations


Ads by Google