Boot Issues Processor comparison TigerSHARC multi-processor system Blackfin single-core.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
CS1104: Computer Organisation School of Computing National University of Singapore.
MC68HC11 System Overview. System block diagram (A8 version)
A look at interrupts What are interrupts and why are they needed.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
Processor System Architecture
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Daddy! -- Where do instructions come from? Program Sequencer controls program flow and provides the next instruction to be executed Straight line code,
6/2/2015 Labs in ENCM415. Laboratory 2 PF control, Copyright M. Smith, ECE, University of Calgary, Canada 1 Temperature Sensor Laboratory 2 Part 2 – Developing.
Review of Blackfin Syntax Moves and Adds 1) What we already know and have to remember to apply 2) What we need to learn.
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.
This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during.
Software and Hardware Circular Buffer Operations First presented in ENCM There are 3 earlier lectures that are useful for midterm review. M. R.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
HD44780 LCD programming From the Hardware Side Design and implementation details on the way to a valid SPI-LCD interface driver.
A look at interrupts What are interrupts and why are they needed in an embedded system? Equally as important – how are these ideas handled on the Blackfin.
Understanding the Blackfin ADSP-BF5XX Assembly Code Format
Chapter 7 Interupts DMA Channels Context Switching.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
A look at interrupts What are interrupts and why are they needed.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Just enough information to program a Blackfin Familiarization assignment for the Analog Devices’ VisualDSP++ Integrated Development Environment.
Blackfin BF533 EZ-KIT Control The O in I/O
Lecture 7 Lecture 7: Hardware/Software Systems on the XUP Board ECE 412: Microcomputer Laboratory.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
ECE 265 – LECTURE 12 The Hardware Interface 8/22/ ECE265.
HD44780 LCD programming From the Hardware Side
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
MICROPROCESSOR INPUT/OUTPUT
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
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.
Blackfin Array Handling Part 1 Making an array of Zeros void MakeZeroASM(int foo[ ], int N);
Lab. 2 Overview. Echo Switches to LED Lab1 Task 7 12/4/2015 TDD-Core Timer Library, Copyright M. Smith, ECE, University of Calgary, Canada 2 / 28.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
A first attempt at learning about optimizing the TigerSHARC code TigerSHARC assembly syntax.
Building a simple loop using Blackfin assembly code If you can handle the while-loop correctly in assembly code on any processor, then most of the other.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
“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,
Microprocessor or Microcontroller
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
DMA example Video image manipulation
The planned and expected
Trying to avoid pipeline delays
Operating Systems Chapter 5: Input/Output Management
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.
Lab. 4 – Part 1 Demonstrating and understanding multi-processor boot
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
Getting serious about “going fast” on the TigerSHARC
Explaining issues with DCremoval( )
Lab. 4 – Part 2 Demonstrating and understanding multi-processor boot
Independent timers build into the processor
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system.
Building a simple loop using Blackfin assembly code
Developing a reliable communication between Blackfin and Slave device
Working with the Compute Block
Chapter 13: I/O Systems.
Presentation transcript:

Boot Issues Processor comparison TigerSHARC multi-processor system Blackfin single-core

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 2 / 22 Overview Had planned to spend 20 minutes on boot issues on processor systems However, TigerSHARC boot involved so many different aspects of the processor and special instructions that decided to examine in more detail You will be building a multi-core boot sequence as part of Lab. 4

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 3 / 22 Information can be found at Analog Web site Analog Devices Loader Manual and various Engineer to Engineer application and technical notes Manuals manuals/index.html manuals/index.html Application Notes plicationNotes/index.html Technical articles hnicalArticles/index.html

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 4 / 22 Blackfin ADSP-BF533 “Conventional approach” What does “booting” the processor require and why is it necessary? On power up, the processor “knows” nothing. Need a systematic and reliable mechanism to “configure” the system. Essentially put registers into known state Move code from an external (8-bit wide) EPROM or FLASH memory to faster memory for easier execution Jump to the new code

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 5 / 22 How the processor “boots” is determined by “hard” settings Powers up as 0 Hard-wired

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 6 / 22 Here boot procedure starts with code from “on chip” boot rom

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 7 / 22 How do you “put” the information into the “Flash” Use VDSP to build an “executable” and “test” it Switch project option to be “loader”. This “build” option breaks the “.dxe” into blocks – “.ldr” file (in Debug) Blocks for characters Blocks for empty arrays (set to 0) Blocks for full arrays (not set to 0) Program code for “internal” memory Program code for “external” memory (SDRAM) Boot “block” – first section of code than runs

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 8 / 22 How do you “put” the information into the “Flash” Once “.ldr” loader file built, you use “Tools | Flash Programmer” to download a special program into Blackfin (TigerSHARC) This program, running on the Blackfin, burns the code into FLASH Disconnect VDSP and “reset the processor” The processor now boots

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 9 / 22 Step 1 – set PC to 0xEF and Jump (PC)

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 10 / 22 Step 2 On-board boot ROM, configures important registers Performs DMA transfer from (8 or 16 bit wide – slow speed) FLASH to on- board SCRATCH memory Must go to “scratch memory” otherwise the new downloaded code might over write old downloaded code

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 11 / 22 Step 3 Boot code is used to examine the “10 –byte header” of downloaded block Block body (in most cases)

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 12 / 22 Step 4 – Handle block based on flag information

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 13 / 22 If zero fill block shown in flags – then boot ROM code does Set address register to address (first 4 bytes of header) Set counter (second 4 bytes in memory) Using pseudo-TigerSHARC syntax LC0 = count J0 = address XR0 = 0 Loop: if nlco0e, jump Loop, [J0 += 1] = XR0 Get next header

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 14 / 22 If non zero fill block shown in flags – then boot ROM code does Set DMA destination register to address (first 4 bytes of header) Set DMA destination counter (second 4 bytes in memory) Set DMA destination stride register to 4 Set DMA source register to next address in FLASH Set DMA source counter to count (bytes) Set DMA source stride to 2 (if 16-bit flash) Set up DMA interrupt routine to set “done-flag” Activate DMA Wait till “done” Process next block

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 15 / 22 If init block shown in flags – then boot ROM code does Set DMA destination register to address (first 4 bytes of header) Set DMA destination counter (second 4 bytes in memory) Set DMA destination stride register to 4 Set DMA source register to next address in FLASH Set DMA source counter to count (bytes) Set DMA source stride to 2 (if 16-bit flash) Set up DMA interrupt routine to set “done-flag” Activate DMA Wait till “done” Set PC to address (first 4 bytes of header) and JUMP PC – system now boots

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 16 / 22 Problem – Catch 22 It is very likely that the application code is “too big” to fit into internal Blackfin Memory But you can’t write “blocks” of code in SDRAM as the SDRAM is not “configured” to accept data after power up You can’t put the configuration code in on- board ROM as you don’t know what SDRAM will be used by the system

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 17 / 22 Two stage boot-process – stage 1 “Init code” executes then returns to Boot ROM Init block runs and configures SDRAM

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 18 / 22 Make sure that you don’t destroy the boot ROM register values

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 19 / 22 This code configures the SDRAM Recover Boot ROM register values If change R0 (return value) then can cause loader to “select” which executable is to be downloaded “multi-code” boot return to boot loader

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 20 / 22 Step 2 – Boot ROM code can now load code into SDRAM

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 21 / 22 Some issues – How do you handle BF561 – multi-core processor? Build 2.dxe’s – one for each core Build a loader “file” with new boot loader.dxe as “init” block core A. dxe core B.dxe On-chip boot rom – downloads “new loader” to special memory location, and then runs the code New loader is responsible for putting code and data arrays as required

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 22 / 22 Other boot approaches Flash memory 16 bit data bus 32 bit address bus Various control logic lines Minimal approach – 4 wires -- SPI interface Chip select Clock Master out – Slave In Master in – Slave out

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 23 / 22 Other boot approaches

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 24 / 22 Speed of booting over 1 line 16 times slower than over 16 plus “clock speed issues” Flash memory 16 bit data bus 32 bit address bus Various control logic lines Minimal approach – 4 wires -- SPI interface Chip select Clock Master out – Slave In Master in – Slave out

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 25 / 22 What type of SPI memory?

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 26 / 22 TigerSHARC Boot Multi-processor system, but only 1 boot FLASH How do you handle bus contention? Does having “on-chip” boot ROM (like Blackfin) make any sense? TigerSHARC not very good at handling the bit patterns in the “field” of the block header – need to understand special TigerSHARC bit pattern instructions (extract instructions

6/1/2015Blackfin Boot, Copyright M. Smith, ECE, University of Calgary, Canada 27 / 22 Overview Had planned to spend 20 minutes on boot issues on processor systems However, TigerSHARC boot involved so many different aspects of the processor and special instructions that decided to examine in more detail You will be building a multi-core boot sequence as part of Lab. 4