Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
programmable-logic:basys-3:demos:abacus [2022/09/12 13:53] – changed forum.digilentinc.com to forum.digilent.com Jeffreyprogrammable-logic:basys-3:demos:abacus [2023/08/24 22:01] (current) – Move to direct file links for downloads Arthur Brown
Line 1: Line 1:
 +====== Basys 3 Abacus Demo ======
 +
 +{{:basys3:abacus_modulo.jpg?500|}}
 +===== Description =====
 +This Abacus demonstration project implements several arithmetic operations using the Basys3's switches, LEDs, pushbuttons, and 7-segment display.
 +  * Subtraction, multiplication, division, and modulo operations are selected with the pushbuttons.
 +  * Results are displayed on the seven segment display.
 +  * Operands are taken from the switches and displayed on the LEDs.
 +
 +----
 +===== Inventory =====
 + 
 +  * Basys 3 with a MicroUSB Programming Cable
 +  * Vivado installation compatible with the latest release of this demo (2022.1)
 +    * //See [[programmable-logic:guides:installing-vivado-and-vitis|Installing Vivado, Vitis, and Digilent Board Files]] for installation instructions.//
 +
 +----
 +===== Download and Usage Instructions =====
 +
 +First and foremost, releases - consisting of a set of files for download - are only compatible with a specific version of the Xilinx tools, as specified in the name of the release (referred to as a //release tag//). In addition, releases are only compatible with the specified variant of the board. For example, a release tagged "20/DMA/2020.1" for the Zybo Z7 is only to be used with the -20 variant of the board and Vivado 2020.1.
 +
 +The latest release version for this demo is highlighted in green.
 +
 +**Note:** //Releases for FPGA demos from before 2020.1 used a different git structure, and used a different release tag naming scheme.//
 +
 +^ Release Tag                ^ Release Downloads                                                                            ^ Setup Instructions                                                                      ^
 +| @#C0EEBD: Abacus/2022.1-1  | {{https://github.com/Digilent/Basys-3/releases/download/Abacus/2022.1-1/Basys-3-Abacus-hw.xpr.zip}}  | See //Using the Latest Release//, below  |
 +| Abacus/2021.1-1            | {{https://github.com/Digilent/Basys-3/releases/download/Abacus/2021.1-1/Basys-3-Abacus-hw.xpr.zip}}  | See //Using the Latest Release//, below  |
 +| Abacus/2020.1-1            | {{https://github.com/Digilent/Basys-3/releases/download/Abacus/2020.1-1/Basys-3-Abacus-hw.xpr.zip}}  | See //Using the Latest Release//, below  |
 +| v2018.2-3                  | [[https://github.com/Digilent/Basys-3-Abacus/releases/tag/v2018.2-3|Release ZIP downloads]]  | [[https://github.com/Digilent/Basys-3-Abacus/tree/v2018.2-3| v2018.2-3 Github README]]  |
 +| v2018.2-2                  | [[https://github.com/Digilent/Basys-3-Abacus/releases/tag/v2018.2-2|Release ZIP downloads]]  | [[https://github.com/Digilent/Basys-3-Abacus/tree/v2018.2-2| v2018.2-2 Github README]]  |
 +| v2018.2-1                  | [[https://github.com/Digilent/Basys-3-Abacus/releases/tag/v2018.2-1|Release ZIP downloads]]  | [[https://github.com/Digilent/Basys-3-Abacus/tree/v2018.2-1| v2018.2-1 Github README]]  |
 +
 +**Note for Advanced Users:** //GitHub sources for this demo can be found in the [[https://github.com/digilent/Basys-3/tree/Abacus/master|Abacus/master]] branch of the Basys-3 repository. Further documentation on the structure of this repository can be found on this wiki's [[programmable-logic:documents:git]] page.//
 +
 +----
 +Instructions on the use of the latest release can be found in this dropdown:
 +
 +--> Using the Latest Release #^
 +
 +<WRAP group>
 +
 +{{page>programmable-logic:guides:using-github-releases#hardware_only_release_before_programming&noheader}}
 +
 +--> Set up the Basys 3 #
 +
 +Plug the Basys 3 into the computer using the microUSB cable.
 +
 +----
 +<--
 +
 +{{page>programmable-logic:guides:using-github-releases#hardware_only_release_programming&noheader}}
 +
 +At this point, the demo is now running on your board. Refer to the [[#description|Description]] and [[#functionality|Functionality]] sections of this document for more information on what it does.
 +</WRAP>
 +
 +<--
 +----
 +
 +===== Functionality =====
 +
 +==== 1. Setting Inputs ====
 +
 +>The abacus can preform 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 7 segment display. On startup, the display will read 0.
 +>
 +>{{:basys3:abacus_startup.jpg?300| "This is a caption" }}
 +
 +==== 2. Subtraction - BTNU ====
 +
 +>Subtraction is activated while BTNU is pressed. This function uses the formula A - B. The 7-segment display will show the difference and sign until the user releases BTNU. The result will then start to scroll across the display.
 +>
 +>{{:basys3:abacus_subtract_held.jpg?300|}}{{:basys3:abacus_subtract_held_neg.jpg?300|}} {{:basys3:abacus_subtract_scroll.jpg?300|}}
 +>
 +>//The abacus calculating 4-2 and 2-4//
 +
 +==== 3. Multiplication - BTND ====
 +
 +>Multiplication is activated while BTND is pressed. This function uses the formula A * B. The 7-segment display will show the product until the user releases BTND. The display will then return to whatever >was last scrolling. 
 +>
 +>{{:basys3:abacus_multiply.jpg?300|}}
 +>
 +>//The abacus calculating 3*3//
 +
 +==== 4. Division - BTNR ====
 +
 +>Division is activated while BTNR is pressed. This function uses the formula A / B. The 7-segment display will show the quotient until the user releases BTNR. The display will then return to whatever was last scrolling. 
 +>
 +>{{:basys3:abacus_division.jpg?300|}}
 +>
 +>//The abacus calculating 16 / 2//
 +
 +==== 5. Modulo/Remainder - BTNL ====
 +
 +>Modulo is activated while BTNL is pressed. This function uses the formula A % B. The 7-segment display will show the remainder until the user releases BTNL. The display will then return to whatever was last scrolling.
 +>
 +>{{:basys3:abacus_modulo.jpg?300|}}
 +>
 +>//The abacus calculating 17 % 2//
 +
 +
 +===== Additional Resources =====
 +
 +All materials related to the use of the Basys 3 can be found on its [[..:start|Resource Center]].
 +
 +For a walkthrough of the process of creating a simple HDL project in Vivado, see [[programmable-logic:guides:getting-started-with-vivado]]. Information on important parts of the GUI, and indirect discussion of the steps required to modify, rebuild, and run this demo in hardware can also be found here.
 +
 +For technical support, please visit the [[https://forum.digilent.com/forum/4-fpga/|FPGA]] section of the Digilent Forum.