intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Embedded software enggineering: Advanced harware fundamentals

Chia sẻ: Duong The Anh | Ngày: | Loại File: PPT | Số trang:24

68
lượt xem
3
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Getting to know the hardware, understanding the big picture, draw your own data flow diagram, examine the landscape,... As the main contents of the lecture "Embedded software engineering: Advanced hardware fundamentals ". Each of your content and references for additional lectures will serve the needs of learning and research.

Chủ đề:
Lưu

Nội dung Text: Embedded software enggineering: Advanced harware fundamentals

  1. Embedded Software Engineering Advanced Hardware  Fundamentals Graduate Course ESE Lecturers:  Dr. Nguyen Ngoc Binh Dr. Le Quang Minh
  2. Getting to Know the Hardware • How to familiarize with a new board? • How to create a header file with the board’s important features? • How to write software code to initialize a newboard? ESE   2
  3. Understanding the Big Picture • Understand the general operation of the system first • Read all documentations • Before picking up the board should answer: • What is the overall purpose of the board? • How does data flow through it? ESE   3
  4. Draw your own data­flow diagram ESE   4
  5. Examine the landscape • Put yourself in the processor’s SHOES! • What does the processor’s world look like? • The processor has a lot of compatriots! – Memories: Storage and retrieval of data / code – Peripherals: Coordinate interaction with outside world (I/O), or specific hardware func • Examples: serial ports, timers • Address Spaces (Address Book of processor) – Memory Space – I/O Space ESE   5
  6. Memory Map for Arcom Board ESE   6
  7. Header File • Describes most important features of a board • Abstract interface to hardware • Refer to devices by name, instead of addresses – Makes software more portable • If 128 KB RAM is moved, – just change header file only, and – recompile program (no need to change program code) ESE   7
  8. Header File: Memory Map ESE   8
  9. Pointers v/s Address • C/C++ compilers for 80x86 use 32-bit pointers • Intel’s 80188EB processor: – 20-bit address space – 16-bit internal registers • TWO 16-bit registers are required: – a segment register (base address) – an offset register (offset address) • Physical Address 12345h: ESE   9
  10. I/O Map Repeat the memory map exercise to create an I/O map! ESE   10
  11. How to Communicate? • Two basic communication techniques: – polling – interrupts • Processor issues some commands to device • Processor waits for device to complete action • Timer: 1000  0 (countdown) ESE   11
  12. Polling: “are we there yet?” do { // Play games, read, listen to music, etc. … // Poll to see if we’re there yet. status = areWeThereYet(); } while (status == NO); ESE   12
  13. Interrupts Asynchronous signal from peripheral to CPU • Processor issues commands • Processor does other things • Device interrupts processor • Processor suspends its work • Processor executes interrupt service routine (ISR) • Processor returns to the interrupted work ESE   13
  14. Interrupts • Not all automatic! • Programmer must: – write ISR – install ISR – enable its execution when interrupt occurs • Initially, a significant challenge!!! • Code is better structured! • Overhead: save registers in memory, disable lower-priority interrupts, transfer control, etc. ESE   14
  15. Interrupt Map • Each processor has a few interrupts • Each interrupt has: – an interrupt pin on CPU – an ISR • Must map interrupt pin with ISR • Interrupt Vector Table – Array of pointers to functions, – Located at some known memory address ESE   15
  16. Interrupt Map for Arcom Board ESE   16
  17. Interrupt Map: Header File ESE   17
  18. Get to Know the Processor • Read databooks of processors! • Three types of processors: – Microprocessors: powerful, general-purpose, Eg: Motorola’s 68k, Intel’s 80x86 – Microcontrollers: less powerful, systemspecific, Eg: 8051, Motorola’s 68HCxx, Intel’s 386EX – Digital Signal Processors (DSP): fast calculations of discrete-time signals, Eg: TI’s TMS320Cxx, Motorola’s 5600x ESE   18
  19. Intel’s 80188EB Processor • Microcontroller version of 80186 • On-chip peripherals: – Interrupt control unit – 2 programmable I/O ports – 3 timer/counters – 2 serial ports – DRAM controller – Chip-select unit • 80188 controls them via internal buses ESE   19
  20. Peripheral Control Block (PCB) • Located in I/O space at address FF00h • Control and status registers for each on-chip peripheral are located at fixed offsets from the PCB base address • Include those offsets in your HEADER file ESE   20
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2