64
4 Module14 ARM기반 SoC Design(II) Contents Contents Excalibur Simulation Model Full stripe simulation Full stripe 을 위한 firmware 작성 Porting

[Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

4Module14 ARM기반 SoC Design(II)

ContentsContents

Excalibur Simulation ModelFull stripe simulation Full stripe 을 위한 firmware 작성Porting

Page 2: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

5Module14 ARM기반 SoC Design(II)

Excalibur Simulation model Excalibur Simulation model

Bus Functional Model (BFM)Test for the interface between the user peripherals and the ARM® embedded processor in an Excalibur device.

The Excalibur stripe simulator (ESS)fast, functionally-accurate model of the Excalibur embedded stripe.not cycle accurate.

The full stripe simulation model (FSSM)allows you to perform cycle-accurate simulations of the Excalibur embedded processor and the other components of the embedded stripe.

Page 3: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

6Module14 ARM기반 SoC Design(II)

What is Full stripe Simulation Model?What is Full stripe Simulation Model?

Full Stripe Simulation Model 이란 Configuration Logic을 제외한excalibur의 모든 기능을 사용하여 검증 할 수 있는 모델.

Stripe와 연동 할 수 있는 소프트웨어 코드가 필요On-Chip SRAM 초기화 파일을 사용.초기화 파일은 Software Build시 자동적으로 생성된다.makeprogfile -m memory <file name>.sbd <file name>.hexSdb(system build descriptor) , hex(software image)

Table 1. Memory Initialization Files

MIF Name Function

memory.SRAM0 memory.SRAM1

Used to initialize the on-board SRAM. Either or both of these files typically contains the software image for the system.

memory.DPRAM0 memory.DPRAM1

Model the initial contents of the DPRAM blocks of the stripe. These files are typically empty unless they are specifically targeted to contain the software image.

memory.REGSDescribes the states of the internal registers of the system. The file sets up various configuration registers for the PLL, DPRAM, SRAM, EBI, UART and other stripe components.

Page 4: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

7Module14 ARM기반 SoC Design(II)

Full Stripe Simulation Model OverviewFull Stripe Simulation Model Overview

Full stripe simulation modelmonitor the interaction between user software code running on the ARM922T™ processor, interacting with any of the peripherals implemented on the stripe, and any logic designed on the PLD side of the Excalibur device.

Modeling Scope All of the stripe peripherals are modeled by the full stripe simulation model, including the on-chip SRAM and dual-port SRAM (DPRAM).

Visible to users during simulation using FSSMARM922T internal registersEmbedded stripe registersAHB1 bus signalsAHB2 bus and arbitration signalsBridge signalsInterrupt signals

Page 5: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

8Module14 ARM기반 SoC Design(II)

Using Modelsim EnvironmentUsing Modelsim Environment

Modelsim 의 SE version 사용해야 함The full stripe model utilizes FLI calls which are only supported in ModelSim SE.

ModelGen manager 의 위치를 지정해야 함.modelsim.ini or ModelSim project file (.mpf)

[VSIM]Veriuser = $MG_LIB/mti_modelsim_verilog/libmgmm.so

Page 6: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

9Module14 ARM기반 SoC Design(II)

FSSM 의 개념FSSM 의 개념

libmgmm.so

Stripe.v

memory.SRAM0 memory.SRAM1

memory.DPRAM0 memory.DPRAM1

memory.REGS

Page 7: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

10Module14 ARM기반 SoC Design(II)

Compile 해야 할 파일Compile 해야 할 파일

For RTL simulationalt_exc_stripe.v<stripe wrapper filename>.v // maga wizard 에서 생성한 파일<any user logic modules>.v<rom model filename>.v (optional)<top-level filename>.v<testbench filename>.vFor Timing simulation apex20ke_atoms.vapex20ke_components.vapex20ke_stripe.v<stripe wrapper filename >.v<any user logic modules >.v<rom model filename>.v (optional)<top-level filename>.v< testbench filename >.v

Page 8: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

11Module14 ARM기반 SoC Design(II)

설계 도면(이전도면 그대로사용)설계 도면(이전도면 그대로사용)

Page 9: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

12Module14 ARM기반 SoC Design(II)

Stripe.s( assembly coding 시 참조)Stripe.s( assembly coding 시 참조); megafunction wizard: %ARM-Based Excalibur%

….; ************************************************************; THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!; ************************************************************EXC_DEFINE_PROCESSOR_LITTLE_ENDIAN EQU (1)EXC_DEFINE_PROCESSOR_BIG_ENDIAN EQU (0)EXC_DEFINE_BOOT_FROM_SERIAL EQU (1)EXC_DEFINE_BOOT_FROM_FLASH EQU (0)EXC_INPUT_CLK_FREQUENCY EQU (25000000)EXC_AHB1_CLK_FREQUENCY EQU (132954545)EXC_AHB2_CLK_FREQUENCY EQU (66477272)EXC_SDRAM_CLK_FREQUENCY EQU (12500000); Registers BlockEXC_REGISTERS_BASE EQU (0x7fffc000)EXC_MODE_CTRL00_BASE EQU (EXC_REGISTERS_BASE + 0x000)EXC_IO_CTRL00_BASE EQU (EXC_REGISTERS_BASE + 0x040)EXC_MMAP00_BASE EQU (EXC_REGISTERS_BASE + 0x080)EXC_PLD_CONFIG00_BASE EQU (EXC_REGISTERS_BASE + 0x140)EXC_TIMER00_BASE EQU (EXC_REGISTERS_BASE + 0x200)EXC_INT_CTRL00_BASE EQU (EXC_REGISTERS_BASE + 0xc00)EXC_CLOCK_CTRL00_BASE EQU (EXC_REGISTERS_BASE + 0x300)EXC_WATCHDOG00_BASE EQU (EXC_REGISTERS_BASE + 0xa00)EXC_UART00_BASE EQU (EXC_REGISTERS_BASE + 0x280)EXC_EBI00_BASE EQU (EXC_REGISTERS_BASE + 0x380)EXC_SDRAM00_BASE EQU (EXC_REGISTERS_BASE + 0x400)EXC_AHB12_BRIDGE_CTRL00_BASE EQU (EXC_REGISTERS_BASE + 0x800)EXC_PLD_STRIPE_BRIDGE_CTRL00_BASE EQU (EXC_REGISTERS_BASE + 0x100)EXC_STRIPE_PLD_BRIDGE_CTRL00_BASE EQU (EXC_REGISTERS_BASE + 0x100)EXC_REGISTERS_SIZE EQU (0x00004000); Single Port SRAM Block(s)EXC_SPSRAM_BLOCK0_BASE EQU (0x00000000)EXC_SPSRAM_BLOCK0_SIZE EQU (0x00004000)EXC_SPSRAM_BLOCK1_BASE EQU (0x00020000)EXC_SPSRAM_BLOCK1_SIZE EQU (0x00004000); PLD Block(s)EXC_PLD_BLOCK0_BASE EQU (0x10000000)EXC_PLD_BLOCK0_SIZE EQU (0x00004000)EXC_PLD_BLOCK0_NON_CACHEABLE EQU (1)EXC_PLD_BLOCK0_CACHEABLE EQU (0)END

Page 10: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

13Module14 ARM기반 SoC Design(II)

Stripe.h (C coding 시 참조)Stripe.h (C coding 시 참조)// File Name: /alu/arm_top/stripe.h#ifndef ARM_TOP_H_INCLUDED#define ARM_TOP_H_INCLUDED#define EXC_DEFINE_PROCESSOR_LITTLE_ENDIAN#define EXC_DEFINE_BOOT_FROM_SERIAL#define EXC_INPUT_CLK_FREQUENCY (25000000)#define EXC_AHB1_CLK_FREQUENCY (132954545)#define EXC_AHB2_CLK_FREQUENCY (66477272)#define EXC_SDRAM_CLK_FREQUENCY (12500000)/* Registers Block */#define EXC_REGISTERS_BASE (0x7fffc000)#define EXC_MODE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x000)#define EXC_IO_CTRL00_BASE (EXC_REGISTERS_BASE + 0x040)#define EXC_MMAP00_BASE (EXC_REGISTERS_BASE + 0x080)#define EXC_PLD_CONFIG00_BASE (EXC_REGISTERS_BASE + 0x140)#define EXC_TIMER00_BASE (EXC_REGISTERS_BASE + 0x200)#define EXC_INT_CTRL00_BASE (EXC_REGISTERS_BASE + 0xc00)#define EXC_CLOCK_CTRL00_BASE (EXC_REGISTERS_BASE + 0x300)#define EXC_WATCHDOG00_BASE (EXC_REGISTERS_BASE + 0xa00)#define EXC_UART00_BASE (EXC_REGISTERS_BASE + 0x280)#define EXC_EBI00_BASE (EXC_REGISTERS_BASE + 0x380)#define EXC_SDRAM00_BASE (EXC_REGISTERS_BASE + 0x400)#define EXC_AHB12_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x800)#define EXC_PLD_STRIPE_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x100)#define EXC_STRIPE_PLD_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x100)#define EXC_REGISTERS_SIZE (0x00004000)/* Single Port SRAM Block(s) */#define EXC_SPSRAM_BLOCK0_BASE (0x00000000)#define EXC_SPSRAM_BLOCK0_SIZE (0x00004000)#define EXC_SPSRAM_BLOCK1_BASE (0x00020000)#define EXC_SPSRAM_BLOCK1_SIZE (0x00004000)/* PLD Block(s) */#define EXC_PLD_BLOCK0_BASE (0x10000000)#define EXC_PLD_BLOCK0_SIZE (0x00004000)#define EXC_PLD_BLOCK0_NON_CACHEABLE#endif

Page 11: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

14Module14 ARM기반 SoC Design(II)

Full stripe simulation 을 위한 Assembly CodeFull stripe simulation 을 위한 Assembly Code

; Full stripe simulation 은 c 또는 Assembly 로 가능하나 이해를 하기 위해서는assembly 가 용이함; get ../stripe.s -> magawizard 에서 만든 파일 사용시EXPORT Entry

AREA |Code|,CODE,READONLY

Entryb Start ; b Unexpected ;b Unexpectedb Unexpectedb Unexpectedb Unexpectedb Unexpected

;; Unnexpected exception handlerUnexpected

b Unexpected

Page 12: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

15Module14 ARM기반 SoC Design(II)

Assembly CodeAssembly Code

;;;; Memory map for user-defined (PLD) registers;;OPERAND1_REGISTER EQU PLD0_BASE + 0x04OPERAND2_REGISTER EQU PLD0_BASE + 0x08OPERATION_REGISTER EQU PLD0_BASE + 0x0CRESULT_LOW_REGISTER EQU PLD0_BASE + 0x10RESULT_HIGH_REGISTER EQU PLD0_BASE + 0x14

PLD0_BASE EQU 0x10000000OPERAND1 EQU 0x0000000AOPERAND2 EQU 0x00000003OPERATION_ADD EQU 0x00000005OPERATION_SUB EQU 0x00000006OPERATION_MUL EQU 0x00000007

OPERAND1_REGISTER 0x10000004

OPERAND2_REGISTER 0x10000008

OPERATION_REGISTER 0x1000000C

RESULT_LOW_REGISTER 0x10000010

RESULT_HIGH_REGISTER 0x10000014

Page 13: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

16Module14 ARM기반 SoC Design(II)

Assembly CodeAssembly Code

;; Load register map into internal registers

ldr r1, =OPERAND1_REGISTER ; 0x10000004ldr r2, =OPERAND2_REGISTER ; 0x10000008ldr r3, =OPERATION_REGISTER; 0x1000000Cldr r4, =RESULT_LOW_REGISTER ; 0x10000010ldr r5, =RESULT_HIGH_REGISTER ; 0x10000014

;; Load data values into internal registersldr r6, =OPERAND1 ; 10 값ldr r7, =OPERAND2 ; 3값ldr r8, =OPERATION_SUB

;; Write Data to Slave registersstr r6, [r1] ;; [PLD0_BASE + 0x04] <= 10;str r7, [r2] ;; [PLD0_BASE + 0x08] <= 3;str r8, [r3] ;; [PLD0_BASE + 0x0C] <= 6(subtract)

Page 14: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

17Module14 ARM기반 SoC Design(II)

Assembly CodeAssembly Code

; Read the slave registers backldr r9, [r4] ; 10- 3 = 7 값이 R9 으로 읽혀질것임ldr r10, [r5] ; 0 값이 r10 으로 읽혀질것임

ldr r8, =OPERATION_ADDstr r8, [r3] ;; Loads Operation into OPERATION_REGISTER

; Read the slave registers backldr r9, [r4] ; 10+ 3 = 13 값이 r9으로 읽혀짐ldr r10, [r5] ; 0 값이 r10 으로 읽혀질것임

ldr r8, =OPERATION_MULstr r8, [r3] ;; Loads Operation into OPERATION_REGISTER

; Read the slave registers backldr r9, [r4] ; 10 * 3 = 30 값이 r9 으로 읽혀짐ldr r10, [r5] ; 0 값이 r10 으로 읽혀질것임

Page 15: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

18Module14 ARM기반 SoC Design(II)

Assembly CodeAssembly Code

nop ; The first few unused memory ;locations are padded to prevent ;unknown rom contents causing Xs;in simulation waveform (not ;actually required)

nopnopnopEND

Page 16: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

19Module14 ARM기반 SoC Design(II)

ADS 툴 설정하기ADS 툴 설정하기

쿼터스에서 ADS 툴을 사용하기 위해서는 셋팅이 필요

Assignment > Settings 를 실행

Page 17: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

20Module14 ARM기반 SoC Design(II)

Software Build Settings WizardSoftware Build Settings Wizard

프로세서 구동 프로그램(C, Assembly) 파일을 compile시 해야함컴파일러의 종류헤더 파일과 라이브러리의 경로하드웨어 이미지 파일을 지정링크 옵션

Page 18: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

21Module14 ARM기반 SoC Design(II)

Software toolset 설정Software toolset 설정

Page 19: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

22Module14 ARM기반 SoC Design(II)

Image 생성방법설정Image 생성방법설정

Memory initialize 파일을 생성시킴

makeprogfile -m memory arm_top.sbd arm_top.hex

Page 20: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

23Module14 ARM기반 SoC Design(II)

프로그래밍 파일 생성 설정프로그래밍 파일 생성 설정

반드시none Configure

시 사용

Page 21: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

24Module14 ARM기반 SoC Design(II)

C compiler 설정C compiler 설정

.,../common

Page 22: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

25Module14 ARM기반 SoC Design(II)

Assembler 설정Assembler 설정

Page 23: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

26Module14 ARM기반 SoC Design(II)

Linker 설정Linker 설정

-entry 0 -ro 0 -rw 0x20000

Page 24: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

27Module14 ARM기반 SoC Design(II)

소프트웨어 빌드 설정하기소프트웨어 빌드 설정하기

Page 25: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

40Module14 ARM기반 SoC Design(II)

IP 검증 에뮬레이션IP 검증 에뮬레이션

IP 검증 방법ALU 의 실행 결과를 UART 로 출력하여 본다.한백전자의 SOC-ENTRY II board 에 porting 하여 Excalibur에FLASH 에 프로그램(PLD+ firmware)을 download 한다.

UART

Byte Blaster port

Page 26: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

41Module14 ARM기반 SoC Design(II)

PC와의 연결PC와의 연결

Page 27: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

42Module14 ARM기반 SoC Design(II)

IP 검증 에뮬레이션과 Simulation 시 차이점IP 검증 에뮬레이션과 Simulation 시 차이점

UART Port 의 사용UART Port 를 사용하기 위해 stripe 에서 수정UART 를 사용하기 위해 Program 의 수정

EBI(Flash) port 의 사용Stripe 의 수정이 필요 (boot from flash mode)

Page 28: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

43Module14 ARM기반 SoC Design(II)

Excaliber Tool Design Flow Excaliber Tool Design Flow

Slave port binary file

Flash loader

Page 29: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

44Module14 ARM기반 SoC Design(II)

Flash MemoryFlash Memory

FlashCPU 프로그램과 FPGA 로직 이미지를 적재용 저장 장치기본 16 X 2 = 32Mbytes의 플래시 메모리 제공최대 32 X 2 = 64MbytesExcalibur가 제공하는 EBI(Expasion Bus Interface) CS0/CS1 영역에 각각 연결

EBI 버스와 연결되어 있어 Quartus상에서 별도의 핀 지정을 할 필요가 없음

Page 30: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

45Module14 ARM기반 SoC Design(II)

Stripe 설정Stripe 설정

쿼터스로 돌아가 스키마틱의 Stripe 모듈을 더블 클릭 후 설정

UART 부분과 FLASH 부분의 추가

Page 31: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

46Module14 ARM기반 SoC Design(II)

Stripe 부Stripe 부

Flash interface

UART

interface

AMBA

AHB

Interface

(PLD0)

Page 32: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

47Module14 ARM기반 SoC Design(II)

StripeStripe

파일 생성 목록

Page 33: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

48Module14 ARM기반 SoC Design(II)

StripeStripe

Stripe만 삭제 후 다시 만든다.

심볼 메뉴에서 Stripe 선택 후 도면 완성

Page 34: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

49Module14 ARM기반 SoC Design(II)

도면 수정도면 수정

추가

수정

W20 으로 추후 연결W20 으로 추후 연결

W6 으로 추후 연결

Page 35: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

53Module14 ARM기반 SoC Design(II)

CLOCK 입력CLOCK 입력

Stripe 으로 들어가는 CLK_ref 와 4 개의 PLD clock모두 같은 clock 사용(한백 board 의 경우)

Hclk로

연결

Page 36: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

54Module14 ARM기반 SoC Design(II)

Push Button InputPush Button Input

Hresetn

연결

Page 37: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

55Module14 ARM기반 SoC Design(II)

도면 수정에 의한 HDL 파일 Update도면 수정에 의한 HDL 파일 Update

메뉴 바에서 File > Create/Update > Create HDL Design File for Current File을 실행. -> error 시 schematic 수정

도면 수정에 의한 HDL 파일 Update

Page 38: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

56Module14 ARM기반 SoC Design(II)

Assignment editor Assignment editor PLD 부분에 대한 핀만 설정 ( hclock, hresetn)

- Stripe 부분은 핀 셋팅 하지 않음

Page 39: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

57Module14 ARM기반 SoC Design(II)

HCLOCK(W6), HRESETn(W20)HCLOCK(W6), HRESETn(W20)

Page 40: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

58Module14 ARM기반 SoC Design(II)

Assign PinsAssign Pins

Page 41: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

59Module14 ARM기반 SoC Design(II)

Device Pin Option SettingsDevice Pin Option Settings

확인할것

Page 42: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

60Module14 ARM기반 SoC Design(II)

Device Pin OptionDevice Pin Option

Device Pin Option 버튼을 클릭해 다음과 같이 설정한다.

Page 43: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

61Module14 ARM기반 SoC Design(II)

Device Pin Option(boot from Flash)Device Pin Option(boot from Flash)

Page 44: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

62Module14 ARM기반 SoC Design(II)

Device Pin OptionDevice Pin Option

확인 후 compile 수행

Page 45: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

63Module14 ARM기반 SoC Design(II)

코드 추가코드 추가

UART와 RIQ 위한 C코트, 어셈 코드추가

Page 46: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

64Module14 ARM기반 SoC Design(II)

코드 추가코드 추가

…₩ALU₩arm_top₩software의 다음 파일 추가 후

tutorial_code.s 코드 삭제

Page 47: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

65Module14 ARM기반 SoC Design(II)

소프트웨어 빌드 설정하기소프트웨어 빌드 설정하기

Page 48: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

66Module14 ARM기반 SoC Design(II)

소프트웨어 빌드 설정하기소프트웨어 빌드 설정하기

Page 49: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

67Module14 ARM기반 SoC Design(II)

소프트웨어 빌드 설정하기소프트웨어 빌드 설정하기

PLD쪽 파일생성

Page 50: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

68Module14 ARM기반 SoC Design(II)

소프트웨어 빌드 설정하기소프트웨어 빌드 설정하기

Page 51: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

69Module14 ARM기반 SoC Design(II)

소프트웨어 빌드 설정하기소프트웨어 빌드 설정하기

Page 52: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

70Module14 ARM기반 SoC Design(II)

소프트웨어 빌드 설정하기소프트웨어 빌드 설정하기

-first armc_startup.o(init) -entry 0 -ro 0 -rw 0x20000

Armc_start_up.s 코드의 init 부분을 0 번 address로 할당

Page 53: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

71Module14 ARM기반 SoC Design(II)

Armc_startup.sArmc_startup.s

….. 중략

AREA init, CODE, READONLYb Startb UdefHndb SwiHndb PabtHndb DabtHndb Unexpectedb IrqHndb FiqHnd

Unexpectedb Unexpected

UdefHndstmdb sp!,{r0-r12,lr}bl CUdefHandlerldmia sp!,{r0-r12,lr}subs pc,lr,#4

SwiHndstmdb sp!,{r0-r12,lr}; So far all we're using SWI for is enabling and disabling interrupts; when in User modesubs r0, lr, #4ldr r0,[r0]mov r1, #0xffffffand r0,r0,r1cmp r0, #1beq Enable_IRQ_SWIb EndOfSwi

………

Page 54: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

72Module14 ARM기반 SoC Design(II)

소프트웨어 빌드 설정하기소프트웨어 빌드 설정하기

설정을 다 마쳤으므로 도구바에서 버튼을 선택해 소프트웨어 빌드 한다.

빌드가 성공하면 이제 SoC-Expert II에 다운로드 할 arm_top_flash.hex 파일이

생성된다.

Page 55: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

73Module14 ARM기반 SoC Design(II)

하이퍼 터미날 설정하이퍼 터미날 설정

새 연결 이름 => entryII

Page 56: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

74Module14 ARM기반 SoC Design(II)

하이퍼 터미날 설정하이퍼 터미날 설정

포트 설정 COM1

Page 57: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

75Module14 ARM기반 SoC Design(II)

하이퍼 터미날 설정하이퍼 터미날 설정

포트 설정

Page 58: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

76Module14 ARM기반 SoC Design(II)

ByteBlasterMV setting ByteBlasterMV setting

Page 59: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

77Module14 ARM기반 SoC Design(II)

ByteBlasterMV settingByteBlasterMV setting

Page 60: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

78Module14 ARM기반 SoC Design(II)

ByteBlasterMV settingByteBlasterMV setting

선택

확인

Page 61: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

79Module14 ARM기반 SoC Design(II)

다운로드 하기다운로드 하기

장비와 컴퓨터에 병렬 케이블을 서로 연결한다.장비에 전원 케이블을 연결하고 전원 스위치를 온 한다.도스 명령어 창을 열고 현재 프로젝트 폴더가 있는 곳으로 이동한다.도스 창에서 아래와 같이 입력하고 엔터를 친다. 현재 프로젝트에서 생성된arm_top_flash.hex 파일이 장비의 플래시에 퓨징하기 시작한다.exc_flash_programmer –p –v –f –g arm_top_flash.hex 내용의 FLASH.BAT 실행

Page 62: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

80Module14 ARM기반 SoC Design(II)

결과결과

Page 63: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

81Module14 ARM기반 SoC Design(II)

Quiz(report)Quiz(report)

모듈 13에서 만들었던 ALU 를 변경했던 코드를 simulation 하도록tutorial.s 코드를 변경하여 simulation 을 수행하시오.

operation Operation[2:0]ADD 001

SUB 010

MULT 011

OR 100

AND 101

EXOR 110

Page 64: [Module 14] SoC 구현 실습 : System integration2).pdf · 2016. 10. 31. · Module14 ARM기반SoC Design(II) Excalibur Simulation model Excalibur Simulation model. zBus Functional

82Module14 ARM기반 SoC Design(II)

Reference Reference

Excalibur Device Hardware Reference Manual,November. 2002ARM922T_Technical_Reference_ManualAN 240: Simulating Excalibur Systems한백 SOC ENTRY II MANUAL rev.1.0Excalibur Stripe Simulator User Guide