Skip to content

Commit

Permalink
parent 84ff0e0
Browse files Browse the repository at this point in the history
author Thea Aarrestad <[email protected]> 1620032180 +0200
committer Sioni Summers <[email protected]> 1636569147 +0100

First version of CNN notebook

Adding QKeras model and start of hls4ml part for cnn tutorial

removing outputs

Changing to hlsm4l master and updating notebook

Switching on bias in QConv2DBN

first autoq draft

updating n trials for autoq

adding vivado reports for baseline

Adding vivado_hls.app

moving .app to reference dir

Adding AutoQ bonus exercise

Adding hls projects

moving to hls4ml master

fixing AutoQ part

changing description of CNN implementation

Fixing bug with non-editable cells and missing layer when loading models
  • Loading branch information
thaarres authored and thesps committed Nov 12, 2021
1 parent 72f6082 commit 38868f6
Show file tree
Hide file tree
Showing 8 changed files with 3,265 additions and 2 deletions.
5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hls4ml-tutorial-0.5.0
name: hls4ml-tutorial
channels:
- conda-forge
dependencies:
Expand All @@ -10,7 +10,8 @@ dependencies:
- pip:
- jupyter
- tensorflow==2.3.1
- hls4ml[profiling]==0.5.0
- tensorflow_datasets
- git+https://github.com/fastmachinelearning/hls4ml.git#egg=hls4ml[profiling]
- git+https://github.com/google/qkeras.git#egg=qkeras
- scikit-learn
- git+https://github.com/thesps/conifer.git
Binary file added images/conv2d_animation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,317 changes: 1,317 additions & 0 deletions part6_cnns.ipynb

Large diffs are not rendered by default.

619 changes: 619 additions & 0 deletions pruned_cnn/myproject_prj/solution1/syn/report/myproject_csynth.rpt

Large diffs are not rendered by default.

298 changes: 298 additions & 0 deletions pruned_cnn/vivado_synth.rpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
--------------------------------------------------------------------------------------
| Tool Version : Vivado v.2020.1 (lin64) Build 2902540 Wed May 27 19:54:35 MDT 2020
| Date : Mon Jun 28 13:59:34 2021
| Host : geonosis.cern.ch running 64-bit CentOS Linux release 7.9.2009 (Core)
| Command : report_utilization -file vivado_synth.rpt
| Design : myproject
| Device : xcu250figd2104-2L
| Design State : Synthesized
--------------------------------------------------------------------------------------

Utilization Design Information

Table of Contents
-----------------
1. CLB Logic
1.1 Summary of Registers by Type
2. BLOCKRAM
3. ARITHMETIC
4. I/O
5. CLOCK
6. ADVANCED
7. CONFIGURATION
8. Primitives
9. Black Boxes
10. Instantiated Netlists
11. SLR Connectivity
12. SLR Connectivity Matrix
13. SLR CLB Logic and Dedicated Block Utilization
14. SLR IO Utilization

1. CLB Logic
------------

+----------------------------+--------+-------+-----------+-------+
| Site Type | Used | Fixed | Available | Util% |
+----------------------------+--------+-------+-----------+-------+
| CLB LUTs* | 123948 | 0 | 1728000 | 7.17 |
| LUT as Logic | 120268 | 0 | 1728000 | 6.96 |
| LUT as Memory | 3680 | 0 | 791040 | 0.47 |
| LUT as Distributed RAM | 0 | 0 | | |
| LUT as Shift Register | 3680 | 0 | | |
| CLB Registers | 43435 | 0 | 3456000 | 1.26 |
| Register as Flip Flop | 43435 | 0 | 3456000 | 1.26 |
| Register as Latch | 0 | 0 | 3456000 | 0.00 |
| CARRY8 | 13270 | 0 | 216000 | 6.14 |
| F7 Muxes | 256 | 0 | 864000 | 0.03 |
| F8 Muxes | 0 | 0 | 432000 | 0.00 |
| F9 Muxes | 0 | 0 | 216000 | 0.00 |
+----------------------------+--------+-------+-----------+-------+
* Warning! The Final LUT count, after physical optimizations and full implementation, is typically lower. Run opt_design after synthesis, if not already completed, for a more realistic count.


1.1 Summary of Registers by Type
--------------------------------

+-------+--------------+-------------+--------------+
| Total | Clock Enable | Synchronous | Asynchronous |
+-------+--------------+-------------+--------------+
| 0 | _ | - | - |
| 0 | _ | - | Set |
| 0 | _ | - | Reset |
| 0 | _ | Set | - |
| 0 | _ | Reset | - |
| 0 | Yes | - | - |
| 0 | Yes | - | Set |
| 0 | Yes | - | Reset |
| 1069 | Yes | Set | - |
| 42366 | Yes | Reset | - |
+-------+--------------+-------------+--------------+


2. BLOCKRAM
-----------

+-------------------+------+-------+-----------+-------+
| Site Type | Used | Fixed | Available | Util% |
+-------------------+------+-------+-----------+-------+
| Block RAM Tile | 42 | 0 | 2688 | 1.56 |
| RAMB36/FIFO* | 0 | 0 | 2688 | 0.00 |
| RAMB18 | 84 | 0 | 5376 | 1.56 |
| RAMB18E2 only | 84 | | | |
| URAM | 0 | 0 | 1280 | 0.00 |
+-------------------+------+-------+-----------+-------+
* Note: Each Block RAM Tile only has one FIFO logic available and therefore can accommodate only one FIFO36E2 or one FIFO18E2. However, if a FIFO18E2 occupies a Block RAM Tile, that tile can still accommodate a RAMB18E2


3. ARITHMETIC
-------------

+----------------+------+-------+-----------+-------+
| Site Type | Used | Fixed | Available | Util% |
+----------------+------+-------+-----------+-------+
| DSPs | 5386 | 0 | 12288 | 43.83 |
| DSP48E2 only | 5386 | | | |
+----------------+------+-------+-----------+-------+


4. I/O
------

+------------+------+-------+-----------+-------+
| Site Type | Used | Fixed | Available | Util% |
+------------+------+-------+-----------+-------+
| Bonded IOB | 274 | 0 | 676 | 40.53 |
+------------+------+-------+-----------+-------+


5. CLOCK
--------

+----------------------+------+-------+-----------+-------+
| Site Type | Used | Fixed | Available | Util% |
+----------------------+------+-------+-----------+-------+
| GLOBAL CLOCK BUFFERs | 1 | 0 | 1344 | 0.07 |
| BUFGCE | 1 | 0 | 384 | 0.26 |
| BUFGCE_DIV | 0 | 0 | 64 | 0.00 |
| BUFG_GT | 0 | 0 | 768 | 0.00 |
| BUFGCTRL* | 0 | 0 | 128 | 0.00 |
| PLL | 0 | 0 | 32 | 0.00 |
| MMCM | 0 | 0 | 16 | 0.00 |
+----------------------+------+-------+-----------+-------+
* Note: Each used BUFGCTRL counts as two GLOBAL CLOCK BUFFERs. This table does not include global clocking resources, only buffer cell usage. See the Clock Utilization Report (report_clock_utilization) for detailed accounting of global clocking resource availability.


6. ADVANCED
-----------

+-----------------+------+-------+-----------+-------+
| Site Type | Used | Fixed | Available | Util% |
+-----------------+------+-------+-----------+-------+
| CMACE4 | 0 | 0 | 12 | 0.00 |
| GTYE4_CHANNEL | 0 | 0 | 24 | 0.00 |
| GTYE4_COMMON | 0 | 0 | 6 | 0.00 |
| ILKNE4 | 0 | 0 | 8 | 0.00 |
| OBUFDS_GTE4 | 0 | 0 | 12 | 0.00 |
| OBUFDS_GTE4_ADV | 0 | 0 | 12 | 0.00 |
| PCIE40E4 | 0 | 0 | 4 | 0.00 |
| SYSMONE4 | 0 | 0 | 4 | 0.00 |
+-----------------+------+-------+-----------+-------+


7. CONFIGURATION
----------------

+-------------+------+-------+-----------+-------+
| Site Type | Used | Fixed | Available | Util% |
+-------------+------+-------+-----------+-------+
| BSCANE2 | 0 | 0 | 16 | 0.00 |
| DNA_PORTE2 | 0 | 0 | 4 | 0.00 |
| EFUSE_USR | 0 | 0 | 4 | 0.00 |
| FRAME_ECCE4 | 0 | 0 | 4 | 0.00 |
| ICAPE3 | 0 | 0 | 8 | 0.00 |
| MASTER_JTAG | 0 | 0 | 4 | 0.00 |
| STARTUPE3 | 0 | 0 | 4 | 0.00 |
+-------------+------+-------+-----------+-------+


8. Primitives
-------------

+----------+-------+---------------------+
| Ref Name | Used | Functional Category |
+----------+-------+---------------------+
| LUT2 | 52029 | CLB |
| FDRE | 42366 | Register |
| LUT3 | 41635 | CLB |
| LUT4 | 40010 | CLB |
| CARRY8 | 13270 | CLB |
| LUT6 | 12631 | CLB |
| LUT5 | 10697 | CLB |
| DSP48E2 | 5386 | Arithmetic |
| LUT1 | 4899 | CLB |
| SRL16E | 2816 | CLB |
| FDSE | 1069 | Register |
| SRLC32E | 864 | CLB |
| MUXF7 | 256 | CLB |
| OBUF | 210 | I/O |
| RAMB18E2 | 84 | Block Ram |
| INBUF | 64 | I/O |
| IBUFCTRL | 64 | Others |
| BUFGCE | 1 | Clock |
+----------+-------+---------------------+


9. Black Boxes
--------------

+----------+------+
| Ref Name | Used |
+----------+------+


10. Instantiated Netlists
-------------------------

+----------+------+
| Ref Name | Used |
+----------+------+


11. SLR Connectivity
--------------------

+----------------------------------+------+-------+-----------+-------+
| | Used | Fixed | Available | Util% |
+----------------------------------+------+-------+-----------+-------+
| SLR3 <-> SLR2 | 0 | | 23040 | 0.00 |
| SLR2 -> SLR3 | 0 | | | 0.00 |
| Using TX_REG only | 0 | 0 | | |
| Using RX_REG only | 0 | 0 | | |
| Using Both TX_REG and RX_REG | 0 | 0 | | |
| SLR3 -> SLR2 | 0 | | | 0.00 |
| Using TX_REG only | 0 | 0 | | |
| Using RX_REG only | 0 | 0 | | |
| Using Both TX_REG and RX_REG | 0 | 0 | | |
| SLR2 <-> SLR1 | 0 | | 23040 | 0.00 |
| SLR1 -> SLR2 | 0 | | | 0.00 |
| Using TX_REG only | 0 | 0 | | |
| Using RX_REG only | 0 | 0 | | |
| Using Both TX_REG and RX_REG | 0 | 0 | | |
| SLR2 -> SLR1 | 0 | | | 0.00 |
| Using TX_REG only | 0 | 0 | | |
| Using RX_REG only | 0 | 0 | | |
| Using Both TX_REG and RX_REG | 0 | 0 | | |
| SLR1 <-> SLR0 | 0 | | 23040 | 0.00 |
| SLR0 -> SLR1 | 0 | | | 0.00 |
| Using TX_REG only | 0 | 0 | | |
| Using RX_REG only | 0 | 0 | | |
| Using Both TX_REG and RX_REG | 0 | 0 | | |
| SLR1 -> SLR0 | 0 | | | 0.00 |
| Using TX_REG only | 0 | 0 | | |
| Using RX_REG only | 0 | 0 | | |
| Using Both TX_REG and RX_REG | 0 | 0 | | |
+----------------------------------+------+-------+-----------+-------+
| Total SLLs Used | 0 | | | |
+----------------------------------+------+-------+-----------+-------+


12. SLR Connectivity Matrix
---------------------------

+-----------+------+------+------+------+
| FROM \ TO | SLR3 | SLR2 | SLR1 | SLR0 |
+-----------+------+------+------+------+
| SLR3 | 0 | 0 | 0 | 0 |
| SLR2 | 0 | 0 | 0 | 0 |
| SLR1 | 0 | 0 | 0 | 0 |
| SLR0 | 0 | 0 | 0 | 0 |
+-----------+------+------+------+------+


13. SLR CLB Logic and Dedicated Block Utilization
-------------------------------------------------

+----------------------------+------+------+------+------+--------+--------+--------+--------+
| Site Type | SLR0 | SLR1 | SLR2 | SLR3 | SLR0 % | SLR1 % | SLR2 % | SLR3 % |
+----------------------------+------+------+------+------+--------+--------+--------+--------+
| CLB | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| CLBL | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| CLBM | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| CLB LUTs | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| LUT as Logic | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| LUT as Memory | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| LUT as Distributed RAM | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| LUT as Shift Register | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| CLB Registers | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| CARRY8 | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| F7 Muxes | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| F8 Muxes | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| F9 Muxes | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| Block RAM Tile | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| RAMB36/FIFO | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| RAMB18 | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| URAM | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| DSPs | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| PLL | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| MMCM | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
| Unique Control Sets | 0 | 0 | 0 | 0 | 0.00 | 0.00 | 0.00 | 0.00 |
+----------------------------+------+------+------+------+--------+--------+--------+--------+
* Note: Available Control Sets based on CLB Registers / 8


14. SLR IO Utilization
----------------------

+-----------+-----------+---------+------------+----------+------------+----------+-----+
| SLR Index | Used IOBs | (%)IOBs | Used IPADs | (%)IPADs | Used OPADs | (%)OPADs | GTs |
+-----------+-----------+---------+------------+----------+------------+----------+-----+
| SLR3 | 0 | 0.00 | 0 | 0.00 | 0 | 0.00 | 0 |
| SLR2 | 0 | 0.00 | 0 | 0.00 | 0 | 0.00 | 0 |
| SLR1 | 0 | 0.00 | 0 | 0.00 | 0 | 0.00 | 0 |
| SLR0 | 0 | 0.00 | 0 | 0.00 | 0 | 0.00 | 0 |
+-----------+-----------+---------+------------+----------+------------+----------+-----+
| Total | 0 | | 0 | | 0 | | 0 |
+-----------+-----------+---------+------------+----------+------------+----------+-----+


Loading

0 comments on commit 38868f6

Please sign in to comment.