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
basys3:abacus [2015/12/03 02:16] – [2. Load the Vivado Project] Sam Lowebasys3:abacus [2018/06/12 21:33] (current) Arthur Brown
Line 1: Line 1:
  
-====== Basys3 Abacus Demo ======+====== Basys3 Abacus Demo (Legacy) ======
  
-{{ :basys3_overview.png?nolink |}}+<WRAP round important 660px> 
 +=== Important! === 
 +This is a legacy demo, see the updated version of this demo [[learn:programmable-logic:tutorials:basys-3-abacus:start|here]]. 
 +</WRAP> 
 + 
 +{{:basys3:abacus_multiply.jpg?600|}}
  
------ 
 ===== Overview ===== ===== Overview =====
 ==== Features Used ==== ==== Features Used ====
Line 20: 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 ==== ==== Description ====
Line 25: Line 31:
 Abacus demonstration project that implements several arithmetic operations using the Basys3's switches, LEDs, buttons and 7-segment display. See this video for instructions on building the project from only source files. Abacus demonstration project that implements several arithmetic operations using the Basys3's switches, LEDs, buttons and 7-segment display. See this video for instructions on building the project from only source files.
  
-{{ http://www.youtube.com/v/6_GxkslqbcU?.swf?560×315 }}+{{youtube>6_GxkslqbcU?large }} 
 + 
 + 
 +-------
  
 ===== Prerequisites ===== ===== Prerequisites =====
  
-1. Vivado installed on your computer\\ +===Skills=== 
-2. Basys3 board from Digilent\\ +  * **Basic familiarity with Vivado** 
-3. Basic familiarity with Vivado\\+    *  //This experience can be found by walking through our "Getting Started with Vivado" guide//
  
-===== Downloads =====+===Hardware=== 
 +  * **Basys3 FPGA board** 
 +  * **Micro-USB cable** 
  
-Basys 3 repository zip folder [[https://github.com/Digilent/Basys3/archive/master.zip|master.zip]]+===Software=== 
 +  * **Vivado Design Suite 2015.X**  
 +    * //Newer/older versions can be used, but the procedure may vary slightly//
  
-Link to the repository on Github [[https://github.com/Digilent/Basys3]] +-----
-===== How to Build and Program (From Project File) =====+
  
  
 +===== Downloads =====
  
 +Basys 3 Support Repository -- [[https://github.com/Digilent/Basys3/archive/master.zip|ZIP]] [[https://github.com/Digilent/Basys3|GIT Repo]]
  
-==== 1Download the Project ====+------ 
 +===== How to...  =====
  
-Download the repository seen above and place it in the location of your choosing.  
  
  
-**Tcl Script Format** 
  
-If you are unfamiliar with how to run projects in this new format, see the [[http://www.instructables.com/id/How-to-run-Digilent-Tcl-format-projects/|guide]]  on the usage of the new project format. Please read the short document included within the project folder.+==== 1Generate the Project ====
  
-==== 2Load the Vivado Project ====+>1.1) Download the repository linked in the download section and place it in the location of your choosing. 
  
->2.1Within the project folder there will be two subfolders named "proj" and "src".Go into the proj folder and right click the "create_project" file and select "Properties". Highlight and copy the file'location. FIXME(pictures)+>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'Github]]
  
->2.2) Open a new Vivado window and enter the letters 'cd' (for change directory) followed by the file location you just copied into the Tcl Console window at the bottom.+==== 2. Build the Project ==== 
 + 
 +>2.1Click **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
 > >
->As in the image aboveonce you have copied there may be a pop-up with a suggested 'proj/'. If you click on this the Tcl Console will automatically flip the slashes in the address from back slashed ( / ) to forward slashes ( \ ). This is a bit mundane but is important since the console will not recognize the address with the backslashes. If it does not automatically correct themjust go in manually and replace each back slash with a forward slash.+>Note: If you want, you can click each step by itself in the order of **Run Synthesis****Run Implementation** and then **Generate Bitstream**.
 > >
->Again, as illustrated in the images, type in "source ./" and select the auto-fill suggestion 'create_project.tcl' and hit enter.+>{{:basys3:buildflow.png?600|}}
  
-{{:basys3:gpio_load.png?600|}}+==== 3Program the Board ====
  
-==== 3. Synthesize, Implement and Generate Bitstream ==== +>3.1) Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option. 
- +> 
-To complete this step all that you need to do is 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. If you want, you can click each step by itself in the order of **Run Synthesis**, **Run Implementation** and then **Generate Bitstream**. +>{{:basys3:device_connected.png?600|}}
- +
-{{:basys3:buildflow.png?600|}} +
- +
-==== 4. Connect and Program the Basys3 ==== +
- +
-Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option. +
- +
-{{:basys3:device_connected.png?600|}}+
  
-After your board is connected, just click program to load the abacus demo onto your Basys3.+>3.2) Click program to load the abacus demo onto your Basys3.
  
-===== Running the Basys3 Abacus Demo =====+==== 4. Run the Project ====
  
 To run all the features of this demo, all you will need is your programmed Basys3. The abacus can preform 4 arithmatic 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. To run all the features of this demo, all you will need is your programmed Basys3. The abacus can preform 4 arithmatic 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.
Line 85: Line 92:
  
  
-==== 1. Subtraction (BTNU) ====+>4.1) Subtraction (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. When BTNU is released, the result will start to scroll through the LEDs.  
 +
 +>{{:basys3:abacus_subtract_held.jpg?300|}}{{:basys3:abacus_subtract_held_neg.jpg?300|}} {{:basys3:abacus_subtract_scroll.jpg?300|}}
  
-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. When BTNU is released, the result will start to scroll through the LEDs+>4.2) 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 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
  
-{{:basys3:abacus_subtract_held.jpg?300|}}{{:basys3:abacus_subtract_held_neg.jpg?300|}}{{:basys3:abacus_subtract_scroll.jpg?300|}} +>4.3) Division (BTNR)  
- +
-==== 2. Multiplication (BTND) ====+>When BTNR is pressed down, this activates divisionThis function uses the formula A / B. While the button is held down, the 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
  
-When BTND is pressed down, this activates multiplicationThis function uses the formula A * B. While the button is held down, the display will show the product until the user releases BTND. The display will then return to whatever was last scrolling.  +>4.4) Modulo/Remainder (BTNL) 
- +> 
-{{:basys3:abacus_multiply.jpg?300|}} +>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 until the user releases BTNL. The display will then return to whatever was last scrolling. 
- +> 
-The abacus calculating 3*3 +>{{:basys3:abacus_modulo.jpg?300|}} 
-==== 3. Division (BTNR==== +
- +>The abacus calculating 17 % 2
-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 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 +
-==== 4. 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 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+{{tag>legacy}}