28
THE DESIGN OF 16 X 1 ARRAY PHOTON COUNTING CIRCUIT WITH BRENT-KUNG ADDER OPTIMZATION ABUBAKAR MOHAMMED NDOTTIWA A project reportsubmitted in partial fulfilment of the Requirements for the award of the degree of Master of Engineering (Computer and Microelectronics System) School of Electrical Engineering Faculty of Engineering Universiti Teknologi Malaysia JANUARY 2020

ABUBAKAR MOHAMMED NDOTTIWA

  • Upload
    others

  • View
    6

  • Download
    1

Embed Size (px)

Citation preview

Page 1: ABUBAKAR MOHAMMED NDOTTIWA

THE DESIGN OF 16 X 1 ARRAY PHOTON COUNTING CIRCUIT WITH

BRENT-KUNG ADDER OPTIMZATION

ABUBAKAR MOHAMMED NDOTTIWA

A project reportsubmitted in partial fulfilment of the

Requirements for the award of the degree of

Master of Engineering (Computer and Microelectronics System)

School of Electrical Engineering

Faculty of Engineering

Universiti Teknologi Malaysia

JANUARY 2020

Page 2: ABUBAKAR MOHAMMED NDOTTIWA

iv

DEDICATION

This thesis is dedicated to my father Ndottiwa Ngari, who taught me that the

best kind of knowledge to have is that which is learned for its own sake. It is also

dedicated to my mother Adji Abba, who taught me that even the largest task can be

accomplished if it is done one step at a time.

Page 3: ABUBAKAR MOHAMMED NDOTTIWA

v

ACKNOWLEDGEMENT

In preparing this thesis, I was in contact with many people, researchers,

academicians, and practitioners. They have contributed towards my understanding

and thoughts. In particular, I wish to express my sincere appreciation to my main

thesis supervisor, Dr. Suhaila Binti Isaak, for the encouragement, guidance, critics,

advice and motivation that are given to me during the course of my study. I am also

very grateful to all lecturers in the Department of Computer and Microelectronics

System and the entire staff of University Teknologi Malaysia for their guidance and

support are given to me. Without their continued support and interest, this thesis

would not have been the same as presented here.

I am also express my indebted gratitude to the Management staff of

Adamawa State Polytechnic Yola (ASPY) particularly Prof. Ibrahim. (Rector).

Another that needs to be mentioned is Prof. Bobboi Umar (former Rector), for

making it possible to benefit from oversea sponsorship through tetfund.

My fellow postgraduate students should also be recognized for their support.

My sincere appreciation also extends to all my colleagues and all those who have

provided assistance at various occasions. Their views and tips are useful indeed.

Unfortunately, it is not possible to list all of them in this limited space. I am grateful

to all my family member especially; my father Ndottiwa Ngari, my mother Adji

Abba, my step mother Aisha Ibrahim, my uncles; Alh. Husseini Usman, Alh. Hamma

Usman, Alh. Bakura Usman, and Salihu Ngari, my aunties Goggore Ngari, Dudu

Usman, and Adda-manga Usman, my Brothers and Sisters Abba Ndottiwa, Aliyu A.

Siddiki, Hamma Abba-adji, Engr. Abana Hamma, Arch. B. Bukura, Awwal Usman,

Saddik Husseini, and also to my wife Ummi Abubakar, and my children Aisha

Abubakar, Abdurrahman Abubakar.

Page 4: ABUBAKAR MOHAMMED NDOTTIWA

vi

ABSTRACT

Farming involves sequence and processes of cultivating crops; among others

are bush clearing, irrigation, and soil testing. The soil testing carried out manually by

dissolving chemical reagent to form a color, then compared with a color chart is time

consuming and error prone without quantitative value. Subsequent systems comprise

spectrophotometer, general packet radio service (GPRS), artificial neural network

(ANN), and raspberry pi based are expensive and slow. Another system has been

developed based on field programmable gate array (FPGA) with capability to test

one sample at a time. FPGA supports parallel computing, but it depends on the

program written to synthesize the hardware. To tap this advantage, this study

developed a design of FPGA based photon counting system, using 16 bits parallel

adder (Brent Kung) algorithm. The developed system comprises 16 bits buffer, 16

bits adder, 16 bits parallel input serial output (PISO), and the clock divider circuit.

The incoming signal stored in buffer and passed to parallel adder. The parallel adder

passes the result to PISO and the clock divider was used to control the counting. The

main advantage of the method is speed, the algorithm allows parallel computation,

such that, it will be easily implemented in low cost FPGA module. The speed of the

adder was achieved by making FPGA operate in parallel mode. To test the

effectiveness of the proposed method, Verilog hardware description language was

used to synthesize through Vivado suite by Xilinx and simulated under different

condition by changing the samples signal with various degree of frequency. It was

further verified with Synopsys. The superiority of the proposed method over the

conventional is high frequency of 625 MHz in FPGA, 1190 MHz for Brent Kung

integrated circuit (IC) and 1639 MHz for two stage pipeline Brent Kung integrated

circuit with low power of 2 mW in gate levels. It is envisioning that the proposed

method will be very useful in the implementation of high performance, low cost for

not only soil nutrient measurement, but also for transforming other serial system to

parallel system.

Page 5: ABUBAKAR MOHAMMED NDOTTIWA

vii

ABSTRAK

Perladangan melibatkan urutan dan proses-proses menanam tanaman; antara

prosesnya adalah membersihkan belukar, pengairan, dan pengujian tanah. Pengujian

tanah yang dijalankan secara manual dengan melarutkan reagen kimia untuk

menghasilkan warna, yang kemudian dibandingkan dengan carta warna adalah

memakan masa dan cenderung berlaku ralat tanpa nilai kuantitatif. Sistem-sistem

seterusnya terdiri daripada spektrofotometer, perkhidmatan radio paket umum

(GPRS), rangkaian neural tiruan (ANN), dan pangkalan Pi raspberi adalah mahal dan

lambat. Sistem lain telah dibina berdasarkan tatasusunan get boleh atur lapangan

(FPGA) dengan keupayaan untuk menguji satu sampel pada satu masa. FGPA

menyokong pengkomputeran selari tetapi ia bergantung kepada program yang ditulis

untuk membina perkakasan. Bagi mencungkil kelebihannya, kajian ini

membangunkan reka bentuk sistem pengukuran foton berasaskan FGPA

menggunakan algoritma penambah selari 16 bit (Brent Kung). Sistem yang

dibangunkan mengandungi penimbal 16 bit, penambah 16 bit, output bersiri input

selari (PISO) 16 bit, dan litar pembahagi jam. Isyarat masuk disimpan dalam

penimbal dipindahkan ke penambah selari. Penambah selari memindahkan keputusan

ke PISO dan pembahagi jam digunakan untuk mengawal kiraan. Kelebihan utama

kaedah ini ialah kelajuan, algoritma membenarkan pengkomputeran selari, dengan

itu ia mudah dilaksanakan dalam modul FPGA berkos rendah. Kelajuan penambah

dicapai dengan membuatkan FGPA beroperasi dalam mod selari. Bagi menguji

keberkesanan kaedah yang dicadangkan, bahasa pemerian perkakas Verilog

digunakan untuk mensintesis melalui suit Vivado oleh Xilinx dan disimulasikan di

bawah beberapa keadaan dengan mengubah isyarat sampel dengan pelbagai darjah

frekuensi. Ia kemudian disahkan dengan Synopsys. Keunggulan kaedah dicadangkan

berbanding kaedah konvensional ialah frekuensi tinggi pada 625 MHz dalam FPGA

dan 1190 MHz bagi litar bersepadu (IC) Brent Kung dan 1639 MHz bagi talian paip

dua peringkat litar bersepadu (IC) Brent Kung dengan kuasa serendah 2 mW pada

tahap get. Kaedah dicadangkan ini dijangka menjadi sangat berguna dalam

pelaksanaan bukan hanya pengukuran nutrien tanah prestasi tinggi dan kos rendah

tetapi juga untuk mengubah sistem bersiri lain kepada sistem selari.

Page 6: ABUBAKAR MOHAMMED NDOTTIWA

ix

TABLE OF CONTENTS

TITLE PAGE

DECLARATION iii

DEDICATION iv

ACKNOWLEDGEMENT v

ABSTRACT vi

ABSTRAK vii

TABLE OF CONTENTS ix

LIST OF TABLES xiv

LIST OF FIGURES xv

LIST OF ABBREVIATIONS xviii

LIST OF SYMBOLS xix

CHAPTER 1 INTRODUCTION 1

1.1 Introduction 1

1.2 Problem Statement 5

1.3 Research Objectives 6

1.4 Research Scope 6

1.4.1 Advantages of optical sensors over

conventional sensors 8

1.5 Project Report Outline 8

CHAPTER 2 LITERATURE REVIEW 11

2.1 Introduction 11

2.1 Brief Overview of soil Nutrients Measurements 11

2.2 Sensors 12

2.2.1 Location sensors 13

2.2.2 Airflow sensors 13

2.2.3 Electrochemical sensors 14

2.2.4 Mechanical sensors 15

Page 7: ABUBAKAR MOHAMMED NDOTTIWA

x

2.2.5 Dielectric Soil Moisture Sensors 16

2.2.6 Optical sensors 17

2.2.6.1 A photodetector (PD) 17

2.2.7 Deadtime 18

2.3 FPGA 19

2.3.1 Architecture of FPGA 20

2.3.2 The following are the advantages and

disadvantages of Arduino and FPGA 22

2.3.3 Disadvantages of Arduino raspberry 22

2.3.4 Advantages of FPGA 22

2.3.5 Disadvantage of FPGA 23

2.3.6 Application of FPGA 23

2.4 Adders overview 23

2.4.1 Ripple carry adder 24

2.4.2 Carry select adder (CSA) 24

2.4.3 Carry Look ahead adder (CLA) 25

2.4.4 Parallel prefix Adder (PPA) 25

2.5 Research Gap 26

2.6 Brent Kung adder 28

2.6.1 Pre-processing computation step 28

2.6.2 Carry generation steps 28

2.6.3 Post-processing step 29

CHAPTER 3 RESEARCH METHODOLOGY 31

3.1 Introduction 31

3.1.1 Project research flow 31

3.2 Methods 32

3.2.1 16-bits buffer RTL circuit 33

3.2.2 Clock Divider RTL circuit 35

3.2.3 Brent Kung adder RTL circuit 36

3.2.3.1 Preprocessing step 36

3.2.3.2 Carry generation step 36

3.2.3.3 Post-processing step 37

Page 8: ABUBAKAR MOHAMMED NDOTTIWA

xi

3.2.4 The complete system of Brent Kung adder 40

3.3 Chapter Summary 40

CHAPTER 4 RESULT AND DISCUSSION 41

4.1 Introduction 41

4.2 16 X 1 Array photon-counting circuit Vivado 2018-3

RTL Synthesis results 42

4.2.1 16-bits Buffer Vivado 2018-3 RTL Synthesis 42

4.2.1.1 16-bits Buffer Vivado 2018-3 RTL

Synthesis Results 43

4.2.1.2 16-bits buffer Vivado 2018-3 RTL

timing results 44

4.2.1.3 16-bits Buffer Vivado 2018-3 RTL

frequency results 45

4.2.1.4 16-bits Buffer Vivado 2018-3 RTL

Power Results 45

4.2.2 Brent Kung adder 46

4.2.2.1 16 -bits Brent Kung adder Vivado

2018-3 synthesis 46

4.2.2.2 16-bits Brent Kung adder Vivado

2018-3 RTL post-synthesis Results 47

4.2.2.3 16-bits Brent Kung adder Vivado

2018-3 RTL post-synthesis timing

results 48

4.2.2.4 16-bits Brent Kung adder Vivado

2018-3 RTL post-synthesis

frequency results 49

4.2.2.5 16-bits Brent Kung adder Vivado

2018-3 RTL post-synthesis power

results 50

4.2.3 16-bits PISO Vivado 2018-3 RTL post-

synthesis Results 51

4.2.3.1 16-bits PISO Vivado 2018-3 RTL

synthesis results 51

4.2.3.2 16-bits PISO Vivado 2018-3 RTL

timing results 53

4.2.3.3 16-bits PISO Vivado 2018-3 RTL

frequency results 53

Page 9: ABUBAKAR MOHAMMED NDOTTIWA

xii

4.2.3.4 16-bits PISO Vivado 2018-3 RTL

power results 54

4.2.4 Clock Divider Vivado 2018-3 RTL post-

synthesis results 55

4.2.4.1 Clock divider Vivado 2018-3 RTL

synthesis result 55

4.2.4.2 Clock divider Vivado 2018-3 RTL

Timing result 56

4.2.4.3 Clock divider Vivado 2018-3 RTL

frequency result 56

4.2.4.4 Clock Divider Vivado 2018-3 RTL

Power result 57

4.2.5 A full system of Brent Kung adder photon-

counting Vivado 2018-3 RTL post-synthesis

result 58

4.2.5.1 A full system of photon counting

Vivado 2018-3 RTL synthesis result 58

4.2.5.2 A full system of Brent Kung adder

photon-counting Vivado 2018-3

RTL timing result 60

4.2.5.3 The full system of photon counting

Vivado 2018-3 RTL frequency

result 60

4.2.5.4 The full system of photon counting

Vivado 2018-3 RTL power result 61

4.2.5.5 The full system of Brent photon-

counting Vivado 2018-3 RTL

resource utilization result 62

4.3 Result Analysis 63

4.3.1 Analysis of Brent Kung system photon-

counting design in Vivado 2013-3 63

4.3.2 Analysis of integrated circuits system design

in Synopsys 66

4.3.3 Comparison between FPGA and Integrated

Circuit of the proposed design 69

4.3.4 Comparison between FPGA and IC of the

proposed and previous design 71

4.4 Summary of the chapter 73

Page 10: ABUBAKAR MOHAMMED NDOTTIWA

xiii

CHAPTER 5 CONCLUSION AND RECOMMENDATIONS 75

5.1 Research Outcomes 75

5.2 Contributions to Knowledge 75

5.3 Future Works 75

REFERENCES 77

Page 11: ABUBAKAR MOHAMMED NDOTTIWA

xiv

LIST OF TABLES

TABLE NO. TITLE PAGE

Table 2.1 Research gap analysis for adders 27

Table 4.1 Parameters for photon counting System using Vivado 62

Table 4.2 FPGA Brent Kung adder system Parameters 64

Table 4.3 Brent Kung system gate level parameters 66

Table 4.4 Two stage pipelined Brent Kung system gate level

parameters I 66

Table 4.5 Two stage pipelined Brent Kung system gate level

parameters II 66

Page 12: ABUBAKAR MOHAMMED NDOTTIWA

xv

LIST OF FIGURES

FIGURE NO. TITLE PAGE

Figure 1.1 Block diagram of the proposed system 5

Figure 1.2 Block diagram of the proposed system 7

Figure 2.1 Three distances based sensor for Position estimation [9] 13

Figure 2.2 Airflow sensor [11] 14

Figure 2.3 Electrochemical sensor [16] 15

Figure 2.4 Mechanical sensors and actuators [18] 16

Figure 2.5 Dielectric soil moisture measurement using TDR [19] 16

Figure 2.6 Basic FPGA [25] 19

Figure 2.7 FPGA Architecture [25] 21

Figure 2.8 FPGA logic block [25] 21

Figure 2.9 block diagram of 4-bits RCA [6]. 24

Figure 2.10 4-bits CSA adder block diagram [27] 24

Figure 2.11 4-bits CLA adder block diagram 25

Figure 2.12 8-bits basic PPA block diagram [30] 26

Figure 2.13 Pre-processing step computation. 28

Figure 2.14 Carry Generation step components [29]. 29

Figure 2.15 16-bits Brent Kung adder block diagram [30]. 30

Figure 3.1 Research flow diagram 32

Figure 3.2 Block diagram of photon counting using FPGA. 33

Figure 3.3 16-bits buffer RTL Schematic diagram 34

Figure 3.4 16-bits buffer RTL Schematic diagram 34

Figure 3.5 Clock Divider RTL schematic 35

Figure 3.6 16-bits Brent Kung adder RTL schematic diagram. 38

Figure 3.7 RTL schematic of CPD OF Brent Kung adder 38

Figure 3.8 Two-stage pipeline 39

Page 13: ABUBAKAR MOHAMMED NDOTTIWA

xvi

Figure 3.9 16-bits PISO RTL schematic diagram 39

Figure 3.10 the complete system of Brent Kung adder for photon

counting 40

Figure 4.1 16-bits buffer post-synthesis Vivado 2018-3 RTL result 43

Figure 4.2 16-bits buffer gate-level results 43

Figure 4.3 16-bits buffer post-synthesis rtl timing report 44

Figure 4.4 16-bits Buffer Vivado 2018-3 RTL timing results 44

Figure 4.5 16-bits Buffer Vivado 2018-3 RTL frequency results 45

Figure 4.6 16-bits Buffer Vivado 2018-3 RTL power results 46

Figure 4.7 Brent Kung adder post-synthesis RTL result 47

Figure 4.8 Brent Kung adder gate-level Synopsys simulation result 48

Figure 4.9 Brent Kung adder post-synthesis timing result 48

Figure 4.10 Brent Kung adder post-synthesis frequency result 49

Figure 4.11 Brent Kung adder with two-stage pipeline frequency result 49

Figure 4.12 Brent Kung adder with power result 50

Figure 4.13 Brent Kung adder with two-stage pipeline power result 51

Figure 4.14 16-bits PISO Vivado 2018-3 RTL synthesis results 52

Figure 4.15 16-bits PISO Vivado 2018-3 RTL synthesis Results 52

Figure 4.16 16-bits PISO Synopsys gate-level simulation results 52

Figure 4.17 16-bits PISO Vivado 2018-3 RTL timing results 53

Figure 4.18 16-bits PISO Vivado 2018-3 RTL frequency Results 54

Figure 4.19 PISO Vivado 2018-3 RTL power results 54

Figure 4.20 Clock Divider Vivado 2018-3 RTL synthesis result 55

Figure 4.21 Clock Divider Synopsys simulation result 55

Figure 4.22 Clock divider Vivado 2018-3 RTL timing result 56

Figure 4.23 Clock divider Vivido 2018-3 RTL frequency result 57

Figure 4.24 Clock Divider Vivado 2018-3 RTL power result 57

Figure 4.25 16-bits Brent Kung adder photon-counting system report 58

Figure 4.26 Full system of photon-counting Vivido 2018-3 RTL

Synthesis result 59

Page 14: ABUBAKAR MOHAMMED NDOTTIWA

xvii

Figure 4.27 Full system of photon-counting Synopsys gate-level result 59

Figure 4.28 Full system of photon counting Vivado 2018-3 RTL

timing result 60

Figure 4.29 Full system of photon counting Vivado 2018-3 RTL

frequency result 61

Figure 4.30 Full photon counting system Vivado 2018-3 RTL power

result 61

Figure 4.31 Resources utilization 63

Figure 4.32 16-bits Brent Kung adder average fan-out 63

Figure 4.33 FPGA WNS versus frequency 65

Figure 4.34 FPGA power versus frequency 65

Figure 4.35 Integrated Circuit gate-level WNS versus frequency 67

Figure 4.36 Integrated Circuit Power versus frequency 67

Figure 4.37 Integrated Circuit WNS versus frequency of PBK 68

Figure 4.38 Integrated Circuit power versus frequency PBK 69

Figure 4.39 Comparison between of WNS of FPGA , Integrated circuit

Brent Kung and Integrated Circuit pipeline Brent Kung

design 70

Figure 4.40 Comparison between of Power of FPGA, Integrated circuit

Brent Kung and Integrated Circuit pipeline Brent Kung

design I 70

Figure 4.41 Comparison of Power Between FPGA, Integrated circuit

Brent Kung and Integrated Circuit pipeline Brent Kung

design II 71

Figure 4.42 Comparison of WNS Between Integrated circuit Brent

Kung and Integrated Circuit pipeline Brent Kung and

previous design [6] 72

Figure 4.43 Comparison of power between Integrated circuit Brent

Kung and Integrated Circuit pipeline Brent Kung and

previous design [6] 72

Figure 4.44 Comparison of Area between Integrated circuit Brent

Kung and Integrated Circuit pipeline Brent Kung and

previous design [6] 73

Page 15: ABUBAKAR MOHAMMED NDOTTIWA

xviii

LIST OF ABBREVIATIONS

BK - Brent-Kung

PPA - Parallel Prefix Adder

PISO - Parallel input Serial output

PBK - Pipeline Brent-kung

WNS - Worse Negative Slack

FPGA - Field Programmable Gate Array

UTM - Universiti Teknologi Malaysia

RTL - Register Transfer Level

FA - Full Adder

CLA - Carry Look Ahead

CSA - Carry Select Adder

KSA - Koggey Stone Adder

TDR - Time Domain Reflectometer

FDR - Frequency Domain reflectometer

ANN - Artificial Neural Network

GPS - Global Positioning System

VCS - Verilog Compiler and Simulator

Page 16: ABUBAKAR MOHAMMED NDOTTIWA

xix

LIST OF SYMBOLS

tD - Death time

f - frequency

TS - Slack Time

TC - Circuit Time

TR - Required Time

FMAX - Maximum Frequency

λ - Wavelength

hc - Photon energy

ΔΕ - Energy Transition

Δtq - Quenching Time

Δtr - Recharging Time

Page 17: ABUBAKAR MOHAMMED NDOTTIWA

CHAPTER 1

INTRODUCTION

1.1 Introduction

Farming involves sequences of steps of preparing the land and the process of

cultivating crops. The farmers do these processes manually, which are very difficult

to carry out. The processes consist of bush clearing, planting, soil testing, fertilizer

application among others. The soil testing is being carried out basically in two broad

categories: the traditional method and the other is by using knowledge of

Engineering, such as Verilog Hardware Description Language (VHDL), which many

agricultural projects are successfully carried out with this knowledge, like irrigation

and many more [1]. Furthermore, there is a need for a soil analysis to determine the

nutrients and their equivalent quantities present in the soil, which aide expert to

recommend the needed amount of fertilizer to complement the deficiency of the

existing amount of nutrients in the soil, for efficient and economical production of

agricultural produce. Even though most soils have a huge amount of nutrients, when

soils are repeatedly used for growing and harvesting crops, nutrients level will

subsequently decrease in the soil. Low nutrients level in the soil leads to several

crops’ disorders and low yield. For a better yield of crop, there is a need to restore

the nutrients to the soil by supplementing it. Therefore, the farmers must add

macronutrients to the soil in the right proportion. Soil macronutrients are essential

nutrients that enhance plant growth in proportion to its level of presence and the

required amount. Macronutrients comprise nitrogen (N), phosphorous (P) and

potassium (K). N aid leaf and stem development and maintain its green colour, P

enhances the root system of the crop for better absorption of water and other

beneficial nutrients, and K helps the crops in producing flowers and fruits. The use of

fertilizer to meet the demand of the crop by utilizing the advantage of the existing

nutrients in the soil is ensured by an appropriate soil test [2]. Additionally, to meet up

with the increasing requirement of the rising population over the years, there must be

Page 18: ABUBAKAR MOHAMMED NDOTTIWA

2

machinery put in place to improve the production of food. There are various sensors

used in the field of agriculture for this purpose, some of the sensors are; global

positioning system (GPS): for Location sensors, optical sensors: can be measure

almost every physical, chemical quantities of interest and electrochemical sensors:

pH and soil nutrient levels, Mechanical sensors: use to measure resistive forces in the

soil, dielectric sensors, Airflow sensors among others.

To increase crop production, fertilizers containing N, P, and K are crucial.

Inappropriate utilization of fertilizers will result in low quality in fruits, vegetables

lagging in colour, size, taste and even amount of the fruits. Moreover, the amount of

recommended N, P, K is related to the type of crop type and status of plant growth.

In addition, the amount of fertilizer to be used is further related to the existing

substances of N, P, K macronutrients in the soil. Therefore, Investigators are looking

for ways to enhance plant productivity while reducing fertilizer intake.

Macronutrients are uniformly varied on a small scale all over a cultivated land;

several researchers are involved in finding ways of evolving sensors to map these

nutrient contents. The spatial and temporal behavior of N, P, K is checked by

integrated crop management systems that were designed for this purpose. To

automate agricultural practice, which will improve drop production, monitoring N, P,

K values alongside the ph. should be continued [2].

Furthermore, farmers used to send the soil sample to the laboratory for

testing, analyzing and get the report back, this type of analysis takes a long time and

the sample is analyzed when it is not fresh. To analyze soil nutrients, specific colours

are produced from the reaction of the chemical reagents with the soil sample for a

particular nutrient. The degree of the presence of nutrient is measured by comparing

against a color chart since this is done manually, it is very slow to take days to

complete the testing, without quantitative values and lead to errors in the report [3,4]

Therefore, there is need to investigate the developed color solution. A

spectrophotometer is applied for this purpose, which is faster. However, the system

of spectrophotometer became complicated and expensive and needs an operator for

proper functioning. The developed of a sensing unit comprises; light emitting diode

(LED), photodiode (PD), microcontroller, analog to digital converter (ADC) and

Page 19: ABUBAKAR MOHAMMED NDOTTIWA

3

general packet radio service (GPRS) modem is reported by Adhikary et. al [3]. The

PD received the light beam, which passes through the soil sample that is generated

from the light source LED; the received light can be used to compute the presence of

the nutrients in the sample. The result from the system shows a little deviation of

about 5 % from the Laboratory result, which is according to the researcher is not

costly to compare to spectrophotometer and does not requires operator [3]. However,

the system is very slow, operates sequentially and requires a network since is a

GPRS based which makes it expensive due to data subscription, the color detected is

in form of red, green and blue (RGB) which gives less accuracy. To solve this

problem, a design was proposed with an architecture of sensing unit based on field

programmable gate array (FPGA) system [4], the system is standalone device which

has similar procedure with another proposed system, with the exception of GPRS,

and instead of computing RGB values directly, the RGB were converted to hue (H)

intensity (I) saturation (S) values [3]. The system gives accurate result compared to

that RGB, but does not operate in real-time and process data serially. Even though,

the macronutrients are the most needed for the purpose of fertilizer application

recommendation, zinc (Zn), magnesium (Mg) and calcium (Ca) are also essential

nutrients for growth of plants and should be involved in the soil nutrients analysis, so

that adequate information on how much specific fertilizer are recommended in a

particular section of crop. A solution to this situation was proposed, by developing a

program that will give soil pH and six different nutrients level. The nutrients are

nitrogen, phosphorous, potassium, zinc, calcium, and magnesium by means of image

processing and artificial neural network through MATLAB. After following the same

procedure of preparing the soil sample. A camera is used to captures the pictures of

the sample for each nutrient, the images are processed through MATLAB, and the

model of training is done with an artificial neural network. The program

implementation was carried out successfully, and a qualitative result was obtained

[5].

Moreover, the artificial neural network requires adequate data training to

obtain an accurate result, the training process often takes longer time and operate

sequentially, since the system is based on microcontroller, which slows down the

operation. The fertilizer recommendation based on the qualitative result of soil

nutrients for specific crops will lead to under or over-application of the fertilizer,

Page 20: ABUBAKAR MOHAMMED NDOTTIWA

4

which is not required. Under the application of fertilizer will lead to plant disorder,

and over-application also amounts to a waste of resources, which should be

discouraged. The processing speed should be enhanced to fast-track the

measurement. The measuring should be improved to handle high-speed parallel data

computation.

To solve this problem, this project is proposed to develop a parallel

processing system that can handle 16 incoming signals from spectroscopy. The 16

signals are represented by digit 0 to 15. To achieve the implementation of the parallel

system, an algorithm and platform that can support parallel processing must be

adapted. Parallel prefix (Brent Kung) adder algorithm and FPGA respectively is

proposed. 16-bit high speed-processing unit based on FPGA, which is incorporated

in spectroscopy. The spectroscopy system comprises a light source that generates

light, which is dispersed through monochrome, the optical fiber is used for

propagating the light source to a cuvette containing a solution. The solution absorbed

some of the light, the absorbance level depends on the concentration of ions in the

solution. In addition, some light passed through the solution to the detector where the

light energy will be detected and converted to current by photodetector. The weak

current is amplified, through the amplify and converted voltage. The analog voltage

is converted to a digital voltage by analog to digital converter, which sends the signal

to FPGA for processing and counting, the block diagram is presented in Figure 1.1.

The FPGA module consists 16-bits buffer that is used to synchronize the

unsynchronized incoming signal from the spectroscopy, which is asynchronous. The

Brent Kung adder is served as the counter of the signals. A clock divider is used to

maintain the appropriate timing for the circuit to operate correctly. The PISO is used

to convert the parallel signal to serial. Both buffer and PISO are registers, that is,

they are synchronous system, the clock divider is used to ascertain the data integrity

at the output of the PISO which is shown in Figure 1.2.

Page 21: ABUBAKAR MOHAMMED NDOTTIWA

5

Spectroscopy

Optical

fiber

Display

FilterAmplifier

A/D

converter

Vin

GND

Vref

B1

B8

Sign

ENB

A/D Converter

FPGA

MODULE

A

12.45

Cuvette

Solution

Light

Source

Photodiode

Figure 1.1 Block diagram of the proposed system

1.2 Problem Statement

The overuse or underuse of fertilizer in the farmyard due to inadequate

information regarding the presence of nutrients and their corresponding levels should

be discouraged.

To analyze soil macronutrients, specific colors are produced from the reaction

of the chemical reagents with the soil sample for a particular nutrient. The degree of

the presence of nutrients is measured by comparing it against a color chart, which

will lead to error and time-consuming. A complicated spectrophotometer is applied

for this purpose. However, the system of spectrophotometer needs operator for

proper functioning. Another system was developed based on FPGA which can test

one sample at a time [5]. Furthermore, a photon counting system was developed

Page 22: ABUBAKAR MOHAMMED NDOTTIWA

6

based on 16 bits Kogge Stone adder by applying FPGA [6]. The system has high

speed with a large area which leads to higher power consumption.

Therefore, there is a needs to utilize the advantages of parallel computing

supported by FPGA, to design a new system that will fully support parallel operation

and exploit those advantages, by applying Brent Kung adder which has a low area

and consequently will lead to lower power consumption.

1.3 Research Objectives

The aim of this project is to develop a high-speed real-time photon counting

using FPGA that will operate parallel. Besides this, the analysis of the performance

of photon counting will be conducted by adapting Brent Kung adder method. In

addition, to analyses the performance of real-time photon counting by using FPGA

with various dead time tD. In other words, the objective can be summarized as

follows:

i. To develop a real-time photon-counting simulation in Xilinx Vivado

Environment using FPGA

ii. To perform analysis of photon counting by adapting Brent Kung Adder

method.

iii. To analyse the performance of real-time soil spectroscopy by using FPGA

and Synopsys with various dead time tD.

1.4 Research Scope

Due to the interaction radiation of electromagnetic, light energy with matter,

spectroscopy is very important in identifying compound and its concentration in

solution. In absorbance spectroscopy, the system comprises a light source,

monochrometer, light detectors, and amplifier as presented in Figure 1.1. LED is

used to generate light that illuminates the sample in the cuvette. When the incidence

Page 23: ABUBAKAR MOHAMMED NDOTTIWA

7

light hits the solution, some of the light is been absorbed by the solution, while the

remaining light can be transmitted to the detector (sensor). The photodetector detects

the transmitted light and converts it to current (weak). The current is proportional to

the intensity of light. The detected weak current signal is amplified and converts to

voltage, which then digitizes for the processing in FPGA. The main advantages of

spectroscopy are simple to use and accuracy [7].

Figure 1.2 Block diagram of the proposed system

The design implementation of the photon counting; consists of 16 bits buffer,

16 bits high speed adder, 16 bits Parallel input Serial output as shown in Figure 1.2.

The 16 bits buffer would be used to settle the incoming signal from Spectroscopy to

guarantee consistencies of data. 16 bits high-speed adder (Brent Kung adder) served

as a counter to the incoming signal from the buffer. The PISO is used to serially

arrange the data at the output. The programming language used is Verilog, through

Vivado Xilinx 2018 software version 3, for the synthesis and simulation of the

design. The analysis of the result was performed and benchmarked with the existing

system for the delay, frequency, power consumption and area of the system. The

details of the block diagram of the is illustrated in Chapter 3 Figure 3.2.

Page 24: ABUBAKAR MOHAMMED NDOTTIWA

8

1.4.1 Advantages of optical sensors over conventional sensors

Optical sensors have significant advantages over the non-optical sensors,

based on their properties; some of the advantages are Higher sensitivity, Passiveness

of electric, free from interference of electromagnetic, dynamic range very wide, both

distributed and points configuration, Capabilities of multiplexing. Furthermore, one

can measure almost every physical quantities of interest and very large chemical

quantities with optical sensors. The physical quantities such as Temperature,

Pressure, flow, liquid level, Position (Displacement), vibration, Magnetic field,

Rotation, Radiation, Force, pH values, Acceleration, Acoustic field, Humidity,

Velocity, Strain, Electric field, etc. and chemical species [6]. Moreover, some

researchers used Arduino/ raspberry pi while other researchers used FPGA.

1.5 Project Report Outline

There are five chapters in this project report. Chapter 1 introduces the

objectives of the project and defines the scope of the project.

Chapter 2 then covers some basic sharing towards understanding soil

nutrients measurements system operations and their findings. It similarly looks in

brief, some of the implementations of different adders towards achieving high speed

with comparatively low power consumption implementation.

Chapter 3 then reports on the design implementation from the actual flow of

work to some details on the circuits that were implemented for this project.

Chapter 4 discuss the design synthesis and simulating the functionality of the

actual implementation of photon-counting circuit and evaluating the result obtained

from the simulations.

Page 25: ABUBAKAR MOHAMMED NDOTTIWA

9

Chapter 5 focuses on summarizing and drawing a conclusion of the result

obtained from the photon counting circuit and briefly explain the future work that

can be an improvement from this project implementation. To estimate the parameters

Page 26: ABUBAKAR MOHAMMED NDOTTIWA

REFERENCES

[1] Kadu A, Rode S V. VHDL based System for Sensing NPK and PH Values in

Soil and Suggesting Fertilizers for Different Crops. Certif Int J Eng Sci Innov

Technol 2008;9001:2319–5967.

[2] Shylaja, S N;Veena M. Real- T ime Monitoring of Soil Nutrient Analysis u

sing WSN. Int. Conf. Energy, Commun. Data Anal. Soft Comput., IEEE;

2017, p. 3059–62.

[3] Adhikary T, Das AK, Razzaque MA, Chowdhury MEH, Parvin S. Test

implementation of a sensor device for measuring soil macronutrients. Proc

2015 Int Conf Netw Syst Secur NSysS 2015 2015.

[4] Ingale V, Vaidya R, Phad A, Shingare P. A sensor device for measuring soil

macronutrient proportion using FPGA. Int. Conf. Commun. Signal Process.

ICCSP 2016, India: IEEE; 2016, p. 715–8.

[5] Puno JC, Sybingco E, Dadios E, Valenzuela I, Cuello J. Determination of soil

nutrients and pH level using image processing and artificial neural network.

HNICEM 2017 - 9th Int. Conf. Humanoid, Nanotechnology, Inf. Technol.

Commun. Control. Environ. Manag., vol. 2018- Janua, IEEE; 2017, p. 1–6.

[6] Kumar NKAR. 16 Bit Counter Data Acquisition Implementation With High

Speed Adder Design Using Verilog. University Teknologi Malysia, 2018.

[7] Farrukh MA. Functionalized Nanomaterials. 2016.

[8] elprocus. Know All About Light Sensor Circuit n.d.

[9] Global Positioning System - Google Search n.d.

https://www.google.com/search?q=Global+Positioning+System (accessed

December 29, 2019).

[10] Schriber S. Smart Agriculture Sensors: Helping Small Farmers and Positively

Impacting Global Issues, Too. Mouser Electron n.d.

https://www.mouser.ph/applications/smart-agriculture-sensors/.

[11] ResearchGate n.d. https://www.researchgate.net/figure/Block-diagram-for-

controlling-the-flow-of-drying-air_fig1_266501804/download (accessed

December 29, 2019).

[12] Cao S, Chen J, Sheng W, Wu W, Zhao Z, Long F. The Fabrication and

Page 27: ABUBAKAR MOHAMMED NDOTTIWA

78

Development of Molecularly Imprinted Polymer-based Sensors for

Environmental Application. Elsevier B.V.; 2012.

[13] Tan J, Yan XP. Discrimination of Analytes with Fluorescent Molecular

Imprinting Sensor Arrays. Elsevier B.V.; 2012.

[14] Warudkar G, Dorle S. Review on sensing the fertility characteristics of

agriculture soils. 2016 Int. Conf. Inf. Commun. Embed. Syst. ICICES 2016,

IEEE; 2016.

[15] Klusáčková M, Nesměrák K. Significant electrochemical sensors for ethylene

and propylene: the state-of-the-art. Monatshefte Fur Chemie 2018;149:1503–

13.

[16] electrochemical sensor - Google Search n.d.

https://www.google.com/search?q=electrochemical+sensor (accessed

December 29, 2019).

[17] Allwood JM, Tekkaya AE. Writing a review paper. J Mater Process Technol

2012;212:1–2.

[18] Pasquale M. Mechanical sensors and actuators. Sensors Actuators, A Phys

2003;106:142–8.

[19] Susha Lekshmi SU, Singh DN, Shojaei Baghini M. A critical review of soil

moisture measurement. Meas J Int Meas Confed 2014;54:92–105.

[20] Hane K, Sasaki M. Optical Sensors and Their Applications 2002;1:60–8.

[21] S. M. Sze kwok k. ng. Physics of Semiconductor Devices Third Edition. n.d.

[22] Isaak S, Bahador SNB. A Linear Array passively quenched Single Photon

Avalanche Diode. 2015 IEEE Student Conf Res Dev SCOReD 2015

2015:441–6.

[23] Bahador N, Hamid FKA, Hamzah A, Isaak S, Ismail R. Improved dead time

response for Si Avalanche Photodiode. 2012 10th IEEE Int Conf Semicond

Electron ICSE 2012 - Proc 2012:396–8.

[24] Fpga altera Board Vs Micro Controllerarduino n.d.

https://www.reddit.com/r/FPGA/comments (accessed January 28, 2019).

[25] Basics of FPGA Architecture and Applications n.d.

https://www.elprocus.com/fpga-architecture-and-applications/ (accessed

January 28, 2019).

[26] Krishna, T Vamshi; s N mamatha GN. sunil MP. Simulation study of brent

kung adder using cadence tool. Int J Adv Res Ideas Innov Technol

Page 28: ABUBAKAR MOHAMMED NDOTTIWA

79

2018;4:564–72.

[27] Rani MJ, Andal SSS, Kalyani P. Carry Select Adder design using Brent Kung

Adder. Int J Eng Trends Appl – 2017;4:50–3.

[28] Potdukhe PP, Jaiswal VD. Design of high speed carry select adder using brent

kung adder. Int Conf Electr Electron Optim Tech ICEEOT 2016 2016;4:652–

5.

[29] Abidin AZ, Junid SAM Al, Sharif KKM, Othman Z, Haron MA. 4-bit brent

kung parallel prefix adder simulation study using Silvaco EDA tools. Int J

Simul Syst Sci Technol 2012;13:47–55.

[30] Raju A, Patnaik R, Babu RK, Mahato P. Parallel prefix adders-A comparative

study for fastest response. Proc. Int. Conf. Commun. Electron. Syst. ICCES

2016, IEEE; 2016, p. 1–6.

[31] Taj M. Implementation of PPA-Brent Kung Adder For Computing

Application. Int J Res 2017;4:1479–86.

[32] March UG. RTL and Technology Schematic Viewers. vol. 685. 2011.

[33] Rahman AA-HA. Vivado_Timing_Analysis_Tutorial.Pdf 2017.

[34] Xilinx. UG899, I/O adn Clock Planning 2017;899:96.

[35] Krishna TV. Simulation study of brent kung adder using cadence tool. Int J

Adv Res Ideas Innov Technol 2018;4:564–73.

[36] Potdukhe PP, Jaiswal VD. Design of high speed carry select adder using brent

kung adder. Int Conf Electr Electron Optim Tech ICEEOT 2016 2016:652–5.

[37] Durga MV, Deepthi A. Design and implementation of Parallel Prefix Adders

using FPGAs. IOSR J Electron Commun Eng 2013;6:41–8.

[38] Anjana D, Jose J. Design and FPGA Implementation of Optimized Parallel

Prefix Adder. Int J Innov Res Sci Eng Technol 2016;5:12975–85.