Bare Metal System Software Development

Slides:



Advertisements
Similar presentations
1 SECURE-PARTIAL RECONFIGURATION OF FPGAs MSc.Fisnik KRAJA Computer Engineering Department, Faculty Of Information Technology, Polytechnic University of.
Advertisements

C Language Programming. C has gradually replaced assembly language in many embedded applications. Data types –C has five basic data types: void, char,
JTAG UART port in NIOS.
C Programming for Embedded Systems. fig_06_00 Computer Layers Low-level hardware to high-level software (4GL: “domain-specific”, report-driven, e.g.)
Lecture 7 Lecture 7: Hardware/Software Systems on the XUP Board ECE 412: Microcomputer Laboratory.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
Development. Development Environment Editor Assembler or compiler Embedded emulator/debugger IAR Embedded Workbench Kickstart Code Composer Essentials.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To be able to use the bitwise logical operators in programs ❏ To be able to use.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Data Structures January 2012.
GBT Interface Card for a Linux Computer Carson Teale 1.
Memory Layout and SLC500™ System Addresses. Processor Memory Division An SLC 500 processor's memory is divided into two storage areas. Like two drawers.
8-1 Embedded Systems Fixed-Point Math and Other Optimizations.
RTL Hardware Design by P. Chu Chapter Basic VHDL program 2. Lexical elements and program format 3. Objects 4. Data type and operators RTL Hardware.
1 Instruction Set Architecture (ISA) Alexander Titov 10/20/2012.
Chapter 5 Computer Organization. Distinguish between the three components of a computer hardware. List the functionality of each component. Understand.
©Brooks/Cole, 2003 Chapter 5 Computer Organization.
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
The Concept of Universal Service
Introduction to Computing Systems
Maj Jeffrey Falkinburg Room 2E46E
Chapter # 2 Part 2 Programs And data
Nios II Processor: Memory Organization and Access
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
I/O Systems.
Names and Attributes Names are a key programming language feature
CS501 Advanced Computer Architecture
Microcontrollers & GPIO
Reg and Wire:.
Chapter 6: Data Types Lectures # 10.
Microprocessor Systems Design I
Manipulating Bit Fields in C
ECE 3430 – Intro to Microcomputer Systems
Microprocessor Systems Design I
C Language VIVA Questions with Answers
Database Management Systems (CS 564)
UART and UART Driver B. Ramamurthy.
The PCI bus (Peripheral Component Interconnect ) is the most commonly used peripheral bus on desktops and bigger computers. higher-level bus architectures.
CS703 - Advanced Operating Systems
L7 – Assembler Directives
ECE 4110–5110 Digital System Design
Overview of Embedded SoC Systems
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Design Flow System Level
Lecture 16 PicoBlaze I/O & Interrupt Interface
Chapter 1 C for Embedded Systems.
FPro Bus Protocol and MMIO Slot Specification
UART and UART Driver B. Ramamurthy.
Variables In programming, we often need to have places to store data. These receptacles are called variables. They are called that because they can change.
Lecture 18 PicoBlaze I/O Interface
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Chapter 1 C for Embedded Systems.
Chapter 14 Bitwise Operators Objectives
Using Fpro SoC with Hardware Accelerators
Lecture 3: Main Memory.
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Chapter # 2 Part 2 Programs And data
Data Flow Description of Combinational-Circuit Building Blocks
Introduction to Microprocessor Programming
Data Flow Description of Combinational-Circuit Building Blocks
Bare Metal System Software Development
Wireless Embedded Systems
THE ECE 554 XILINX DESIGN PROCESS
C Programming Pointers
ECE 545 Lecture 5 Simple Testbenches.
FPro Video Subsystem: VGA Frame Buffer Core
A simple function.
Using FPro SoC with customized hardware cores
THE ECE 554 XILINX DESIGN PROCESS
Using FPro SoC with customized hardware cores
Presentation transcript:

Bare Metal System Software Development ECE 448 Lecture 16 Bare Metal System Software Development ECE 448 – FPGA and ASIC Design with VHDL

Required Reading P. Chu, FPGA Prototyping by VHDL Examples Chapter 9, Bare Metal System Software Development Source Code of Examples http://academic.csuohio.edu/chu_p/rtl/fpga_mcs_vhdl.html Basys 3 FPGA Board Reference Manual 7. VGA Port ECE 448 – FPGA and ASIC Design with VHDL

Software Hierarchy Desktop-like System Bare Metal Systems

Basic Embedded Program Architecture

Address Map of a Simple System

I/O Register Map of a Timer Core

I/O Address Map of the FPro System The subsystem provides 64 slots to connect up to 64 (i.e., 26) I/O cores Each I/O core is allocated with 32 (i.e., 25) registers Each register is 32 bits wide (i.e., a word) The subsystem requires a memory space of 211 (i.e., 26 ∗ 25) words or 213 bytes. The 11-bit word address for the MMIO subsystem appears as sss_sssr_rrrr in which ssssss is the slot number and rrrrr is the register offset. When combined with the video subsystem, its 22-bit word address becomes 00_0000_0000_0sss_sssr_rrrr However, most I/O cores will not use all 32 registers and will not always need 32 data bits

C Pointers

C Pointer to I/O Register

Robust I/O Register Access The address assignment of the FPro system is fixed for the slots in the MMIO subsystem and various modules in the video subsystem. Only two parts may change: Bridge base address Slot assignment in the MMIO subsystem Instead of using hard literals, we express the information using symbolic constants and record them in chu_io_map.h : a C/C++ header file used for software development chu_io_map.vhd : a VHDL package declaration to be used in conjunction with hardware development

Robust I/O Register Access (cont.) The processor treats the MMIO and video subsystems as a single I/O module and communicates with the module via the bridge The bridge base address is the starting address of the module and is assigned when a system is created For the MicroBlaze MCS configuration, it is a fixed value of 0xc0000000 For an IP core attached to the MMIO subsystem, its base address can be calculated using the assigned slot number. Recall that each slot contains 32 words (128 bytes). The base address of slot n is Bridge_base_address + n ∗ 32 ∗ 4

Slot assignment of the vanilla FPro system

Slot and constant definitions in chu_io_map.h

inttypes.h C has many predefined data types, such as short, int, and long. The width (i.e., number of bits) of each data type is left to the compiler and implementation. While interacting with low-level device activities, it is often important to know the exact width and format of registers and data. To facilitate this, C provides a header file, inttypes.h, which explicitly specifies the width and format of each data type. It is good practice to use these data types for low-level coding.

Data Types in inttypes.h int8_t: signed 8-bit integer uint8_t: unsigned 8-bit integer int16_t: signed 16-bit integer uint16_t: unsigned 16-bit integer int32_t: signed 32-bit integer uint32_t: unsigned 32-bit integer int64_t: signed 64-bit integer uint64_t: unsigned 64-bit integer

I/O Macros in chu_io_rw.h

GpoCore class definition in gpio_core.h

GpoCore class implementation in gpio_core.cpp

GpiCore class definition in gpio_core.h

GpiCore class implementation in gpio_core.cpp

TimerCore class definition in timer_core.h

TimerCore class implementation in timer_core.cpp

FPro utility routine declarations and macros in chu_init.h

FPro utility routine declarations and macros in chu_init.h

FPro utility routine implementation in chu_init.cpp

Vanilla FPro test program in main_vanilla_test.cpp