![Page 1: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/1.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected])
Dummy FTL & RAM FTL
Prof. Dongkun Shin ([email protected])
TA – Junho Lee ([email protected])
TA – Somm Kim ([email protected])
Embedded Software Laboratory
Sungkyunkwan University
http://nyx.skku.ac.kr
![Page 2: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/2.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 2
Contents
• Review of Jasmine operation
• Deep dive to the Jasmine & codes
– Read / write command flow
– Host interface layer• SATA controller
• Buffer manager
– Flash translation layer
• Intro. to Dummy FTL
– Request handling in Dummy FTL (code-level)
• Measuring performance with IOmeter
• RAM FTL
![Page 3: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/3.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 3
SRAM
(96KB)
NAND Flash
NAND Controller
INDILINX
BarefootTM
Controller
Clock
Generator
Controller
ROM
Controller
ARM7TDMI-S
Core
Buffer
Manager
SATA
Device
DRAM
ControllerMemory Utility
APB Bridge
UART
GPIO
Timer
WDT
PMU
ICU
SATA Host interface DRAM
AHB
DRAM Access Bus
JTAG
JTAG debug port
Hardware Architecture
![Page 4: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/4.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 4
SRAM
(96KB)
NAND Flash
NAND Controller
INDILINX
BarefootTM
Controller
Clock
Generator
Controller
ROM
Controller
ARM7TDMI-S
Core
Buffer
Manager
SATA
Device
DRAM
ControllerMemory Utility
APB Bridge
UART
GPIO
Timer
WDT
PMU
ICU
SATA Host interface DRAM
AHB
DRAM Access Bus
JTAG
JTAG debug port
Read Command Flow
1
2
![Page 5: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/5.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 5
SRAM
(96KB)
NAND Flash
NAND Controller
INDILINX
BarefootTM
Controller
Clock
Generator
Controller
ROM
Controller
ARM7TDMI-S
Core
Buffer
Manager
SATA
Device
DRAM
ControllerMemory Utility
APB Bridge
UART
GPIO
Timer
WDT
PMU
ICU
SATA Host interface DRAM
AHB
DRAM Access Bus
JTAG
JTAG debug port
Write Command Flow
2
13
![Page 6: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/6.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 6
SATA Controller
• SATA event queue
– 128 slots for SATA command
– Inserted by ISR
– Deleted by FTL
• Queue policy
– FIFO• Read latency suffers
– Read first• RAW hazard
• History log by H/W
Disabled in Jasmine
handle_got_cfis()
![Page 7: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/7.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 7
Buffer Manager
• SATA data is buffered in DRAM
• Memory map of Jasmine board
![Page 8: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/8.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 8
Buffer Manager (cont’d)
• ftl_read_ptr, ftl_write_ptr
– Transfer data from / to NAND
• sata_read_ptr / sata_write_ptr
– Transfer data to / from host
Q. Why the order of bm_ptris different in read and write?
![Page 9: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/9.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 9
Triggering & Initializing FTL
• ./target_spw/init_gnu.s
– Call init_jasmine()
– Call Main()
• init_jasmine()
– Initialize H/W configurations
• Main()
– FTL top level loop
– ./sata/sata_main.c
![Page 10: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/10.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 10
Dummy FTL
• ./ftl_dummy
– ftl.c, ftl.h
• Dummy FTL is not a real FTL
– No access to NAND flash
– Neither stores nor retrives any data
• Why Dummy FTL?
– To simply measure the SATA & DRAM speed
![Page 11: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/11.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 11
How to Enable Dummy FTL
• ./build_gnu/Makefile
![Page 12: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/12.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 12
Dummy FTL: Read Handling
• ./ftl_dummy/ftl.c
![Page 13: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/13.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 13
Dummy FTL: Write Handling
• ./ftl_dummy/ftl.c
![Page 14: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/14.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected])
Measuring performance with IOmeter
![Page 15: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/15.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 15
IOmeter
• Performance measurement tool for storage
– http://www.iometer.org
• Performance factors
– IOPS (IOs Per Second)
– Bandwidth (MB/s)
– Response time (also known as latency)
![Page 16: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/16.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 16
IOmeter
• Select disk target
OpenSSD Disk16MB
![Page 17: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/17.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 17
IOmeter
• Make new access specification
– Access Specifications -> New
![Page 18: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/18.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 18
IOmeter
• Assign access specification
– Select access specification and “Add”
![Page 19: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/19.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 19
IOmeter
• Assign Run Time
![Page 20: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/20.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 20
IOmeter
• Start Tests
– Result Display -> Click “Flag Icon”
![Page 22: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/22.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 22
Lab 3 : RAM FTL
• Develop a 32MB disk with dummy FTL
(OpenSSD-1.1.0\ftl_dummy)
– It can be used like a normal disk.
– Modify ftl_read(), ftl_write() functions to read/write
data using Jasmine DRAM.
• Hint: See the ‘#define’ of ftl.h
![Page 23: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/23.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 23
ftl_read(), ftl_write()
• ftl_read(lba, total_sectors)– Description• Read the data corresponding to ‘lba’ and ‘total_sectors’ from the DRAM.
– Hint: Set the offset of the g_ftl_read_buf_id pointer and DRAM address
• ftl_write(lba, total_sectors)– Description• Write the data corresponding to ‘lba’ and ‘total_sectors’ to the DRAM.
– Hint: Set the offset of the g_ftl_write_buf_id pointer and DRAM address
• Note: Use the memory utility function to transfer data between DRAM and SRAM.
![Page 24: Dummy FTL & RAM FTLnyx.skku.ac.kr/wp-content/uploads/2019/10/Week5_Lab.pdf · 2019-10-01 · • You should submit a report – Use an IOmeter to measure performance • Sequential](https://reader033.vdocument.in/reader033/viewer/2022042202/5ea372e5d3d2b227a22c0cad/html5/thumbnails/24.jpg)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 24
Miscellaneous
• Recommended environment : Windows
• Team Project
• You should submit a report
– Use an IOmeter to measure performance• Sequential Write 16KB, Sequential Read 16KB, Random Write 16KB, Random Read 16KB
– Capture and describe the performance comparison of Dummy FTL and RAM FTL (Direct connection to SATA, Not through a USB)
• Submit to the icampus
– Due: 10/7(Mon.) 23:59:59
– File to submit: ftl.c, ftl.h, jasmine.h, report.pdf
– File name: team_$NUMBER.zip (ex. team_01.zip)
• Late penalty : -20% per day (Up to 3 days)