Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
23 views28 pages

Lec1. Linux On DE10 STD

123farevreejaej
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views28 pages

Lec1. Linux On DE10 STD

123farevreejaej
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Linux trên board DE10

[email protected]

1
Nội dung
Giới thiệu board DE10 Standard và Linux trên board DE10:
• Các thành phần trên board
• Hệ thống SoC HPS
• Ngoại vi Lightweight FPGA slaves
• Boot up process
• Linux distribution
• Linux kernel

2
DE10 Standard board

3
Kit Contents

4
connectors
and key
components

5
block diagram
of the board, all
connections are
around Cyclone
V SoC FPGA

6
• 800MHz Dual-core ARM Cortex-A9 MPCore
processor
• 1GB DDR3 SDRAM (32-bit data bus)
• 1 Gigabit Ethernet PHY with RJ45 connector
HPS (Hard • 2-port USB Host, normal Type-A USB
connector
Processor • Micro SD card socket
System) • Accelerometer (I2C interface + interrupt)
• UART to USB, USB Mini-B connector
• Warm reset button and cold reset button
• One user button and one user LED
• LTC 2x7 expansion header
• 128x64 dots LCD Module with Backlight
7
FPGA Configuration Mode

MSEL[4:0] Description
10010 FPGA configured
from EPCS (default)
01010 FPGA configured
from HPS software:
Linux

8
Linux on HPS

ARM 1GB DDR3


SW Timer LCD
Cortex-A9 RAM

PC

LEDR HEX KEY


micro SD USB
Ethernet UART
Card
FPGA
HPS

Network (SSH)
Note: FPGA is automatically programmed by Linux when it finishes booting up

9
MPU Physical Address Space
Component Base End Size
DDR3 0x00000000 0x3FFFFFFF 1 GB
NOT use on DE10 0x40000000 0xBFFFFFFF 2 GB
FPGA slaves 0xC0000000 0xFC000000 960 MB
Peripheral 0xFC000000 0xFFFFFFFF 64 MB

Peripheral Base End Size


STM Module 0xFC000000 0xFEFFFFFF 48 MB
DAP Module 0xFF000000 0xFF1FFFFF 2 MB
Lightweight FPGA slaves 0xFF200000 0xFF3FFFFF 2 MB
Others 0xFF400000 0xFFFFFFFF 12 MB

10
Lightweight FPGA slaves (1/5)
LEDR registers
Address Name Used Bit Function
Bit x=1: LEDRx is ON
0xFF200000 Data register 9 … 0
Bit x=0: LEDRx is OFF

SW registers
Address Name Used Bit Function
Bit x=1: SWx is ON (up position)
0xFF200040 Data register 9 … 0
Bit x=0: SWx is OFF (down position)

11
Lightweight FPGA slaves (2/5)
KEY registers
Address Name Used Bit Function
Bit x=1: KEYx is being pressed
0xFF200050 Data register 3…0
Bit x=0: KEYx is NOT being pressed

Interruptmask Bit x=1: KEYx can generate interrupt (interrupt number 73)
0xFF200058 3…0
register Bit x=0: KEYx can NOT generate interrupt
Bit x=1: KEYx has been pressed
Edgecapture
0xFF20005C 3…0 Bit x=0: KEYx has NOT been pressed
register
Write 1 to bit x to clear it

12
Lightweight FPGA slaves (3/5)

HEX (7-segment display) registers


Address Name Used Bit Function
Bit x=1: segment (x%8) of HEX(x/8) is ON
0xFF200020 Data register 31 … 0
Bit x=0: segment (x%8) of HEX(x/8) is OFF
Bit x=1: segment (x%8) of HEX(4 + x/8) is ON
0xFF200030 Data register 15 … 0
Bit x=0: segment (x%8) of HEX(4 + x/8) is OFF

13
Lightweight FPGA slaves (4/5)
Timer0 registers (1/2)
Address Name Used Bit Function
0xFF202000 Status 1 0 Bit 0 TO bit. Set to 1 by the Timer when it reaches zero. Write 0 to
register this bit to clear it
Bit 1 RUN bit.
0xFF202004 Control 3 … 0 Bit 0 ITO bit. Set to 1 makes the Timer generate interrupt
register everytime TO bit is set (interrupt number 72)
Bit 1 CONT bit. Automatically repeat the counting process when
Timer reaches zero
Bit 2 START bit. Set to 1 to start the Timer. Timer starts counting
from 32bit "Counter Start" to zero at clock rate of 100 MHz
Bit 3 STOP bit. Set to 1 to stop the Timer

14
Lightweight FPGA slaves (5/5)

Timer0 registers (2/2)


Address Name Used Bit Function
0xFF202008 Counter Start (low) 15 … 0 16bit lower part of 32bit Counter Start
0xFF20200C Counter Start (high) 15 … 0 16bit upper part of 32bit Counter Start
0xFF202010 Counter Snapshot (low) 15 … 0 16bit lower part of 32bit Counter Snapshot
0xFF202014 Counter Snapshot (high) 15 … 0 16bit upper part of 32bit Counter Snapshot

15
Boot up process

16
SD card layout

MBR partition 3 partition 2 partition 1


512 Byte 1 MB ~ 4GB ~ 2GB
raw format root ext4 file system data FAT file system
SPL & bootloader uImage & devie tree blob

partition 3 (1 MB)
64 KB 64 KB 64 KB 64 KB The rest
1st U-Boot SPL 2nd U-Boot SPL 3rd U-Boot SPL 4th U-Boot SPL U-Boot bootloader

17
From power on to Linux
Multiple stages process:
• Boot ROM
• Preloader (SPL)
• Bootloader
• Linux (automatically program FPGA)

18
Boot log (1/3)

U-Boot SPL 2013.01.01 (Jun 05 2017 - 17:18:22) RESET: COLD


BOARD : Altera SOCFPGA Cyclone V Board INFO : Watchdog enabled
CLOCK: EOSC1 clock 25000 KHz SDRAM: Initializing MMR registers
CLOCK: EOSC2 clock 25000 KHz SDRAM: Calibrating PHY
CLOCK: F2S_SDR_REF clock 0 KHz SEQ.C: Preparing to start memory calibration
CLOCK: F2S_PER_REF clock 0 KHz SEQ.C: CALIBRATION PASSED
CLOCK: MPU clock 925 MHz SDRAM: 1024 MiB
CLOCK: DDR clock 400 MHz ALTERA DWMMC: 0
CLOCK: UART clock 100000 KHz
CLOCK: MMC clock 50000 KHz
CLOCK: QSPI clock 370000 KHz

19
Boot log (2/3)
U-Boot 2013.01.01 (Jun 05 2017 - 17:18:22) reading soc_system.rbf
2158716 bytes read in 109 ms (18.9 MiB/s)
CPU : Altera SOCFPGA Platform ## Starting application at 0x3FF795A4 ...
BOARD : Altera SOCFPGA Cyclone V Board ## Application terminated, rc = 0x0
I2C: ready ## Booting kernel from Legacy Image at 00007fc0 ...
DRAM: 1 GiB Image Name: Linux-3.18.0
MMC: ALTERA DWMMC: 0 Image Type: ARM Linux Kernel Image
In: serial (uncompressed)
Out: serial Data Size: 4314976 Bytes = 4.1 MiB
Err: serial Load Address: 00008000
Net: mii0 Entry Point: 00008000
Hit any key to stop autoboot: 0 ## Flattened Device Tree blob at 00000100
reading uImage Booting using the fdt blob at 0x00000100
4315040 bytes read in 211 ms (19.5 MiB/s) XIP Kernel Image ... OK
reading socfpga.dtb OK
19147 bytes read in 7 ms (2.6 MiB/s) reserving fdt memory region: addr=0 size=1000
20 ... OK
Loading Device Tree to 03ff8000, end 03fffaca
Boot log (3/3)
Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0


[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Linux version 3.18.0 (altera@altera-Inspiron-5558) (gcc version 4.8.4 (Ubuntu/Linaro
4.8.4-2ubuntu1~14.04.1) ) #9 SMP Mon Aug 8 17:11:41 EDT 2016
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: de1soc
...
[ 3.128277] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 3.142850] devtmpfs: mounted
[ 3.146151] Freeing unused kernel memory: 468K (c0823000 - c0898000)
[ 3.705368] init: ureadahead main process (634) terminated with status 5

Last login: Thu Jan 1 00:35:10 UTC 1970 from desktop on pts/2
21
root@de10stdlinux:~#
Linux

22
Linux and Unix
(From Wikipedia)

23
Linux distribution (From Wikipedia)
A Linux distribution[a] (often abbreviated as distro) is an operating system made from a
software collection that includes the Linux kernel and often a package management system.
Linux users usually obtain their operating system by downloading one of the Linux distributions,
which are available for a wide variety of systems ranging from embedded devices (for
example, OpenWrt) and personal computers (for example, Linux Mint) to
powerful supercomputers (for example, Rocks Cluster Distribution)

A typical Linux distribution comprises a Linux kernel, an init system (such as systemd, OpenRC,
or runit), GNU tools and libraries, documentation, and many other types of software (such
as IP network configuration utilities and the getty TTY setup program, among others). Optionally,
to provide a desktop experience (most commonly the Mesa userspace graphics drivers)
a display server (the most common being the X.org Server, or, more recently,
a Wayland compositor such as Sway, KDE's KWin, or GNOME's Mutter), a desktop
environment, a sound server (usually either PulseAudio or more recently PipeWire), and other
related programs may be included with the distribution or are installable by the user.

24
Linux distribution (From Wikipedia)

25
Linux major
distros
(From Wikipedia)

26
Linux kernel (From Wikipedia)
Linux has a monolithic kernel, with a modular design.
Different parts of the kernel, such as drivers, are designed as modules.
User can load and unload these modules at any time

27
Linux on
DE10
board

28

You might also like