Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
learn:software:tutorials:verilog-project-2:start [2017/01/25 17:35] – James Colvin | learn:software:tutorials:verilog-project-2:start [2022/09/08 20:38] (current) – changed forum.digilentinc.com to forum.digilent.com Jeffrey | ||
---|---|---|---|
Line 6: | Line 6: | ||
===== Project Overview ===== | ===== Project Overview ===== | ||
- | The goal of this project is to take the [[learn/ | + | The goal of this project is to take the [[learn/ |
A list of the previous projects can be found [[learn/ | A list of the previous projects can be found [[learn/ | ||
- | //This project presumes you are using an FPGA development board that has external slide switches and LEDs built into the board, much like the [[http://store.digilentinc.com/fpga-programmable-logic/ | + | //This project presumes you are using an FPGA development board that has external slide switches and LEDs built into the board, much like the [[https://digilent.com/shop/boards-and-components/ |
===== Some Background Information ===== | ===== Some Background Information ===== | ||
- | The digital circuit we are building from Project 1 is called led_sw. With this project, the FPGA is receiving an input signal, in this case from an embedded switch, that can be logic high, ' | + | The digital circuit we are building from Project 1 is called led_sw. With this project, the FPGA is receiving an input signal, in this case from an embedded switch, that can be logic high, ' |
===== Relooking at the Simple Example HDL ===== | ===== Relooking at the Simple Example HDL ===== | ||
Line 46: | Line 46: | ||
===== Programming our FPGA ===== | ===== Programming our FPGA ===== | ||
- | > 0) If you haven' | + | > 0) If you haven' |
> 1) On the opening screen, click on the '' | > 1) On the opening screen, click on the '' | ||
Line 72: | Line 72: | ||
> | > | ||
- | > 7) After clicking next on the IP cores since we don't have any to add, click '' | + | > 7) After clicking next on the IP cores since we don't have any to add, click '' |
> | > | ||
> | > | ||
Line 104: | Line 104: | ||
> | > | ||
- | > 15) Now we just need to add the functionality of how our circuit module we are creating on the FPGA that has a single input and a single output is going to work. This is done between the '' | + | > 15) Now we just need to add the functionality of how our circuit module we are creating on the FPGA that has a single input and a single output is going to work. This is done by declaring our inputs and outputs |
>'' | >'' | ||
> Press Cntl+S to save your changes. | > Press Cntl+S to save your changes. | ||
Line 115: | Line 115: | ||
> | > | ||
- | > 17) Our XDC will become visible in the workspace window (as mentioned in the step above). As this is a master XDC file (at least for me) there' | + | > 17) Our XDC will become visible in the workspace window (as mentioned in the step above). As this is a master XDC file (at least for me) there' |
> | > | ||
> | > | ||
Line 167: | Line 167: | ||
> | > | ||
- | You'll then be asked to choose the bitstream file (we don't have a debug core in our code, so we won't put anything in that field) | ||
> 28) You'll then be asked to choose the bitstream file that we are to program the FPGA with; we don't have a debug core in our code, so we won't have to put anything in that field. | > 28) You'll then be asked to choose the bitstream file that we are to program the FPGA with; we don't have a debug core in our code, so we won't have to put anything in that field. | ||
> | > | ||
Line 182: | Line 181: | ||
Now we're done! The way this project was setup, the first switch (labeled '' | Now we're done! The way this project was setup, the first switch (labeled '' | ||
- | insert a picture of this working here FIXME :!: | + | {{:learn:software: |
- | + | ||
- | also need to fix images 15, 26, and 27 to have the module be called '' | + | |
==== Multiple Switches and LEDs ==== | ==== Multiple Switches and LEDs ==== | ||
But why restrict ourselves to a single input and a single output? Perhaps instead we want create a '' | But why restrict ourselves to a single input and a single output? Perhaps instead we want create a '' | ||
- | As I am using the [[http://store.digilentinc.com/ | + | As I am using the [[https://digilent.com/shop/arty-a7-artix-7-fpga-development-board/ |
- | probably three different portions of this: the 1 to 1 ratio, the 1 to 1 with some NOT's incorporated, and bus to bus with some binary incorporated. | + | This tutorial presumes that you created a new project to for the bus inputs and outputs, but you can easily modify your existing project |
+ | |||
+ | > 1) The same process of a creating a Vivado project was followed; a top module was created, no IP was added, and the Master XDC file was copied into the local directory. Once we confirm our project settings, we can then create our new module | ||
+ | > | ||
+ | > | ||
+ | |||
+ | > 2) Once the corresponding Verilog module has been created, we can '' | ||
+ | > | ||
+ | > | ||
+ | |||
+ | > 3) The XDC file will also need to be edited so that Vivado knows which FPGA pins we intend to use. With this Master XDC file, the names of the pins for both the switches (shown) | ||
+ | > | ||
+ | > | ||
+ | |||
+ | > 4) Here's what the Arty looks like with SW0 switched " | ||
+ | > | ||
+ | > {{learn: | ||
+ | |||
+ | > 5) It is also possible | ||
+ | > | ||
+ | > {{learn: | ||
+ | |||
+ | > 6) Here's what the Arty looks like for the above code with SW3 switched " | ||
+ | > | ||
+ | > {{learn: | ||
- | {{: | + | ==== Taking it one step further ==== |
- | {{: | + | Try using some of the external I/O rather than the embedded I/O on your system board. You can even keep the Verilog module code exactly the same; the key here will be to change |
- | {{: | + | |
===== Important Takeaways from Project 2 ===== | ===== Important Takeaways from Project 2 ===== | ||
- | * | + | * Creating single bit and multi-bit inputs and outputs |
+ | * Assigning input ports to output ports for single bits, bits within bus's, and bus's to bus' | ||
+ | * Confidence in going through the Vivado design flow from creating a project, editing it, and programming the system board | ||
- | tags to be added after I add in curly braces in the code below\\ | ||
- | '' |