Systèmes embarqués microprogrammés

EE-310

This file is part of the content downloaded from Systèmes embarqués microprogrammés.
Course summary



Objectifs:

L'étudiant comprendra les architectures des systèmes embarqués microprogrammés, les architectures des microprocesseurs, hiérarchie de mémoire et les différents périphériques de Entrée/Sortie (E/S) inclus, utilisant comme étude de cas la plate-forme portable Nintendo DS.

Objectives:

The student will get to know the architecture of microprogrammed embedded systems, including the microprocessor architecture, memory hierarchy and different input/output peripherals, using as case study the Nintendo DS portable platform.


Horaire:

  • Cours: Vendredi de 9h00 à 11h00 au GCC 330
  • Laboratoire: Vendredi de 14h00 à 16h00 au MED 2 2524  

Heures pour poser des questions:

  • Vendredi, 11h00 - 13h00, office ELG 130 (David Atienza)
  • Mardi, 11h00 - 13h00, office ELG 121 (Stefano Albini)
  • Vendredi, 12h00 - 14h00, office ELG 134 (Dimitrios Samakovlis)
  • Jeudi, 14h00 - 16h00, office ELG 121 (Kai Zhu)
  • Jeudi, 11h00 - 13h00, office ELG 121 (Juan Sapriza)
Vous pouvez également poser des questions online en utilisant le Forum "Questions et Réponses (via Ed tool)"


Support du cours: 

  • Diapositives du cours et séries de laboratoire sur Moodle, et livres de réference à la bibliothèque indiqués pendant le cours. 


Theory session (1 hour):

  • Presentation of the course objectives, evaluation format, and introduction to the structure of the sessions with the Nintendo DS. 
Lab. session (2 hours):

  • In this session, it will be explained how to test the given equipment for the laboratory, and the students can review C programming and read the basic Nintendo DS manual of operation.


Material:

Theory session (2 hours):

  • Microprogrammed Embedded Systems: what, why and when 
    • Comparisons with traditional embedded systems.
    • Main application fields and design constraints.
    • System-level architectures: hardware and software. 
    • C-based cross-development frameworks.
  • Case study: Nintendo DS Lite 
    • Hardware and software architecture overview.

Lab. session (2 hours):
  • Getting familiar with the NDS cross-compilation environment: How to use the software installed in the VM (eclipse and the toolchain), create a clean environment, compile a project, run it on the simulator.
  • Practical Work 2: Starting with C for the Nintendo DS.
  • Practical Work 3: 
    • Setting up the debugger in Eclipse
    • Learn how to debug C code in Eclipse
    • Advanced programming exercises with C to understand the features of the architecture of the NDS and the correct memory management.
    • Learn how to use different compilation options.

Material:

Theory session (2 hours):

  • Introduction to microprocessor architectures evolution and computational models for computing systems: ARM case study
  • NDS memory hierarchy and boot-up process
  • ARM microprocessor architectures for the NDS
  • ARM instruction set (definition of the main instructions). Registers and purpose.
  • How the ARM compiler works: translations from C code structures to assembly code.
  • Interacting C programming with assembly.


Lab. Session (2 hours):

  • Practical Work 4:
    • Examples of ARM assembly for the NDS
    • How to insert assembly code directly in C and how to include in C assembly code from a separate assembly file. Use of both modes in the NDS.
Material:

Theory session (2 hours):
  • Types of I / O and peripheral management
    • I / O interfaces and required management operations
    • Synchronization between I / O devices and microprocessors' CPUs
    • Prioritizing multiple interrupt sources: multi-level interrupts handling
    • I / O management for ARM architectures
    • I / O peripheral subsystem in ARM microprocessors
  • Management of timers in the NDS using the libnds library
    • Use of timers and screen together in the NDS: designing a clock


Lab. session (2 hours):

  • Programming exercises combining interrupts using timers and the keys.
    • Measure time using timers
    • Implementing a chronometer using 2 timers’ interrupt
    • Implementing a chronometer using 1 timer
    • Refreshing the screen properly using graphic interrupts
    • Changing the color of the clock periodically
    • Printing lap time with the keys
  • Our first simple game with interrupts: The Time Challenge game

Material:


Theory session (2 hours): GRAPHICS I - Fundamental graphics

  • Colors in the Nintendo DS
  • Review of the (V)RAM structure
  • Framebuffer mode

Lab. session (2 hours): 

  • Implementation of fundamental graphic functions to draw lines and rectangles or fill shapes using framebuffer mode.
  • Drawing basic shapes in the screen (rectangles, lines, triangles) with different colours, degrading the screen and cleaning the screen.
  • Additional effects in framebuffer mode: Gray-scale, color inversion, etc.

Material:


Theory session (2 hours):
  • Specific aspects of C coding for embedded systems: arrays/matrices, pointers and memory management
  • Presentation about fixed-point arithmetic in microprogrammed embedded systems
  • Questions about previous exams and exercises


Lab. session (2 hours):

  • Catchup to complete previous practical work sessions
  • Suggestion: revisit exercises about C after fixed-point arithmetic lecture this week.


Material:



Theory session (2 hours): - GRAPHICS II - Extended rotoscale mode 

  • Video modes for rotoscale 
  • Palettes and backgrounds 
  • Data storage in VRAM structure 
  • Data transfer functions 
  • Transformation matrix 
  • Drawing graphics in extended rotoscale mode with the NDS 
  • Examples transformation matrix 
  • Converting images for NDS: grit


Lab. session (2 hours):

  • Video modes for rotoscale 
  • Palettes and backgrounds 
  • Data storage in VRAM structure 
  • Data transfer functions 
  • Transformation matrix 
  • Drawing graphics in extended rotoscale mode with the NDS 
  • Examples transformation matrix 
  • Converting images for NDS: grit

Material:

Theory session (2 hours): GRAPHICS III - Tiled/text mode

  • NDS video modes for tiled mode
  • Concepts: tiles and their effects
  • Multi-palettes with tiles
  • Background representations with tiles
  • Review of the (V)RAM structure
  • Copying large data sets: direct memory address (DMA)


Lab session (2 hours):

  • Drawing graphics in tiled/text mode (Part 1)
  • Example of custom background definition in tiled mode
  • Converting images to tiles: revisit the grit tool
  • Implementation of effects using multiple backgrounds in the NDS
  • Additional exercises with advanced graphics: change background priorities, large backgrounds, overlapping backgrounds, and use of sprites on backgrounds.


Material:

Theory session (2 hours): Controls in NDS: keys and touchscreen

  • Detection of events in controls and I/O handling modes
  • Polling for keys and touchscreen: libnds
  • Efficient keys management: interrupts triggers and identification
  • Tracking complex shapes using the touchscreen


Lab. session (2 hours):

  • Using controls and graphics in the NDS
  • Developing a basic Paint tool
  • Try to be the fastest with colors: Simon game
  • Adding keypad and touchscreen control to the Tetris


Material:


Theory session (2 hours): Review of solution of midterm 2014-2015 and Q&A session

  • An example of mid-term exam (year 2014-2015) will be solved in the classroom all together
  • Mid-term practice doing the mid-term exams of the academic years 2017-2018 and 2022-2023 (the solution is available in the Moodle page)

  • Sound system management on the NDS
    • Adding background music and sounds to the Simon game
    • Adding preexisting background music and effects to the Tetris
    • Creating a piano keyboard for the NDS

Lab. session ( 2 hours):
  • Practice doing the mid-term exam of one of the previous academic years
  • Sound system management on the NDS
    • Adding background music and sounds to the Simon game
    • Adding preexisting background music and effects to the Tetris
    • Creating a piano keyboard for the NDS

Material:


Theory session (2 hours): Questions about Midterm, and advanced sound system management
  • Q&A session about Midterm 
  • Advanced sound system management on the NDS
    • Creating streaming flow with IPC flow between ARM7 and ARM9
    • Using the NDS microphone
    • Creating a piano keyboard for the NDS: advanced sound effects on WAV format

Lab. session ( 2 hours): Mid-Term Individual Exam (open book, the submission of the different exercises after correction of the teachers should be done using the links below)
  • The mid-term exam will take place on Friday, December 1, from 14:15 to 16:00 in the laboratory room MED 2 2524 and MED 2 2419, during the usual laboratory session of the course. Please make sure to come a few minutes before 14:15 to be ready to start on time. Also, do not forget to upload each exercise on the corresponding link on Moodle after the correction of the exercise during the exam by the teachers.

Material:

Theory session (2 hours): Midterm review and secondary storage management in NDS

  • Revision of midterm and explanation of solutions

  • Secondary storage on the NDS
    • Comparisons between memories and secondary storage units 
    • Components of a file system: files and directories 
    • Implementations of a file system: contiguous and indirect allocation 
    • libFAT library methods for files and directories in the NDS

Lab. session ( 2 hours): Secondary management in Nintendo DS

  • Secondary Storage on the NDS (2 hours):
    • Listing the root directory of the NDS into a file
    • Listing all files of an NDS unit into a file
    • Adding score counters and managing score records (store and retrieval) in the Tetris Game
    • Adding storage and playing saved melodies in a Piano keyboard player

Material:

Theory session (2 hours): Understanding the use of WiFI in the NDS and Q&A for the final projects
Wireless communication in the NDS
  • General network topology structure
  • Internet protocol concepts
  • Wireless communication devices in the NDS: Wi-Fi and Bluetooth
  • Description of DSWifi library methods for Wi-Fi
  • Use of high-level Mini-Wifi library methods for NDS
  • Basic Wi-Fi functionality: Send/receive data between two NDS

Q&A for Final Projects
  • Presentation of template slides for the final projects delivery (in groups of two students) 
  • Questions about the oral exam, and requirements of final project code and presentations


Lab. session (2 hours):

  • Wifi interface on the NDS:
  • Use of high-level Mini-Wifi library methods for NDS
  • Basic Wi-Fi functionality: Send/receive data between two NDS
  • Work on the Final Project


Material:

Theory session (2 hours): Revision Session

  • Q&A about theory and projects preparation 

Lab. session (2 hours):

  • Work in the final project.


Material



NOT USED THIS YEAR

Theory (1h):

  • Presentation about fixed-point arithmetic in microprogrammed embedded systems.

Work on Team Project (1h):

  • Questions about the use of NDS for the projects. 


The project here is an example of generating random numbers on the NDS using the real-time-clock.

However, it always return the same number on the emulator, as the emulator does not have a real-time clock.