A Design Methodology For Implementing DSP With Xilinx System Generator For Matlab
A Design Methodology For Implementing DSP With Xilinx System Generator For Matlab
Matlab@
Absnacr- This paper presents a methodology for Field reconfigurabilty of FPGA systems allows
implementing real-time DSP applications on a programming their hardware for a specific inshument
reconfigurable logic platform using Xilinx' System and/or computing system. The use of FPGA systems
Generator for Matlab@. The methodology aims at reduces the overall system development time. The physical
improving the eficiency of learning the use of such and electrical testing of the hardware can be done
complex design system. The methodology steps will be concurrently with the detailed design and programming of
demonstrated using DSP design examples built with the system. Design errors can be caught and easily
Xilinx@System Generator for Matlab'. Assessment of rectified at any stage of the development process. This
the methodology is also discussed. minimizes the effect of errors on the project schedule.
0-7803-7339-1/02/$17.0002002 IEEE
404
--I
405
2.) A/D Converter and Comparison Stage In order to make the counter work properly, a flag
needs to be set and held until the simulation ended or the
The second stage of the design is the conversion of the system was reset. With any digital system, the best way to
analog (or continuous time) signal into a digital (or hold a value at a certain time would be to use a state
discrete time) signal and the comparison of the two input machine. With the System GeneratorE state machine
waves (Figure 3). block, the state is controlled by a single hit. The best way
to set and hold a flag was to set the output to logical '1'
when the state machine received a signal from the
comparer in stage 2. This is why two state machines are
used (See Figure 4.) When the fmt state machine receives
a signal from the comparer, a signal is sent to the next
stage to start the counting. When the second comparer
sends the signal, the XOR logic stops the signal from
going to the counter.
Stages 2 through 5 all use the XiIiiCt design blocks Figure 5a shows the System view of the counter stage.
so that System GeneratorE can convert the design from Figure 5b shows the design of the delay counter. The
Sholink@ to VHDL. To allow an analog input for the counter stage is the beart of the design. The counter starts
FPGA chip, an A/D converter is needed. The A/D counting when the fust signal reaches 2 volts and stops
converter was set to signed, 16 and 8 binary point bits to counting when the second signal reached 2 volts. Since the
allow for the analog signal to swing from +5 volts to - 5 counter is set to count every le-5 samples (the same as the
volts. A sample period of le-5 was set in order to see a sample rate of the A D converter), the counter is counting
delay as little as 10 microseconds. The comparison blocks the delay between the two signals.
are used as a trigger. When the input signals are greater
then 2 volts, a signal is sent from the comparer stage to the
next stage to set a flag for the counter.
406
Figure 6: Output Stage
The output stage (Figure 6) consists of a D/A Figure 8: Output with 3 delay set 10 SO microseconds
converter and an output scope. This stage is not needed for note: Y-axis shows the calculated time delay)
the design to work. For simulation purpose in SimulinkQ,
the D/A is needed in order to display the data to the scope. V. THE SYSTEM GENEXATORQ SOFTWARE TO
PRODUCE VHDL CODE AND TEST BENCH.
407
Figure 10 shows the System [email protected]
window tells the Xilinxm ISE 4.2 the chip to be used and
the clock speed of the design to be set. For simulation
purpose, the major switch is the “Create Test bench”. This
switch when selected will automatically create a test bench
for the system in VHDL along with creating the VHDL
code of the system.
M.REFERENCES
408