Beruflich Dokumente
Kultur Dokumente
by
A THESIS
IN
ELECTRICAL ENGINEERING
MASTER OF SCIENCE
IN
ELECTRICAL ENGINEERING
Approved
Jon Bredeson
Chairperson of the Committee
Micheal Parten
Accepted
John Borrelli
Dean of the Graduate School
May 2007
Copyright 2007, Shashikant Shrimali
Texas Tech University, Shashikant Shrimali, May 2007
ACKNOWLEDGEMENTS
I wish to express my sincere gratitude to Prof. Dr. Jon Gustav Bredeson for
providing the opportunity to carry out this study, and for guidance and support. I am
deeply indebted to Prof. Dr. Micheal Eugene Parten for his valuable suggestions and
active cooperation and having been a part of every single stage of my thesis, from
inception to completion. I am very grateful to fellow graduate students for their constant
support, timely suggestions and inspiration. I gratefully acknowledge the cooperation I
received from other faculty members of this department. I will be failing in my duty if I
do not mention the administrative staff of this department for their timely help.
My friends outside the field of engineering have kept me interested in matters
other than just electrical. I have spent very relaxing moments with my friends taking part
in different activities and hopefully will continue to do so. I would like to thank all whose
direct and indirect support helped me completing my thesis in time. I would also like to
recognize the encouragement and unconditional love of my friends in India.
Finally, there are those whose spiritual support is even more important. I thank
my parents, who taught me the value of hard work by their own example. I would also
thank my sister, who has constantly encouraged me to study as much as possible.
ii
Texas Tech University, Shashikant Shrimali, May 2007
TABLE OF CONTENTS
ACKNOWLEDGEMENTS……………………………………………………………….ii
ABSTRACT……………………………………………………………………………….v
LIST OF FIGURES………………………………………………………………………vi
CHAPTER
I. INTRODUCTION TO DDFS…………………………………………………..1
1.1 DDFS- A Brief History………………………………………………..1
1.2 DDFS- An Overview………………………………………….………2
1.3 Aim of Thesis………………………………………………………….3
1.4 Thesis Organization…………………………………………………...4
II. OPERATION OF DDFS……………………………………………………….5
2.1 Architecture of Sine Output DDFS……………………………………5
2.2 Frequency Tuning Equation…………………………………………...7
2.3 Building Blocks of DDFS……………………………………………..9
2.3.1 Phase Accumulator………………………………………...10
2.3.2 Phase-to-Amplitude Converter (ROM/LUT)………………12
2.3.3 Digital-to-Analog Converter and Filter……………………13
III. OUTPUT SPECTRUM OF DDFS…………………………………………..14
3.1 Sampled Output of DDFS……………………………………………14
3.2 Spectral Purity Considerations……………………………………….16
3.3 Spurious Free Dynamic Range………………………………………16
3.4 DDFS with Phase Truncation and Spurious Performance…………...17
3.5 DDFS with Dither and its effect on SFDR…………………………..19
IV. SIMULATION AND RESULTS OF DDFS………………………………...21
4.1 High-level simulation of DDFS using MATLAB-Simulink………...21
4.2 RTL level simulation of DDFS using ModelSim……………………24
4.2.1 Simple DDFS simulation using ModelSim………………..24
4.2.2 DDFS with Phase Truncation and Dither……………….…30
iii
Texas Tech University, Shashikant Shrimali, May 2007
iv
Texas Tech University, Shashikant Shrimali, May 2007
ABSTRACT
v
Texas Tech University, Shashikant Shrimali, May 2007
LIST OF FIGURES
vi
Texas Tech University, Shashikant Shrimali, May 2007
4.40
f out =12.11M Hz with jitter = 2ns………………………………………..43
4.41
f out =12.11M Hz with jitter = 1ns………………………………………..44
vii
Texas Tech University, Shashikant Shrimali, May 2007
CHAPTER I
INTRODUCTION TO DDFS
1
Texas Tech University, Shashikant Shrimali, May 2007
generators, cellular base stations and wireless local loop base stations.
2
Texas Tech University, Shashikant Shrimali, May 2007
With advances in design and process technology, today’s DDFS devices are very
compact and draw little power. The ability to accurately produce and control waveforms
of various frequencies and profiles has become a key requirement common to a number
of industries. Whether providing agile sources of low-phase-noise variable-frequencies
with good spurious performance for communications, or simply generating a frequency
stimulus in industrial or biomedical test equipment applications, convenience,
compactness, and low cost are important design considerations. Many possibilities for
frequency generation are open to a designer, ranging from phase-locked-loop (PLL)-
based techniques for very high-frequency synthesis, to dynamic programming of digital-
to-analog converter (DAC) outputs to generate arbitrary waveforms at lower frequencies.
The DDFS technique is rapidly gaining acceptance for solving frequency- (or waveform)
generation requirements in both communications and industrial applications because
single-chip IC devices can generate programmable analog output waveforms simply and
with high resolution and accuracy.
3
Texas Tech University, Shashikant Shrimali, May 2007
application.
In the digital part, phase truncation introduces errors and when some dither is
added, spurious free dynamic range (SFDR), is improved. The analog part of the DDFS
includes a D/A converter and a low pass filter. Random jitter is added to the input
reference clock for system-level verification and simulation.
Spurious performances of DDFS are partly caused by quantization operations in
its digital part. These errors are deterministic and periodic in the time domain; therefore,
they appear as undesired components: spurs in the frequency domain. Hence, it is quite
natural to analyze the effects by DFT (Discrete Fourier Transform). The amplitude
quantization (AQ) is present permanently and causes harmonically related spurs, while
phase truncation (PT) produces spurs around the output frequency by phase modulation.
4
Texas Tech University, Shashikant Shrimali, May 2007
CHAPTER II
OPERATION OF DDFS
Figure 2.1: DDFS function blocks and signal flow diagrams [2]
programmed into the phase register (frequency control word, M ), length of n-bit
accumulator. The binary number in the phase register provides the main input to the
phase accumulator.
5
Texas Tech University, Shashikant Shrimali, May 2007
If a sine look-up table is used, the phase accumulator computes a phase (angle)
address for the look-up table, which outputs the digital value of amplitude—
corresponding to the sine of that phase angle—to the DAC. The DAC, in turn, converts
that number to a corresponding value of analog voltage or current. To generate a fixed-
frequency sine wave, a constant value (the phase increment—that is determined by the
binary number M ) is added to the phase accumulator with each clock cycle. If the phase
increment is large, the phase accumulator will step quickly through the sine look-up table
and thus generate a high frequency sine wave. If the phase increment is small, the phase
accumulator will take many more steps, accordingly generating a slower waveform [4].
The heart of the system is the phase accumulator whose contents are updated once
each clock cycle. Each time the PA is updated, the digital number or M , stored in the
phase register is added to the number in the phase accumulator register. If the number in
the phase register is 00...01 and the initial content of the phase accumulator are 00...00.
The phase accumulator is updated by 00...01 on each clock cycle. If the accumulator is
32-bits wide, 232 clock cycles (over 4 billion) are required before the phase accumulator
returns to 00...00, and the cycle repeats. The output of the phase accumulator serves as
the address to a sine (or cosine) lookup table/ROM/phase-to-amplitude converter. Each
address in the LUT corresponds to a phase point on the sine wave from 0° to 360°. The
LUT contains the corresponding digital amplitude information for one complete cycle of
a sine wave. The LUT, therefore, maps the phase information from the phase accumulator
into a digital amplitude word, which in turn drives the DAC. For n=32, and M =1. The
phase accumulator steps through each of 232 possible outputs before it overflows. The
corresponding output sine-wave frequency is equal to the clock frequency divided by 232.
If M=2, then the phase accumulator register "rolls over" twice as fast, and the output
frequency is doubled. For an n-bit phase accumulator (n generally ranges from 24 to 32 in
most DDFS systems), there are 2n possible phase points. The digital word in the phase
register, M represents the amount the phase accumulator is incremented each clock cycle.
6
Texas Tech University, Shashikant Shrimali, May 2007
If f clk is the clock frequency, then the frequency of the output sine wave is equal
to:
M * f clk
f out = (1)
2n
Above equation is known as the DDFS "tuning equation." The frequency resolution of
f clk
the system equals . In a practical DDFS system, all the bits out of the phase
2n
accumulator are not passed on to the LUT, but are truncated, leaving only the first 13 to
15 MSBs. This reduces the size of the LUT and does not affect the frequency resolution.
The phase truncation only adds a small but acceptable amount of phase noise to the final
output. The resolution of the DAC is typically 2 to 4 bits less than the width of the lookup
table. Even a perfect N-bit DAC adds quantization noise to the output [17].
7
Texas Tech University, Shashikant Shrimali, May 2007
Knowing that the phase of a sine wave is linear and that it depends on a reference clock
period, with clock frequency f clk , the phase rotation ( Δp ) for that period can be
determined by
Δp = ω.Δt (2)
Where, Δp = change in phase of sine wave, ω = angular frequency of wave, Δt = small
change in time. Solving for ω in Equation 2, gives
ω = ⎛⎜ Δp Δt ⎞⎟ = 2πf (3)
⎝ ⎠
The overflowing accumulator (phase accumulator, PA) clocked with f clk , generates the
f clk = 1 (4)
Δt
Solving for from Equation 3 and substituting the reference clock frequency for the
reference period in Equation 4, specifies the frequency of the output signal:
Δp * f clk
f out =
2π (5)
Finally, for an n-bit accumulator the output signal will have the frequency specified
Δp * f clk
f out = (6)
2n
Where, Δp (in degree) is the phase increment word or frequency control word or
frequency tuning word and f clk is the clock frequency, n is the length of accumulator.
This phase value Δp is generated using the modulo 2 n overflowing property of an n-bit
PA. The rate of the overflow is the output frequency given by Equation 6 or,
Δp * f clk
f out = (7)
2n
8
Texas Tech University, Shashikant Shrimali, May 2007
decreases.
9
Texas Tech University, Shashikant Shrimali, May 2007
The PA is a modulo- M counter that increments its stored number each times it
10
Texas Tech University, Shashikant Shrimali, May 2007
receives a clock pulse. The magnitude of the increment is determined by the binary-coded
input word ( M ). This word forms the phase step size between reference-clock updates; it
effectively sets how many points to skip around the phase wheel. The larger the jump
size, the faster the phase accumulator overflows and completes the equivalent of a sine-
wave cycle. The number of discrete phase points contained in the wheel is determined by
the resolution of the PA (n-bits), which determines the tuning resolution of the DDFS.
For example, for an n = 28-bit phase accumulator, M will have a value of 0000...0001,
which would cause the phase accumulator to overflow after 228 reference-clock cycles
(increments). If the value of M is changed to 0111...1111, phase accumulator will
overflow after only 2 reference-clock cycles (the minimum required by Nyquist). This
relationship can be seen in the basic tuning equation for DDFS architecture:
M * f clk
f out =
2n (10)
where:
f out = output frequency of the DDFS,
M = frequency control word,
f clk = internal reference clock frequency (system clock),
n = length of the phase accumulator, in bits.
Any change to the value of M results in immediate and phase-continuous changes
in the output frequency. In a DDFS, no loop settling time is incurred as in the case of a
PLL. As the output frequency is increased, the number of samples per cycle decreases.
Since, sampling theory, dictates that at least two samples per cycle are required to
reconstruct the output waveform, the maximum fundamental output frequency of a DDFS
f clk
is . However, for practical applications, the output frequency is limited to somewhat
2
less than that, improving the quality of the reconstructed waveform and permitting
filtering on the output. When generating a constant frequency, the output of the PA
increases linearly, so the analog waveform, it generates is inherently a ramp.
11
Texas Tech University, Shashikant Shrimali, May 2007
12
Texas Tech University, Shashikant Shrimali, May 2007
wave. Ideally, SIN ( x ) is used to filter the output of the DAC [2]. It removes the extra
x
frequency components added to the sine wave and hence produces a smooth sine wave.
13
Texas Tech University, Shashikant Shrimali, May 2007
CHAPTER III
OUTPUT SPECTRUM OF DDFS
The Nyquist Theorem dictates that there is a minimum of two samples per cycle
required to reconstruct the desired output waveform. Images are created in the sampled
output spectrum at f clk ± f out . The 1st image response occurs in this example at f clk − f out
or 220 MHz. The 3rd, 4th, and 5th images appear at 380 MHz, 520 MHz, 680 MHz, and
820 MHz (respectively). Figure 3.1 shows that nulls appear at multiples of the sampling
frequency. In the case of the f out frequency exceeding the f clk frequency, the 1st image
response will appear within the Nyquist bandwidth DC − 1 f clk as an aliased image.
2
14
Texas Tech University, Shashikant Shrimali, May 2007
approximately 40% of the f clk frequency [4]. This facilitates using an economical lowpass
filter implementation on the output.
Figure 3.1 indicates that the amplitude of f out and the image response follows a
sin( x ) roll off response. This is due to the quantized nature of the sampled output. The
x
amplitude of the fundamental and any given image response can be calculated using the
sin( x ) formula. Per the rolloff response function, the amplitude of the fundamental
x
output will decrease inversely to increases in its tuned frequency. The amplitude rolloff
of the image response and the sin( x ) amplitude response at the desired f out and f clk
x
frequencies.
The other anomalies in the output spectrum, such as integral and differential
linearity errors of the D/A converter, glitch energy associated with the D/A converter,
and clock feed-through noise, do not follow the sin( x ) roll-off response. These
x
anomalies appear as harmonics and spurious energy in the output spectrum and generally
are much lower in amplitude than the image responses. The general noise floor of a
DDFS is determined by the cumulative combination of substrate noise, thermal noise
effects, ground coupling, and a variety of other sources of low-level signal corruption.
The noise floor, spur performance, and jitter performance of DDFS is greatly influenced
15
Texas Tech University, Shashikant Shrimali, May 2007
by circuit board layout, the quality of the power supply, and the quality of the input
reference clock.
16
Texas Tech University, Shashikant Shrimali, May 2007
In ADC-based systems, adding a small amount of random noise to the input tends
to randomize the quantization errors and reduce this effect. The same thing can be done
in a DDFS system. A pseudo-random digital noise generator output can be added to the
DDFS sine amplitude word before being loaded into the DAC. The amplitude of the
digital noise is set to about 1 LSB . This accomplishes the randomization process at the
2
expense of a slight increase in the overall output noise floor. In most DDFS applications,
however, there is enough flexibility in selecting the various frequency ratios so that
dithering is not required [5].
17
Texas Tech University, Shashikant Shrimali, May 2007
Figure 3.2: Phase truncation error and the phase wheel [6]
With an 8-bit accumulator, the phase resolution associated with the accumulator is
1/256th of a full circle, or 1.41° (360/28). In Figure 3.2, the accumulator phase resolution
is identified by the outer circle of tic marks. If only the most significant 5 bits of the
accumulator are used to convey phase information, then the resolution becomes 1/32nd of
a full circle, or 11.25° (360/25).
These are identified by the inner circle of tic marks. If a tuning word, value of 6 is
used, then the accumulator counts by increments of 6. The first four phase angles
corresponding to 6-count steps of the accumulator are depicted in Figure 3.2. The first
phase step (6 counts on the outer circle) falls short of the first inner tic mark. Thus, a
discrepancy arises between the phase of the accumulator (the outer circle) and the phase
as determined by 5-bit resolution (the inner circle). This discrepancy results in a phase
error of 8.46° (6 x 1.41°), as depicted by arc E1 in the Figure 3.2. On the second phase
step of the accumulator (6 more counts on the outer circle) the phase of the accumulator
resides between the 1st and 2nd tic marks on the inner circle. Again, there is a
discrepancy between the phase of the accumulator and the phase as determined by 5 bits
of resolution. The result is an error of 5.64° (4 x 1.41°) as depicted by arc E2 in the
Figure 3.2.
18
Texas Tech University, Shashikant Shrimali, May 2007
Similarly, at the 3rd phase steps of the accumulator an error of 2.82° (2 x 1.41°)
results. On the 4th phase step, however, the accumulator phase and the 5-bit resolution
phase coincide resulting in no phase error. This pattern continues as the accumulator
increments by 6 counts on the outer circle each time.
The phase error introduced by truncating the accumulator will result in errors in
amplitude during the phase-to-amplitude conversion process inherent in the DDS. It turns
out that these errors are periodic. They are periodic because, regardless of the tuning
word chosen, after a sufficient number of revolutions of the phase wheel, the accumulator
phase and truncated phase will coincide. Since these amplitude errors are periodic in the
time domain, they appear as spurs in the frequency domain and are known as phase
truncation spurs.
It turns out that the magnitude and distribution of phase truncation spurs is
dependent on three factors [6]:
1. Phase Accumulator size
2. Phase word size; i.e., the number of bits of phase after truncation
3. Frequency control word
19
Texas Tech University, Shashikant Shrimali, May 2007
These spurs can be suppressed by breaking up the regularity of the address error
with an additive randomizing signal. This random sequence, called dither, a noise
sequence, with variance approximately equal to the least significant integer bit of the PA.
The dithered DDFS supplies, a higher spurious free dynamic range (SFDR) in
comparison to a phase truncation design. The additional logic resources required to
implement the dither sequence generator are not significant. Typically, a 3 or 4-bit
random number is sufficient.
20
Texas Tech University, Shashikant Shrimali, May 2007
CHAPTER IV
SIMULATION AND RESULTS OF DDFS
This chapter discusses the implementation of different models of the DDFS and
their simulation results. High-level modeling and simulation of a DDFS was carried out
using MATLAB-Simulink to understand the overall functionality and the flow from input
to output. The DDS has also been modeled using Verilog and simulated with the
ModelSim simulator. This Verilog code is synthesizable on an FPGA. A DDFS has also
been designed using VerilogA and simulated with Cadence. In the Cadence simulation,
the reference clock used is a jittered clock, to understand the effect of clock jitter on the
output spectrum. Simulations help to increase the understanding of design under non-
ideal operations. Simulations serve as a prototype for a design before it is actually built in
hardware. These simulations are used to understand the effect of the non-ideal
characteristics of the building blocks of a DDFS on its output spectrum. Operation of the
DDFS has been explained in previous chapters.
21
Texas Tech University, Shashikant Shrimali, May 2007
With every clock pulse the contents of the PR is added to that of PA. The PA
generates the phase values of the output sine wave. The output of the PA serves as the
address of the LUT. Each time the PA overflows, the LUT outputs sampled values of the
sine wave. This output of the LUT represents one cycle of the sine waveform, since the
LUT contains sampled values of one cycle of the sine wave. The overflow rate of the PA
depends on the bit-size of the PA (number of bits) and the frequency tuning word. Larger
the size of the frequency tuning word faster the PA overflows. The output frequency of
the DDFS is directly proportional to the frequency tuning word. Therefore, larger the
frequency tuning word, higher is the output frequency and faster the PA overflows. This
is shown with the help of simulations. These simulations help to understand the signal
flow through the DDFS and the overflow of the PA and the relation of output frequency
with the PA. The frequency of the output wave depends on the overflow rate of the PA
and the frequency tuning word. This overflow rate depends on the frequency tuning word
stored in the phase register.
To generate an output frequency of 10 MHz with a reference clock frequency of
50M Hz, a frequency tuning word ( M ) of 51 is stored in the Phase Register. The value
of the frequency tuning word ( M ) is calculated using the frequency tuning equation. The
Phase Accumulator is 8-bits wide. This control word M is added to the previous value of
PA with each clock pulse.
22
Texas Tech University, Shashikant Shrimali, May 2007
In the Figure 4.2, it can be seen that for a frequency tuning word of 51, for the
first 3000 clocks, the PA overflows slightly more than two times. Therefore, the sine
wave of lower frequency is produced, which is shown in Figure 4.3.
23
Texas Tech University, Shashikant Shrimali, May 2007
In the above Figure 4.4, it can be seen that for a frequency tuning word of 102, for
the first 3000 clocks, the PA overflows slightly more than four times. Therefore, sinne
wave of higher frequency is produced, which is shown in Figure 4.5.
For smaller values of M , the PA overflows slower than with larger values as can
be seen in Figure 4.2 and Figure 4.3 respectively. Hence, the output wave in Figure 4.4
has a frequency lower then the output wave in Figure 4.5.
24
Texas Tech University, Shashikant Shrimali, May 2007
This model of the DDFS uses an 8-bit PA. The PA consists of a register and adder
with a feedback network. The Adder module is an 8-bit adder that has two 8-bit inputs
and one 9-bit output.
The Figure 4.7 shows the Verilog code for module Register. This module takes
clock, reset and 8-bit data “d” as input and an 8-bit output “q”. At each clock, this module
checks if the reset is high then the output q is zero else, it is equal to input d. This code is
synthesizable.
25
Texas Tech University, Shashikant Shrimali, May 2007
Next module used in this model is the Look up Table. This module takes clock,
reset and an 8-bit address as input and has one 8-bit output. The 8-bit address input is the
output of the PA. The LUT contains the sampled values of the amplitude of the one cycle
of the sine wave. The LUT has 28 entries i.e. 256 values and each entry is 8-bit in length.
Therefore, the size of the LUT is 256*8 i.e. 65536.
26
Texas Tech University, Shashikant Shrimali, May 2007
The contents of the LUT i.e. sampled values of the amplitude of the sine wave are
generated using MATLAB.
Figure 4.10 shows the Verilog code of the LUT. This code is synthesizable. When
the reset is high, the LUT is loaded with the sampled values of the amplitude of the sine
wave and the output is 0. When the reset goes low, then based on the address generated
by the PA and received by the LUT the, corresponding values are present at the output of
the LUT, this is shown in Figure 4.11 below.
27
Texas Tech University, Shashikant Shrimali, May 2007
28
Texas Tech University, Shashikant Shrimali, May 2007
29
Texas Tech University, Shashikant Shrimali, May 2007
The output frequency obtained is 4.887 MHz, which is a little less than the desired
frequency due to loss of the fractional part of frequency tuning word. SFDR of 55.04 dB
is found from the PSD plot in Figure 4.16.
30
Texas Tech University, Shashikant Shrimali, May 2007
The phase truncation and its effect on output spectrum of DDFS have been
examined through this simulation. A 12-bit PA will generate a 12-bit phase value and a
LUT with entries 212 i.e. 4096 samples will be required. In this simulation, an additional
module for PT has been implemented. This module takes the 12-bit phase value
generated by the PA and outputs the 8 MSB’s leaving 4 LSB’s. These 8 most significant
31
Texas Tech University, Shashikant Shrimali, May 2007
bits of the phase are used to address the LUT. This can be seen in Figure 4.19, “q2”
represents the output of the PA and “pt” is the truncated phase value.
32
Texas Tech University, Shashikant Shrimali, May 2007
-10 X: 3.128e+006
Y: -5.982
-20
-30
-40
dB
-50
-60
-70
-80
-90
7
10
Hz
The SFDR from the PSD plot in Figure 4.21 is found to be 19.42 dB.
As indicated in previous chapters, phase truncation introduces amplitude errors,
and these errors are reflected as spurs in the output spectrum. To suppress these spurs a
random bit sequence, called dither, is added to the PA output before truncation. This
gives a better SFDR than phase truncation alone.
33
Texas Tech University, Shashikant Shrimali, May 2007
34
Texas Tech University, Shashikant Shrimali, May 2007
The figure 4.24 above shows the simulation result of the PA, PT and the Dither
modules connected together. The output of the PA is shown by signal “q2”, phase
truncated phase is shown by “pt” and the dither by “x”.
The PSD of the output
-10 X: 3.107e+006
Y: -5.538
-20
-30
-40
dB
-50
-60
-70
-80
-90
7
10
Hz
Looking at the PSD plot in Figure 4.25, SFDR is found to be 29.10 dB. As earlier
mentioned that PT introduces spurs in the output spectrum and addition of dither helps in
suppressing these spurs unto some extent.
These Verilog models are very user friendly and synthesizable on FPGA. One can
easily make changes to these models according to their application requirement and look
into different aspects of the DDFS.
35
Texas Tech University, Shashikant Shrimali, May 2007
36
Texas Tech University, Shashikant Shrimali, May 2007
$dist_normal function is an integer input which helps determine the shape of the density
function. Larger numbers for standard deviation will spread the returned values over a
wider range. With a mean of 0 and standard deviation of 1, $dist_normal generates
Gaussian distribution.
Figure 4.28 shows the random number generated using random function of VerilogA.
37
Texas Tech University, Shashikant Shrimali, May 2007
This random number is used to vary the delay time of the clock. When this
random number is integrated with the ideal clock, it randomly changes the delay time of
the clock pulse, which introduces jitter in the clock. The Figure 4.29 shows ideal clock.
Jitter induced clock can be seen in Figure 4.30 below. As shown, the delay time of the
jittered clock, represented by green, is different from the ideal clock, represented in
black.
38
Texas Tech University, Shashikant Shrimali, May 2007
The amount of jitter induced in the ideal clock is shown in Figure 4.31. The
amount of jitter can be varied by making very small changes in the clock module.
39
Texas Tech University, Shashikant Shrimali, May 2007
Figure 4.32 and Figure 4.33 shows DDFS with ideal clock and non-ideal clock
respectively. Figure 4.34 shows the output of the PA when clocked with the ideal clock.
Figure 4.35 shows the output of the PA when clocked with jittered clock.
40
Texas Tech University, Shashikant Shrimali, May 2007
As shown in Figure 4.34 and Figure 4.35, the PA overflows uniformly with the
ideal clock but non-uniformly with the jittered clock. This non-uniform overflow of PA
in Figure 4.35 is due to the effect of jitter present in the clock. For the clock with jitter,
the PA goes through non-uniform iterations. When this PA output is fed to the input of
the LUT, the LUT output’s samples at different times and this gives rise to spurs in the
output spectrum of the DDFS.
If an output frequency of 7.5 MHz is generated with a reference clock frequency
of 100 MHz, a frequency tuning word ( M ) of 19 is stored in the Phase Register. In this
design, the Phase Accumulator is 8-bit wide. This control word M is added to the
previous value of PA with each clock update.
Figure 4.36: Output spectrum of DDFS with ideal clock f out = 7.5 MHz
41
Texas Tech University, Shashikant Shrimali, May 2007
Figure 4.37: Output spectrum with clock jitter f out = 7.5 MHz
42
Texas Tech University, Shashikant Shrimali, May 2007
in the case of the clock with jitter, represented in red, is higher that the ideal clock.
Figure 4.39 above compares the output spectrums. For the output frequency of
12.11 MHz, the SFDR for the ideal clock spectrum is 36 dB and for the jitter clock
spectrum, the SFDR is 32.5 dB. There is a 3.5 dB loss of dynamic range.
43
Texas Tech University, Shashikant Shrimali, May 2007
Figure 4.40 and Figure 4.41 shows the effect of different values of jitter for the same
output frequency of 12.11 MHz. For a jitter of 1ns, SFDR is found to be 51.2 dB and for
a jitter of 2ns SFDR is 48.8 dB. The values of jitter presented are the average of 30 clock
cycles.
Figure 4.42: DDFS Output Spectrum with LUT having 8-bit samples
44
Texas Tech University, Shashikant Shrimali, May 2007
Figure 4.43: DDFS Output Spectrum with LUT having 12-bit samples
The spectrum plot, shown in Figure 4.42, is produced by using the LUT
containing 8-bit quantized samples and in Figure 4.43, using a LUT containing 12-bit
samples. Figure 4.42 shows a SFDR of 41.2dB and Figure 4.43shows a SFDR of 42dB.
If the output frequency is increased to 10 MHz, keeping the reference clock the
same and performing simulations for LUT containing 8-bit and 12-bit quantized samples.
In Figure 4.44, blue represents the spectrum generated by a LUT with 8-bit
quantized samples and red represents the spectrum generated by a LUT with 12-bit
quantized samples. The SFDR of the curve Blue is calculated to be 22.2 dB and red curve
45
Texas Tech University, Shashikant Shrimali, May 2007
is 23 dB. The change in SFDR, for this case, seems small and may be in an acceptable
range.
46
Texas Tech University, Shashikant Shrimali, May 2007
CHAPTER V
CONCLUSIONS AND FUTURE WORK
The DDFS models have been successfully created, implemented and simulated
using MATLAB-Simulink, ModelSim and Cadence Specter simulators. These models
have effectively shown the effect of each building block of the DDFS on the output.
These models are discussed in detail in Chapter IV along with simulation. The effects of
jitter on the output spectrum of DDFS with different simulation results have been
successfully presented. These simulations have provided a better understanding of the
response of DDFS with variation of jitter. Dynamic Range of 51.2 dB has been achieved
for a jitter of 1ns and 48.8 dB for a jitter of 2ns.
As the length of the phase accumulator increases, the size of the ROM/LUT
increases exponentially. This reduces the speed of the DDFS and increases the size of
hardware but more the number of bits in the phase accumulator, higher the frequency
resolution. Therefore, there exists a trade off between size, frequency resolution and the
speed. This issue of increase in the size of ROM can be solved with the phase truncation
but that introduces noise in the output. These spurs can be suppressed with the addition of
dither. This has been efficiently shown with different models of the DDFS.
The Verilog modules, presented in this thesis are synthesizable on FPGA. The
response of the DDFS mainly depends upon length of accumulator, desired output
frequency and the clock frequency, therefore one can change these values in the top
module and use these models to understand different aspects of DDFS and the effects on
output as per the application.
A methodology for the purpose of modeling and simulating the jitter in DDFS is
presented. The simulation is done at the behavioral level, and so is efficient enough to be
applied in a wide variety of applications. This methodology is flexible enough to be used
in a broad range of applications where noise and jitter is important.
47
Texas Tech University, Shashikant Shrimali, May 2007
48
Texas Tech University, Shashikant Shrimali, May 2007
LIST OF REFERENCES
[2] Direct Digital Synthesizers: Theory, Design and Applications- Jouko Vankka
Boston ; London : Kluwer Academic Publishers, 2001
[5] High Speed DACs and DDS Systems- Walt Kester, Online Available WWW:
http://www.analog.com/UploadedFiles/Associated_Docs/3670548256311702750332
4650252sect6.pdf.
Accessed on 1 January, 2007.
[6] Ask The Application Engineer—33, All About Direct Digital Synthesis
Volume 38 – August 2004: Eva Murphy , Colm Slattery, Online Available WWW:
http://www.analog.com/library/analogDialogue/archives/38-08/dds.html.
Accessed on 11 August, 2006.
49
Texas Tech University, Shashikant Shrimali, May 2007
[9] New direct digital frequency synthesizer architecture for mobile transceivers
Hegazi, E.M.; Ragaie, H.F.; Haddara, H.; Ghali, H. Circuits and Systems, 1998.
ISCAS' 98. Proceedings of the 1998 IEEE International Symposium on, Volume:
3, 1998 Page(s): 647 -650 vol.3.
[12] CMOS/SOS frequency synthesizer LSI circuit for spread spectrum communications
-D.Sunderland, R.Strauch, S.Wharfield, H.Peterson, and C.Cole, IEEE J. Solid-state
Circuits, vol. SC-19, pp 497-505, Aug. 1984.
[13] The optimization of direct digital frequency synthesizer performance in the presence
of finite word length effects- H.Nicholas, H.Samueli, and B.Ki, 42nd Annul.
Frequency Control Symp., 1988, pp.357-363.
50
Texas Tech University, Shashikant Shrimali, May 2007
[15] A 2-V, 2-GHz low-power direct digital frequency synthesizer chip-set for wireless
communication- Yamagishi, A.; Ishikawa, M.; Tsukahara, T.; Date, S.
Solid-State Circuits, IEEE Journal of, Volume: 33 Issue: 2, Feb. 1998
Page(s): 210 –217.
[17] Nicholas, H.T., and Samueli H., “ An analysis of output spectrum of direct digital
frequency synthesizer in the presence of phase accumulator truncation”,
Proceedings of the 41st. IEEE Annual Frequency Control Symposium pp495-502.
51
Texas Tech University, Shashikant Shrimali, May 2007
APPENDIX A
VerilogA Modules:
`include "constants.h"
`include "discipline.h"
module ADDER(in1,in2,out);
input in1,in2;
output out;
electrical in1,in2;
electrical out;
real out_reg;
analog begin
out_reg = V(in1)+V(in2);
if (out_reg > 1)
out_reg = out_reg - 1;
V(out) <+ transition(out_reg,1e-9,1e-9);
end
endmodule
`include "constants.h"
`include "disciplines.h"
module Look_up_table(clk,address,LUT_out);
52
Texas Tech University, Shashikant Shrimali, May 2007
analog begin
threshold = 0.5;
@(initial_step)
begin
// sine values
LUT[0]=0.0234;
LUT[1]=0.0469;
LUT[2]=0.0703;
LUT[3]=0.0938;
LUT[4]=0.1172;
LUT[5]=0.1406;
LUT[6]=0.1641;
LUT[7]=0.1875;
LUT[8]=0.2188;
LUT[9]=0.2422;
LUT[10]=0.2656;
LUT[11]=0.2891;
LUT[12]=0.3125;
LUT[13]=0.3359;
LUT[14]=0.3594;
LUT[15]=0.375;
53
Texas Tech University, Shashikant Shrimali, May 2007
LUT[16]=0.3984;
LUT[17]=0.4219;
LUT[18]=0.4453;
LUT[19]=0.4688;
LUT[20]=0.4922;
LUT[21]=0.5078;
LUT[22]=0.5312;
LUT[23]=0.5547;
LUT[24]=0.5703;
LUT[25]=0.5938;
LUT[26]=0.6094;
LUT[27]=0.6328;
LUT[28]=0.6484;
LUT[29]=0.6641;
LUT[30]=0.6875;
LUT[31]=0.7031;
LUT[32]=0.7188;
LUT[33]=0.7344;
LUT[34]=0.75;
LUT[35]=0.7656;
LUT[36]=0.7812;
LUT[37]=0.7969;
LUT[38]=0.8125;
LUT[39]=0.8281;
LUT[40]=0.8438;
LUT[41]=0.8516;
LUT[42]=0.8672;
LUT[43]=0.875;
LUT[44]=0.8906;
LUT[45]=0.8984;
LUT[46]=0.9141;
LUT[47]=0.9219;
LUT[48]=0.9297;
LUT[49]=0.9375;
LUT[50]=0.9453;
LUT[51]=0.9531;
54
Texas Tech University, Shashikant Shrimali, May 2007
LUT[52]=0.9609;
LUT[53]=0.9688;
LUT[54]=0.9688;
LUT[55]=0.9766;
LUT[56]=0.9844;
LUT[57]=0.9844;
LUT[58]=0.9922;
LUT[59]=0.9922;
LUT[60]=0.9922;
LUT[61]=0.9922;
LUT[62]=0.9922;
LUT[63]=0.9922;
LUT[64]=0.9922;
LUT[65]=0.9922;
LUT[66]=0.9922;
LUT[67]=0.9922;
LUT[68]=0.9922;
LUT[69]=0.9844;
LUT[70]=0.9844;
LUT[71]=0.9766;
LUT[72]=0.9688;
LUT[73]=0.9688;
LUT[74]=0.9609;
LUT[75]=0.9531;
LUT[76]=0.9453;
LUT[77]=0.9375;
LUT[78]=0.9297;
LUT[79]=0.9219;
LUT[80]=0.9141;
LUT[81]=0.8984;
LUT[82]=0.8906;
LUT[83]=0.875;
LUT[84]=0.8672;
LUT[85]=0.8516;
LUT[86]=0.8438;
LUT[87]=0.8281;
55
Texas Tech University, Shashikant Shrimali, May 2007
LUT[88]=0.8125;
LUT[89]=0.7969;
LUT[90]=0.7812;
LUT[91]=0.7656;
LUT[92]=0.75;
LUT[93]=0.7344;
LUT[94]=0.7188;
LUT[95]=0.7031;
LUT[96]=0.6875;
LUT[97]=0.6641;
LUT[98]=0.6484;
LUT[99]=0.6328;
LUT[100]=0.6094;
LUT[101]=0.5938;
LUT[102]=0.5703;
LUT[103]=0.5547;
LUT[104]=0.5312;
LUT[105]=0.5078;
LUT[106]=0.4922;
LUT[107]=0.4688;
LUT[108]=0.4453;
LUT[109]=0.4219;
LUT[110]=0.3984;
LUT[111]=0.375;
LUT[112]=0.3594;
LUT[113]=0.3359;
LUT[114]=0.3125;
LUT[115]=0.2891;
LUT[116]=0.2656;
LUT[117]=0.2422;
LUT[118]=0.2188;
LUT[119]=0.1875;
LUT[120]=0.1641;
LUT[121]=0.1406;
LUT[122]=0.1172;
LUT[123]=0.0938;
56
Texas Tech University, Shashikant Shrimali, May 2007
LUT[124]=0.0703;
LUT[125]=0.0469;
LUT[126]=0.0234;
LUT[127]=0;
LUT[128]=-0.0234;
LUT[129]=-0.0469;
LUT[130]=-0.0703;
LUT[131]=-0.0938;
LUT[132]=-0.1172;
LUT[133]=-0.1406;
LUT[134]=-0.1641;
LUT[135]=-0.1875;
LUT[136]=-0.2188;
LUT[137]=-0.2422;
LUT[138]=-0.2656;
LUT[139]=-0.2891;
LUT[140]=-0.3125;
LUT[141]=-0.3359;
LUT[142]=-0.3594;
LUT[143]=-0.375;
LUT[144]=-0.3984;
LUT[145]=-0.4219;
LUT[146]=-0.4453;
LUT[147]=-0.4688;
LUT[148]=-0.4922;
LUT[149]=-0.5078;
LUT[150]=-0.5312;
LUT[151]=-0.5547;
LUT[152]=-0.5703;
LUT[153]=-0.5938;
LUT[154]=-0.6094;
LUT[155]=-0.6328;
LUT[156]=-0.6484;
LUT[157]=-0.6641;
LUT[158]=-0.6875;
LUT[159]=-0.7031;
57
Texas Tech University, Shashikant Shrimali, May 2007
LUT[160]=-0.7188;
LUT[161]=-0.7344;
LUT[162]=-0.75;
LUT[163]=-0.7656;
LUT[164]=-0.7812;
LUT[165]=-0.7969;
LUT[166]=-0.8125;
LUT[167]=-0.8281;
LUT[168]=-0.8438;
LUT[169]=-0.8516;
LUT[170]=-0.8672;
LUT[171]=-0.875;
LUT[172]=-0.8906;
LUT[173]=-0.8984;
LUT[174]=-0.9141;
LUT[175]=-0.9219;
LUT[176]=-0.9297;
LUT[177]=-0.9375;
LUT[178]=-0.9453;
LUT[179]=-0.9531;
LUT[180]=-0.9609;
LUT[181]=-0.9688;
LUT[182]=-0.9688;
LUT[183]=-0.9766;
LUT[184]=-0.9844;
LUT[185]=-0.9844;
LUT[186]=-0.9922;
LUT[187]=-0.9922;
LUT[188]=-0.9922;
LUT[189]=-0.9922;
LUT[190]=-0.9922;
LUT[191]=-0.9922;
LUT[192]=-0.9922;
LUT[193]=-0.9922;
LUT[194]=-0.9922;
LUT[195]=-0.9922;
58
Texas Tech University, Shashikant Shrimali, May 2007
LUT[196]=-0.9922;
LUT[197]=-0.9844;
LUT[198]=-0.9844;
LUT[199]=-0.9766;
LUT[200]=-0.9688;
LUT[201]=-0.9688;
LUT[202]=-0.9609;
LUT[203]=-0.9531;
LUT[204]=-0.9453;
LUT[205]=-0.9375;
LUT[206]=-0.9297;
LUT[207]=-0.9219;
LUT[208]=-0.9141;
LUT[209]=-0.8984;
LUT[210]=-0.8906;
LUT[211]=-0.875;
LUT[212]=-0.8672;
LUT[213]=-0.8516;
LUT[214]=-0.8438;
LUT[215]=-0.8281;
LUT[216]=-0.8125;
LUT[217]=-0.7969;
LUT[218]=-0.7812;
LUT[219]=-0.7656;
LUT[220]=-0.75;
LUT[221]=-0.7344;
LUT[222]=-0.7188;
LUT[223]=-0.7031;
LUT[224]=-0.6875;
LUT[225]=-0.6641;
LUT[226]=-0.6484;
LUT[227]=-0.6328;
LUT[228]=-0.6094;
LUT[229]=-0.5938;
LUT[230]=-0.5703;
LUT[231]=-0.5547;
59
Texas Tech University, Shashikant Shrimali, May 2007
LUT[232]=-0.5312;
LUT[233]=-0.5078;
LUT[234]=-0.4922;
LUT[235]=-0.4688;
LUT[236]=-0.4453;
LUT[237]=-0.4219;
LUT[238]=-0.3984;
LUT[239]=-0.375;
LUT[240]=-0.3594;
LUT[241]=-0.3359;
LUT[242]=-0.3125;
LUT[243]=-0.2891;
LUT[244]=-0.2656;
LUT[245]=-0.2422;
LUT[246]=-0.2188;
LUT[247]=-0.1875;
LUT[248]=-0.1641;
LUT[249]=-0.1406;
LUT[250]=-0.1172;
LUT[251]=-0.0938;
LUT[252]=-0.0703;
LUT[253]=-0.0469;
LUT[254]=-0.0234;
LUT[255]=0;
end
60
Texas Tech University, Shashikant Shrimali, May 2007
`include "constants.h"
`include "disciplines.h"
module random1(out);
output out;
electrical out;
parameter period = 1;
integer seed;
real x;
analog begin
@(timer(0, period))
seed = 1;
x= ($rdist_normal(seed,1,1));
V(out) <+ transition(x/1, 0, period/100);
end
endmodule
`include "constants.vams"
`include "disciplines.vams"
61
Texas Tech University, Shashikant Shrimali, May 2007
input in,clk;
output clkout;
electrical in, clk, clkout;
parameter real tr = 1e-9;
parameter real tf= 1e-9;
real vin;
real vout;
analog begin
vin = V(in)*1e-15;
`include "discipline.h"
voltage clk, d, q;
input clk;
input d;
output q;
real temp;
analog begin
@(initial_step)
temp = 0;
62
Texas Tech University, Shashikant Shrimali, May 2007
`include "constants.h"
`include "disciplines.h"
input in;
output out;
parameter real pole = 500000;
voltage in, out;
analog begin
63
Texas Tech University, Shashikant Shrimali, May 2007
APPENDIX B
Verilog Modules:
always@(posedge clk)
begin
if(reset == 1'b1)
begin
LUT[0]<=8'b00000011;
LUT[1]<=8'b00000110;
LUT[2]<=8'b00001001;
LUT[3]<=8'b00001100;
LUT[4]<=8'b00001111;
LUT[5]<=8'b00010010;
LUT[6]<=8'b00010101;
LUT[7]<=8'b00011000;
LUT[8]<=8'b00011100;
LUT[9]<=8'b00011111;
LUT[10]<=8'b00100010;
LUT[11]<=8'b00100101;
LUT[12]<=8'b00101000;
LUT[13]<=8'b00101011;
LUT[14]<=8'b00101110;
LUT[15]<=8'b00110000;
64
Texas Tech University, Shashikant Shrimali, May 2007
LUT[16]<=8'b00110011;
LUT[17]<=8'b00110110;
LUT[18]<=8'b00111001;
LUT[19]<=8'b00111100;
LUT[20]<=8'b00111111;
LUT[21]<=8'b01000001;
LUT[22]<=8'b01000100;
LUT[23]<=8'b01000111;
LUT[24]<=8'b01001001;
LUT[25]<=8'b01001100;
LUT[26]<=8'b01001110;
LUT[27]<=8'b01010001;
LUT[28]<=8'b01010011;
LUT[29]<=8'b01010101;
LUT[30]<=8'b01011000;
LUT[31]<=8'b01011010;
LUT[32]<=8'b01011100;
LUT[33]<=8'b01011110;
LUT[34]<=8'b01100000;
LUT[35]<=8'b01100010;
LUT[36]<=8'b01100100;
LUT[37]<=8'b01100110;
LUT[38]<=8'b01101000;
LUT[39]<=8'b01101010;
LUT[40]<=8'b01101100;
LUT[41]<=8'b01101101;
LUT[42]<=8'b01101111;
LUT[43]<=8'b01110000;
LUT[44]<=8'b01110010;
LUT[45]<=8'b01110011;
LUT[46]<=8'b01110101;
LUT[47]<=8'b01110110;
LUT[48]<=8'b01110111;
LUT[49]<=8'b01111000;
LUT[50]<=8'b01111001;
LUT[51]<=8'b01111010;
65
Texas Tech University, Shashikant Shrimali, May 2007
LUT[52]<=8'b01111011;
LUT[53]<=8'b01111100;
LUT[54]<=8'b01111100;
LUT[55]<=8'b01111101;
LUT[56]<=8'b01111110;
LUT[57]<=8'b01111110;
LUT[58]<=8'b01111111;
LUT[59]<=8'b01111111;
LUT[60]<=8'b01111111;
LUT[61]<=8'b01111111;
LUT[62]<=8'b01111111;
LUT[63]<=8'b01111111;
LUT[64]<=8'b01111111;
LUT[65]<=8'b01111111;
LUT[66]<=8'b01111111;
LUT[67]<=8'b01111111;
LUT[68]<=8'b01111111;
LUT[69]<=8'b01111110;
LUT[70]<=8'b01111110;
LUT[71]<=8'b01111101;
LUT[72]<=8'b01111100;
LUT[73]<=8'b01111100;
LUT[74]<=8'b01111011;
LUT[75]<=8'b01111010;
LUT[76]<=8'b01111001;
LUT[77]<=8'b01111000;
LUT[78]<=8'b01110111;
LUT[79]<=8'b01110110;
LUT[80]<=8'b01110101;
LUT[81]<=8'b01110011;
LUT[82]<=8'b01110010;
LUT[83]<=8'b01110000;
LUT[84]<=8'b01101111;
LUT[85]<=8'b01101101;
LUT[86]<=8'b01101100;
LUT[87]<=8'b01101010;
66
Texas Tech University, Shashikant Shrimali, May 2007
LUT[88]<=8'b01101000;
LUT[89]<=8'b01100110;
LUT[90]<=8'b01100100;
LUT[91]<=8'b01100010;
LUT[92]<=8'b01100000;
LUT[93]<=8'b01011110;
LUT[94]<=8'b01011100;
LUT[95]<=8'b01011010;
LUT[96]<=8'b01011000;
LUT[97]<=8'b01010101;
LUT[98]<=8'b01010011;
LUT[99]<=8'b01010001;
LUT[100]<=8'b01001110;
LUT[101]<=8'b01001100;
LUT[102]<=8'b01001001;
LUT[103]<=8'b01000111;
LUT[104]<=8'b01000100;
LUT[105]<=8'b01000001;
LUT[106]<=8'b00111111;
LUT[107]<=8'b00111100;
LUT[108]<=8'b00111001;
LUT[109]<=8'b00110110;
LUT[110]<=8'b00110011;
LUT[111]<=8'b00110000;
LUT[112]<=8'b00101110;
LUT[113]<=8'b00101011;
LUT[114]<=8'b00101000;
LUT[115]<=8'b00100101;
LUT[116]<=8'b00100010;
LUT[117]<=8'b00011111;
LUT[118]<=8'b00011100;
LUT[119]<=8'b00011000;
LUT[120]<=8'b00010101;
LUT[121]<=8'b00010010;
LUT[122]<=8'b00001111;
LUT[123]<=8'b00001100;
67
Texas Tech University, Shashikant Shrimali, May 2007
LUT[124]<=8'b00001001;
LUT[125]<=8'b00000110;
LUT[126]<=8'b00000011;
LUT[127]<=8'b00000000;
LUT[128]<=8'b11111100;
LUT[129]<=8'b11111001;
LUT[130]<=8'b11110110;
LUT[131]<=8'b11110011;
LUT[132]<=8'b11110000;
LUT[133]<=8'b11101101;
LUT[134]<=8'b11101010;
LUT[135]<=8'b11100111;
LUT[136]<=8'b11100011;
LUT[137]<=8'b11100000;
LUT[138]<=8'b11011101;
LUT[139]<=8'b11011010;
LUT[140]<=8'b11010111;
LUT[141]<=8'b11010100;
LUT[142]<=8'b11010001;
LUT[143]<=8'b11001111;
LUT[144]<=8'b11001100;
LUT[145]<=8'b11001001;
LUT[146]<=8'b11000110;
LUT[147]<=8'b11000011;
LUT[148]<=8'b11000000;
LUT[149]<=8'b10111110;
LUT[150]<=8'b10111011;
LUT[151]<=8'b10111000;
LUT[152]<=8'b10110110;
LUT[153]<=8'b10110011;
LUT[154]<=8'b10110001;
LUT[155]<=8'b10101110;
LUT[156]<=8'b10101100;
LUT[157]<=8'b10101010;
LUT[158]<=8'b10100111;
LUT[159]<=8'b10100101;
68
Texas Tech University, Shashikant Shrimali, May 2007
LUT[160]<=8'b10100011;
LUT[161]<=8'b10100001;
LUT[162]<=8'b10011111;
LUT[163]<=8'b10011101;
LUT[164]<=8'b10011011;
LUT[165]<=8'b10011001;
LUT[166]<=8'b10010111;
LUT[167]<=8'b10010101;
LUT[168]<=8'b10010011;
LUT[169]<=8'b10010010;
LUT[170]<=8'b10010000;
LUT[171]<=8'b10001111;
LUT[172]<=8'b10001101;
LUT[173]<=8'b10001100;
LUT[174]<=8'b10001010;
LUT[175]<=8'b10001001;
LUT[176]<=8'b10001000;
LUT[177]<=8'b10000111;
LUT[178]<=8'b10000110;
LUT[179]<=8'b10000101;
LUT[180]<=8'b10000100;
LUT[181]<=8'b10000011;
LUT[182]<=8'b10000011;
LUT[183]<=8'b10000010;
LUT[184]<=8'b10000001;
LUT[185]<=8'b10000001;
LUT[186]<=8'b10000000;
LUT[187]<=8'b10000000;
LUT[188]<=8'b10000000;
LUT[189]<=8'b10000000;
LUT[190]<=8'b10000000;
LUT[191]<=8'b10000000;
LUT[192]<=8'b10000000;
LUT[193]<=8'b10000000;
LUT[194]<=8'b10000000;
LUT[195]<=8'b10000000;
69
Texas Tech University, Shashikant Shrimali, May 2007
LUT[196]<=8'b10000000;
LUT[197]<=8'b10000001;
LUT[198]<=8'b10000001;
LUT[199]<=8'b10000010;
LUT[200]<=8'b10000011;
LUT[201]<=8'b10000011;
LUT[202]<=8'b10000100;
LUT[203]<=8'b10000101;
LUT[204]<=8'b10000110;
LUT[205]<=8'b10000111;
LUT[206]<=8'b10001000;
LUT[207]<=8'b10001001;
LUT[208]<=8'b10001010;
LUT[209]<=8'b10001100;
LUT[210]<=8'b10001101;
LUT[211]<=8'b10001111;
LUT[212]<=8'b10010000;
LUT[213]<=8'b10010010;
LUT[214]<=8'b10010011;
LUT[215]<=8'b10010101;
LUT[216]<=8'b10010111;
LUT[217]<=8'b10011001;
LUT[218]<=8'b10011011;
LUT[219]<=8'b10011101;
LUT[220]<=8'b10011111;
LUT[221]<=8'b10100001;
LUT[222]<=8'b10100011;
LUT[223]<=8'b10100101;
LUT[224]<=8'b10100111;
LUT[225]<=8'b10101010;
LUT[226]<=8'b10101100;
LUT[227]<=8'b10101110;
LUT[228]<=8'b10110001;
LUT[229]<=8'b10110011;
LUT[230]<=8'b10110110;
LUT[231]<=8'b10111000;
70
Texas Tech University, Shashikant Shrimali, May 2007
LUT[232]<=8'b10111011;
LUT[233]<=8'b10111110;
LUT[234]<=8'b11000000;
LUT[235]<=8'b11000011;
LUT[236]<=8'b11000110;
LUT[237]<=8'b11001001;
LUT[238]<=8'b11001100;
LUT[239]<=8'b11001111;
LUT[240]<=8'b11010001;
LUT[241]<=8'b11010100;
LUT[242]<=8'b11010111;
LUT[243]<=8'b11011010;
LUT[244]<=8'b11011101;
LUT[245]<=8'b11100000;
LUT[246]<=8'b11100011;
LUT[247]<=8'b11100111;
LUT[248]<=8'b11101010;
LUT[249]<=8'b11101101;
LUT[250]<=8'b11110000;
LUT[251]<=8'b11110011;
LUT[252]<=8'b11110110;
LUT[253]<=8'b11111001;
LUT[254]<=8'b11111100;
LUT[255]<=8'b11111111;
end
else
LUT_out <= LUT[address];
end
endmodule
71
Texas Tech University, Shashikant Shrimali, May 2007
endmodule
72
Texas Tech University, Shashikant Shrimali, May 2007
begin
if (reset==1)
x <= 0;
else
x <= {x[1:2], !x[0]};
end
endmodule
if (reset == 1'b1)
begin
q <= 12'd0;
end
else
begin
q <= d;
end
end
endmodule
73
Texas Tech University, Shashikant Shrimali, May 2007
if(reset ==1)
d1 <= 12'b000011111101;
else
out1 <= out;
end
endmodule
74
Texas Tech University, Shashikant Shrimali, May 2007
PERMISSION TO COPY
__________________________________ ___________________
Student Signature Date