학습목표 • HW/SW codesign에 대한 기본 개념을 실습을 통해 익힌다. • ARM ADS를 이용하여 JPEG 예제를 수행하고 분석해본다. 이를 통해 HW 수행에 적합한 task가 어떤 것인지 찾아본다. • HDL을 이용하여 직접 HW 블록을 설계해본다. • HDL을 이용하여 직접 버스와 HW 블록을 연결하는 wrapper를 설계해본다. • 직접 설계한 모듈을 ModelSim을 이용해 simulation해 보고, 사용법을 익힌다. • 간단한 SoC를 구성하기 위해 여러 모듈들을 integration하고 실제 simulation해 봄으로써, codesign에 따른 성능 향상을 확인한다.
61
Embed
학습목표 - KOREATECH사용하지않는architecture 4를이용하여compile 해야한다. ... build, and debug C, C++, or ARM assembly language programs. Components of ADS • Command-line
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
학습목표
• HW/SW codesign에 대한 기본 개념을 실습을 통해 익힌다.
• ARM ADS를 이용하여 JPEG 예제를 수행하고 분석해본다. 이를통해 HW 수행에 적합한 task가 어떤 것인지 찾아본다.
• HDL을 이용하여 직접 HW 블록을 설계해본다.
• HDL을 이용하여 직접 버스와 HW 블록을 연결하는 wrapper를설계해본다.
• 직접 설계한 모듈을 ModelSim을 이용해 simulation해 보고, 사용법을 익힌다.
• 간단한 SoC를 구성하기 위해 여러 모듈들을 integration하고실제 simulation해 봄으로써, codesign에 따른 성능 향상을확인한다.
강의자료 활용 Guideline
• JPEG 이외에 다른 여러 가지 예제들을 이용하는 실습을 하는 것도 좋다.
• 프로파일의 결과에 따라 꼭 computation intensive한 task를 HW로 보낼 필요는 없다. 상황에 따라, 즉 HW module의 reuse나 설계 용이성 등에 따라, HW로 보낼 task를 설계자가 결정할 수 있다.
• 통신 방식은 polling, interrupt 등 다양하게 사용될 수 있다.
• 통신의 양에 따라서 때로는 codesign한 결과가 처음보다 나쁘게나올 수 있으므로 double buffering, task level pipelining 등 성능 향상을 위한 다양한 기법을 적용하는 것도 좋다.
• Simulation 도구의 버전에 따라서 다른 결과를 나타낼 수도 있다. ModelSim은 6.2a를 ADS는 1.2를 사용할 것을 권장한다. 만약arm compiler가 RealView로 되어있을 경우에는 thumb 모드를사용하지 않는 architecture 4를 이용하여 compile 해야 한다.
Contents
1. Overview
2. ADS를 이용한 JPEG encoder profiling
3. HDL을 이용한 HW IP 설계 (VHDL or verilog)
4. ModelSim을 이용한 RTL simulation 실습
5. AHB slave 인터페이스를 만족하는 wrapper 설계
6. Codesign에 따른 성능비교
Overview
• Final architecture (Simple SoC)
– Codesign에 따른 성능비교• ARM7 프로세서만을 이용한 JPEG encoder 수행• ARM7 프로세서와 Quantize, Zigzag HW 블록을 이용한 JPEG encoder 수행
ARM7tdmi-s
Quantize& Zigzag(HW IP)
ROM RAM
wrapper
UARTGPIO
AMBA AHB bus
Contents
1. Overview
2. ADS를 이용한 JPEG encoder profiling
3. HDL을 이용한 HW IP 설계 (VHDL or verilog)
4. ModelSim을 이용한 RTL simulation 실습
5. AHB slave 인터페이스를 만족하는 wrapper 설계
6. Codesign에 따른 성능비교
About the ADS
• ADS consists of a suite of applications, together with supporting documentation and examples, that enable you to write and debug applications for the ARM family of RISC processors.
• You can use ADS to develop, build, and debug C, C++, or ARM assembly language programs
Components of ADS
• Command-line development tools
– armcc, armcpp, armasm, armlink, armsd
• GUI development tools
– AXD, CodeWarrior IDE
• Utilities
– fromELF, armprof
• Supporting software.
– ARMulator
• Documentation
– http://www.arm.com
Objective
• Using ADS tool
• Profiling JPEG encoder code
– Our JPEG encoder 구성
ReadBmp ChenDCT Quantize Zigzag HuffEncode
“bmp” image source “jpg” compressed image
About JPEG encoder
Bmp image
88 Preshift
DCT
Bound
Quantize
Zigzag
Encoding
8
8jpg format
Using Code Warrior (1)
• STEP 1
– new project
• file->new project
Using Code Warrior (2)
• STEP 2
– Add Files
• Copy jpeg.c file to project folder
• Add jpeg.c (mouse right click on the project background)
Using Code Warrior (3)
• STEP 3
– DebugRel setting
Using Code Warrior (4)
• STEP 4
– Target settings
Using Code Warrior (5)
• STEP 5
– ARM Assembler setting
Using Code Warrior (6)
• STEP 6
– Arm C compiler setting
Using Code Warrior (7)
• STEP 7
– ARM C compiler optimization level setting
Using Code Warrior (8)
• STEP 8
– Other compiler setting
• ARM C++ compiler, Thumb C compiler, Thumb C++ compiler
Using Code Warrior (9)
• STEP 9
– ARM Linker Setting (output)
Using Code Warrior (10)
• STEP 10
– MAKE ALL
– Launch AXD debugger
Using AXD (1)
• STEP 11
– Load Image with profiling on
Using AXD (2)
• STEP 12
– Profiling setting
Using AXD (3)
• STEP 13
– Run simulation until “_sys_exit”
– Write profiling data
Using AXD (4)
• STEP 14
– Run “armprof jpeg.prf > jpeg_profile_result.txt” command