Project Report Compilation
Project Report Compilation
Digital-to-Analog Conversion
Submitted by
Swastik Gupta PRN: 2014111045
Rohit Kumar Gupta PRN: 2014111050
Mansi Lal PRN: 2014111076
CERTIFICATE
This is to certify that the Project Stage -II report on ”Digital Duty-Cycle Mod-
ulation Scheme for FPGA-Based Digital-to-Analog Conversion” submitted by
Date:
Place: Pune
Acknowledgements
We would like to express our sincere gratitude to all those who have contributed to
the successful completion of the project ”Digital Duty-Cycle Modulation Scheme for
FPGA-Based Digital-to-Analog Conversion.” First and foremost, we extend our deep-
est appreciation to our project guide Dr. Ajay Kumar Kushwaha, whose invaluable
guidance, expertise, and encouragement were instrumental throughout the project.
We are deeply indebted to Dr. Arundhati A. Shinde (HOD, ECE) & Dr. Shruti Oza
(HOD, ENTC), for their continuous support, guidance, and belief in our abilities.
Additionally, we express our gratitude to Dr. Dhiraj. M. Dhane , our project coordina-
tor, for their exceptional organizational skills and unwavering commitment to ensuring
the project’s success. We are also grateful to our college for providing the necessary
resources, facilities, and financial support that enabled us to undertake this project.
Furthermore, we would like to thank our teachers and peers for their collaboration,
constructive feedback, and assistance at various stages of the project. Their contribu-
tions have enriched our work and facilitated our learning experience.
Finally, we extend our heartfelt thanks to our families and friends for their unwavering
support, understanding, and encouragement throughout this journey.
In conclusion, we acknowledge with gratitude all those who have contributed directly
or indirectly to the realization of this project. Your support and involvement have been
invaluable, and we are truly grateful for the opportunity to undertake this endeavor
endeavor.
Mansi Lal
Rohit Kumar Gupta
Swastik Gupta
i
Contents
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
1 Introduction 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Existing System of Digital-to-Analog Conversion . . . . . . . . . 3
1.2 Motivation for the project . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Problem Being Addressed . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.1 Comparison between major DAC converters . . . . . . . . . . . . 9
1.4 Need Of The Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.1 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2 Literature Review 15
3 Objectives 22
4 Methodology 25
4.1 Methods and Techniques Used . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2 Design Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3 Reason for Chosen Methodologies . . . . . . . . . . . . . . . . . . . . . . 28
ii
5.1 Components Used and its Function . . . . . . . . . . . . . . . . . . . . . . 29
5.2 Design Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.2.1 DDCM design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.2.2 DAC Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.3 Programs and RTL design . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.4 Circuit Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.1 Software Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4.2 Programming Language . . . . . . . . . . . . . . . . . . . . . . . . 51
References 62
iii
List of Figures
1.1 R2R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Binary Weighted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Delta Sigma DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Pipeline Dac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Segmented Dac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
iv
6.5 Waveform For NOT gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.6 Successful Bitstream Generation . . . . . . . . . . . . . . . . . . . . . . . 56
v
List of Tables
vi
List of Abbreviations
vii
Abstract
In project Stage-1 we did the literature survey for The project ”Digital Duty-Cycle
Modulation Scheme for FPGA-Based Digital-to-Analog Conversion” and explored the
implementation of a novel digital-to-analog conversion (DAC) method utilizing Duty-
Cycle Modulation (DDCM) on Field-Programmable Gate Arrays (FPGAs). Through an
extensive literature survey, it was identified that DDCM offers significant advantages
over traditional DAC methods, particularly addressing the limitations of commonly
used techniques such as Delta-Sigma Pulse Width Modulation (DPWM) and Direct
Digital Synthesis Modulation (DDSM). This project aims to leverage the simplicity of
DPWM and the high performance of DDSM architectures to develop a FPGA-based
digital-to-analog converter. By combining these features, the proposed DDCM scheme
promises to overcome the drawbacks associated with existing DAC methods while pro-
viding efficient and accurate analog signal generation. Key objectives include studying
the theoretical foundations of DDCM, designing and implementing the DDCM scheme
on FPGA platforms, and evaluating its performance in terms of signal quality, efficiency,
and versatility. The project aims to contribute to the advancement of digital-to-analog
conversion techniques, particularly in applications requiring precise analog signal gen-
eration with FPGA-based solutions.
Overall, this project seeks to demonstrate the feasibility and effectiveness of DDCM
as a superior DAC method, offering potential applications in diverse fields such as
telecommunications, audio processing, industrial control systems, and more.
viii
Chapter 1
Introduction
1.1 Introduction
1
1.1. Introduction
high-resolution analog output, such as audio synthesis, motor control, and power
management.
The utilization of FPGAs in conjunction with DDCM schemes introduces a novel
paradigm in DAC design. FPGAs offer immense computational power, parallelism,
and reconfigurability, enabling the implementation of complex modulation algorithms
with unprecedented precision and efficiency. Moreover, the inherent flexibility of
FPGAs allows for seamless integration of DDCM schemes into diverse digital systems,
accommodating various design requirements and performance objectives.
The primary objective of this project is to explore the design, implementation, and
evaluation of a Digital Duty-Cycle Modulation Scheme tailored specifically for FPGA-
based DAC architectures. Through comprehensive analysis and experimentation, we
aim to investigate the feasibility, performance characteristics, and practical implications
of integrating DDCM techniques into FPGA-based DAC systems. Specifically, our
research endeavors to:
2
1.1. Introduction
1 Resistor Network DACs (R-2R DAC) :This is one of the most traditional and
widely used DAC architectures. R-2R ladder networks consist of resistors with
specific values connected in a ladder-like structure. Depending on the binary
input code,different combinations of resistors are switched on and off to generate
the desired analog output voltage. R-2R DACs are known for their simplicity,
linearity, and ease of implementation, making them popular for a wide range of
3
1.1. Introduction
applications.
2 Binary-Weighted DAC : This type of DAC employs resistor networks with weights
that are binary multiples of each other. The digital input bits determine which
resistors are activated, and their contributions are summed to produce the analog
output voltage. While this approach provides high-speed operation, it is sensitive
to resistor matching and tends to have reduced resolution for large input bit
widths.
4
1.1. Introduction
known for their exceptional linearity and low noise performance. However, they
require complex digital signal processing and filtering, making them suitable for
specific applications like audio converters and sensors where high precision is
essential.
4 Pipeline DAC : Pipeline DACs are often used in high-speed applications, such
as data communication and wireless transmission. They consist of multiple
stages,each contributing a portion of the overall analog output. The pipeline
architecture allows for parallel processing, resulting in faster conversion rates,
but it may come at the cost of power consumption and complexity.
6 Segmented DACs : Segmented DACs break down the conversion process into
smaller segments, allowing for optimized performance in different sections of
5
1.2. Motivation for the project
the analog output range. This can result in improved linearity and reduced
complexity.
7 Delta Pulse Width Modulation DAC : Delta Pulse Width Modulation (DPWM)
is a DAC technique where the width of output pulses is adjusted based on the
difference (delta) between the input digital signal and the reconstructed analog
signal. By quantizing and modulating this delta error, DPWM DACs aim to
minimize distortion and improve linearity. This approach allows for high fidelity
and accuracy in DAC operation, making it suitable for applications like audio
processing and control systems.
6
1.2. Motivation for the project
DSDM architecture is intricate, standard DPWM schemes suffer from low resolution
and a broad spectrum. These drawbacks have spurred the creation of a DDCM-based
DAC utilizing a Fast Fourier Series (FFS) approach. Yet, the FFS algorithm’s primary
limitation lies in its iterative calculations involving nonlinear functions within each
oversampling period. Consequently, even with a 20 MHz processor and simplified
modulation models, the input bandwidth is restricted to less than 200 Hz.
The motivation behind embarking on the exploration and development of a Digital
Duty-Cycle Modulation Scheme for FPGA-Based Digital-to-Analog Conversion stems
from several key factors driving innovation and advancement in the field of digital
signal processing and embedded systems.
7
1.3. Problem Being Addressed
exploration into the integration of DDCM schemes into FPGA-based DAC archi-
tectures.
8
1.4. Need Of The Project
The need for the project ”Digital Duty-Cycle Modulation Scheme for FPGA-Based
Digital-to-Analog Conversion” arises from several critical factors:
9
1.4. Need Of The Project
1.4.1 Applications
• DDCM-based FPGA DACs can generate precise analog signals with low
distortion, enhancing signal integrity and improving communication range
and reliability.
10
1.4. Need Of The Project
• DDCM-based FPGA DACs can deliver the resolution and accuracy required
for precise speed and position control, improving system efficiency and
performance.
• By generating smooth and accurate control signals, DDCM DACs can en-
hance the precision and responsiveness of motorized systems, leading to
smoother operation, reduced energy consumption, and increased produc-
tivity.
11
1.4. Need Of The Project
• By improving signal fidelity and reducing noise and distortion, DDCM DACs
contribute to the development of advanced medical imaging technologies for
early disease detection, treatment monitoring, and patient care.
• DDCM-based FPGA DACs can provide accurate control signals for control-
ling engine parameters, actuating vehicle components, and implementing
safety features such as collision avoidance and adaptive cruise control.
• DDCM-based FPGA DACs can provide accurate control signals for control-
ling aircraft systems, guiding spacecraft, and transmitting telemetry and
command signals.
12
1.4. Need Of The Project
• The high resolution and low distortion characteristics of DDCM DACs en-
sure accurate and reliable measurements in various applications, including
scientific research, electronic testing, and metrology.
• DDCM-based FPGA DACs can deliver the resolution and accuracy required
for controlling industrial processes, regulating equipment operation, and
implementing safety interlocks.
• By improving signal fidelity and reducing distortion and noise, DDCM DACs
enhance the performance and reliability of telecommunications and net-
working equipment, enabling seamless connectivity and data transfer in
wired and wireless networks.
13
1.4. Need Of The Project
• By enhancing signal fidelity and reducing artifacts such as noise and crosstalk,
DDCM DACs improve the overall user experience and enjoyment of multi-
media content, enabling immersive and engaging entertainment experiences
for consumers.
14
Chapter 2
Literature Review
The paper titled ”Design and analysis of FPGA based high-resolution digital
pulse width modulators technique for DC-DC converters” by Dr. K. Umadevi
and Mr. R. Karthikeyan’s [1] research in digital control architectures for power
converters marks a notable shift towards FPGA-based solutions, showcasing ad-
vancements in sensorless motor drives and interleaved boost converters. These
studies underscore the significance of accurate control strategies in enhancing ef-
ficiency and performance in power electronics applications. While the adoption
of FPGA-based solutions in digital control architectures demonstrates promising
outcomes, there remains a gap in the optimal utilization of FPGA resources and
the integration of advanced control algorithms. Existing literature predominantly
focuses on theoretical analyses and simulation studies, lacking substantial exper-
imental validation in practical applications. Addressing these gaps is crucial for
furthering the field of digital power electronics and facilitating the development
of more efficient and reliable power converter systems.
The paper titled ”Design and Implementation of FPGA based High Resolu-
tion Digital Pulse Width Modulator ” by Sabarinath.V and K. Sivanandam’s
[2]research underscores recent strides in digital control, particularly the prevalent
use of digital pulse width modulators (DPWMs) within power electronics sys-
tems. These modulators are pivotal, as their resolution significantly influences
15
system performance. Previous studies have delved into various architectures and
techniques to bolster DPWM resolution, with the overarching goal of enhancing
system efficiency and precision. Despite advancements, gaps persist in current
understanding and solutions. One primary challenge is striking a balance be-
tween achieving higher resolution and minimizing implementation complexity
and FPGA resource utilization. While some architectures offer superior resolu-
tion, they often demand substantial FPGA resources or intricate designs, con-
straining their practical applicability. Additionally, there’s a need for thorough
comparisons between different DPWM architectures to accurately gauge their
performance across diverse operating conditions.
The paper ”A Low Cost and High Quality Duty-Cycle Modulation Scheme and
16
Applications” byB. Lonla Moffo, J. Mbihi, L. Nneme Nneme[4] discusses research
in duty-cycle modulation (DCM) has garnered attention due to its potential ad-
vantages over standard pulse width modulation (PWM) techniques. This study
provides a detailed examination and comparison of a low-cost duty-cycle modu-
lation scheme with conventional PWM techniques. Through analytical reasoning
and electronics simulation, it demonstrates that the proposed DCM scheme offers
superior characteristics under similar operating conditions compared to standard
PWM methods. Notably, the simulation results suggest that DCM holds promise
as a high-quality control policy applicable across various domains, including
A/D and D/A conversion, signal transmission, and power electronics switching
control. Despite the widespread use of PWM techniques, particularly in power
control electronics and instrumentation engineering, this paper aims to highlight
the attractive features of DCM compared to PWM weaknesses. By presenting a
thorough architectural comparison between DCM and standard PWM schemes,
it sheds light on the hardware complexity, frequency analysis, and performance
characteristics of each modulation technique. Furthermore, the study explores
various application areas, including A/D and D/A conversion, power converter
control, and signal transmission, to assess the practical viability of DCM. How-
ever, while showcasing the potential of DCM, the paper also indicates areas for
further exploration, particularly in extending DCM techniques to control other
types of switching DC-DC power converters and developing FPGA-based em-
bedded DCM devices and drivers.
17
Techniques such as bus splitting, error masking, and hardware reduction have
been proposed and evaluated for their effectiveness in optimizing modulator per-
formance. Despite significant progress in architectural design and performance
improvement techniques, there are still gaps in the existing knowledge and so-
lutions. One area that warrants further exploration is the integration of these
techniques with emerging technologies such as deep learning and neuromorphic
computing to develop more efficient and adaptable Sigma Delta modulators.
Additionally, there is a need for research focusing on the robustness and reli-
ability of these modulators in real-world applications, particularly in scenarios
with varying environmental conditions and stringent performance requirements.
Moreover, the development of standardized benchmarking methods and evalu-
ation criteria would facilitate comparative studies and promote the adoption of
best practices in Sigma Delta modulator design and implementation. Addressing
these gaps will contribute to the advancement of Sigma Delta DAC technology
and its broader applicability in various audio and communication systems.
The paper ”Sigma-Delta ADC and DAC for Digital Wireless Communication”
by Zhongming Shi [6] discusses research in Sigma-Delta ADC and DAC tech-
niques has primarily focused on their applications in wireless communication
systems, particularly in audio codecs and RF baseband channels. Significant ad-
vancements have been made in designing low-power, high-resolution converters
suitable for audio applications, as well as high-speed converters for RF baseband
channels. However, there seems to be a gap in research regarding the optimization
of these techniques for IF bandpass converters, which are crucial for achieving
cheap and reliable digital signal processing in wireless transceivers. While some
work has been done in this area, further exploration is needed to address chal-
lenges such as clock jitter, power consumption, and component integration in IF
bandpass converters. Existing knowledge suggests that while Sigma-Delta ADC
and DAC techniques have been successfully implemented in various wireless
communication systems, there are still gaps in achieving optimal performance
18
across different frequency bands. Specifically, there is a need for more research
on improving the resolution and dynamic range of converters while minimizing
power consumption, especially in IF bandpass converters. Additionally, explor-
ing novel topologies and design methodologies could help address challenges
related to stability, noise shaping, and non-linearity, thus bridging the existing
gap in knowledge and facilitating the development of more efficient and reliable
wireless communication systems.
The paper ”FPGA Based Soft IP Design for Reconfigurable High Resolution DAC”
by V. V. Patil, P.A. Uchagaonkar, Dr. S. A. Shinde, Dr. R. K. Kamat [7] discusses
research in the field has primarily focused on enhancing the performance and
efficiency of DACs, particularly in the context of FPGA-based implementations.
Studies have investigated various techniques such as sigma-delta modulation,
PWM modulation, and hardware-software co-design approaches to achieve high-
resolution DAC functionality. These efforts have contributed to advancing the
understanding of DAC architectures and their integration into mixed-signal sys-
tems. Additionally, research has explored the challenges associated with tradi-
tional DAC implementations, including the need for external DAC chips, limita-
tions in resolution and sampling rates, and complexities in software-based DAC
designs. Despite significant progress, gaps still exist in the current knowledge and
solutions pertaining to FPGA-based DAC designs. One notable gap is the need
for more comprehensive approaches to address the trade-offs between resolution,
sampling rate, and resource utilization in FPGA implementations. While existing
studies have demonstrated the feasibility of FPGA-based DACs, further research
is needed to optimize design methodologies and explore novel techniques for
achieving higher resolution and sampling rates without compromising resource
efficiency. Additionally, there is a need for standardized design methodologies
and tools to streamline the development process and facilitate the integration of
FPGA-based DACs into various embedded systems. Addressing these gaps will
contribute to the advancement of FPGA-based DAC technology and its broader
19
adoption in real-world applications.
The paper ”Novel Digital Multi-Phase Duty Cycle Modulation Methods for Volt-
age Regulators” by Yi Sun, Jian Li, Ming Xu and Fred C. Lee [8] discusses research
paper outlines the advantages of duty cycle modulation methods, notably high-
lighting the efficacy of the proposed pseudo-dither modulation technique. This
approach offers a substantial enhancement in resolution compared to traditional
constant frequency modulation methods. By strategically alternating between
adjacent quantized values, the pseudo-dither method enables finer control over
the duty cycle, resulting in precise regulation of the output voltage. Moreover,
these modulation techniques achieve heightened resolution without necessitat-
ing excessively high clock frequencies, thereby reducing power consumption and
enhancing energy efficiency. Additionally, the pseudo-dither method contributes
to stability improvement by mitigating issues like limit cycle oscillations (LCOs)
through smoother transitions between duty cycle values. Notably, these benefits
extend to multi-phase voltage regulator systems, where the resolution remains
consistently high across configurations, making the proposed methods suitable
for diverse industrial applications. Furthermore, the cost-effectiveness of these
approaches, coupled with their performance advantages, positions them as com-
pelling solutions for digitally controlled voltage regulators, offering a balance
between high resolution, efficiency, stability, and affordability.
The paper titled ”An Oversampled Digital PWM Linearization Technique for
Digital-to-Analog Conversion” by Jin-Whi Jung and Malcolm J. Hawksford,[9]
published in the IEEE Transactions on Circuits and Systems—I: Regular Papers
in September 2004, discusses an algorithmic-based linearization process for uni-
formly sampled digital pulse-width modulation (PWM). This technique aims to
address the intrinsic distortion inherent in uniformly sampled PWM, which can
produce significant levels of in-band distortion. The authors propose a method
termed direct PWM mapping (DPM), which utilizes a fractional delay digital fil-
ter embedded within a noise shaping re-quantizer. The DPM scheme employs a
20
Farrow structure fractional delay finite-impulse response (FIR) digital filter em-
ploying third-order Lagrange interpolation. This filter is designed to compensate
for the spectral distortion introduced by uniformly sampled PWM, thereby im-
proving the linearity of the digital-to-analog conversion process. PWM DACs,
despite their widespread use and cost-effectiveness, suffer from several significant
disadvantages. One of the foremost limitations lies in the compromise between
resolution and output bandwidth. As resolution increases to achieve finer analog
control, the necessary manipulation of pulse widths escalates the switching fre-
quency. Consequently, maintaining high-resolution output at elevated frequen-
cies becomes challenging without introducing considerable distortion or noise,
thereby constraining the DAC’s performance in demanding applications. Fur-
thermore, PWM DACs are plagued by quantization noise, especially evident at
lower resolutions. Stemming from the discrete nature of digital signals, this noise
undermines the signal-to-noise ratio (SNR) of the DAC output, thereby compro-
mising analog waveform reconstruction fidelity. Despite attempts to alleviate
this issue through oversampling and noise shaping techniques, the persistent
challenge of mitigating quantization noise remains a bottleneck, particularly in
applications demanding high-fidelity audio or precise analog control.
21
Chapter 3
Objectives
The main objective of this project is to combines the simplicity of DPWM and
the high performance of DSDM architecture with output feedback , it is founded
on a lookup DDCM map which significantly reduces the overall digital signal
processing (DSP) time, while preserving the exact nature of nonlinear DDCM
models for better performances. In addition, its realization as the building core
of a FPGA-based DAC, requires minimal DSP resources.
1 Precision Enhancement:
• Explore techniques to mitigate the effects of clock jitter, which can degrade
conversion accuracy.
2 Efficiency Optimization:
22
• Implement algorithms that minimize power consumption without sacrific-
ing performance.
• Optimize the timing and routing of digital signals within the FPGA to reduce
propagation delays and improve overall efficiency.
3 Distortion Reduction:
• Design the scheme to support various input data formats and sampling rates,
accommodating a wide range of digital signal processing applications.
• Ensure that the modulation scheme is compatible with popular FPGA fami-
lies and development tools.
23
• Implement the scheme on FPGA hardware and conduct extensive testing to
assess its real-world performance.
• Ensure that the modulation scheme complies with relevant industry stan-
dards and specifications, such as those defined by organizations like the
Institute of Electrical and Electronics Engineers (IEEE).
• Design the modulation scheme with scalability in mind, allowing for easy
expansion and enhancement in future iterations.
• Stay abreast of emerging technologies and trends in FPGA design and digital
signal processing, ensuring that the scheme remains relevant and competi-
tive in the long term.
24
Chapter 4
Methodology
25
4.1. Methods and Techniques Used
26
4.2. Design Process
d. Integration with DAC : After the FPGA design is synthesized and pro-
27
4.3. Reason for Chosen Methodologies
grammed onto the FPGA, it needs to be connected to the DAC. This involves
interfacing the FPGA output with the input of the DAC and configuring DAC
parameters such as resolution, sampling rate, and output voltage range to
match the requirements of the application.
c. Digital Precision : DSP techniques enable precise control over the generated
waveforms, ensuring accurate DAC conversion with minimal distortion and high
fidelity.
28
Chapter 5
1 Multiplexer
2 Down Counter
3 JK Flip-Flop
4 AND Gate
5 NOT Gate
i Selection: The control inputs determine which data input is connected to the
output. Each combination of control inputs selects a specific data input.
ii Data Transmission: The selected data input is transmitted to the output line.
All other data inputs are effectively disconnected from the output.
29
5.1. Components Used and its Function
iii Binary Encoding: The control inputs are typically binary encoded, with each
combination of control inputs representing a unique binary number. This
binary number selects the corresponding data input for transmission.
2. Signal Routing:A multiplexer can be used to select and route the appropriate
digital signals to the components responsible for generating the PWM (Pulse
Width Modulation) waveform. For example, different control signals, such as
amplitude control, frequency control, or waveform shape control, may need
to be selected and combined based on the requirements of the modulation
scheme.
4. Integration with PWM Generator:Once the digital signals are selected and
routed using the multiplexer, they can be fed into a PWM generator module
within the FPGA. The PWM generator produces a digital waveform with a
30
5.1. Components Used and its Function
iii Zero Detection : The counter continuously monitors its count value. When
the count reaches zero, a zero detection mechanism is triggered. This could
31
5.1. Components Used and its Function
iv Reset : After reaching zero, the counter may reset to its initial preset value
to start the countdown again. Alternatively, it may remain at zero or be
reloaded with a new preset value depending on the specific requirements of
the application.
32
5.1. Components Used and its Function
the digital signals before they are converted into analog signals. The down
counter might be part of a larger DSP pipeline where digital signals are pro-
cessed, and the resulting information is used to control the duty cycle of the
PWM waveform.
i State Transition: The JK flip-flop has four possible states: Set (S), Reset (R),
Toggle (T), and No Change (NC). The transition between these states is con-
trolled by the input conditions:
When both J and K inputs are LOW, the flip-flop remains in its current state
(No Change).
When both J and K inputs are HIGH, the flip-flop toggles, i.e., if it was in the
33
5.1. Components Used and its Function
ii Clock Edge Triggering: The state changes of the flip-flop occur on the rising
or falling edge of the clock signal, depending on whether it’s a positive-edge-
triggered or negative-edge-triggered flip-flop.
34
5.1. Components Used and its Function
produces a digital waveform with a variable duty cycle based on the control
signals provided by the flip-flop and other digital logic circuits.
4. AND Gate : An AND gate is one of the fundamental logic gates in digital elec-
tronics, commonly used for Boolean operations. It produces an output signal
only when all of its input signals are high (logic 1).
Operation of AND Gate:
i Inputs: The AND gate has two inputs, typically labeled as A and B. Each
input can take on one of two binary states: 0 (low) or 1 (high).
ii Output: The AND gate produces a single output, typically labeled as Y. The
output is determined by the logical AND operation performed on the inputs.
2. Control Logic:An AND gate can be employed as part of the control logic
circuitry responsible for determining when to set the PWM output signal to
high (logic 1) based on specific conditions or input signals. For example:
One input of the AND gate could receive the clock signal, ensuring that
the PWM waveform transitions occur synchronously with the clock. An-
35
5.1. Components Used and its Function
other input could receive a control signal that enables or disables the PWM
generation based on system requirements.
5 NOT Gate : A NOT gate, also known as an inverter, is one of the simplest and
most fundamental logic gates in digital electronics. Its primary function is to
invert or complement the input signal, i.e., it converts a high input signal (logic
1) to a low output signal (logic 0), and vice versa.
i Input: The NOT gate has one input, often labeled as A. The input can be in
one of two binary states: 0 (low) or 1 (high).
ii Output: The NOT gate produces a single output, typically labeled as Y. The
output is the logical complement of the input
2. Control Logic:A NOT gate can be employed as part of the control logic
circuitry responsible for determining when to set the PWM output sig-
nal to low (logic 0) based on specific conditions or input signals. For
example: The NOT gate could be used to complement a control signal
that enables or disables the PWM generation based on system require-
ments. It could be used to invert a clock signal, ensuring that the PWM
36
5.1. Components Used and its Function
37
5.2. Design Flow
38
5.2. Design Flow
39
5.3. Programs and RTL design
1. 16:8 Multiplexer
library IEEE;
use [Link] LOGIC [Link];
entity mux16:8 is
Port (
clk : in STD LOGIC;
sel : in STD LOGIC VECTOR(3 downto 0);
in data : in STD LOGIC VECTOR(15 downto 0);
out data : out STD LOGIC VECTOR(7 downto 0)
);
end mux16:8;
architecture Behavioral of mux16:8 is
begin
process(clk)
begin
if rising edge(clk) then
case sel is
when ”0000” =>
out data <= in data(7 downto 0);
when ”0001” =>
out data <= in data(15 downto 8);
when ”0010” =>
out data <= in data(14 downto 7);
when ”0011” =>
out data <= in data(13 downto 6);
when ”0100” =>
out data <= in data(12 downto 5);
when ”0101” =>
40
5.3. Programs and RTL design
41
5.3. Programs and RTL design
2. Down Counter
library IEEE;
use [Link] LOGIC [Link];
use [Link] [Link];
entity counter is
Port (
clk : in std logic;
rst : in std logic;
load : in std logic;
input data : in std logic vector(7 downto 0);
output data : out std logic vector(7 downto 0);
cout : out std logic );
end counter;
42
5.3. Programs and RTL design
end Behavioral;
43
5.3. Programs and RTL design
3. JK Flip-Flop
library ieee;
use [Link] logic [Link];
entity JK flip flop is
port (clk,J,K,prs,clr : in std logic;
Q: out std logic;
Qnot : out std logic);
end JK flip flop;
architecture JKFF arch of JK flip flop is
signal nxt state,prv state: std logic;
signal input: std logic vector(1 downto 0);
begin
input <= J & K;
process(clk, prs,clr) is
begin
if (clr=’1’) then
nxt state <= ’0’;
elsif (prs=’1’) then
nxt state <= ’1’;
44
5.3. Programs and RTL design
45
5.3. Programs and RTL design
4. AND Gate
library IEEE;
use [Link] logic [Link];
entity andGate is
port(A : in std logic;
– AND gate input B : in std logic;
– AND gate input Y : out std logic);
– AND gate output end andGate;
architecture andLogic of andGate is
begin
Y <= A AND B;
end andLogic;
46
5.3. Programs and RTL design
Y <= not(A) ;
end notLogic;
47
5.4. Circuit Diagram
Figure 5.13
48
5.4. Circuit Diagram
49
5.4. Circuit Diagram
50
5.4. Circuit Diagram
51
5.4. Circuit Diagram
high level of abstraction, allowing for rapid prototyping and algorithm ex-
ploration. Designers can model the duty-cycle modulation algorithm and its
interactions with other components in the system using VHDL’s concurrent
and sequential constructs, capturing the intended functionality comprehen-
sively. Moreover, VHDL’s support for synthesis targets FPGA technology
directly, facilitating seamless integration of the modulation scheme into the
FPGA fabric. VHDL’s strong typing system and static elaboration ensure re-
liable and predictable behavior during synthesis and simulation, crucial for
achieving the required performance and reliability in the digital-to-analog
conversion process. Overall, VHDL empowers designers to develop com-
plex digital systems with confidence, making it an essential tool for realizing
innovative modulation schemes like the one proposed in the project.
52
Chapter 6
6.1 Results
1. Multiplexer
53
6.1. Results
2. Down counter
3. JK Flip-Flop
54
6.1. Results
4. AND gate
5. NOT gate
55
6.2. Bitstream Generation
6.3 Discussion
56
6.3. Discussion
Furthermore, our results indicate that DDCM offers scalability, allowing for
the generation of analog signals with varying resolutions and frequencies
to accommodate diverse application requirements. This flexibility is a sig-
nificant advantage over fixed-resolution DACs, where altering the output
resolution typically involves hardware redesign or additional components.
While the implementation of DDCM for FPGA-based DACs has shown con-
siderable promise, certain unexpected findings and challenges have emerged
during the experimental phase. One notable challenge was the optimization
of FPGA resources and timing constraints to achieve optimal performance
without sacrificing resolution or speed.
Optimizing the DDCM algorithm for resource utilization and timing closure
proved to be non-trivial, requiring iterative design iterations and trade-offs
between resolution, frequency, and resource utilization. Balancing these
factors while ensuring real-time operation posed a significant challenge,
particularly for applications with stringent timing requirements.
57
6.3. Discussion
In the industrial domain, the adoption of DDCM holds promise for vari-
ous applications requiring high-resolution analog signal generation, such
as wireless communications, audio processing, and instrumentation. The
ability to achieve fine-grained control over analog output signals using read-
ily available FPGA platforms opens up opportunities for cost-effective and
customizable solutions in these domains.
58
Chapter 7
7.1 Conclusion
59
7.2. Future Work
There are several avenues for further research and improvement in the ”Dig-
ital Duty-Cycle Modulation Scheme for FPGA-Based Digital-to-Analog Con-
version” project:
60
7.2. Future Work
61
References
[1] [Link] and [Link], “Design and analysis of fpga based high-
resolution digital pulse width modulators technique for dc-dc converters,” Circuit
and System, vol. 7, pp. 464–474, 2016.
[2] Sabarinath.V and [Link], “Design and implementation of fpga based high
resolution digital pulse width modulator,” pp. 563–567, 2013.
[4] B. Moffo, [Link], and L. Nneme, “A low cost and high quality duty-cycle modulation
scheme and applications,” vol. 6, 2015.
[5] A. Askhedkar and D. Agrawal, “Digital sigma delta modulators: An overview,” 2018.
[6] Z. Shi, “Sigma-delta adc and dac for digital wireless communication,” 1999 IEEE Radio
Frequency Integrated Circuits Symposium, 2002.
[7] [Link], P. D. A. Shinde, and D. R. K. Kamat, “Fpga based soft ip design for recon-
figurable high resolution dac,” International Journal of Advanced Research in Electrical,
Electronics and Instrumentation Engineering, 2014.
[8] Y. Sun, J. Li, M. Xu, Lee, and F. C, “Novel digital multi-phase duty cycle modula-
tion methods for voltage regulators,” 2008 Twenty-Third Annual IEEE Applied Power
Electronics Conference and Exposition, pp. 1099–1105, 2008.
[9] J.-W. Jung and M. Hawksford, “An oversampled digital pwm linearization technique
for digital-to-analog conversion,” IEEE Transactions on Circuits and Systems I: Regular
Papers, vol. 51, no. 9, pp. 1781–1789, 2004.
[10] M. Bertrand and J. Mbihi, “A novel digital duty-cycle modulation scheme for fpga-
based digital-to-analog conversion,” IEEE Transactions on Circuits and Systems II: Express
Briefs, vol. 62, pp. 1–1, 06 2015.
62