Professional Documents
Culture Documents
APPLICATIONS
A PROJECT REPORT
Submitted by
SAKTHEKANNAN M S (212220060228)
YOGAVIGNES B M (212219060302)
of
BACHELOR OF ENGINEERING
in
APRIL 2023
ANNA UNIVERSITY: CHENNAI 600 025
BONAFIDE CERTIFICATE
Certified that this report titled “SD CARD INTERFACE USING FPGA FOR
MULTIMEDIA APPLICATIONS” is the bona-fide work of “SAKHTEKANNAN M
S (212219060228), UDAYA KRISHNAN M (212219060284), YOGAVIGNES B M
(212219060302)” who carried out the work under my supervision.
SIGNATURE SIGNATURE
Dr. SRIGITHA S NATH, M.E., Ph.D Dr. SRIGITHA S NATH, M.E., Ph.D
HEAD OF THE DEPARTMENT SUPERVISOR
Professor Assistant Professor
Department of ECE, Department of ECE,
Saveetha Engineering College, Saveetha Engineering College,
Thandalam, Thandalam,
Chennai - 602105 Chennai – 602105
The project sheet “SD CARD INTERFACE USING FPGA FOR MULTIMEDIA
APPLICATIONS” submitted by “SAKTHEKANNAN M S (212219060228),
UDAYA KRISHNAN M (212219060284), and YOGAVIGNES B M
(212219060302)” is approved for submission, as partial requirement for the award of
the Degree of Bachelor of Engineering in Electronics and Communication, Anna
University during the academic year 2022-2023.
We wish to express our gratitude to our Founder president, Dr. N.M. Veeraiyan,
President Dr. V. Saveetha and Director Dr. S. Rajesh and for providing us with the
facilities for the completion of our project. We also thank our principal
Dr.N.Duraipandian , M.E.Ph.D., for his continuous support and encouragement in
carrying out our project work. Also, our thanks to Dr. Srigitha S Nath M.E., Ph.D.,
Head of the Department, Electronics and Communication Engineering of our college for
providing us facilities and permission to carry out our project work
We mention our special thanks to our project coordinator Dr. K. Mahendran M.E.,
Ph.D., Assistant Professor, Department of Electronics and Communication Engineering
for his wisdom, guidance, and constant encouragement. We manifest cut deep sense of
gratitude to our internal guide Dr. Srigitha S Nath M.E, Ph.D., Assistant professor,
Department of Electronics and Communication Engineering for his encouragement and
faith in as though this endeavor.
ABSTRACT iii
LIST OF TABLE xvi
LIST OF FIGURES xviii
LIST OF SYMBOLS xxvii
1. INTRODUCTION 1
1.1 GENERAL 1
1.2 .... ......... 2
1.2.1 General 5
1.2.2 ........... 12
1.2.2.1 General 19
1.2.2.2 . . . . . . . . . . 25
1.2.2.3 . . . . . . . . . . 29
1.2.3 . . . . . . . . . . . . 30
1.3 . . . . . . . . . . .. . . . . . . 45
1.4 .................. 58
2. LITERATURE REVIEW 69
2.1 GENERAL 75
2.2 .......... 99
2.2 ……………. 100
i
ABSTRACT
Based on FPGA (Field Programming Gate Array) chips, this application is used
for audio, video and image processing. At the same time, applications require more
memory in addition to on-chip memory to resolve additional data. Onboard memory can
be used to meet the requirements of FPGA systems but cannot be expanded by adding
just a few cards. More convenient is SD card (Secure Digitals) is a microcontroller which
can read and write to SD card. The main goal is to provide a storage solution for FPGA,
solution for FPGA for storing large files. The hardware design is done in Verilog HDL
language and implemented in FPGA. All data access from the SD card is through
supply with a built-in oscillator frequency of 100 MHz. A 4GB micro SDHC card (class
6) from Strontium is used in this particular project. FAT32 is formatted by SD card. The
ultimate aim of this project is to read a BMP image file from the SD card. FAT32 is
formatted by SD card before interfacing. The code for the FAT32 is written to interface
the SD card.
ii
LIST OF TABLES
iii
LIST OF FIGURES
1.7 MOSI 11
iv
3.4 FPGA BLOCK DIAGRAM 25
STRUCTURE OF FS DIRECTORY IN SD
3.17 CARD 41
v
IN FPGA
vi
LIST OF SYMBOLS AND ABBREIVATIONS
SD - Secure Digitals
CLK - Clock
CMD - Command
UART
- Universal Asynchronous Receiver-Transmitter
1
CHAPTER 1
INTRODUCTION
2
impedance matching requirements. The data link layer of the SD card protocol
is responsible for managing the transfer of data between the SD card and the
host system. It involves sending and receiving commands and data packets, as
well as managing error detection and correction. To implement the data link
layer on an FPGA, designers need to understand the command and data packet
formats, as well as the error detection and correction mechanisms used by the
SD card. The file system layer of the SD card protocol is responsible for
managing the storage and retrieval of files on the SD card. It involves managing
the directory structure, file attributes, and data storage format. To implement the
file system layer on an FPGA, designers need to understand the file system
format used by the SD card, including the FAT (File Allocation Table) file
system used by most SD cards. Implementing an SD card interface using FPGA
involves designing custom digital circuits to perform each of these functions.
This typically involves writing Verilog code to describe the digital circuitry, and
then using software tools to synthesize and map the code onto the FPGA. The
resulting design can then be tested using simulation tools and debugged using
hardware debugging tools [4], [5], [6].
1.1 SD CARD
The SD card is consisting of two basic semiconductor sections, a
‘memory core’ and a ‘SD card controller’. The ‘memory core’ is the flash
memory region where the actual data of the file is saved. When we format the
SD card a file system will be written into this region. Hence this is the region
where the file system exists [7]. The ‘SD card controller’ helps to communicate
the ‘memory core’ with the external devices like FPGAs, FPGA. It can respond
to certain set of standard SD commands and read or write data from the memory
core in for the external device. Fig. 1.1 shows the block diagram of SD card.
3
Fig. 1.1 Block Diagram of SD Card
4
Fig. 1.2 Memory Architecture of SD Card
5
1.1.2 BUS PROTOCOL OF SD CARD
The idea behind SD communication is straightforward; it operates in a
master-slave fashion. A master controller and many slave controllers connected
through 3-6s lines are usual in such a setup. They are labelled as "CMD,"
"CLK," and "DAT0-3" (data lines). Table. 1.1 shows the pin function of SD
mode.
Table 1.1 Pin functions of SD mode.
Name Functions
CLK microcontroller uses this pin to send clock signal to SD card.
CMD bidirectional pin for information and command transmission between
microcontroller and SD card.
DAT0-3 Four bidirectional pins are used for bulk data transfer data between
microcontroller and SD card.
6
ignore the supplied value [15]. Below Table 1.2 describes the commands of SD
card and the functions of each command of the SD card.
7
In SPI mode the SD card response to all the incoming command using
three basic types of command response, R1, R2 and R3. Each bit in the response
block contains some specific details about the status of the SD card. Fig. 1.3,
Fig. 1.4, Fig. 1.5 shows the Response 1, Response 2, and Response 3 of SD card
respectively.
Response – R1
Response – R7
The R7 Response again is a product of the R1 response, it gives very similar
information back compared to R3. All we need to ensure is that the last byte is
equal to AA, that's it.
Response – R2
8
Fig. 1.4 SD card command Response 2 in SPI Mode
Response – R3
1.2 FPGA
Field Programmable Gate Arrays (FPGAs) are semiconductor devices
that are based around a matrix of configurable logic blocks (CLBs) connected
via programmable interconnects. FPGAs can be reprogrammed to desired
application or functionality requirements after manufacturing [16]. This feature
distinguishes FPGAs from Application Specific Integrated Circuits (ASICs),
which are custom manufactured for specific design tasks. Although one-time
programmable (OTP) FPGAs are available, the dominant types are SRAM
based which can be reprogrammed as the design evolves [17].
9
The process of transforming the original system concept into an actual
FPGA implementation that performs the required task is called functional
design. A device built as an array of configurable logic elements (LE). Each
logic elements can be configured to work in combination or sequential
functions. Modern FPGAs integrate other useful things features such as built-in
multipliers and high-speed (I/O), data converters including analog to digital
converters, large RAM arrays (random access memory), and processor. All
these features allow you to create complex system-on-Chip (SoC) hardware that
provides options such as create a specific custom Central Processing Unit
(CPU), the purpose of which is executing multiple statements [18].
10
Fig. 1.6 FPGA Development Board
11
1.3 SPI
The Serial Peripheral Interface (SPI) is a protocol utilized by many
electrical devices. A card reader for SD or RFID cards and a wireless 2.4 GHz
transceiver are examples of peripherals that utilize SPI to connect with a
microcontroller. Sending and receiving any number of bits is possible so long as
the flow is continuous. I2C and UART both transmit data in discrete packets
with a defined number of bits. Start and stop criteria, which indicate the
beginning and end of each packet, distort data transmission [21].
12
system operating at 5 V, a 0 bit is communicated as a short pulse of 0 V, and a 1
bit is communicated by a short pulse of 5 V. The bits of data can be transmitted
either in parallel or serial form as shown in Fig. 1.8. In parallel communication,
the bits of data are sent all at the same time, each through a separate wire [22],
[23]. The following diagram shows the parallel transmission of the letter “C” in
binary (01000011):
In serial communication, the bits are sent one by one through a single
wire as shown in Fig. 1.9. The following diagram shows the serial transmission
of the letter “C” in binary (01000011):
13
1.3.2 PIN FUNCTIONS OF SPI
Master Output/Slave Input (MOSI) - the master transmits data to the
slave.
Master Input/ Slave Output (MISO) – slave delivers data to master,
Clock (SCLK) – clock signal line.
Slave Select/Chip Select (SS/CS) – allows the master to select to which
slave to transfer data.
14
Fig. 1.11 Slave Select Activation
The master generates the frequency of the clock. When the master pushes
the SS/CS pins to a reduced voltage state, the slave is activated. The master
transmits information bit by bit to the slave over the MOSI line. The slave
inspected each received bit as shown in Fig. 1.12, Fig. 1.13. When a response is
required, the slave sends the data back to the master bit-by-bit over her MISO
line. The master performs an analysis on the received bits [25].
15
will provide an effective solution for data storage and transfer in a range of
portable devices.
CHAPTER 2
LITERATURE SURVEY
16
with SD cards that only have one bit, the read performance of SD cards that
have four bits is roughly 67% better than that of SD cards that just have one bit.
When it comes to write operations, the SD 4-bit mode is thus 80% quicker than
the SD 1-bit mode. It is vital to offer a mechanism that can do multi-block
writes and reads as well as swiftly generate 16-bit CRC write instructions since
it may be a high priority to improve the overall performance of the system.
Because of this, it will always be necessary to acquire more costly hardware
resources. The suggested firmware would be useful for a variety of different
applications, one of which is the capturing of video in real time.
According to J. Y. Qiang et al [29] it has been proved that the SPI bus is
similar to a synchronous, full-duplex serial interface data bus line. Moreover,
17
the SPI bus offers a straightforward protocol and a fast rate of data transfer.
Since they make quick device creation and testing possible, FPGAs are a
popular solution for applications that need parallel processing. In this section,
we will talk about the formation of SPI as well as its functioning. The operation
sequence as well as the four modes are broken down and analysed by the
communication bus. A module circuit provides an FPGA interface capability for
an SPI bus. This capability is given. The hardware description language Verilog
is used throughout the design process of the SPI, while the vivado simulator is
utilised to mimic the SPI's waveforms. The viability of the approach is shown
via the use of a simulation of waveform analysis.
18
devices. Because of this, it was necessary to create an SD card reader that could
be used on any device that is based on an FPGA.
19
Reconfigurable Processing Element (RPE) with an arithmetic unit that can be
reconfigured on-the-fly was also implemented. Multiple RPEs can be used to
design a General Purpose Image Processing System (GPIPS) that can switch
between different algorithms during runtime. As an illustrative example, the
GPIPS on Spartan-6 was programmed to switch between two applications on-
demand, such as two-dimensional filtering and block-matching.
20
platform using FPGAs that addresses this issue. Specifically, the paper focuses
on interfacing FPGAs with CMOS image sensors and VGA monitors. The
authors describe techniques used to achieve a processing speed of 50 FPS,
which is a significant improvement over the previously reported speed of 3 FPS.
The paper also presents benchmarking data for a real-time image-processing
application that was executed on both an FPGA-based system and a DSP-based
system, demonstrating the superior real-time performance of the FPGA-based
system. Overall, this paper provides valuable insights into the use of FPGAs for
image processing and highlights the potential for improving processing speed
through better interface design.
21
of the pupil is identified by computing the centre value of the detected region.
The proposed hardware architecture is designed using Verilog HDL and
implemented on an Altera DE2 Cyclone II FPGA. The logic utilization of the
system is compared with existing work. The setup includes a Cyclone II FPGA,
an E2V camera, SDRAM, and a VGA monitor. The experimental results
demonstrate the accuracy and effectiveness of the real-time implementation, as
the algorithm is able to manage various types of input video frames, and all
calculations are performed in real-time. Although there is room for further
improvement, the project is a success as it enables accurate detection and
tracking of any inputted eye.
22
ff484. The power consumption of the UART was analysed for each FPGA,
providing insights into its efficiency in different technologies.
23
CHAPTER 3
PROPOSED WORK
24
Fig. 3.2 One-bit SD mode pin diagram
Among these three modes from Fig 3.1, Fig 3.2, Fig 3.3 (SPI
mode, one-bit SD mode and four-bit SD mode), the latter two are significantly
slower than the former. The higher bit rate of four-bit SD mode allows for rapid
and efficient command execution, including read/write operations and Table.
3.1 shows the comparison between all 3 modes.
25
Fig. 3.4 illustrates the recommended FPGA block architecture for 4-bit
SD mode and SPI mode protocol. Regarding the data pins, 4-bit SD mode
requires only one clock and four data ones. The Clock Control module's
principal purpose is information sharing. All functionality of 4-bit SD mode
may be assured with the Command Control package. Due to the SD card's
limited 512-byte memory location, two FIFO buffers are designed to
temporarily store data during transmission and reception.
26
Command 8 is to check if we are using the correct card. Otherwise, this
particular program will always return to the beginning. This part of the
initialization procedure is mandatory.
cmd_out<= 56'hFF_48_00_00_01_AA_87;
Then to get R3 reaction after the R1 reaction. The one and only thing we
need to understand is that the final byte we get has to be (hex) AA. This signals
the detection of an SD card version 2 (SDHC). There is only one NCR
necessary. Furthermore, the ACMD41 instruction configures the SD card to
operate in SPI mode. There is only one NCR necessary.
cmd_out<= 56'hFF_69_40_00_00_00_01;
During the initial run, the idle flag remains set. This activation procedure
is complete if the flag is cleared. Alternatively, command 55 is delivered. The
ACMD command has a feature in that all commands are preceded with
command 55.
cmd_out<= 56'hFF_77_00_00_00_00_65;
CRC, NCR, and null arguments are often transmitted as 0xFF. The SD
card operates in this manner, which explains why the data remains high.
Whenever the SD card gets busy, the output data pin goes to ground, and when
it is ready, it goes too high. This is helpful when writing on cards. To read a
state register, no instructions are required. Fig. 3.5 illustrates the initialization of
Secure Digital card.
27
Fig. 3.5 SD card initialization flow chart.
28
command is used to permanently store data in a memory block beginning at
address 2000. For the command set to operate properly, it must appear as
follows:
After receiving the data response, the SD card may be written to; however,
before the card's status can be verified, it must be de-asserted eight times (1
byte) and then reasserted. While the preceding code snippet may occasionally
function and is frequently how datasheets are to be understood, the SD card
29
must be deselected prior to beginning the writing procedure. When the SD card
is being used for something else, the output data will be reduced (if this option
is set), but when it is no longer in use, the output data will be increased to
indicate that it is accessible. Fig. 3.6 illustrates write data of Secure Digital
Card.
30
A single block of data (512 bytes) is read from the SD card in READ
BLOCK mode.
READ_SINGLE_BLOCK
Each SD card block is represented by a 512-byte memory address
sequence. The READ SINGLE BLOCK command is used to get a single block
of data beginning at the given memory address. In this instance, 2000 is the
beginning address. The command packet format must be as follows:
When the time comes to record the succeeding data block.
0x51 is the value of the first byte (command).
(The argument) positions 0x000007d0 through 0x000007ff (This field must be
set to zero even when there are no parameters for those other commands.)
(CRC) represents the random values included in the sixth byte. Seven-byte
NCR. The response from R1 should reach FPGA immediately following the
instruction. All bits should be set to zero. The FPGA may get information from
the SD card if the R1 response byte is zero. Each READ SINGLE BLOCK
request from an SD card returns 512 bytes in response. Fig. 3.7 illustrates read
data of Secure Digital Card.
31
Fig. 3.7 Read data flow chart for SD card.
32
3.3.3 SD CARD CONTROLLER WORKING
Input
Clock - 25Mhz
Reset - Active high reset
Din [7:0] - Data in [write operation]
Address [31:0] - Sector address [Read/Write operation]
Wr - Write enable
Rd - Read enable
Multi_sector_en - Multiple sectors read Henable
I_blk_num - Read total number of blocks in multi sector mode
Miso - Read total number
Output
Cs - chip select
Mosi - FPGA send command/data to be shared
Sclk - spi clock
byte_counter - byte count till 512 bytes
Dout, recv_data - data out from Sd card
status - state changes
byte_available - ensure the valid data by data enable
Reading - data is reading from Sd card
Ready - ready to send the read/write command
Read_for_next_byte - each byte has 8bits. Ready to send next byte
Read_done - enable every 512 bytes completed
33
3.4 FILE SYSTEM LAYER
This section explains the FAT32 file system implementation of the SD
card in detail. The FAT32 file system is actually written into the ‘Memory
Core’ when it was formatted. The FAT32 stands for File Allocation Table 32,
means it has a file allocation table of length 32 bits. The entire data of a file is
scrambled across the Memory Core and the FAT (File Allocation Table) holds
the location of next block corresponding to the location of the current block.
3.4.1 SECTORS
The Memory Core has 8-bit (1 byte) memory locations. The consecutive
8-bit memory locations are grouped into ‘Sectors’. A FAT32 sector usually has
512 bytes per Sector. The grouping of memory bytes to form Sectors is shown
in the following Fig. 3.8.
3.4.2 CLUSTERS
The consecutive Sectors are grouped to form ‘Clusters’. The number of
Sectors per Cluster depends on the size of the entire file system. The grouping
of Sectors to form Clusters is shown in the following Fig. 3.9.
34
3.4.3 SCRAMBLED STORAGE
The entire data of a file is scrambled across the Memory Core as Data
Clusters. The following figure shows how the data from three files named A, B,
C are scrambled across the Memory Core. FAT (File Allocation Table) holds
the location of next Cluster corresponding to the location of the current Cluster
of the file as shown in Fig. 3.10.
35
3.5.1 PARTITION
The MBR (Master Boot Record) is the very first Sector of the ‘Memory
Core’ and it is meant to hold the information regarding the partitions inside the
file system. The MBR can hold details of four fundamental partitions. The first
accessible line of data in an SD card will start at something like address 8192
but in a HEX editor such as WinHex you will not see these first 8192 bytes and
it will in fact say sector 0. When in reality reading from sector 0 will actually
require address 8192, in general this offset will take this value but of course a
computer needs to be certain as it can take other values. There are a few things
first which should be known. Firstly, a sector consists of 512 bytes, this is set
and cannot be changed. Each bit in the SD card command address corresponds
to a sector, therefore single bytes cannot be written or read, only in multiples of
512-byte sectors. A cluster is a multiple of sectors, for example my SD card has
been configured to 64 sectors per cluster, this is written into the FAT boot
record. Lastly all of the SD card data, not our file data, follows something called
"little endian", the data is read backwards, so byte 1, byte 2, byte 3, etc… Below
is an example of the partition, the software does a great job of decoding what all
of these bytes mean. The only part of data that we need is the location of the
first sector, so we would read from address zero and then continuously read and
discard the data until we reach bytes 0x1C6 through to 0x1C9. The first sector
is known as the boot sector, this is where most HEX editors will start from,
without reading the partition we would be unable to accurately reach this point.
The data read is 00 20 00 00 which is actually 0x00002000, following little
endian, this corresponds to 8192 decimals.
36
Fig. 3.12 Partition 512 bytes – Sector 0 of SDCARD
The Partition Info Bytes are 16 bytes long and each of them holds
important information regarding the corresponding partitions. The last byte of
the MBR is the signature byte which holds a specific value (0xAA55 for
FAT32) which can be used to check whether the sector is MBR or not. The four
bytes long First Sector number of the partition can be read starting from 8 th bit
to 11th bit of the Partition Info Bytes as shown below Fig. 3.13:
From Fig. 3.14 the first two bytes are Check Bytes which together holds a
specific value, usually 0xE9 or 0xEB. The 11 th and the 12th bytes when read
together give the number of Bytes per Sector for the file system. The FAT32
usually has 512 bytes per Sector. The 13 th byte holds the number of Sectors per
Cluster for the file system. The 14 th and the 15th bytes together read the number
of Reserved Sectors before the FATs, starting from the beginning of the
partition. The 16th bit holds the value of the number of FATs in the file system.
The 4 bytes starting from the 27th byte to 30th byte can be read together to get
the number of Hidden Sectors between the FATs and the First Cluster of the
partition. The 4 bytes starting from the 43rd byte to the 46th byte holds the
address of the root cluster, which is the very first cluster of the partition (usually
2). The 47th and the 48th bytes can be read together to get the location of the
Sector where the File Information is stored (Directory Sector).
After finding the start of the boot sector we need to load this value into
the read command, so loading 8192 into the SD cards read command will bring
us to the boot sector. Here is an example of the boot sector, the main things we
need to read from this are, the bytes per sector (this should always be 512), the
38
sectors per cluster, the reserved sectors, the hidden sectors and the sectors per
FAT. You may notice the offset in the software can be calculated by sectors x
bytes per sector, 8192 x 512 = 4194304, 0x400000.
0x40 = 64
39
= 0x1898
= 6296
40
Fig. 3.16 Root Directory
Taking the first entry from the root directory,
The entry has been deleted, the file is called "001", the file is an archive, etc...
You may also notice that some data is missing such as a the cluster offset and
the size of the file, the reason is that this is a deleted file. The following is the
actual file, we can see this time that the file is about 17kbyte long and the offset
cluster is 3. In the boot sector there was an entry called the "root cluster", it's
value was 2, it will always be 2
41
The root cluster is referring to the root directory, so when the cluster offset in
the entry above says 3 it means that it is the cluster after the root directory. Our
root directory is cluster 2 and our file is in cluster 3. The root directory has the
sector address location 16384, since there are 64 sectors per cluster it means that
our file is at sector 16448. You will find there are a great deal of entries relating
to your file even if you have only ever saved one copy, only one of them will be
valid, a disc clean up tool such as a defragmenter will remove these obsolete
entries.
It is the first Sector inside the first Cluster of the file system. The first Cluster
always starts with a Cluster number 2. It is also the very first Data Sector of the
partition. The FS Directory is 32 bytes long and hence there are 16 FS
Directories per FS Directory Sector. The Sector number of the First FS
Directory Sector can be found by using the following equation:
DIR_SECTOR_NUM = No. RESERVED SECTORS + No. FATS + No.
HIDDEN SECTORS
Each FS Directory holds the significant details regarding a single file as shown
in the following Fig. 3.17:
42
Fig. 3.18 illustrates that it is able to read FAT32-formatted files. This
sector read has been discovered to be the final phase of every operation. We can
use the READ_SINGLE_BLOCK command supplied by the SD Command
Layer to read only this one sector from the memory core of the SD card.
sdcard_fat _32_read. V
FAT32 sector cluster counts are expressed by 32 bits. Every cluster is
represented by a 32-bit set. If each cluster consists of 512 bytes, then the sector
will have 128 cluster pointers. This section describes how space is allotted to
files in a FAT32 file system.
The following equation may be used to compute the number of the next cluster
pointer within the FAT32.
Number of sectors of FAT in the next cluster pointer = number of first
sectors in partition + reserved number of sectors + ((clusters of current number
* 4)/bytes per sector).
43
Fig. 3.18 FAT32 Algorithm for reading.
From Fig. 3.19 the yellow-coloured box indicates the cluster that contain
the data for each file in FAT32 and the respective cluster pointers. The red-
44
coloured line shows that the next cluster pointer which matches the present
cluster is being sought, while the green-coloured line shows that the next cluster
is being sought using the cluster thing about having in the FAT32 clusters
pointer.
45
Fig. 3.20 Block Diagram of Coding layers in FPGA
The FPGA read and writes data using the File System Layer. The File
System Layer interacts with the SD Commands layer using
READ_SINGLE_BLOCK command only. The SD Commands Layer interacts
with the Serial Interface Layer using SPI transmission and SPI reception
function calls. The entire FPGA system interacts with the SD card using the SPI
bus interface.
Function pointers have been used for the interaction between different
layers effectively. Structures and dynamic memory allocation has been used to
store and access 512 bytes of data each time.
46
CHAPTER 4
SOFTWARE DESIGN
Xilinx 14.7 is a software tool used for programming, designing, and
testing FPGAs (Field Programmable Gate Arrays) and SoCs (System on Chips).
The software is produced by Xilinx, a leading provider of FPGAs and
programmable devices. Xilinx 14.7 software has a user-friendly interface that
allows designers to easily create and configure their designs. One of the key
features of Xilinx 14.7 is the Integrated Design Environment (IDE), which
provides a comprehensive platform for designing, testing, and debugging
FPGAs and SoCs. The IDE includes tools such as a synthesis engine, place-and-
route algorithms, and a timing analyzer, which allow designers to quickly and
efficiently develop complex designs. Another notable feature of Xilinx 14.7 is
its support for a wide range of FPGAs and SoCs, including the Zynq-7000 and
the Virtex-7 families. This allows designers to choose the device that best suits
their application requirements and ensures that their designs can be easily
migrated to newer devices as they become available. Xilinx 14.7 also includes a
range of IP (Intellectual Property) cores that can be used to accelerate the
development of FPGA and SoC designs. These cores include digital signal
processing (DSP) blocks, memory controllers, and Ethernet and USB interfaces,
among others. The use of IP cores can significantly reduce design time and
complexity, allowing designers to focus on the unique aspects of their
application. Finally, Xilinx 14.7 includes extensive documentation and support
resources, including online tutorials, user guides, and a community forum. This
ensures that designers can quickly and easily get up to speed with the software
and obtain help if they encounter any issues.
47
CHAPTER 5
RESULTS
Existing Method
48
CHAPTER 6
CONCLUSION
49
REFERENCE
50
[6] Ismail, S.M.; Rahman, A.B.M.S.; Islam, F.T., "Low power design of
Johnson Counter using clock gating," Computer and Information Technology
(ICCIT), 2012 15th International Conference, pp. 510, 517, 22-24 Dec. 2012.
[8] Ortega, C.; Tse, J.; Manohar, R., "Static Power Reduction Techniques for
Asynchronous Circuits," Asynchronous Circuits and Systems (ASYNC), 2010
IEEE Symposium on, pp. 52-61, 3-6 May 2010.
[9] Yanjun Zhang; Chunli Yi; Jinqi Wang; Jinye Zhang, "Asynchronous
FIFO implementation using FPGA," Electronics and Optoelectronics (ICEOE),
2011 International Conference on, Vol. 3, pp. V3-207, V3-209, 29-31 July
2011.
[10] Xinrui Zhang; Jian Wang; Yuan Wang; Dan Chen; Jinmei Lai, "BRAM-
based asynchronous FIFO in FPGA with optimized cycle latency," Solid-State
and Integrated Circuit Technology (ICSICT), 2012 IEEE 11th International
Conference on, pp. 1-3, Oct. 29 2012-Nov. 2012.
51
[12] X Xie and C. Wu, "WPU: A FPGA-based Scalable Efficient and
Software/Hardware Co-design Deep Neural Network Inference Acceleration
Processor[C]", 2021 International Conference on High Performance Big Data
and Intelligent Systems (HPBD&IS), pp. 1-5, 2021.
[13] Liu Bing et al., "An FPGA-based CNN accelerator integrating depthwise
separable convolution", Electronics 8.3, pp. 281, 2019.
[18] H Meng, T Yan, F Yuan et al., "Speech emotion recognition from 3D log-
mel spectrograms with deep learning network[J]", IEEE access, vol. 7, pp.
125868-125881, 2019.
52
[19] Schuller Bj, "Speech emotion recognition: Two decades in a nutshell
benchmarks and ongoing trends", Communications of the ACM 61, vol. 5, pp.
90-99, 2018.
[20] K Guo, L Sui, J Qiu et al., "Angel-eye: A complete design flow for
mapping CNN onto embedded FPGA[J]", IEEE transactions on computer-
aided design of integrated circuits and systems, vol. 37, no. 1, pp. 35-47, 2017.
53
[25] F. Devic, L. Torres and B. Badrignans, "Securing Boot of an Embedded
Linux on FPGA", Parallel and Distributed Processing Workshops and Phd
Forum (IPDPSW) 2011 IEEE International Symposium on, pp. 189-195, 2011.
[27] Gul Munir Ujjan, Abdul Malik, Mohd Zaid Abdullah, Shakil Ahmed,
“Implementation of 4-bit data transmission for accessing SD card with FPGA
Embedded Soft Processor;” ICIIT '19, February 20–23, 2019, DaNang, Viet
Nam.
[29] Jiayi Qiang, Yong Gu and Guochu Chen, “FPGA Implementation of SPI
Bus Communication Based on State Machine Method,” Journal of Physics:
Conference Series 1449 012027, 2020.
[31] Zhenlin LU, Jingjiao LI, Yao Zhang. 2010. The Reading/Writing SD
Card System Based on FPGA. 2010 First International Conference on
54
Pervasive Computing Signal Processing and Applications (PCSPA), pp. 419-
422.
[34] P.J. Oliver, J. urto, B. Diego, M. Ramos and B Eduardo, "Clock gating
and clock enable for FPGA power reduction", Programmable Logic (SPL) 2012
VIII Southern Conference on, pp. 1-5, 2012.
[36] Yansi Yang, Yingyun Yang, Lipi Niu, Huabing Wang and Bo Liu,
"Hardware system design of SD card reader and image processor on FPGA,"
2011 IEEE International Conference on Information and Automation,
Shenzhen, 2011, pp. 577-580.
55
[38] V. Asanza, A. Constantine, S. Valarezo and E. Peláez, "Implementation of
a Classification System of EEG Signals Based on FPGA," 2020 Seventh
International Conference on eDemocracy & eGovernment (ICEDEG), Buenos
Aires, Argentina, 2020, pp. 87-92.
56