Vlsi Lab Document
Vlsi Lab Document
Vlsi Lab Document
Objectives
After completing this lab, you will be able to:
Use the provided Xilinx Design Constraint (XDC) file to constrain the timing of the circuit
Elaborate the design and understand the output
Synthesize the design with the provided basic timing constraints
Analyze the output of the synthesized design
Change the synthesis settings and see their effects on the generated output
Write a checkpoint after the synthesis so the results can be analyzed after re-loading it
Procedure
This lab is broken into steps that consist of general overview statements providing information on the
detailed instructions that follow. Follow these detailed instructions to progress through the lab.
Note: You will notice certain procedures have different variations depending on development
board being ZedBoard or Zybo. It will be explicitly mentioned in notes when such variation is
encountered
Design Description
The design consists of a uart receiver receiving the input typed on a keyboard and displaying the binary
equivalent of the typed character on the 8 LEDs. When a push button is pressed, the lower and upper
nibbles are swapped. The block diagram is as shown in Figure 1.
In this design we will use boards USB-UART which is controlled by the Zynqs ARM Cortex-A9 processor.
Our PL design needs access to this USB-UART. So first thing we will do is to create a Processing System
design which will put the USB-UART connections in a simple GPIO-style and make it available to the PL
section. The complete system is shown in Figure 2.
The provided design places the UART (RX) pin of the PS (Processing System) on the Cortex-A9 in a
simple GPIO mode to allow the UART to be connected (passed through) to the Programmable Logic.
The processor samples the RX signal and sends it to the EMIO channel 0 which is connected to Rx input
of the HDL module provided in the Static directory. This is done through a software application provided
in the lab3.sdk folder hierarchy.
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
ZYNQ 2-1
Lab Workbook
ZYNQ 2-2
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
Lab Workbook
General Flow
Step 1:
Create a
Vivado
Project using
IDE
Step 2:
Elaborate the
Design
Step 3:
Step 4:
Synthesize
the Design
Read the
Checkpoints
Step 1
1-1-1. Open Vivado by selecting Start > All Programs > Xilinx Design Tools > Vivado 2016.2 >
Vivado 2016.2
1-1-2. Click Create New Project to start the wizard. You will see Create A New Vivado Project dialog
box. Click Next.
1-1-3. Click the Browse button of the Project location field of the New Project form, browse to
<2016_2_ZYNQ_labs>, and click Select.
1-1-4. Enter lab2 in the Project name field. Make sure that the Create Project Subdirectory box is
checked. Click Next.
1-1-5. Select RTL Project option in the Project Type form, and click Next.
1-1-6. Using the drop-down buttons, select Verilog as the Target Language and Simulator Language in
the Add Sources form.
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
ZYNQ 2-3
Lab Workbook
1-1-7. Click on the Green Plus button, then the Add Files button and browse to the
<2016_2_ZYNQ_sources>\lab2 directory, select all the Verilog files (led_ctl.v, meta_harden.v,
uart_baud_gen.v, uart_led.v, uart_rx.v, uart_rx_ctl.v and uart_top.v), click OK, and then click
Next to get to the Add Existing IP form.
1-1-8. Since we do not have any IP to add, click Next to get to the Add Constraints form.
1-1-9. Click on the Green Plus button, then Add Files and browse to the
c:\xup\fpga_flow\2016_2_ZYNQ\lab2 directory (if necessary), select
uart_led_timing_<board>.xdc and click Open.
1-1-10. Click Next.
This Xilinx Design Constraints file assigns the basic timing constraints (period, input delay, and
output delay) to the design.
1-1-11. In the Default Part form, Use the Boards option, you may select the Zedboard or the Zybo
depending on your board from the Display Name drop down field.
You may also use the Parts option and various drop-down fields of the Filter section. If using the
ZedBoard, select the XC7Z020clg484-1 part. If using the Zybo, select the XC7Z010clg400-1 part.
Note: Notice that Zedboard and Zybo may not be listed under Boards menu as they are not
in the tools database. If not listed then you can download the board files for the desired
boards either from Digilent Inc website or from the XUP websites workshop material
pages.
1-1-12. Click Next.
1-1-13. Click Finish to create the Vivado project.
1-1-14. In the Tcl Shell window enter the following command to change to the lab directory and hit Enter.
cd c:/xup/fpga_flow/2016_2_ZYNQ_sources/lab2
1-1-15. Generate the PS design by executing the provided Tcl script.
source ps7_create_zed.tcl (for ZedBoard) or
source ps7_create_zybo.tcl (for Zybo)
This script will create a block design called system, instantiate ZYNQ PS with one GPIO channel
49 and one EMIO channel. It will then create a top-level wrapper file called system_wrapper.v
which will instantiate the system.bd (the block design). You can check the contents of the tcl files
to confirm the commands that are being run.
1-2.
1-2-1. In the Sources pane, expand the uart_led entry and notice hierarchy of the lower-level modules.
ZYNQ 2-4
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
Lab Workbook
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
ZYNQ 2-5
Lab Workbook
1-3.
1-3-1. In the Sources pane, expand the Constraints folder and double-click the
uart_led_timing<board>.xdc entry to open the file in text mode.
Step 2
2-1-1. Expand the Open Elaborated Design entry under the RTL Analysis tasks of the Flow Navigator
pane and click on Schematic. Click OK.
The model (design) will be elaborated and a logical view of the design is displayed.
ZYNQ 2-6
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
Lab Workbook
Figure 6. A logic view of the design one-level down from the top in component U0
You will see two components at the top-level, going down one level in component U0 shows 2
instances of meta_harden, one instance of uart_rx, and one instance of led_ctl.
2-1-2. To see where the uart_rx_i0 gets generated, right-click on the uart_rx_i0 instance and select Go
To Source and see that line 84 in the source code is generating it.
2-1-3. Double-click on the uart_rx_i0 instance in the schematic diagram to see the underlying
components.
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
ZYNQ 2-7
Lab Workbook
Step 3
Synthesize the design with the Vivado synthesis tool and analyze the
Project Summary output.
3-1-1. Click on Run Synthesis under the Synthesis tasks of the Flow Navigator pane.
Click Save if the Save Project dialog box is displayed.
The synthesis process will be run on the uart_top.v and all its hierarchical files. When the
process is completed a Synthesis Completed dialog box with three options will be displayed.
3-1-2. Select the Open Synthesized Design option and click OK as we want to look at the synthesis
output.
Click Yes to close the elaborated design if the dialog box is displayed.
3-1-3. Select the Project Summary tab
If you dont see the Project Summary tab then select Layout > Default Layout, or click the
Project Summary icon
ZYNQ 2-8
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
Lab Workbook
3-1-4. Click on the Table tab in the Project Summary tab and fill out the following information.
Question 1
Look through the table and find the number used of each of the following:
FF:
LUT:
I/O:
BUFG:
3-1-5. Click on Schematic under the Open Synthesized Design tasks of Synthesis tasks of the Flow
Navigator pane to view the synthesized design in a schematic view.
3-2.
ZYNQ 2-9
Lab Workbook
3-2-1. Click on Report Timing Summary under the Synthesized Design tasks of the Flow Navigator
pane.
3-2-2. Click OK to generate the Timing_1 report.
ZYNQ 2-10
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
Lab Workbook
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
ZYNQ 2-11
Lab Workbook
3-3.
3-3-1. Click Report Utilization under the Synthesized Design, and click OK to generate the utilization
report. Click on Summary in the left pane.
ZYNQ 2-12
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
Lab Workbook
Question 2
Look through the report and find the number used of each of the following:
FF:
LUT:
I/O:
BUFG:
3-3-2. Select Slice LUTs entry in the left pane and see the utilization by lower-level instances. You can
expand the instances in the right pane to see the complete hierarchy utilization.
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
ZYNQ 2-13
Lab Workbook
Question 3
From the power report, find the % power consumption used by each of the following:
Clocks:
Signals:
Logic:
I/O:
PS7:
%
%
%
%
%
You can move the mouse on the boxes which do not show the percentage to see the
consumption.
3-4.
Write the checkpoint in order to analyze the results without going through
the actual synthesis process.
3-4-1. Select File > Write Checkpoint to save the processed design so it can be opened later for
further analysis.
3-4-2. A dialog box will appear showing the default name of the file in the current project directory.
ZYNQ 2-14
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
Lab Workbook
3-5.
3-5-1. Click on the Project Settings under the Project Manager, and select Synthesis.
3-5-2. Click on the flatten_hierarchy drop-down button and select full to flatten the design.
ZYNQ 2-15
Lab Workbook
3-6.
Write the checkpoint in order to analyze the results without going through
the actual synthesis process.
3-6-1. Select File > Write Checkpoint to save the processed design so it can be opened later for
further analysis.
3-6-2. A dialog box will appear showing the default name of the file (checkpoint_2.dcp) in the current
project directory.
3-6-3. Click OK.
3-6-4. Close the project by selecting File > Close Project.
ZYNQ 2-16
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
Lab Workbook
Step 4
5-1-1. Select File > Open Checkpoint at the Getting Started screen.
5-1-2. Browse to <2016_2_ZYNQ_labs>\lab2 and select checkpoint_1.
5-1-3. Click OK.
5-1-4. If the schematic isnt open by default, in the netlist tab, select the U0(uart_led), right-click and
select Schematic.
You will see the hierarchical blocks. You can double-click on any of the first-level block and see
the underlying blocks. You can also select any lower-level block in the netlist tab, right-click and
select Schematic to see the corresponding level design.
5-1-5. In the netlist tab, select the top-level instance, U0(uart_led), right-click and select Show
Hierarchy.
You will see how the blocks are hierarchically connected.
5-1-6. Select Tools > Timing > Report Timing Summary and click OK to see the report you saw
previously.
5-1-7. Select Tools > Report > Report Utilization and click OK to see the utilization report you saw
previously
5-1-8. Select File > Open Checkpoint, browse to <2016_2_ZYNQ _labs>\lab2 and select
checkpoint_2.
5-1-9. Click No to keep the Checkpoint_1 open.
This will invoke second Vivado GUI.
5-1-10. If the schematic isnt open by default, in the netlist tab, select the top-level instance, uart_top,
right-click and select Schematic.
You will see the flattened design.
5-1-11. You can generate the desired reports on this checkpoint as you wish.
5-1-12. Close the Vivado program by selecting File > Exit and click OK.
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx
ZYNQ 2-17
Lab Workbook
Conclusion
In this lab you applied the timing constraints and synthesized the design. You viewed various postsynthesis reports. You wrote checkpoints and read it back to perform the analysis you were doing during
the design flow. You saw the effect of changing synthesis settings.
Answers
1. Look through the table and find the number used of each of the following:
FF:
LUT:
I/O:
11
BUFG:
2. Look through the report and find the number used of each of the following:
FF:
LUT:
I/O:
11
BUFG:
3. From the power report, find the % power consumption used by each of the following (ZedBoard):
Clocks:
1%
Signals:
1%
Logic:
1%
I/O:
1%
PS7:
96%
1%
Signals:
1%
Logic:
1%
I/O:
1%
PS7:
96%
ZYNQ 2-18
www.xilinx.com/support/university
[email protected]
copyright 2016 Xilinx