1 / 36

Bus-Based Computer Systems

Bus-Based Computer Systems. Designing with microprocessors. Development and debugging. System-level performance analysis. System architectures. Architectures and components: software; hardware. Some software is very hardware-dependent. Hardware platform architecture.

pete
Télécharger la présentation

Bus-Based Computer Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. System architectures • Architectures and components: • software; • hardware. • Some software is very hardware-dependent. 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? 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. 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. Overheads for Computers as Components 2nd ed.

  6. 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. Overheads for Computers as Components 2nd ed.

  7. 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. Overheads for Computers as Components 2nd ed.

  8. 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. Overheads for Computers as Components 2nd ed.

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

  10. 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. Overheads for Computers as Components 2nd ed.

  11. 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. Overheads for Computers as Components 2nd ed.

  12. Example: StrongARM • StrongARM system includes: • CPU chip (3.686 MHz clock) • system control module (32.768 kHz clock). • Real-time clock; • operating system timer • general-purpose I/O; • interrupt controller; • power manager controller; • reset controller. 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. Overheads for Computers as Components 2nd ed.

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

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

  16. 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. Overheads for Computers as Components 2nd ed.

  17. 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. Overheads for Computers as Components 2nd ed.

  18. 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 ARM breakpoints 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. Overheads for Computers as Components 2nd ed.

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

  21. Logic analyzers • A logic analyzer is an array of low-grade oscilloscopes: 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 Overheads for Computers as Components 2nd ed.

  23. 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. Overheads for Computers as Components 2nd ed.

  24. 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. 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. 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 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). 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. Overheads for Computers as Components 2nd ed.

  29. 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 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) Overheads for Computers as Components 2nd ed.

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

  32. 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 Overheads for Computers as Components 2nd ed.

  33. Bus performance bottlenecks • Transfer 320 x 240 video frame @ 30 frames/sec = 612,000 bytes/sec. • Is performance bottleneck bus or memory? CPU memory 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 = 1.224 sec. • Memory: try burst mode B=4, width w=0.5. • Tmem = (4*1+4)612,000/(4*0.5) = 2,448,000 cycles = 0.2448 sec. Overheads for Computers as Components 2nd ed.

  35. Performance spreadsheet Overheads for Computers as Components 2nd ed.

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

More Related