Lab. 4 – Part 2 Demonstrating and understanding multi-processor boot

Slides:



Advertisements
Similar presentations
A look at interrupts What are interrupts and why are they needed.
Advertisements

Computer System Overview
Boot Issues Processor comparison TigerSHARC multi-processor system Blackfin single-core.
Lab. 2 – More details – Tasks 4 to 6 1. What concepts are you expected to understand after the Lab. 2 is finished? 2. How do you demonstrate that you have.
Software and Hardware Circular Buffer Operations First presented in ENCM There are 3 earlier lectures that are useful for midterm review. M. R.
Understanding the TigerSHARC ALU pipeline Determining the speed of one stage of IIR filter.
A look at interrupts What are interrupts and why are they needed.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
TigerSHARC processor General Overview. 6/28/2015 TigerSHARC processor, M. Smith, ECE, University of Calgary, Canada 2 Concepts tackled Introduction to.
Introduction to Embedded Systems
DAT2343 Accessing Services Through Interrupts © Alan T. Pinck / Algonquin College; 2003.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Understanding the TigerSHARC ALU pipeline Determining the speed of one stage of IIR filter – Part 3 Understanding the memory pipeline issues.
Understanding the TigerSHARC ALU pipeline Determining the speed of one stage of IIR filter – Part 2 Understanding the pipeline.
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system Manual control of RC car.
Lab. 4 Demonstrating and understanding multi-processor boot TigerSHARC multi-processor system.
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Bootable Programs Building an O/S. Basic Requirements of any O/S Respond to interrupts (all kinds) Preserve user environment Protect users and self from.
“Lab. 5” – Updating Lab. 3 to use DMA Test we understand DMA by using some simple memory to memory DMA Make life more interesting, since hardware is involved,
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Protection in Virtual Mode
Computer Architecture
Lecture Topics: 11/1 Processes Process Management
Day 08 Processes.
Day 09 Processes.
Assembly Language for Intel-Based Computers, 5th Edition
Chapter 10 The Stack.
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Software and Hardware Circular Buffer Operations
TigerSHARC processor General Overview.
Generating the “Rectify” code (C++ and assembly code)
Generating “Rectify( )”
A Play Core Timer Interrupts
Computer Organization “Central” Processing Unit (CPU)
DMA example Video image manipulation
Overview of SHARC processor ADSP Program Flow and other stuff
Trying to avoid pipeline delays
ENCM K Interrupts Theory and Practice
Understanding the TigerSHARC ALU pipeline
Control Unit Introduction Types Comparison Control Memory
TigerSHARC processor and evaluation board
Lab. 2 – More details – Later tasks
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Understanding the TigerSHARC ALU pipeline
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
Accessing Services Through Interrupts
Lab. 4 – Part 1 Demonstrating and understanding multi-processor boot
Processes Hank Levy 1.
Single Value Processing Multi-Threaded Process
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
* M. R. Smith 07/16/96 This presentation will probably involve audience discussion, which will create action items. Use PowerPoint.
HD44780 LCD programming From the Hardware Side
Processes and Process Management
Modern PC operating systems
Explaining issues with DCremoval( )
General Optimization Issues
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Chapter 9 Bootloader.
DMA example Video image manipulation
Independent timers build into the processor
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system.
Understanding the TigerSHARC ALU pipeline
A first attempt at learning about optimizing the TigerSHARC code
Processes Hank Levy 1.
Wireless Embedded Systems
COMP3221: Microprocessors and Embedded Systems
Working with the Compute Block
Blackfin Syntax Moves and Adds
Blackfin Syntax Stores, Jumps, Calls and Conditional Jumps
* M. R. Smith 07/16/96 This presentation will probably involve audience discussion, which will create action items. Use PowerPoint.
Presentation transcript:

Lab. 4 – Part 2 Demonstrating and understanding multi-processor boot TigerSHARC multi-processor system

Overview Lab. 4 Task 1– Generating and testing tasks for a multi-processor system Lab. 4 Task 2 – Demonstrating multi-processor boot Lab. 4 Task 3 -- Read the flags (button) from each processor and deactivate the sound from that processor (FLAG0_A deactivates left channel – FLAG0_B deactivate right channel) Understanding new TigerSHARC functionality Understanding TigerSHARC multi-processor bus arbitration Understanding TigerSHARC boot-process 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Bus Arbitration We have two processors accessing one external memory location (for both read and there is no conflict. How does the bus arbitration work on the TigerSHARC 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

From TigerSHARC hardware manual 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Multi- TigerSHARC cluster Each processor has hard-wired ID 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Understanding the other new instructions used during TigerSHARC boot Copy the boot file directory into Lab4\LeftCodeDirectory 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Why CJMP (NP) branches? Cache Thrash Do we want “return addresses” stored in BTB 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

FEXT instruction As with Blackfin, TigerSHARC EEPROM has a header for each block Need to understand block format During boot sequences – DMA activity causes the header to be stored at memory location 0 Can access file: XR2 = [J0 += 0];; instruction Access destination: j0 = [J31 + 1];; 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

FEXT – field extraction 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

XR3 = (0x5 << 8) | 8;; XR4 = 0x0000 1234;; XR5 = FEXT R4 BY R3;; 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

How does DMA work on TigerSHARC? Why so much DMA activity in boot? 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Allowed DMA activity Note an important exception This restriction explains one of the issues about the load Process See later 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

DMA 4 registers Where to start 1 D transfer info 2 D transfer info If not 0, where the next DMA information (4 memory locations) is stored – auto DMA 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

DMA channels that are available on the TigerSHARC 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

DMA activity “during” boot load Setting up register groups XR3:0 and XR7:4 in this part of the code Getting processor ID is needed during boot sequence 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

DMA code and ISR NEW TigerSHARC instruction “idle” Essentially “wait here” till an interrupt occurs Loading the TCB using XR3:0 and XR7:4 causes the DMA to start Code waits for DMA interrupt completion and then gets ready for next Unanswered questions How does the processor know that this was the interrupt routine to use and not another one? Even more important – how did ANY code get into the processor? 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

We know what info we need to know So look in manual for detail 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Understanding the boot load 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

That’s where all the code came from! One question answered On power up, the processor automatically configures its internal registers to cause a DMA from the EPROM into its memory That’s where all the code came from! 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Boot details 1 – register config 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Boot details 2 – note unknown instruction RDS – means what? 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Boot detail 3 – already examined 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Boot detail 4 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Final stage – self modifying code to make sure system is in the correct state Boot loader – down loads final header Finds that it is “final block” DMA’s “first 4 instructions” into memory and then copies those into XR registers Replaces “first 4 instructions” with patch code Resets DMA interrupt vector to 0x00 so that on DMA completion runs “patch code” Starts DMA for instruction 5 to 256 Runs patch on DMA completion – which clears DMA interrupt level, restores true “first 4 instructions” and then executes 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Understanding Final init procedure 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Final Boot PIPELINE ISSUES 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada

Overview Lab. 4 Task 1– Generating and testing tasks for a multi-processor system Lab. 4 Task 2 – Demonstrating multi-processor boot Lab. 4 Task 3 -- Read the flags (button) from each processor and deactivate the sound from that processor (FLAG0_A deactivates left channel – FLAG0_B deactivate right channel) Understanding new TigerSHARC functionality Understanding TigerSHARC multi-processor bus arbitration Understanding TigerSHARC boot-process 2/24/2019 TigerSHARC Lab. 4 , Copyright M. Smith, ECE, University of Calgary, Canada