Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
learn:courses:digital-projects:blinking-leds:start [2023/10/19 17:11] – created Martha | learn:courses:digital-projects:blinking-leds:start [2023/11/07 00:07] (current) – Arthur Brown | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | ===== Blinking LEDs ===== | + | |
- | + | ||
===== Introduction ===== | ===== Introduction ===== | ||
A flip-flop is an edge-triggered memory circuit. In this project, we will implement a flip-flop behaviorally using Verilog®, and use a bunch of flip-flops to implement a clock divider that blinks the LEDs. | A flip-flop is an edge-triggered memory circuit. In this project, we will implement a flip-flop behaviorally using Verilog®, and use a bunch of flip-flops to implement a clock divider that blinks the LEDs. | ||
Before you begin, you should: | Before you begin, you should: | ||
- | * Have the Xilinx® ISE WebPACK™ | + | * Have Vivado |
* Have your FPGA board set up. | * Have your FPGA board set up. | ||
* Be able to describe a digital circuit using logic operators. | * Be able to describe a digital circuit using logic operators. | ||
- | * Be able to write test bench and simulate circuit using ISim. | + | * Be able to write test bench and simulate circuit using Vivado' |
* Be able to model and simulate circuit delay. | * Be able to model and simulate circuit delay. | ||
Line 19: | Line 16: | ||
===== Inventory===== | ===== Inventory===== | ||
- | * 1 Digilent Nexys 4, Nexys 3, Nexys 2, or Basys 2 FPGA Board | + | * Digilent Nexys A7 or Basys 3 FPGA Board |
- | * Xilinx ISE Design Suite: WebPACK (14.6 Recommended) | + | * Vivado Installation |
- | * Digilent Adept | + | |
Line 35: | Line 31: | ||
===== Step 1: Implement D-FF ===== | ===== Step 1: Implement D-FF ===== | ||
- | In this step, we are going to implement a D-FF with asynchronous reset. | + | In this step, we are going to implement a D-FF with asynchronous reset.\\ \\ |
1. As the block diagram in Fig. 1 shows, D flip-flops have three inputs: data input (D), clock input (//clk//), and asynchronous reset input (//rst//, active high), and one output: //data output// (Q). | 1. As the block diagram in Fig. 1 shows, D flip-flops have three inputs: data input (D), clock input (//clk//), and asynchronous reset input (//rst//, active high), and one output: //data output// (Q). | ||
Line 258: | Line 254: | ||
{{ : | {{ : | ||
- | Screenshot above is from Xilinx ISim running on Microsoft Windows 7. Altered to enhance visual understanding.}} | + | }} |
< | < | ||
- | < | + | < |
</ | </ | ||
- | Now you can create | + | Now you can create |
---- | ---- | ||
===== Test Your Knowledge! ===== | ===== Test Your Knowledge! ===== | ||
- | Now that you've completed this project, try these modifications: | + | Now that you've completed this project, try these modifications: |
1. Can you add two switches to control how fast the LED blinks: Say, if switch[1:0] is 0, LED blink frequency is 0.745 Hz; if switch[1:0] is 1, LED blink frequency is 1.49 Hz; if switch[1:0] is 2, LED blink frequency is 2.98 Hz; if switch[1:0] is 3, LED blink frequency is 5.96 Hz. | 1. Can you add two switches to control how fast the LED blinks: Say, if switch[1:0] is 0, LED blink frequency is 0.745 Hz; if switch[1:0] is 1, LED blink frequency is 1.49 Hz; if switch[1:0] is 2, LED blink frequency is 2.98 Hz; if switch[1:0] is 3, LED blink frequency is 5.96 Hz. | ||