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:basys-3-getting-started-with-microblaze:start [2016/07/14 20:57] – jon peyronlearn:programmable-logic:tutorials:basys-3-getting-started-with-microblaze:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
  
-====== Basys 3 - Getting started in Microblaze  ======+====== Basys 3 Getting started in Microblaze  ====== 
 + 
 +<WRAP round important 660px> 
 +=== Important! === 
 +This guide is obsolete, the updated guide can be found [[:vivado:getting-started-with-ipi:start|here]]. 
 +</WRAP>
  
 >{{:basys3:abacus_multiply.jpg?600|}} >{{:basys3:abacus_multiply.jpg?600|}}
Line 117: Line 122:
 >{{:basys3:image_5.jpg?600|}} >{{:basys3:image_5.jpg?600|}}
  
->3.3) Double click the **Clocking Wizard** block to customize it. Click on the **Output Clocks** tab and confirm **clk_out1** to "100.000". Make sure the **Reset Type** to **Active high**+>3.3) Double click the **Clocking Wizard** block to customize it. Click on the **Output Clocks** tab. Make sure **clk_out1** is "100.000" and the **Reset Type** is **Active High**
 > >
 >{{:basys3:image_6.jpg?600|}} >{{:basys3:image_6.jpg?600|}}
Line 134: Line 139:
 {{:basys3:image_8.1.jpg?600|}} {{:basys3:image_8.1.jpg?600|}}
  
->4.3) Change default settings in the block options as shown below and click **OK**. This will customize the block with our new user settings.+>4.3) Change default settings in the block options as shown below and click **OK**. This will customize the block with our new user settings.  
 +> 
 +>Local Memory: 128KB 
 +>Local Memory ECC: None 
 +>Cache Configuration: None 
 +>Debug Module: Debug only 
 +>Peripheral AXI Port: Enabled 
 +>Interrupt Controller: unchecked 
 +>Clock Connection: /clk_wiz0/clk_out1(100 MHZ) 
 +> 
 +>{{:basys3:image_1.1.jpg?600|}}
 > >
->{{:basys3:image_7.jpg?600|}} 
- 
 >4.4) Running the block automation will auto-generate a set of additional IP blocks which will be added to our hardware design automatically based on the options selected in the previous step. **Do not click on Run Connection Automation yet.** >4.4) Running the block automation will auto-generate a set of additional IP blocks which will be added to our hardware design automatically based on the options selected in the previous step. **Do not click on Run Connection Automation yet.**
 > >
Line 150: Line 163:
 >:{{:basys3:image_10.1.jpg?600|}} >:{{:basys3:image_10.1.jpg?600|}}
  
->5.2) Click **Run Connection Automation** in the green banner. Check the **All Automation** checkbox **OK**.+>5.2) Click **Run Connection Automation** in the green banner. Check the **All Automation** box and then click **OK**.
 > >
 >{{:basys3:image_11.1.jpg?600|}} >{{:basys3:image_11.1.jpg?600|}}
  
->5.3) Click **Run Connection Automation** again in the green banner. Check the **All Automation** checkbox **OK**.+>5.3) Click **Run Connection Automation** again in the green banner. Check the **All Automation** box and then click **OK**.
 > >
 >{{:basys3:image_12.1.jpg?600|}} >{{:basys3:image_12.1.jpg?600|}}
  
->5.4) Select {{:genesys2:validate.jpg?nolink|}} **Validate Design**. This will check for design and connection errors. There will be an error with the reset of the clock wizard and the rst_clk_wiz.+>5.4) Select {{:genesys2:validate.jpg?nolink|}} **Validate Design**. This will check for design and connection errors. 
 > >
->{{:basys3:image_10.jpg?600|}} 
- 
->5.5) Select messages and look at only the Errors. Click on the second blue link and change from active low to active high in the box above the messages console. 
 > >
->{{:basys3:image_13.1.jpg?600|}} +>5.5) Click the {{:genesys2:regenerate.jpg?nolink|}} **Regenerate Layout** button to rearrange your block design. The block design should look like
-  +
->5.6) Add an IP core by clicking on the {{:genesys2:addip.jpg?nolink|}} **Add IP** icon. Search for "Processor System Reset" and double click on it to add the IP block to your design.+
 > >
->{{:basys3:image_11.jpg?600|}} +>{{:learn:programmable-logic:tutorials:basys-3-getting-started-with-microblaze:gsmb_basys3.jpg?800|}}
- +
->5.7) Move all the connections to and from the rst_clk_wiz to the Processor System Reset+
 > >
->{{:basys3:image_13.jpg?600|}} +>5.6) Select {{:genesys2:validate.jpg?nolink|}} **Validate Design**. This will check for design and connection errors.
- +
-5.8) Click the {{:genesys2:regenerate.jpg?nolink|}} **Regenerate Layout** button to rearrange your block design. The block design should look like +
-> +
->{{:basys3:image_14.jpg?600|}} +
- +
-5.9) Select {{:genesys2:validate.jpg?nolink|}} **Validate Design**. This will check for design and connection errors.+
 > >
 >{{:basys3:image_14.1.jpg?600|}} >{{:basys3:image_14.1.jpg?600|}}
- 
  
 ----- -----
Line 198: Line 197:
  
 ----- -----
 +==== 7. Generate a bitstream ====
  
-====7. Exporting Hardware Design to SDK ====+>7.1) Click Generate bitstream 
 +> 
 +>{{:basys3:image_15.1.jpg?600|}}
  
->7.1) On the main toolbar, click **File** and select **Export->Export Hardware**. Check the box to **Include Bitstream** and click **OK**. This will export the hardware design with system wrapper for the Software Development Tool - Vivado SDK. + 
 +----- 
 +====8. Exporting Hardware Design to SDK ==== 
 + 
 +>8.1) On the main toolbar, click **File** and select **Export->Export Hardware**. Check the box to **Include Bitstream** and click **OK**. This will export the hardware design with system wrapper for the Software Development Tool - Vivado SDK. 
 > >
 >{{:genesys2:gsmb18.jpg?nolink&400|}} >{{:genesys2:gsmb18.jpg?nolink&400|}}
Line 207: Line 213:
 >A new file directory will be created under **Hello_World.SDK** similar to the Vivado hardware design project name. Two other files, //.sysdef// and //.hdf// are also created. This step essentially creates a new SDK Workspace.  >A new file directory will be created under **Hello_World.SDK** similar to the Vivado hardware design project name. Two other files, //.sysdef// and //.hdf// are also created. This step essentially creates a new SDK Workspace. 
  
->7.2) On the main toolbar, click **File** and then **Launch SDK**. Leave both of the dropdown menus as their default //Local to Project// and click **OK**. This will open Xilinx SDK and import your hardware.+>8.2) On the main toolbar, click **File** and then **Launch SDK**. Leave both of the dropdown menus as their default //Local to Project// and click **OK**. This will open Xilinx SDK and import your hardware.
 > >
 >{{:genesys2:gsmb19.jpg?nolink&400|}} >{{:genesys2:gsmb19.jpg?nolink&400|}}
  
 ----- -----
 +
 +====9. Creating New Application Project in SDK ====
 +
 +>9.1) Click the {{:genesys2:new.jpg?nolink|}} **New** dropdown arrow and select **Xilinx->Application Project**.
 +>
 +>{{:genesys2:gsmb21.jpg?nolink&500|}}
 +>
 +>Give your project a name that has no empty spaces and click **Next**.
 +
 +>9.2) Select **Hello World** from the list of templates and click **Finish**.
 +>
 +>{{:genesys2:gsmb22.jpg?nolink&500|}}
 +
 +You will see two new folders in the **Project Explorer** panel. 
 +  * **Hello_world** which contains all the binaries, .C and .H (Header) files
 +  * **Hello_world_bsp** which is the board support folder 
 +
 +**Hello_world** is our main working source folder. This also contains an important file shown here which is the "lscript.ld". This is a Xilinx auto generated linker script file. Double click on this file to open.
 +
 +>9.3) Back in the **Project Explorer**, double click and open **helloworld.c** under the **src** folder.
 +>
 +>This is the main .C file which will print "Hello World" in the console when executed. 
 +>
 +>{{:basys3:image_24.jpg?600|}}
 +
 +====10. Programming FPGA with Bit File ====
 +
 +>10.1) Make sure that the Basys 3 is turned on and connected to the host PC via the USB-JTAG port - this port will serve dual purpose as the USB-UART connection to the Microblaze.
 +>
 +>On the top toolbar, click the {{:genesys2:programfpga.jpg?nolink|}} **Program FPGA** button.
 +
 +>10.2) Click **Program** to program your FPGA with your hardware design.
 +>
 +>{{:genesys2:gsmb24.jpg?nolink&500|}}
 +
 +-----
 +
 +====11. Setting up UART Terminal====
 +
 +>11.1) Open up a Serial Terminal application(Terra Term). Connect to the Basys 3 UART port with a baud rate of 9600. This baud rate can be altered in your block design by double clicking the Uartlite block.
 +>
 +>{{:genesys2:gsmb25.jpg?nolink&500|}}
 +>
 +>11.2) With Tera Term serial port settings
 +>
 +>{{:basys3:image_16.1.jpg?direct&300|}}
 +
 +-----
 +====12. Program the Microblaze Processor====
 +
 +>12.1) Back in SDK, select your **Hello_world** project and click the {{:genesys2:run.jpg?nolink|}} **Run As...** button. Select **Launch on Hardware (System Debugger)** and click **OK**.
 +>
 +>{{:genesys2:gsmb26.jpg?nolink&500|}}
 +
 +>12.2) Your program will run and you should see "Hello World" pop up inside of your Serial Terminal. Hooray!
 +>
 +>{{:basys3:image_17.1.jpg?600|}}
 +
 +-----
 +/*{{tag>learn programmable-logic tutorial basys-3}}*/