Lab 06
Lab 06
Lab 06
ELE-408
FPGA BASED SYSTEM DESIGN
7th Semester fall 2020
Name:
Register No./C.NO :
Venue: Computer Laboratory # 1
Lab No. : 6
Lab Tile : clock division using Internal Clock Of Spartan 3 Board And Blinking An
External Connected Led At Different Frequency.
Date of Conduction:
Date of Submission:
Particulars Maximum Marks Marks Obtained
Pre –lab 20
Data analysis 30
Punctuality 20
Total 100
REPORT VERIFICATION
Date:
Signature:
LAB #6
CLOCK DIVISION USING INTERNAL CLOCK OF SPARTAN 3
BOARD AND BLINKING AN EXTERNAL CONNECTED LED AT
DIFFERENT FREQUENCY
6.1 AIM
The aim of this lab is to introduce the student how to use the expansion connector to connect FPGA to
external environment. And this will be done by writing a Verilog code that blinks an led connected to A1
port of development board at different frequency. The blinking frequencies will be set by accessing the
internal clock oscillator.
6.2 OBJECTIVE
After completing this lab, you will be able to:
6.3 THEORY
6.3.1 INTRODUCTION
The Spartan-3 Starter Kit board has three 40-pin expansion connectors labeled A1, A2, and B1.
The A1 and A2 connectors, indicated as and, respectively, in Figure 6-1, are on the top edge of
the board. Connector A1 is on the top left, and A2 is on the top right. The B1 connector,
indicated as in Figure 6-1, is along the right edge of the board.
Each port offers some ability to program the FPGA on the Spartan-3 Starter Kit Board. For example, port
A1 provides additional logic to drive the FPGA and Platform Flash JTAG chain. Similarly, ports A2 and B1
provide connections for Master or Slave Serial mode configuration. Finally, port B1 also offers Master or
Slave Parallel configuration mode. Each 40-pin expansion header, shown in Figure 13-2, uses 0.1-inch
(100 mil) DIP spacing. Pin 1 on each connector is always GND. Similarly, pin 2 is always the +5V DC
output from the switching power supply. Pin 3 is always the output from the +3.3V DC regulator.
The Spartan-3 Starter Kit board has a dedicated 50 MHz Epson SG-8002JF series clock oscillator source
and an optional socket for another clock oscillator source. Anyone can Use the 50 MHz clock frequency
as it is or derive other frequencies using the FPGAs Digital Clock Managers (DCMs). The pin configuration
to access the clock and socket is shown in the table.
6.4 PRE-LAB:
1. Calculate the bit size of the register to count 50MHz of clock signal.
input CLOCK_50;
output LEDG
reg stateled ;
begin
end
endmodule
input clk,
);
reg[26:0] counter=27'd0;
begin
if(counter>=(dividingfactor-1))
end
endmodule
6.8 PROCEDURE:
1. Double click the project navigator and select the option File-New project.
2. Give the project name.
3. Select Verilog module.
4. Type your Verilog coding.(described in sec 4.6 )
5. Check for syntax.
6. Choose behavioral simulation and simulate it by Xilinx ISE simulator.
7. Define UCF file.
8. Synthesize your design.
9. Implement your design
10. Generate programming file
11. Using JTAG cable configure your target device with .bit file
12. Verify the output on the fpga by watching the status of led.
6.9 IN LAB-TASK
1. Write a code for slow blinking of led.
2. Simulate the code and verify the results .
3. Create different frequencies using the above clock division method
Result
POST-LAB TASK