4
CONTENTS
3.3 A Simple Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.2 A Wishbone Interface for the UART . . . . . . . . . . . . . . 32
3.3.3 The Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.3.4 Test Your Design . . . . . . . . . . . . . . . . . . . . . . . . 35
3.4 A Benchmark Program . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4.1 JPEG Compression . . . . . . . . . . . . . . . . . . . . . . . 36
3.4.2 Integer DCT . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4.3 The Test Program dct_sw . . . . . . . . . . . . . . . . . . . 38
3.4.4 A Test Example . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.5 Design a Performance Counter Module . . . . . . . . . . . . . . . . 38
3.6 Useful Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.6.1 Synthesis Reports . . . . . . . . . . . . . . . . . . . . . . . . 40
3.7 How to get Started Writing/Executing C Programs . . . . . . . . . . . 41
3.7.1 A Note on Volatile . . . . . . . . . . . . . . . . . . . . . . . 41
3.7.2 What to Include in the Lab Report . . . . . . . . . . . . . . . 42
4 Lab task 2 - Design a JPEG accelerator 43
4.1 The lab system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2 Proposed architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2.1 Block RAMs in VirtexII . . . . . . . . . . . . . . . . . . . . 44
4.2.2 Distributed RAMs . . . . . . . . . . . . . . . . . . . . . . . 45
4.2.3 The transpose memory . . . . . . . . . . . . . . . . . . . . . 46
4.2.4 WB memory map . . . . . . . . . . . . . . . . . . . . . . . . 46
4.3 Introduction to µClinux . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.3.1 Compiling an application to µClinux . . . . . . . . . . . . . 47
4.3.2 Starting the TFTP server . . . . . . . . . . . . . . . . . . . . 47
4.3.3 Downloading applications via TFTP . . . . . . . . . . . . . . 48
4.4 Introduction to jpegfiles . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.4.1 Important files in the lab skeleton . . . . . . . . . . . . . . . 48
4.4.2 The jpegtest application . . . . . . . . . . . . . . . . . . . . 50
4.4.3 The webcam application . . . . . . . . . . . . . . . . . . . . 50
4.5 Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.6 Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.6.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.6.2 Design of a hardware accelerator for quantization . . . . . . . 52
4.7 Tips and tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.8 What to include in the lab report . . . . . . . . . . . . . . . . . . . . 53
5 Lab task 3 55
5.1 DMA in the DCT Accelerator . . . . . . . . . . . . . . . . . . . . . 55
5.1.1 Proposed architecture . . . . . . . . . . . . . . . . . . . . . . 55
5.1.2 jpeg_dma.sv . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.1.3 How to use DMA in jpegfiles . . . . . . . . . . . . . . . . 58
5.1.4 Cache coherency issue . . . . . . . . . . . . . . . . . . . . . 58
5.2 What to Include in the Lab Report . . . . . . . . . . . . . . . . . . . 59
Commenti su questo manuale