Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:programmable-logic:tutorials:nexys-4-abacus-demo:start [2016/07/08 21:19] Sam Klearn:programmable-logic:tutorials:nexys-4-abacus-demo:start [2017/10/24 21:22] (current) Arthur Brown
Line 1: Line 1:
  
-====== Nexys4 Abacus Demo ======+====== Nexys 4 Abacus Demo ======
  
 {{:nexys:nexys4:img_1546.jpg?nolink&500|}} {{:nexys:nexys4:img_1546.jpg?nolink&500|}}
  
 ===== Overview ===== ===== Overview =====
 +
 +==== Description ====
 +
 +Abacus demonstration project that implements several arithmetic operations using the Nexys4's switches, LEDs, buttons and 7-segment display.
 +
 ==== Features Used ==== ==== Features Used ====
  
Line 19: Line 24:
 ^ USB HID Host with mouse    X  |    | ^ USB HID Host with mouse    X  |    |
 ^ USB HID Host with keyboard    X  |    | ^ USB HID Host with keyboard    X  |    |
- 
-==== Description ==== 
- 
-Abacus demonstration project that implements several arithmetic operations using the Nexys4's switches, LEDs, buttons and 7-segment display. See this video for instructions on building the project from only source files. 
  
 ------- -------
  
 ===== Prerequisites ===== ===== Prerequisites =====
- 
-===Skills=== 
-  * **Basic familiarity with Vivado** 
-    *  //This experience can be found by walking through our "Getting Started with Vivado" guide// 
  
 ===Hardware=== ===Hardware===
Line 37: Line 34:
  
 ===Software=== ===Software===
-  * **Vivado Design Suite 2015.X**  +  * **Vivado Design Suite 2016.4**  
-    * //Newer/older versions can be used, but the procedure may vary slightly//+    * //Newer versions can be used, but the procedure may vary slightly// 
 +  * **Digilent Board Support Files for Vivado**  
 +    * Follow the [[vivado:boardfiles|Vivado Board Files for Digilent 7-Series FPGA Boards]] guide on how to install Board Support Files for Vivado.
  
 ----- -----
  
 ===== Downloads ===== ===== Downloads =====
-Nexys4 Support Repository -- [[https://github.com/Digilent/Nexys4/archive/master.zip|ZIP]] [[https://github.com/Digilent/Nexys4|GIT Repo]]+Nexys4 Abacus Demo Project Repository -- [[https://github.com/Digilent/Nexys-4-Abacus/releases/download/v2016.4-1/Nexys-4-Abacus-2016.4-1.zip|ZIP]] [[https://github.com/Digilent/Nexys-4-Abacus|GIT Repo]]
  
 ------- -------
-===== How to... ===== 
  
 +===== Download and Launch the Nexys 4 Abacus Demo =====
  
 +>Follow the [[:learn:programmable-logic:tutorials:github-demos:start|Using Digilent Github Demo Projects]] Tutorial. This is an HDL design project, and as such does not support Vivado SDK, select the tutorial options appropriate for a Vivado-only design. You do not need to return to this guide until your board is fully programmed.
  
-==== 1. Generate the Project ====+===== Using the Nexys 4 Abacus Demo =====
  
->1.1) Download the repository linked in the download section and unzip it in the location of your choosing+To run all the features of this demo, all you will need is your programmed Nexys4The abacus can perform 4 arithmetic functions on two 8-bit numbers. Switches 15-8 represent input A. Switches 7-0 represent input B. The abacus works by setting the slide switches to your desired operands and then selecting an operation with the buttons. The result will be displayed on the two 7 segment displays
  
->1.2) Generate the **Abacus** project in the Projects folder by following this guide before continuing: [[vivado:github|How to Generate a Project from Digilent's Github]]+==== 1. No Operation ====
  
-==== 2. Build the Project ==== +>On startup and as long as no button is pressed, each four digit section of the 7-segment display will show whatever the value that input's switches are set to.
- +
->2.1) Click **Generate Bitstream** on the left hand menu towards the bottom. Vivado will run through both Run Synthesis and Run Implementation before it generates the bitstream automatically+
 > >
->Note: If you want, you can click each step by itself in the order of **Run Synthesis**, **Run Implementation** and then **Generate Bitstream**. +>{{:nexys:nexys4:img_1542.jpg?nolink&300|}}
-+
->{{:basys3:buildflow.png?600|}}+
  
-==== 3. Program the Board ==== 
  
->3.1Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option. +==== 2Subtraction (BTNU====
-+
->{{:nexys4-ddr:deviceconnected.jpg?600|}}+
  
->3.2) Click program to load the project onto your Nexys4. +>The subtraction operation is activated while BTNU is held down. This function uses the formula A - B. The display will show the difference of the two inputs and whether the result is positive or negative.
- +
-==== 4. Run the Project ==== +
- +
-To run all the features of this demo, all you will need is your programmed Nexys4. The abacus can perform 4 arithmetic functions on two 8-bit numbers. Switches 15-8 represent input A. Switches 7-0 represent input B. The abacus works by setting the slide switches to your desired operands and then selecting an operation with the buttons. The result will be displayed on the two 7 segment displays.  +
- +
->4.1) On startup, the display will read whatever the input switches values are set to. +
-+
->{{:nexys:nexys4:img_1542.jpg?nolink&300|}}  +
->Displaying the two inputs when no button is pressed. +
- +
- +
->4.2) Subraction (BTNU) +
-+
->When BTNU is pressed down, this activates subtraction. This function uses the formula A - B. While the button is held down, the display will show a static number that will also display whether it is positive or negative.+
 > >
 >{{:nexys:nexys4:img_1543.jpg?nolink&300|}} >{{:nexys:nexys4:img_1543.jpg?nolink&300|}}
Line 92: Line 71:
 >Displaying 7-14 >Displaying 7-14
  
->4.3) Multiplication (BTND) +==== 3. Multiplication (BTND) ==== 
-> + 
->When BTND is pressed down, this activates multiplication. This function uses the formula A * B. While the button is held down, the display will show the product.+>The multiplication operation is activated while BTND is held down. This function uses the formula A * B. The display will show the product of the two inputs.
 > >
 >{{:nexys:nexys4:img_1547.jpg?nolink&300|}} >{{:nexys:nexys4:img_1547.jpg?nolink&300|}}
Line 102: Line 81:
 >Displaying 248×61 >Displaying 248×61
  
->4.4) Division (BTNR) +==== 4. Division (BTNR) ==== 
-> + 
->When BTNR is pressed down, this activates division. This function uses the formula A / B. While the button is held down, the display will show the quotient.+>The division operation is activated while BTNR is held down. This function uses the formula A / B. The display will show the quotient.
 > >
 >{{:nexys:nexys4:img_1550.jpg?nolink&300|}} >{{:nexys:nexys4:img_1550.jpg?nolink&300|}}
 >Displaying 24/13 (Rounded down to 1) >Displaying 24/13 (Rounded down to 1)
  
->4.5) Modulo/Remainder (BTNL) +==== 5. Modulo/Remainder (BTNL) ==== 
-> + 
->When BTNL is pressed down, this activates modulo. This function uses the formula A % B. While the button is held down, the display will show the remainder.+>The modulo operation is activated while BTNL is held down. This function uses the formula A % B. The display will show the remainder.
 > >
 >{{:nexys:nexys4:img_1551.jpg?nolink&300|}} >{{:nexys:nexys4:img_1551.jpg?nolink&300|}}
 >Displaying 24%13 >Displaying 24%13
  
->4.6) Addition (BTNC) +==== 6. Addition (BTNC) ==== 
-> + 
->When BTNC is pressed down, this activates addition. This function uses the formula A + B. While the button is help down, the display will show the sum.+>The addtion operation is activated while BTNC is held down. This function uses the formula A + B. The display will show the sum of the two inputs.
 > >
 >{{:nexys:nexys4:img_1555.jpg?nolink&300|}} >{{:nexys:nexys4:img_1555.jpg?nolink&300|}}
 >Displaying 24+13 >Displaying 24+13
  
-{{tag>learn programmable-logic tutorial nexys-4}}+{{tag>learn programmable-logic project nexys-4}}