masaaki@masaaki-H110M4-M01:~/Vitis_Work/2019.2/all_layers_template/Hardware/sd_card$ xclbinutil --help
This utility operates on a xclbin produced by xocc.
For example:
1) Reporting xclbin information : xclbinutil --info --input binary_container_1.xclbin
2) Extracting the bitstream image: xclbinutil --dump-section BITSTREAM:RAW:bitstream.bit --input binary_container_1.xclbin
3) Extracting the build metadata : xclbinutil --dump-section BUILD_METADATA:HTML:buildMetadata.json --input binary_container_1.xclbin
4) Removing a section : xclbinutil --remove-section BITSTREAM --input binary_container_1.xclbin --output binary_container_modified.xclbin
5) Signing xclbin : xclbinutil --private-key key.priv --certificate cert.pem --input binary_container_1.xclbin --output signed.xclbin
Command Line Options
Options:
-h [ --help ] Print help messages
-i [ --input ] arg Input file name. Reads xclbin into memory.
-o [ --output ] arg Output file name. Writes in memory xclbin image to
a file.
--private-key arg Private key used in signing the xclbin image.
--certificate arg Certificate used in signing and validating the
xclbin image.
--digest-algorithm arg Digest algorithm. Default: sha512
--validate-signature Validates the signature for the given xclbin
archive.
-v [ --verbose ] Display verbose/debug information.
-q [ --quiet ] Minimize reporting information.
--migrate-forward Migrate the xclbin archive forward to the new
binary format.
--remove-section arg Section name to remove.
--add-section arg Section name to add. Format:
<section>:<format>:<file>
--dump-section arg Section to dump. Format: <section>:<format>:<file>
--replace-section arg Section to replace.
--key-value arg Key value pairs. Format: [USER|SYS]:<key>:<value>
--remove-key arg Removes the given user key from the xclbin archive.
--add-signature arg Adds a user defined signature to the given xclbin
image.
--remove-signature Removes the signature from the xclbin image.
--get-signature Returns the user defined signature (if set) of the
xclbin image.
--info [=arg(=<console>)] Report accelerator binary content. Including:
generation and packaging data, kernel signatures,
connectivity, clocks, sections, etc. Note:
Optionally an output file can be specified. If
none is specified, then the output will go to the
console.
--list-sections List all possible section names (Stand Alone
Option)
--version Version of this executable.
--force Forces a file overwrite.
Addition Syntax Information
---------------------------
Syntax: <section>:<format>:<file>
<section> - The section to add or dump (e.g., BUILD_METADATA, BITSTREAM, etc.)
Note: If a JSON format is being used, this value can be empty. If so, then
the JSON metadata will determine the section it is associated with.
In addition, only sections that are found in the JSON file will be reported.
<format> - The format to be used. Currently, there are three formats available:
RAW: Binary Image; JSON: JSON file format; and HTML: Browser visible.
Note: Only selected operations and sections supports these file types.
<file> - The name of the input/output file to use.
Used By: --add_section and --dump_section
Example: xclbinutil --add-section BITSTREAM:RAW:mybitstream.bit
masaaki@masaaki-H110M4-M01:~/Vitis_Work/2019.2/all_layers_template/Hardware/sd_card$ xclbinutil --info --input all_layers_dnn.xclbin
XRT Build Version: 2.3.1301
Build Date: 2019-10-24 20:05:16
Hash ID: 192e706aea53163a04c574f9b3fe9ed76b6ca471
------------------------------------------------------------------------------
Warning: The option '--output' has not been specified. All operations will
be done in memory with the exception of the '--dump-section' command.
------------------------------------------------------------------------------
Reading xclbin file into memory. File: all_layers_dnn.xclbin
==============================================================================
XRT Build Version: 2.3.1301
Build Date: 2019-10-24 20:05:16
Hash ID: 192e706aea53163a04c574f9b3fe9ed76b6ca471
==============================================================================
xclbin Information
------------------
Generated by: v++ (2019.2) on Thu Oct 24 18:45:48 MDT 2019
Version: 2.3.1301
Kernels: all_layers_dnn
Signature:
Content: Bitstream
UUID (xclbin): 5def028b-c959-4a11-b9c6-8aed2fda4be3
Sections: BITSTREAM, MEM_TOPOLOGY, IP_LAYOUT, CONNECTIVITY,
BUILD_METADATA, EMBEDDED_METADATA, SYSTEM_METADATA
==============================================================================
Hardware Platform (Shell) Information
-------------------------------------
Vendor: vendor
Board: Ultra96V2
Name: ultra96v2_min2
Version: 1.0
Generated Version: Vivado 2019.2 (SW Build: 2700185)
Created: Fri Nov 29 04:12:55 2019
FPGA Device: xczu3eg
Board Vendor: em.avnet.com
Board Name: em.avnet.com:ultra96v2:1.0
Board Part: em.avnet.com:ultra96v2:part0:1.0
Platform VBNV: vendor_Ultra96V2_ultra96v2_min2_1_0
Static UUID: 00000000-0000-0000-0000-000000000000
Feature ROM TimeStamp: 0
Clocks
------
No clock frequency data available.
Memory Configuration
--------------------
Name: HPC
Index: 0
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HPC
Index: 1
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HP
Index: 2
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x80000000
Bank Used: Yes
Name: HP
Index: 3
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HP
Index: 4
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HP
Index: 5
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
==============================================================================
Kernel: all_layers_dnn
Definition
----------
Signature: all_layers_dnn (* inm, * output, * dot2, int x_size, int y_size)
Ports
-----
Port: M_AXI_GMEM
Mode: master
Range (bytes): 0xFFFFFFFF
Data Width: 32 bits
Port Type: addressable
Port: M_AXI_GMEM2
Mode: master
Range (bytes): 0xFFFFFFFF
Data Width: 32 bits
Port Type: addressable
Port: S_AXI_CONTROL
Mode: slave
Range (bytes): 0x1000
Data Width: 32 bits
Port Type: addressable
--------------------------
Instance: all_layers_dnn_1
Base Address: 0xa0000000
Argument: inm
Register Offset: 0x10
Port: M_AXI_GMEM
Memory: HP (MEM_DRAM)
Argument: output
Register Offset: 0x1C
Port: M_AXI_GMEM
Memory: HP (MEM_DRAM)
Argument: dot2
Register Offset: 0x28
Port: M_AXI_GMEM2
Memory: HP (MEM_DRAM)
Argument: x_size
Register Offset: 0x34
Port: S_AXI_CONTROL
Memory: <not applicable>
Argument: y_size
Register Offset: 0x3C
Port: S_AXI_CONTROL
Memory: <not applicable>
==============================================================================
Generated By
------------
Command: v++
Version: 2019.2 - Thu Oct 24 18:45:48 MDT 2019 (SW BUILD: 2700185)
Command Line: v++ --target hw --link --config common-config.ini --config all_layers_dnn-link.ini -oall_layers_dnn.xclbin ../src/all_layers_dnn.xo
Options: --target hw
--link
--config common-config.ini
--config all_layers_dnn-link.ini
-oall_layers_dnn.xclbin ../src/all_layers_dnn.xo
==============================================================================
User Added Key Value Pairs
--------------------------
<empty>
==============================================================================
Leaving xclbinutil.
masaaki@masaaki-H110M4-M01:~/Vitis_Work/2019.2/all_layers_template/Hardware/sd_card$ xclbinutil --list-section
XRT Build Version: 2.3.1301
Build Date: 2019-10-24 20:05:16
Hash ID: 192e706aea53163a04c574f9b3fe9ed76b6ca471
All supported section names supported by this tool:
BITSTREAM
BITSTREAM_PARTIAL_PDI
BMC
BUILD_METADATA
CLEARING_BITSTREAM
CLOCK_FREQ_TOPOLOGY
CONNECTIVITY
DEBUG_DATA
DEBUG_IP_LAYOUT
DESIGN_CHECKPOINT
DNA_CERTIFICATE
EMBEDDED_METADATA
EMULATION_DATA
FIRMWARE
IP_LAYOUT
KEYVALUE_METADATA
MCS
MEM_TOPOLOGY
PARTITION_METADATA
PDI
SCHED_FIRMWARE
SOFT_KERNEL
SYSTEM_METADATA
USER_METADATA
{
"mem_topology": {
"m_count": "6",
"m_mem_data": [
{
"m_type": "MEM_DRAM",
"m_used": "0",
"m_sizeKB": "0x0",
"m_tag": "HPC",
"m_base_address": "0x0"
},
{
"m_type": "MEM_DRAM",
"m_used": "0",
"m_sizeKB": "0x0",
"m_tag": "HPC",
"m_base_address": "0x0"
},
{
"m_type": "MEM_DRAM",
"m_used": "1",
"m_sizeKB": "0x200000",
"m_tag": "HP",
"m_base_address": "0x0"
},
{
"m_type": "MEM_DRAM",
"m_used": "0",
"m_sizeKB": "0x0",
"m_tag": "HP",
"m_base_address": "0x0"
},
{
"m_type": "MEM_DRAM",
"m_used": "0",
"m_sizeKB": "0x0",
"m_tag": "HP",
"m_base_address": "0x0"
},
{
"m_type": "MEM_DRAM",
"m_used": "0",
"m_sizeKB": "0x0",
"m_tag": "HP",
"m_base_address": "0x0"
}
]
}
}
{
"ip_layout": {
"m_count": "1",
"m_ip_data": [
{
"m_type": "IP_KERNEL",
"m_int_enable": "1",
"m_interrupt_id": "0",
"m_ip_control": "AP_CTRL_HS",
"m_base_address": "0xa0000000",
"m_name": "all_layers_dnn:all_layers_dnn_1"
}
]
}
}
1. Load up the trained PyTorch model
2. Call Brevitas FINN-ONNX export and visualize with Netron
3. Import into FINN and call cleanup transformations
ネットワークトポロジは、量子化線形層と量子化アクティベーションを生成するいくつかのヘルパー関数を使用して構築されていることがわかります。レイヤーのビット幅は実際にはコンストラクターでパラメーター化されているので、このネットワークの1ビットの重みとアクティベーションバージョンをインスタンス化しましょう。モデルにロードするこのネットワークの事前トレーニング済みの重みもあります。
Brevitasには、FINN-ONNXエクスポート機能が組み込まれています。これは、PyTorchの通常のONNXエクスポート機能に似ていますが、いくつかの違いがあります。
1. 重み量子化ロジックはグラフの一部としてエクスポートされません。むしろ、量子化された重み自体がエクスポートされます。
2. 特別な量子化アノテーションは、低ビット量子化情報を保持するために使用されます。ONNX(執筆時)は、最小ビット幅として8ビットの量子化をサポートしていますが、FINN-ONNXの量子化アノテーションは、バイナリ/バイポーラ量子化に分類できます。
3. 低ビット量子化アクティベーション関数は、MultiThresholdオペレーターとしてエクスポートされます。
実際、次のようにBrevitasモデルからONNXをエクスポートするのは非常に簡単です。
このノートブックをFINN Dockerコンテナーで実行すると、上記のインポートされたネットワークのインタラクティブな視覚化を確認し、個々のノードをクリックしてパラメーターを調べることができます。MatMulノードのいずれかを見ると、重みがすべて{-1、+1}の値であり、アクティベーションがSign関数であることがわかります。
Add2_node = onnx.helper.make_node(
'Add',
inputs=['sum1', 'in3'],
outputs=['sum2'],
name='Add2',
)
Add3_node = onnx.helper.make_node(
'Add',
inputs=['abs1', 'abs1'],
outputs=['out1'],
name='Add3',
)
Abs_node = onnx.helper.make_node(
'Abs',
inputs=['sum2'],
outputs=['abs1'],
name='Abs'
)
#Round_node = onnx.helper.make_node(
# 'Round',
# inputs=['sum3'],
# outputs=['out1'],
# name='Round',
#)
を入力したところ、Jupyter Notebook が起動した。http://127.0.0.1:8888/?token=fd26d65a80b527eed0e8f7f97d9835d9f6b8f1f5fea6b84c
masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/Xilinx_github/finn$ sh run-docker.sh
Please set the PYNQ_IP env.var. to enable PYNQ deployment tests.
Instance is named as finn_dev_masaaki
Mounting /tmp/finn_dev_masaaki into /tmp/finn_dev_masaaki
Mounting /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2019.2 into /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2019.2
Port-forwarding for Jupyter 8888:8888
Port-forwarding for Netron 8081:8081
Vivado IP cache dir is at /tmp/finn_dev_masaaki/vivado_ip_cache
Using default PYNQ board Pynq-Z1
Running container only
Sending build context to Docker daemon 124MB
Step 1/57 : FROM pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-devel
1.1.0-cuda10.0-cudnn7.5-devel: Pulling from pytorch/pytorch
34667c7e4631: Pull complete
d18d76a881a4: Pull complete
119c7358fbfc: Pull complete
2aaf13f3eff0: Pull complete
643564d518c8: Pull complete
1fea03e629a4: Pull complete
45402f4cf61d: Pull complete
86f75b2a221d: Pull complete
bed75fe8e483: Pull complete
6c2a711c6f0a: Pull complete
0cebfcdacfee: Pull complete
854b430e64dc: Pull complete
c4f1bf920b70: Pull complete
bdec02fc8c62: Pull complete
4f99990b1c4a: Pull complete
2ec3348b7aee: Pull complete
Digest: sha256:9e0bdb425f3dde6dfd54e3486f7927d2f56b015c53ca1e24d994865a8393cf8b
Status: Downloaded newer image for pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-devel
---> 1be771bff6d1
Step 2/57 : MAINTAINER Yaman Umuroglu <yamanu@xilinx.com>
---> Running in 7348979c41ab
Removing intermediate container 7348979c41ab
---> c2fe37ac0c0d
Step 3/57 : ARG PYTHON_VERSION=3.6
---> Running in fbc33c1d7e70
Removing intermediate container fbc33c1d7e70
---> c5419d73de61
Step 4/57 : ARG GID
---> Running in e523d2deac0d
Removing intermediate container e523d2deac0d
---> 5db65ef27949
Step 5/57 : ARG GNAME
---> Running in 40b1f3a77ad2
Removing intermediate container 40b1f3a77ad2
---> 1010057a99ea
Step 6/57 : ARG UNAME
---> Running in eaff575742e9
Removing intermediate container eaff575742e9
---> ecebd047af53
Step 7/57 : ARG UID
---> Running in b6919b1b6112
Removing intermediate container b6919b1b6112
---> a9954d55477c
Step 8/57 : ARG PASSWD
---> Running in f0a4b12f8d1f
Removing intermediate container f0a4b12f8d1f
---> f5e546e5f990
Step 9/57 : ARG JUPYTER_PORT
---> Running in 5b7ab2a7a7d1
Removing intermediate container 5b7ab2a7a7d1
---> 26e15d0141f3
Step 10/57 : ARG NETRON_PORT
---> Running in 24d104bc364c
Removing intermediate container 24d104bc364c
---> fbec7f863323
Step 11/57 : EXPOSE $JUPYTER_PORT
---> Running in e39ce2458031
Removing intermediate container e39ce2458031
---> 52db95ecd395
Step 12/57 : EXPOSE $NETRON_PORT
---> Running in cd3d98eb1e4b
Removing intermediate container cd3d98eb1e4b
---> 3cc715e23f81
Step 13/57 : WORKDIR /workspace
---> Running in 803190d38d4b
Removing intermediate container 803190d38d4b
---> 489d59bb8f30
Step 14/57 : RUN apt-get update
---> Running in ac524215b950
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Ign:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Ign:4 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 InRelease
Get:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release [564 B]
Get:6 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release [564 B]
Get:7 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release.gpg [819 B]
Get:8 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release.gpg [833 B]
Get:9 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages [254 kB]
Get:10 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Packages [81.5 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [1115 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [627 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [6677 B]
Get:18 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1482 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1031 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [19.7 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7942 B]
Get:26 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [8807 B]
Fetched 16.8 MB in 5s (3149 kB/s)
Reading package lists...
Removing intermediate container ac524215b950
---> b24a6dd6d8f6
Step 15/57 : RUN apt-get -y upgrade
---> Running in 5ea3c30f002a
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages have been kept back:
libcudnn7 libcudnn7-dev libnccl-dev libnccl2
The following packages will be upgraded:
apt apt-transport-https base-files bash bsdutils bzip2 cpp-5
cuda-compat-10-0 cuda-nvjpeg-10-0 cuda-nvjpeg-dev-10-0 curl debconf dpkg
dpkg-dev e2fslibs e2fsprogs g++-5 gcc-5 gcc-5-base git git-man libapparmor1
libapt-pkg5.0 libasan2 libatomic1 libblkid1 libbz2-1.0 libcc1-0 libcilkrts5
libcomerr2 libcurl3-gnutls libdb5.3 libdpkg-perl libexpat1 libfdisk1
libgcc-5-dev libgcrypt20 libgnutls30 libgomp1 libitm1 libjpeg-turbo8
libjpeg-turbo8-dev libldap-2.4-2 liblsan0 libmount1 libmpx0 libprocps4
libquadmath0 libsasl2-2 libsasl2-modules-db libseccomp2 libsmartcols1
libsqlite3-0 libss2 libstdc++-5-dev libstdc++6 libsystemd0 libtsan0
libubsan0 libudev1 libuuid1 linux-libc-dev login mount passwd patch procps
systemd systemd-sysv util-linux zlib1g zlib1g-dev
72 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 60.2 MB of archives.
After this operation, 7083 kB of additional disk space will be used.
Get:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-compat-10-0 410.129-1 [6466 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 base-files amd64 9.4ubuntu4.11 [67.5 kB]
Get:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvjpeg-10-0 10.0.130.1-1 [1302 kB]
Get:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvjpeg-dev-10-0 10.0.130.1-1 [1086 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 bash amd64 4.3-14ubuntu1.4 [583 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 bsdutils amd64 1:2.27.1-6ubuntu3.10 [50.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg amd64 1.18.4ubuntu1.6 [2085 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 e2fslibs amd64 1.42.13-1ubuntu1.2 [188 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 e2fsprogs amd64 1.42.13-1ubuntu1.2 [770 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 login amd64 1:4.2-3.1ubuntu5.4 [304 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 util-linux amd64 2.27.1-6ubuntu3.10 [849 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 mount amd64 2.27.1-6ubuntu3.10 [121 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 bzip2 amd64 1.0.6-8ubuntu0.2 [32.5 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libbz2-1.0 amd64 1.0.6-8ubuntu0.2 [30.7 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.12 [131 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.12 [55.2 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.12 [27.4 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.12 [8892 B]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.12 [265 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.12 [105 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.12 [244 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.12 [95.3 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.12 [40.0 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.12 [9762 B]
Get:25 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.3 [167 kB]
Get:26 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g amd64 1:1.2.8.dfsg-2ubuntu4.3 [51.2 kB]
Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.12 [8430 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.12 [8612 kB]
Get:29 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.12 [7783 kB]
Get:30 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.12 [38.8 kB]
Get:31 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.12 [1428 kB]
Get:32 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.12 [2239 kB]
Get:33 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5-base amd64 5.4.0-6ubuntu1~16.04.12 [17.4 kB]
Get:34 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++6 amd64 5.4.0-6ubuntu1~16.04.12 [393 kB]
Get:35 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapparmor1 amd64 2.10.95-0ubuntu2.11 [29.5 kB]
Get:36 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 passwd amd64 1:4.2-3.1ubuntu5.4 [780 kB]
Get:37 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libuuid1 amd64 2.27.1-6ubuntu3.10 [14.5 kB]
Get:38 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libblkid1 amd64 2.27.1-6ubuntu3.10 [107 kB]
Get:39 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmount1 amd64 2.27.1-6ubuntu3.10 [114 kB]
Get:40 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libseccomp2 amd64 2.4.1-0ubuntu0.16.04.2 [38.5 kB]
Get:41 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsystemd0 amd64 229-4ubuntu21.28 [206 kB]
Get:42 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd amd64 229-4ubuntu21.28 [3639 kB]
Get:43 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-pkg5.0 amd64 1.2.32ubuntu0.1 [713 kB]
Get:44 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt amd64 1.2.32ubuntu0.1 [1087 kB]
Get:45 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 debconf all 1.5.58ubuntu2 [136 kB]
Get:46 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd-sysv amd64 229-4ubuntu21.28 [12.3 kB]
Get:47 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libjpeg-turbo8-dev amd64 1.4.2-0ubuntu3.3 [255 kB]
Get:48 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libjpeg-turbo8 amd64 1.4.2-0ubuntu3.3 [111 kB]
Get:49 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcomerr2 amd64 1.42.13-1ubuntu1.2 [65.8 kB]
Get:50 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdb5.3 amd64 5.3.28-11ubuntu0.2 [670 kB]
Get:51 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libfdisk1 amd64 2.27.1-6ubuntu3.10 [138 kB]
Get:52 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgcrypt20 amd64 1.6.5-2ubuntu0.6 [336 kB]
Get:53 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsmartcols1 amd64 2.27.1-6ubuntu3.10 [62.1 kB]
Get:54 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libss2 amd64 1.42.13-1ubuntu1.2 [70.2 kB]
Get:55 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev1 amd64 229-4ubuntu21.28 [54.8 kB]
Get:56 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libprocps4 amd64 2:3.3.10-4ubuntu2.5 [32.9 kB]
Get:57 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 procps amd64 2:3.3.10-4ubuntu2.5 [222 kB]
Get:58 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libexpat1 amd64 2.1.0-7ubuntu0.16.04.5 [71.5 kB]
Get:59 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgnutls30 amd64 3.4.10-4ubuntu1.7 [548 kB]
Get:60 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsqlite3-0 amd64 3.11.0-1ubuntu1.4 [398 kB]
Get:61 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 curl amd64 7.47.0-1ubuntu2.14 [139 kB]
Get:62 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsasl2-modules-db amd64 2.1.26.dfsg1-14ubuntu0.2 [14.5 kB]
Get:63 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsasl2-2 amd64 2.1.26.dfsg1-14ubuntu0.2 [48.7 kB]
Get:64 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libldap-2.4-2 amd64 2.4.42+dfsg-2ubuntu3.8 [159 kB]
Get:65 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcurl3-gnutls amd64 7.47.0-1ubuntu2.14 [184 kB]
Get:66 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt-transport-https amd64 1.2.32ubuntu0.1 [26.7 kB]
Get:67 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg-dev all 1.18.4ubuntu1.6 [584 kB]
Get:68 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdpkg-perl all 1.18.4ubuntu1.6 [195 kB]
Get:69 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 patch amd64 2.7.5-1ubuntu0.16.04.2 [90.8 kB]
Get:70 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 git-man all 1:2.7.4-0ubuntu1.9 [736 kB]
Get:71 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 git amd64 1:2.7.4-0ubuntu1.9 [3176 kB]
Get:72 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-libc-dev amd64 4.4.0-179.209 [859 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 60.2 MB in 9s (6034 kB/s)
(Reading database ... 12586 files and directories currently installed.)
Preparing to unpack .../base-files_9.4ubuntu4.11_amd64.deb ...
Unpacking base-files (9.4ubuntu4.11) over (9.4ubuntu4.8) ...
Setting up base-files (9.4ubuntu4.11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../bash_4.3-14ubuntu1.4_amd64.deb ...
Unpacking bash (4.3-14ubuntu1.4) over (4.3-14ubuntu1.2) ...
Setting up bash (4.3-14ubuntu1.4) ...
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../bsdutils_1%3a2.27.1-6ubuntu3.10_amd64.deb ...
Unpacking bsdutils (1:2.27.1-6ubuntu3.10) over (1:2.27.1-6ubuntu3.6) ...
Setting up bsdutils (1:2.27.1-6ubuntu3.10) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../dpkg_1.18.4ubuntu1.6_amd64.deb ...
Unpacking dpkg (1.18.4ubuntu1.6) over (1.18.4ubuntu1.5) ...
Setting up dpkg (1.18.4ubuntu1.6) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../e2fslibs_1.42.13-1ubuntu1.2_amd64.deb ...
Unpacking e2fslibs:amd64 (1.42.13-1ubuntu1.2) over (1.42.13-1ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up e2fslibs:amd64 (1.42.13-1ubuntu1.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../e2fsprogs_1.42.13-1ubuntu1.2_amd64.deb ...
Unpacking e2fsprogs (1.42.13-1ubuntu1.2) over (1.42.13-1ubuntu1) ...
Setting up e2fsprogs (1.42.13-1ubuntu1.2) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../login_1%3a4.2-3.1ubuntu5.4_amd64.deb ...
Unpacking login (1:4.2-3.1ubuntu5.4) over (1:4.2-3.1ubuntu5.3) ...
Setting up login (1:4.2-3.1ubuntu5.4) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../util-linux_2.27.1-6ubuntu3.10_amd64.deb ...
Unpacking util-linux (2.27.1-6ubuntu3.10) over (2.27.1-6ubuntu3.6) ...
Setting up util-linux (2.27.1-6ubuntu3.10) ...
Installing new version of config file /etc/cron.weekly/fstrim ...
Processing triggers for systemd (229-4ubuntu21.16) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../mount_2.27.1-6ubuntu3.10_amd64.deb ...
Unpacking mount (2.27.1-6ubuntu3.10) over (2.27.1-6ubuntu3.6) ...
Setting up mount (2.27.1-6ubuntu3.10) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../bzip2_1.0.6-8ubuntu0.2_amd64.deb ...
Unpacking bzip2 (1.0.6-8ubuntu0.2) over (1.0.6-8) ...
Preparing to unpack .../libbz2-1.0_1.0.6-8ubuntu0.2_amd64.deb ...
Unpacking libbz2-1.0:amd64 (1.0.6-8ubuntu0.2) over (1.0.6-8) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libbz2-1.0:amd64 (1.0.6-8ubuntu0.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.3_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.3) over (1:1.2.8.dfsg-2ubuntu4.1) ...
Preparing to unpack .../zlib1g_1%3a1.2.8.dfsg-2ubuntu4.3_amd64.deb ...
Unpacking zlib1g:amd64 (1:1.2.8.dfsg-2ubuntu4.3) over (1:1.2.8.dfsg-2ubuntu4.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up zlib1g:amd64 (1:1.2.8.dfsg-2ubuntu4.3) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking g++-5 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Preparing to unpack .../gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.12) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libstdc++6_5.4.0-6ubuntu1~16.04.12_amd64.deb ...
Unpacking libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.12) over (5.4.0-6ubuntu1~16.04.11) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libapparmor1_2.10.95-0ubuntu2.11_amd64.deb ...
Unpacking libapparmor1:amd64 (2.10.95-0ubuntu2.11) over (2.10.95-0ubuntu2.10) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libapparmor1:amd64 (2.10.95-0ubuntu2.11) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../passwd_1%3a4.2-3.1ubuntu5.4_amd64.deb ...
Unpacking passwd (1:4.2-3.1ubuntu5.4) over (1:4.2-3.1ubuntu5.3) ...
Setting up passwd (1:4.2-3.1ubuntu5.4) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libuuid1_2.27.1-6ubuntu3.10_amd64.deb ...
Unpacking libuuid1:amd64 (2.27.1-6ubuntu3.10) over (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libuuid1:amd64 (2.27.1-6ubuntu3.10) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libblkid1_2.27.1-6ubuntu3.10_amd64.deb ...
Unpacking libblkid1:amd64 (2.27.1-6ubuntu3.10) over (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libblkid1:amd64 (2.27.1-6ubuntu3.10) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libmount1_2.27.1-6ubuntu3.10_amd64.deb ...
Unpacking libmount1:amd64 (2.27.1-6ubuntu3.10) over (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libmount1:amd64 (2.27.1-6ubuntu3.10) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libseccomp2_2.4.1-0ubuntu0.16.04.2_amd64.deb ...
Unpacking libseccomp2:amd64 (2.4.1-0ubuntu0.16.04.2) over (2.3.1-2.1ubuntu2~16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libseccomp2:amd64 (2.4.1-0ubuntu0.16.04.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libsystemd0_229-4ubuntu21.28_amd64.deb ...
Unpacking libsystemd0:amd64 (229-4ubuntu21.28) over (229-4ubuntu21.16) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libsystemd0:amd64 (229-4ubuntu21.28) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../systemd_229-4ubuntu21.28_amd64.deb ...
Unpacking systemd (229-4ubuntu21.28) over (229-4ubuntu21.16) ...
Setting up systemd (229-4ubuntu21.28) ...
Initializing machine ID from random generator.
addgroup: The group `systemd-journal' already exists as a system group. Exiting.
Operation failed: No such file or directory
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.2.32ubuntu0.1_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.2.32ubuntu0.1) over (1.2.29ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libapt-pkg5.0:amd64 (1.2.32ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12590 files and directories currently installed.)
Preparing to unpack .../apt_1.2.32ubuntu0.1_amd64.deb ...
Unpacking apt (1.2.32ubuntu0.1) over (1.2.29ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up apt (1.2.32ubuntu0.1) ...
Installing new version of config file /etc/apt/apt.conf.d/01autoremove ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../debconf_1.5.58ubuntu2_all.deb ...
Unpacking debconf (1.5.58ubuntu2) over (1.5.58ubuntu1) ...
Setting up debconf (1.5.58ubuntu2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_229-4ubuntu21.28_amd64.deb ...
Unpacking systemd-sysv (229-4ubuntu21.28) over (229-4ubuntu21.16) ...
Setting up systemd-sysv (229-4ubuntu21.28) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libjpeg-turbo8-dev_1.4.2-0ubuntu3.3_amd64.deb ...
Unpacking libjpeg-turbo8-dev:amd64 (1.4.2-0ubuntu3.3) over (1.4.2-0ubuntu3.1) ...
Preparing to unpack .../libjpeg-turbo8_1.4.2-0ubuntu3.3_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (1.4.2-0ubuntu3.3) over (1.4.2-0ubuntu3.1) ...
Preparing to unpack .../libcomerr2_1.42.13-1ubuntu1.2_amd64.deb ...
Unpacking libcomerr2:amd64 (1.42.13-1ubuntu1.2) over (1.42.13-1ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libcomerr2:amd64 (1.42.13-1ubuntu1.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libdb5.3_5.3.28-11ubuntu0.2_amd64.deb ...
Unpacking libdb5.3:amd64 (5.3.28-11ubuntu0.2) over (5.3.28-11ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libdb5.3:amd64 (5.3.28-11ubuntu0.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libfdisk1_2.27.1-6ubuntu3.10_amd64.deb ...
Unpacking libfdisk1:amd64 (2.27.1-6ubuntu3.10) over (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libfdisk1:amd64 (2.27.1-6ubuntu3.10) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libgcrypt20_1.6.5-2ubuntu0.6_amd64.deb ...
Unpacking libgcrypt20:amd64 (1.6.5-2ubuntu0.6) over (1.6.5-2ubuntu0.5) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libgcrypt20:amd64 (1.6.5-2ubuntu0.6) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libsmartcols1_2.27.1-6ubuntu3.10_amd64.deb ...
Unpacking libsmartcols1:amd64 (2.27.1-6ubuntu3.10) over (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libsmartcols1:amd64 (2.27.1-6ubuntu3.10) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libss2_1.42.13-1ubuntu1.2_amd64.deb ...
Unpacking libss2:amd64 (1.42.13-1ubuntu1.2) over (1.42.13-1ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libss2:amd64 (1.42.13-1ubuntu1.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libudev1_229-4ubuntu21.28_amd64.deb ...
Unpacking libudev1:amd64 (229-4ubuntu21.28) over (229-4ubuntu21.16) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libudev1:amd64 (229-4ubuntu21.28) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libprocps4_2%3a3.3.10-4ubuntu2.5_amd64.deb ...
Unpacking libprocps4:amd64 (2:3.3.10-4ubuntu2.5) over (2:3.3.10-4ubuntu2.4) ...
Preparing to unpack .../procps_2%3a3.3.10-4ubuntu2.5_amd64.deb ...
Unpacking procps (2:3.3.10-4ubuntu2.5) over (2:3.3.10-4ubuntu2.4) ...
Preparing to unpack .../libexpat1_2.1.0-7ubuntu0.16.04.5_amd64.deb ...
Unpacking libexpat1:amd64 (2.1.0-7ubuntu0.16.04.5) over (2.1.0-7ubuntu0.16.04.3) ...
Preparing to unpack .../libgnutls30_3.4.10-4ubuntu1.7_amd64.deb ...
Unpacking libgnutls30:amd64 (3.4.10-4ubuntu1.7) over (3.4.10-4ubuntu1.4) ...
Preparing to unpack .../libsqlite3-0_3.11.0-1ubuntu1.4_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.11.0-1ubuntu1.4) over (3.11.0-1ubuntu1.1) ...
Preparing to unpack .../curl_7.47.0-1ubuntu2.14_amd64.deb ...
Unpacking curl (7.47.0-1ubuntu2.14) over (7.47.0-1ubuntu2.12) ...
Preparing to unpack .../libsasl2-modules-db_2.1.26.dfsg1-14ubuntu0.2_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.26.dfsg1-14ubuntu0.2) over (2.1.26.dfsg1-14ubuntu0.1) ...
Preparing to unpack .../libsasl2-2_2.1.26.dfsg1-14ubuntu0.2_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.26.dfsg1-14ubuntu0.2) over (2.1.26.dfsg1-14ubuntu0.1) ...
Preparing to unpack .../libldap-2.4-2_2.4.42+dfsg-2ubuntu3.8_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.8) over (2.4.42+dfsg-2ubuntu3.4) ...
Preparing to unpack .../libcurl3-gnutls_7.47.0-1ubuntu2.14_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.14) over (7.47.0-1ubuntu2.12) ...
Preparing to unpack .../apt-transport-https_1.2.32ubuntu0.1_amd64.deb ...
Unpacking apt-transport-https (1.2.32ubuntu0.1) over (1.2.31) ...
Preparing to unpack .../cuda-compat-10-0_410.129-1_amd64.deb ...
Unpacking cuda-compat-10-0 (410.129-1) over (410.104-1) ...
Preparing to unpack .../cuda-nvjpeg-10-0_10.0.130.1-1_amd64.deb ...
Unpacking cuda-nvjpeg-10-0 (10.0.130.1-1) over (10.0.130-1) ...
Preparing to unpack .../cuda-nvjpeg-dev-10-0_10.0.130.1-1_amd64.deb ...
Unpacking cuda-nvjpeg-dev-10-0 (10.0.130.1-1) over (10.0.130-1) ...
Preparing to unpack .../dpkg-dev_1.18.4ubuntu1.6_all.deb ...
Unpacking dpkg-dev (1.18.4ubuntu1.6) over (1.18.4ubuntu1.5) ...
Preparing to unpack .../libdpkg-perl_1.18.4ubuntu1.6_all.deb ...
Unpacking libdpkg-perl (1.18.4ubuntu1.6) over (1.18.4ubuntu1.5) ...
Preparing to unpack .../patch_2.7.5-1ubuntu0.16.04.2_amd64.deb ...
Unpacking patch (2.7.5-1ubuntu0.16.04.2) over (2.7.5-1ubuntu0.16.04.1) ...
Preparing to unpack .../git-man_1%3a2.7.4-0ubuntu1.9_all.deb ...
Unpacking git-man (1:2.7.4-0ubuntu1.9) over (1:2.7.4-0ubuntu1.6) ...
Preparing to unpack .../git_1%3a2.7.4-0ubuntu1.9_amd64.deb ...
Unpacking git (1:2.7.4-0ubuntu1.9) over (1:2.7.4-0ubuntu1.6) ...
Preparing to unpack .../linux-libc-dev_4.4.0-179.209_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.4.0-179.209) over (4.4.0-145.171) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for systemd (229-4ubuntu21.28) ...
Setting up bzip2 (1.0.6-8ubuntu0.2) ...
Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.3) ...
Setting up cpp-5 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up gcc-5 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.12) ...
Setting up g++-5 (5.4.0-6ubuntu1~16.04.12) ...
Setting up libjpeg-turbo8:amd64 (1.4.2-0ubuntu3.3) ...
Setting up libjpeg-turbo8-dev:amd64 (1.4.2-0ubuntu3.3) ...
Setting up libprocps4:amd64 (2:3.3.10-4ubuntu2.5) ...
Setting up procps (2:3.3.10-4ubuntu2.5) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up libexpat1:amd64 (2.1.0-7ubuntu0.16.04.5) ...
Setting up libgnutls30:amd64 (3.4.10-4ubuntu1.7) ...
Setting up libsqlite3-0:amd64 (3.11.0-1ubuntu1.4) ...
Setting up libsasl2-modules-db:amd64 (2.1.26.dfsg1-14ubuntu0.2) ...
Setting up libsasl2-2:amd64 (2.1.26.dfsg1-14ubuntu0.2) ...
Setting up libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.8) ...
Setting up libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.14) ...
Setting up curl (7.47.0-1ubuntu2.14) ...
Setting up apt-transport-https (1.2.32ubuntu0.1) ...
Setting up cuda-compat-10-0 (410.129-1) ...
Setting up cuda-nvjpeg-10-0 (10.0.130.1-1) ...
Setting up cuda-nvjpeg-dev-10-0 (10.0.130.1-1) ...
Setting up libdpkg-perl (1.18.4ubuntu1.6) ...
Setting up patch (2.7.5-1ubuntu0.16.04.2) ...
Setting up dpkg-dev (1.18.4ubuntu1.6) ...
Setting up git-man (1:2.7.4-0ubuntu1.9) ...
Setting up git (1:2.7.4-0ubuntu1.9) ...
Setting up linux-libc-dev:amd64 (4.4.0-179.209) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Removing intermediate container 5ea3c30f002a
---> c2644d8c127c
Step 16/57 : RUN apt-get install -y build-essential libglib2.0-0 libsm6 libxext6 libxrender-dev
---> Running in f34a4831e2e6
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version (12.1ubuntu2).
The following additional packages will be installed:
libglib2.0-data libice6 libicu55 libpthread-stubs0-dev libx11-6 libx11-data
libx11-dev libx11-doc libxau-dev libxau6 libxcb1 libxcb1-dev libxdmcp-dev
libxdmcp6 libxml2 libxrender1 sgml-base shared-mime-info x11-common
x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-render-dev
xdg-user-dirs xml-core xorg-sgml-doctools xtrans-dev
Suggested packages:
libxcb-doc sgml-base-doc debhelper
The following NEW packages will be installed:
libglib2.0-0 libglib2.0-data libice6 libicu55 libpthread-stubs0-dev libsm6
libx11-6 libx11-data libx11-dev libx11-doc libxau-dev libxau6 libxcb1
libxcb1-dev libxdmcp-dev libxdmcp6 libxext6 libxml2 libxrender-dev
libxrender1 sgml-base shared-mime-info x11-common x11proto-core-dev
x11proto-input-dev x11proto-kb-dev x11proto-render-dev xdg-user-dirs
xml-core xorg-sgml-doctools xtrans-dev
0 upgraded, 31 newly installed, 0 to remove and 4 not upgraded.
Need to get 13.9 MB of archives.
After this operation, 61.2 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-0 amd64 2.48.2-0ubuntu4.6 [1120 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxau6 amd64 1:1.0.8-1 [8376 B]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxdmcp6 amd64 1:1.1.2-1.1 [11.0 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxcb1 amd64 1.11.1-1ubuntu1 [40.0 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libx11-data all 2:1.6.3-1ubuntu2.1 [113 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libx11-6 amd64 2:1.6.3-1ubuntu2.1 [570 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxext6 amd64 2:1.3.3-1 [29.4 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/main amd64 sgml-base all 1.26+nmu4ubuntu1 [12.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 x11-common all 1:7.7+13ubuntu3.1 [22.9 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 libice6 amd64 2:1.0.9-1 [39.2 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial/main amd64 libsm6 amd64 2:1.2.2-1 [15.8 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-data all 2.48.2-0ubuntu4.6 [131 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libicu55 amd64 55.1-7ubuntu0.5 [7650 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libxml2 amd64 2.9.3+dfsg1-1ubuntu0.7 [698 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 shared-mime-info amd64 1.5-2ubuntu0.2 [405 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 xdg-user-dirs amd64 0.15-2ubuntu6.16.04.1 [61.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 xml-core all 0.13+nmu2 [23.3 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial/main amd64 libpthread-stubs0-dev amd64 0.3-4 [4068 B]
Get:19 http://archive.ubuntu.com/ubuntu xenial/main amd64 xorg-sgml-doctools all 1:1.11-1 [12.9 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 x11proto-core-dev all 7.0.31-1~ubuntu16.04.2 [254 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxau-dev amd64 1:1.0.8-1 [11.1 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxdmcp-dev amd64 1:1.1.2-1.1 [25.1 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-input-dev all 2.3.1-1 [118 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-kb-dev all 1.0.7-0ubuntu1 [224 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial/main amd64 xtrans-dev all 1.3.5-1 [70.5 kB]
Get:26 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxcb1-dev amd64 1.11.1-1ubuntu1 [74.2 kB]
Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libx11-dev amd64 2:1.6.3-1ubuntu2.1 [640 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libx11-doc all 2:1.6.3-1ubuntu2.1 [1470 kB]
Get:29 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxrender1 amd64 1:0.9.9-0ubuntu1 [18.5 kB]
Get:30 http://archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-render-dev all 2:0.11.1-2 [20.1 kB]
Get:31 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxrender-dev amd64 1:0.9.9-0ubuntu1 [24.5 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 13.9 MB in 5s (2686 kB/s)
Selecting previously unselected package libglib2.0-0:amd64.
(Reading database ... 12599 files and directories currently installed.)
Preparing to unpack .../libglib2.0-0_2.48.2-0ubuntu4.6_amd64.deb ...
Unpacking libglib2.0-0:amd64 (2.48.2-0ubuntu4.6) ...
Selecting previously unselected package libxau6:amd64.
Preparing to unpack .../libxau6_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau6:amd64 (1:1.0.8-1) ...
Selecting previously unselected package libxdmcp6:amd64.
Preparing to unpack .../libxdmcp6_1%3a1.1.2-1.1_amd64.deb ...
Unpacking libxdmcp6:amd64 (1:1.1.2-1.1) ...
Selecting previously unselected package libxcb1:amd64.
Preparing to unpack .../libxcb1_1.11.1-1ubuntu1_amd64.deb ...
Unpacking libxcb1:amd64 (1.11.1-1ubuntu1) ...
Selecting previously unselected package libx11-data.
Preparing to unpack .../libx11-data_2%3a1.6.3-1ubuntu2.1_all.deb ...
Unpacking libx11-data (2:1.6.3-1ubuntu2.1) ...
Selecting previously unselected package libx11-6:amd64.
Preparing to unpack .../libx11-6_2%3a1.6.3-1ubuntu2.1_amd64.deb ...
Unpacking libx11-6:amd64 (2:1.6.3-1ubuntu2.1) ...
Selecting previously unselected package libxext6:amd64.
Preparing to unpack .../libxext6_2%3a1.3.3-1_amd64.deb ...
Unpacking libxext6:amd64 (2:1.3.3-1) ...
Selecting previously unselected package sgml-base.
Preparing to unpack .../sgml-base_1.26+nmu4ubuntu1_all.deb ...
Unpacking sgml-base (1.26+nmu4ubuntu1) ...
Selecting previously unselected package x11-common.
Preparing to unpack .../x11-common_1%3a7.7+13ubuntu3.1_all.deb ...
dpkg-query: no packages found matching nux-tools
Unpacking x11-common (1:7.7+13ubuntu3.1) ...
Selecting previously unselected package libice6:amd64.
Preparing to unpack .../libice6_2%3a1.0.9-1_amd64.deb ...
Unpacking libice6:amd64 (2:1.0.9-1) ...
Selecting previously unselected package libsm6:amd64.
Preparing to unpack .../libsm6_2%3a1.2.2-1_amd64.deb ...
Unpacking libsm6:amd64 (2:1.2.2-1) ...
Selecting previously unselected package libglib2.0-data.
Preparing to unpack .../libglib2.0-data_2.48.2-0ubuntu4.6_all.deb ...
Unpacking libglib2.0-data (2.48.2-0ubuntu4.6) ...
Selecting previously unselected package libicu55:amd64.
Preparing to unpack .../libicu55_55.1-7ubuntu0.5_amd64.deb ...
Unpacking libicu55:amd64 (55.1-7ubuntu0.5) ...
Selecting previously unselected package libxml2:amd64.
Preparing to unpack .../libxml2_2.9.3+dfsg1-1ubuntu0.7_amd64.deb ...
Unpacking libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.7) ...
Selecting previously unselected package shared-mime-info.
Preparing to unpack .../shared-mime-info_1.5-2ubuntu0.2_amd64.deb ...
Unpacking shared-mime-info (1.5-2ubuntu0.2) ...
Selecting previously unselected package xdg-user-dirs.
Preparing to unpack .../xdg-user-dirs_0.15-2ubuntu6.16.04.1_amd64.deb ...
Unpacking xdg-user-dirs (0.15-2ubuntu6.16.04.1) ...
Selecting previously unselected package xml-core.
Preparing to unpack .../xml-core_0.13+nmu2_all.deb ...
Unpacking xml-core (0.13+nmu2) ...
Selecting previously unselected package libpthread-stubs0-dev:amd64.
Preparing to unpack .../libpthread-stubs0-dev_0.3-4_amd64.deb ...
Unpacking libpthread-stubs0-dev:amd64 (0.3-4) ...
Selecting previously unselected package xorg-sgml-doctools.
Preparing to unpack .../xorg-sgml-doctools_1%3a1.11-1_all.deb ...
Unpacking xorg-sgml-doctools (1:1.11-1) ...
Selecting previously unselected package x11proto-core-dev.
Preparing to unpack .../x11proto-core-dev_7.0.31-1~ubuntu16.04.2_all.deb ...
Unpacking x11proto-core-dev (7.0.31-1~ubuntu16.04.2) ...
Selecting previously unselected package libxau-dev:amd64.
Preparing to unpack .../libxau-dev_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau-dev:amd64 (1:1.0.8-1) ...
Selecting previously unselected package libxdmcp-dev:amd64.
Preparing to unpack .../libxdmcp-dev_1%3a1.1.2-1.1_amd64.deb ...
Unpacking libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
Selecting previously unselected package x11proto-input-dev.
Preparing to unpack .../x11proto-input-dev_2.3.1-1_all.deb ...
Unpacking x11proto-input-dev (2.3.1-1) ...
Selecting previously unselected package x11proto-kb-dev.
Preparing to unpack .../x11proto-kb-dev_1.0.7-0ubuntu1_all.deb ...
Unpacking x11proto-kb-dev (1.0.7-0ubuntu1) ...
Selecting previously unselected package xtrans-dev.
Preparing to unpack .../xtrans-dev_1.3.5-1_all.deb ...
Unpacking xtrans-dev (1.3.5-1) ...
Selecting previously unselected package libxcb1-dev:amd64.
Preparing to unpack .../libxcb1-dev_1.11.1-1ubuntu1_amd64.deb ...
Unpacking libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
Selecting previously unselected package libx11-dev:amd64.
Preparing to unpack .../libx11-dev_2%3a1.6.3-1ubuntu2.1_amd64.deb ...
Unpacking libx11-dev:amd64 (2:1.6.3-1ubuntu2.1) ...
Selecting previously unselected package libx11-doc.
Preparing to unpack .../libx11-doc_2%3a1.6.3-1ubuntu2.1_all.deb ...
Unpacking libx11-doc (2:1.6.3-1ubuntu2.1) ...
Selecting previously unselected package libxrender1:amd64.
Preparing to unpack .../libxrender1_1%3a0.9.9-0ubuntu1_amd64.deb ...
Unpacking libxrender1:amd64 (1:0.9.9-0ubuntu1) ...
Selecting previously unselected package x11proto-render-dev.
Preparing to unpack .../x11proto-render-dev_2%3a0.11.1-2_all.deb ...
Unpacking x11proto-render-dev (2:0.11.1-2) ...
Selecting previously unselected package libxrender-dev:amd64.
Preparing to unpack .../libxrender-dev_1%3a0.9.9-0ubuntu1_amd64.deb ...
Unpacking libxrender-dev:amd64 (1:0.9.9-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for systemd (229-4ubuntu21.28) ...
Setting up libglib2.0-0:amd64 (2.48.2-0ubuntu4.6) ...
No schema files found: doing nothing.
Setting up libxau6:amd64 (1:1.0.8-1) ...
Setting up libxdmcp6:amd64 (1:1.1.2-1.1) ...
Setting up libxcb1:amd64 (1.11.1-1ubuntu1) ...
Setting up libx11-data (2:1.6.3-1ubuntu2.1) ...
Setting up libx11-6:amd64 (2:1.6.3-1ubuntu2.1) ...
Setting up libxext6:amd64 (2:1.3.3-1) ...
Setting up sgml-base (1.26+nmu4ubuntu1) ...
Setting up x11-common (1:7.7+13ubuntu3.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libice6:amd64 (2:1.0.9-1) ...
Setting up libsm6:amd64 (2:1.2.2-1) ...
Setting up libglib2.0-data (2.48.2-0ubuntu4.6) ...
Setting up libicu55:amd64 (55.1-7ubuntu0.5) ...
Setting up libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.7) ...
Setting up shared-mime-info (1.5-2ubuntu0.2) ...
Setting up xdg-user-dirs (0.15-2ubuntu6.16.04.1) ...
Setting up xml-core (0.13+nmu2) ...
Setting up libpthread-stubs0-dev:amd64 (0.3-4) ...
Setting up xorg-sgml-doctools (1:1.11-1) ...
Setting up x11proto-core-dev (7.0.31-1~ubuntu16.04.2) ...
Setting up libxau-dev:amd64 (1:1.0.8-1) ...
Setting up libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
Setting up x11proto-input-dev (2.3.1-1) ...
Setting up x11proto-kb-dev (1.0.7-0ubuntu1) ...
Setting up xtrans-dev (1.3.5-1) ...
Setting up libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
Setting up libx11-dev:amd64 (2:1.6.3-1ubuntu2.1) ...
Setting up libx11-doc (2:1.6.3-1ubuntu2.1) ...
Setting up libxrender1:amd64 (1:0.9.9-0ubuntu1) ...
Setting up x11proto-render-dev (2:0.11.1-2) ...
Setting up libxrender-dev:amd64 (1:0.9.9-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for systemd (229-4ubuntu21.28) ...
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
Removing intermediate container f34a4831e2e6
---> f5e2305f61ab
Step 17/57 : RUN apt-get install verilator
---> Running in f7e176d1a1d1
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
gtkwave systemc
The following NEW packages will be installed:
verilator
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 2419 kB of archives.
After this operation, 10.2 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 verilator amd64 3.874-1 [2419 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 2419 kB in 2s (946 kB/s)
Selecting previously unselected package verilator.
(Reading database ... 14470 files and directories currently installed.)
Preparing to unpack .../verilator_3.874-1_amd64.deb ...
Unpacking verilator (3.874-1) ...
Setting up verilator (3.874-1) ...
Removing intermediate container f7e176d1a1d1
---> d51d466e1b25
Step 18/57 : RUN apt-get install nano
---> Running in 7643e55625d9
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
spell
The following NEW packages will be installed:
nano
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 191 kB of archives.
After this operation, 700 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 nano amd64 2.5.3-2ubuntu2 [191 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 191 kB in 1s (116 kB/s)
Selecting previously unselected package nano.
(Reading database ... 14537 files and directories currently installed.)
Preparing to unpack .../nano_2.5.3-2ubuntu2_amd64.deb ...
Unpacking nano (2.5.3-2ubuntu2) ...
Setting up nano (2.5.3-2ubuntu2) ...
update-alternatives: using /bin/nano to provide /usr/bin/editor (editor) in auto mode
update-alternatives: using /bin/nano to provide /usr/bin/pico (pico) in auto mode
Removing intermediate container 7643e55625d9
---> 14107355f3e0
Step 19/57 : RUN apt-get -y install sshpass
---> Running in e97493619a6d
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libbsd0 libedit2 libxmuu1 openssh-client xauth
Suggested packages:
ssh-askpass libpam-ssh keychain monkeysphere
The following NEW packages will be installed:
libbsd0 libedit2 libxmuu1 openssh-client sshpass xauth
0 upgraded, 6 newly installed, 0 to remove and 4 not upgraded.
Need to get 751 kB of archives.
After this operation, 4385 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libbsd0 amd64 0.8.2-1ubuntu0.1 [42.0 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libedit2 amd64 3.1-20150325-1ubuntu2 [76.5 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxmuu1 amd64 2:1.1.2-2 [9674 B]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 openssh-client amd64 1:7.2p2-4ubuntu2.8 [590 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 xauth amd64 1:1.0.9-1ubuntu2 [22.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/universe amd64 sshpass amd64 1.05-1 [10.5 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 751 kB in 2s (313 kB/s)
Selecting previously unselected package libbsd0:amd64.
(Reading database ... 14601 files and directories currently installed.)
Preparing to unpack .../libbsd0_0.8.2-1ubuntu0.1_amd64.deb ...
Unpacking libbsd0:amd64 (0.8.2-1ubuntu0.1) ...
Selecting previously unselected package libedit2:amd64.
Preparing to unpack .../libedit2_3.1-20150325-1ubuntu2_amd64.deb ...
Unpacking libedit2:amd64 (3.1-20150325-1ubuntu2) ...
Selecting previously unselected package libxmuu1:amd64.
Preparing to unpack .../libxmuu1_2%3a1.1.2-2_amd64.deb ...
Unpacking libxmuu1:amd64 (2:1.1.2-2) ...
Selecting previously unselected package openssh-client.
Preparing to unpack .../openssh-client_1%3a7.2p2-4ubuntu2.8_amd64.deb ...
Unpacking openssh-client (1:7.2p2-4ubuntu2.8) ...
Selecting previously unselected package xauth.
Preparing to unpack .../xauth_1%3a1.0.9-1ubuntu2_amd64.deb ...
Unpacking xauth (1:1.0.9-1ubuntu2) ...
Selecting previously unselected package sshpass.
Preparing to unpack .../sshpass_1.05-1_amd64.deb ...
Unpacking sshpass (1.05-1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libbsd0:amd64 (0.8.2-1ubuntu0.1) ...
Setting up libedit2:amd64 (3.1-20150325-1ubuntu2) ...
Setting up libxmuu1:amd64 (2:1.1.2-2) ...
Setting up openssh-client (1:7.2p2-4ubuntu2.8) ...
Setting up xauth (1:1.0.9-1ubuntu2) ...
Setting up sshpass (1.05-1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Removing intermediate container e97493619a6d
---> f699bf3658b1
Step 20/57 : RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
---> Running in 5643c3d52de0
Removing intermediate container 5643c3d52de0
---> 8103ae707ccb
Step 21/57 : COPY requirements.txt .
---> dd941c3eed7a
Step 22/57 : RUN pip install -r requirements.txt
---> Running in dea9093d5191
Collecting bitstring (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/c3/fc/ffac2c199d2efe1ec5111f55efeb78f5f2972456df6939fea849f103f9f5/bitstring-3.1.7.tar.gz (195kB)
Collecting docrep (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/dd/4a/ac09d6e07713e22baa4ab4e6f422d25e53425f3dc042616387dfbc272504/docrep-0.2.7.tar.gz
Collecting future (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829kB)
Collecting numpy==1.18.0 (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/92/e6/45f71bd24f4e37629e9db5fb75caab919507deae6a5a257f9e4685a5f931/numpy-1.18.0-cp36-cp36m-manylinux1_x86_64.whl (20.1MB)
Collecting onnx==1.5.0 (from -r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/88/50/e4a5a869093f35884d1fd95b46b24705ab27adb7e562a2a307523c043be3/onnx-1.5.0-cp36-cp36m-manylinux1_x86_64.whl (7.0MB)
Collecting onnxruntime==1.2.0 (from -r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/69/39/404df5ee608c548dacde43a17faf0248b183fa6163cf9c06aca6a511d760/onnxruntime-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (3.7MB)
Collecting pre-commit (from -r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/fc/70/b162b8e15689427006853a245b45040435534a568cc773be098bfaebd36d/pre_commit-2.4.0-py2.py3-none-any.whl (171kB)
Collecting pyverilator (from -r requirements.txt (line 8))
Downloading https://files.pythonhosted.org/packages/5f/28/abb7d556067963e444c36b67000a02e435c2d6bdde8ed083acfa6b477d50/PyVerilator-0.1.0-py3-none-any.whl
Collecting scipy (from -r requirements.txt (line 9))
Downloading https://files.pythonhosted.org/packages/dc/29/162476fd44203116e7980cfbd9352eef9db37c49445d1fec35509022f6aa/scipy-1.4.1-cp36-cp36m-manylinux1_x86_64.whl (26.1MB)
Collecting sphinx (from -r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/57/ee/b1ca567be96185ccc7d352dffa46cb047eb62fbf437e643d4dee5df09619/Sphinx-3.0.3-py3-none-any.whl (2.8MB)
Collecting wget (from -r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/47/6a/62e288da7bcda82b935ff0c6cfe542970f04e29c756b0e147251b2fb251f/wget-3.2.zip
Requirement already satisfied: six in /opt/conda/lib/python3.6/site-packages (from docrep->-r requirements.txt (line 2)) (1.12.0)
Collecting typing-extensions>=3.6.2.1 (from onnx==1.5.0->-r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/0c/0e/3f026d0645d699e7320b59952146d56ad7c374e9cd72cd16e7c74e657a0f/typing_extensions-3.7.4.2-py3-none-any.whl
Collecting typing>=3.6.4 (from onnx==1.5.0->-r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/fe/2e/b480ee1b75e6d17d2993738670e75c1feeb9ff7f64452153cf018051cc92/typing-3.7.4.1-py3-none-any.whl
Collecting protobuf (from onnx==1.5.0->-r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/c4/c1/300e675e55644f400b9e855c6a8189f3c9e4f41906a23954d15ebf59600f/protobuf-3.12.1-cp36-cp36m-manylinux1_x86_64.whl (1.3MB)
Collecting nodeenv>=0.11.1 (from pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/08/43/86ff33286c83f7b5e8903c32db01fe122c5e8a9d8dc1067dcaa9be54a033/nodeenv-1.3.5-py2.py3-none-any.whl
Collecting importlib-metadata; python_version < "3.8" (from pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/ad/e4/891bfcaf868ccabc619942f27940c77a8a4b45fd8367098955bb7e152fb1/importlib_metadata-1.6.0-py2.py3-none-any.whl
Requirement already satisfied: pyyaml>=5.1 in /opt/conda/lib/python3.6/site-packages (from pre-commit->-r requirements.txt (line 7)) (5.1)
Collecting virtualenv>=20.0.8 (from pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/57/6e/a13442adf18bada682f88f55638cd43cc7a39c3e00fdcf898ca4ceaeb682/virtualenv-20.0.21-py2.py3-none-any.whl (4.7MB)
Collecting toml (from pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/9f/e1/1b40b80f2e1663a6b9f497123c11d7d988c0919abbf3c3f2688e448c5363/toml-0.10.1-py2.py3-none-any.whl
Collecting cfgv>=2.0.0 (from pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/6d/82/49913e721128ff16d6b7cf304f513de7bba698583b045dfb9c4b3bb2f467/cfgv-3.1.0-py2.py3-none-any.whl
Collecting identify>=1.0.0 (from pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/a0/2e/c1a997cde3fe4c2dfb0d3917e2fa4a2653444a7da69cb64e2d0851e52e1e/identify-1.4.16-py2.py3-none-any.whl (97kB)
Collecting importlib-resources; python_version < "3.7" (from pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/7f/2d/88f166bcaadc09d9fdbf1c336ad118e01b7fe1155e15675e125be2ff1899/importlib_resources-1.5.0-py2.py3-none-any.whl
Collecting tclwrapper>=0.0.1 (from pyverilator->-r requirements.txt (line 8))
Downloading https://files.pythonhosted.org/packages/c9/12/415ce7843101faccc72e05117e40a1534245774f40d2322a399e77d595cc/tclwrapper-0.0.1.tar.gz
Collecting snowballstemmer>=1.1 (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/7d/4b/cdf1113a0e88b641893b814e9c36f69a6fda28cd88b62c7f0d858cde3166/snowballstemmer-2.0.0-py2.py3-none-any.whl (97kB)
Collecting sphinxcontrib-qthelp (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/2b/14/05f9206cf4e9cfca1afb5fd224c7cd434dcc3a433d6d9e4e0264d29c6cdb/sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90kB)
Requirement already satisfied: Pygments>=2.0 in /opt/conda/lib/python3.6/site-packages (from sphinx->-r requirements.txt (line 10)) (2.3.1)
Collecting babel>=1.3 (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/15/a1/522dccd23e5d2e47aed4b6a16795b8213e3272c7506e625f2425ad025a19/Babel-2.8.0-py2.py3-none-any.whl (8.6MB)
Collecting imagesize (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/31/b2/b5522a0c8d11e4aff83f8342f3f0dea68c2fb25aa44403e420587f0ce204/imagesize-1.2.0-py2.py3-none-any.whl
Collecting sphinxcontrib-htmlhelp (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/36/62/8222554b29b3acde8420128d6d3999c5904d40922ef4b6ccb370e2be7421/sphinxcontrib_htmlhelp-1.0.3-py2.py3-none-any.whl (96kB)
Collecting sphinxcontrib-applehelp (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/dc/47/86022665a9433d89a66f5911b558ddff69861766807ba685de2e324bd6ed/sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121kB)
Requirement already satisfied: requests>=2.5.0 in /opt/conda/lib/python3.6/site-packages (from sphinx->-r requirements.txt (line 10)) (2.21.0)
Collecting packaging (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/46/19/c5ab91b1b05cfe63cccd5cfc971db9214c6dd6ced54e33c30d5af1d2bc43/packaging-20.4-py2.py3-none-any.whl
Collecting sphinxcontrib-serializinghtml (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/9a/ca/bfad79b79b3821d0c6361c431f0ef4aec16ee248338b2c2013008b34d345/sphinxcontrib_serializinghtml-1.1.4-py2.py3-none-any.whl (89kB)
Requirement already satisfied: Jinja2>=2.3 in /opt/conda/lib/python3.6/site-packages (from sphinx->-r requirements.txt (line 10)) (2.10.1)
Collecting alabaster<0.8,>=0.7 (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/10/ad/00b090d23a222943eb0eda509720a404f531a439e803f6538f35136cae9e/alabaster-0.7.12-py2.py3-none-any.whl
Collecting sphinxcontrib-devhelp (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/c5/09/5de5ed43a521387f18bdf5f5af31d099605c992fd25372b2b9b825ce48ee/sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84kB)
Collecting docutils>=0.12 (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/81/44/8a15e45ffa96e6cf82956dd8d7af9e666357e16b0d93b253903475ee947f/docutils-0.16-py2.py3-none-any.whl (548kB)
Collecting sphinxcontrib-jsmath (from sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /opt/conda/lib/python3.6/site-packages (from sphinx->-r requirements.txt (line 10)) (41.0.1)
Collecting zipp>=0.5 (from importlib-metadata; python_version < "3.8"->pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/b2/34/bfcb43cc0ba81f527bc4f40ef41ba2ff4080e047acb0586b56b3d017ace4/zipp-3.1.0-py3-none-any.whl
Requirement already satisfied: filelock<4,>=3.0.0 in /opt/conda/lib/python3.6/site-packages (from virtualenv>=20.0.8->pre-commit->-r requirements.txt (line 7)) (3.0.10)
Collecting distlib<1,>=0.3.0 (from virtualenv>=20.0.8->pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/7d/29/694a3a4d7c0e1aef76092e9167fbe372e0f7da055f5dcf4e1313ec21d96a/distlib-0.3.0.zip (571kB)
Collecting appdirs<2,>=1.4.3 (from virtualenv>=20.0.8->pre-commit->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl
Requirement already satisfied: pytz>=2015.7 in /opt/conda/lib/python3.6/site-packages (from babel>=1.3->sphinx->-r requirements.txt (line 10)) (2019.1)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx->-r requirements.txt (line 10)) (2019.3.9)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx->-r requirements.txt (line 10)) (1.24.2)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx->-r requirements.txt (line 10)) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx->-r requirements.txt (line 10)) (2.8)
Collecting pyparsing>=2.0.2 (from packaging->sphinx->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl (67kB)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/conda/lib/python3.6/site-packages (from Jinja2>=2.3->sphinx->-r requirements.txt (line 10)) (1.1.1)
Building wheels for collected packages: bitstring, docrep, future, wget, tclwrapper, distlib
Building wheel for bitstring (setup.py): started
Building wheel for bitstring (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/b8/27/f0/8373e26b7de57db03dc18aaaebdd8c26a99da882416f762979
Building wheel for docrep (setup.py): started
Building wheel for docrep (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/43/6c/2a/d7b1c8a6e7e66f708a6b6a4fbe4bb5a73219f9c7f0afed568b
Building wheel for future (setup.py): started
Building wheel for future (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/8b/99/a0/81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e
Building wheel for wget (setup.py): started
Building wheel for wget (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/40/15/30/7d8f7cea2902b4db79e3fea550d7d7b85ecb27ef992b618f3f
Building wheel for tclwrapper (setup.py): started
Building wheel for tclwrapper (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/80/e2/6e/38daa5a5f60e12aaf768cf2b4a7078da05d70b886d89d55303
Building wheel for distlib (setup.py): started
Building wheel for distlib (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/6e/e8/db/c73dae4867666e89ba3cfbc4b5c092446f0e584eda6f409cbb
Successfully built bitstring docrep future wget tclwrapper distlib
Installing collected packages: bitstring, docrep, future, numpy, typing-extensions, typing, protobuf, onnx, onnxruntime, nodeenv, zipp, importlib-metadata, distlib, appdirs, importlib-resources, virtualenv, toml, cfgv, identify, pre-commit, tclwrapper, pyverilator, scipy, snowballstemmer, sphinxcontrib-qthelp, babel, imagesize, sphinxcontrib-htmlhelp, sphinxcontrib-applehelp, pyparsing, packaging, sphinxcontrib-serializinghtml, alabaster, sphinxcontrib-devhelp, docutils, sphinxcontrib-jsmath, sphinx, wget
Found existing installation: numpy 1.16.3
Uninstalling numpy-1.16.3:
Successfully uninstalled numpy-1.16.3
Successfully installed alabaster-0.7.12 appdirs-1.4.4 babel-2.8.0 bitstring-3.1.7 cfgv-3.1.0 distlib-0.3.0 docrep-0.2.7 docutils-0.16 future-0.18.2 identify-1.4.16 imagesize-1.2.0 importlib-metadata-1.6.0 importlib-resources-1.5.0 nodeenv-1.3.5 numpy-1.18.0 onnx-1.5.0 onnxruntime-1.2.0 packaging-20.4 pre-commit-2.4.0 protobuf-3.12.1 pyparsing-2.4.7 pyverilator-0.1.0 scipy-1.4.1 snowballstemmer-2.0.0 sphinx-3.0.3 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-1.0.3 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.4 tclwrapper-0.0.1 toml-0.10.1 typing-3.7.4.1 typing-extensions-3.7.4.2 virtualenv-20.0.21 wget-3.2 zipp-3.1.0
Removing intermediate container dea9093d5191
---> dc3c8d1ffd60
Step 23/57 : RUN rm requirements.txt
---> Running in c7ab75e2320c
Removing intermediate container c7ab75e2320c
---> 579eca7e5baf
Step 24/57 : RUN pip install jupyter
---> Running in 11fb24fc9163
Collecting jupyter
Downloading https://files.pythonhosted.org/packages/83/df/0f5dd132200728a86190397e1ea87cd76244e42d39ec5e88efd25b2abd7e/jupyter-1.0.0-py2.py3-none-any.whl
Collecting jupyter-console (from jupyter)
Downloading https://files.pythonhosted.org/packages/0a/89/742fa5a80b552ffcb6a8922712697c6e6828aee7b91ee4ae2b79f00f8401/jupyter_console-6.1.0-py2.py3-none-any.whl
Collecting qtconsole (from jupyter)
Downloading https://files.pythonhosted.org/packages/61/9c/ee26b844381f0cf2ea24bd822e4a9ed2c7fd6d8cdeef63be459c62132f9b/qtconsole-4.7.4-py2.py3-none-any.whl (118kB)
Collecting ipywidgets (from jupyter)
Downloading https://files.pythonhosted.org/packages/56/a0/dbcf5881bb2f51e8db678211907f16ea0a182b232c591a6d6f276985ca95/ipywidgets-7.5.1-py2.py3-none-any.whl (121kB)
Collecting ipykernel (from jupyter)
Downloading https://files.pythonhosted.org/packages/61/18/f2350f0396fca562c22f880e25d668eaf6de129b6a56bf5b6786796a12e1/ipykernel-5.3.0-py3-none-any.whl (119kB)
Collecting notebook (from jupyter)
Downloading https://files.pythonhosted.org/packages/b1/f1/0a67f09ef53a342403ffa66646ee39273e0ac79ffa5de5dbe2f3e28b5bdf/notebook-6.0.3-py3-none-any.whl (9.7MB)
Collecting nbconvert (from jupyter)
Downloading https://files.pythonhosted.org/packages/79/6c/05a569e9f703d18aacb89b7ad6075b404e8a4afde2c26b73ca77bb644b14/nbconvert-5.6.1-py2.py3-none-any.whl (455kB)
Requirement already satisfied: pygments in /opt/conda/lib/python3.6/site-packages (from jupyter-console->jupyter) (2.3.1)
Requirement already satisfied: ipython in /opt/conda/lib/python3.6/site-packages (from jupyter-console->jupyter) (7.5.0)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /opt/conda/lib/python3.6/site-packages (from jupyter-console->jupyter) (2.0.9)
Collecting jupyter-client (from jupyter-console->jupyter)
Downloading https://files.pythonhosted.org/packages/34/0b/2ebddf775f558158ca8df23b35445fb15d4b1558a9e4a03bc7e75b13476e/jupyter_client-6.1.3-py3-none-any.whl (106kB)
Collecting jupyter-core (from qtconsole->jupyter)
Downloading https://files.pythonhosted.org/packages/63/0d/df2d17cdf389cea83e2efa9a4d32f7d527ba78667e0153a8e676e957b2f7/jupyter_core-4.6.3-py2.py3-none-any.whl (83kB)
Collecting qtpy (from qtconsole->jupyter)
Downloading https://files.pythonhosted.org/packages/cd/fd/9972948f02e967b691cc0ca1f26124826a3b88cb38f412a8b7935b8c3c72/QtPy-1.9.0-py2.py3-none-any.whl (54kB)
Requirement already satisfied: ipython-genutils in /opt/conda/lib/python3.6/site-packages (from qtconsole->jupyter) (0.2.0)
Requirement already satisfied: traitlets in /opt/conda/lib/python3.6/site-packages (from qtconsole->jupyter) (4.3.2)
Collecting pyzmq>=17.1 (from qtconsole->jupyter)
Downloading https://files.pythonhosted.org/packages/c9/11/bb28199dd8f186a4053b7dd94a33abf0c1162d99203e7ab32a6b71fa045b/pyzmq-19.0.1-cp36-cp36m-manylinux1_x86_64.whl (1.1MB)
Collecting widgetsnbextension~=3.5.0 (from ipywidgets->jupyter)
Downloading https://files.pythonhosted.org/packages/6c/7b/7ac231c20d2d33c445eaacf8a433f4e22c60677eb9776c7c5262d7ddee2d/widgetsnbextension-3.5.1-py2.py3-none-any.whl (2.2MB)
Collecting nbformat>=4.2.0 (from ipywidgets->jupyter)
Downloading https://files.pythonhosted.org/packages/d5/3c/251cfe5e3c9545ece107d342909ee3822d8cd9f3f11a591df37baeff2089/nbformat-5.0.6-py3-none-any.whl (170kB)
Collecting tornado>=4.2 (from ipykernel->jupyter)
Downloading https://files.pythonhosted.org/packages/95/84/119a46d494f008969bf0c775cb2c6b3579d3c4cc1bb1b41a022aa93ee242/tornado-6.0.4.tar.gz (496kB)
Collecting prometheus-client (from notebook->jupyter)
Downloading https://files.pythonhosted.org/packages/b3/23/41a5a24b502d35a4ad50a5bb7202a5e1d9a0364d0c12f56db3dbf7aca76d/prometheus_client-0.7.1.tar.gz
Collecting Send2Trash (from notebook->jupyter)
Downloading https://files.pythonhosted.org/packages/49/46/c3dc27481d1cc57b9385aff41c474ceb7714f7935b1247194adae45db714/Send2Trash-1.5.0-py3-none-any.whl
Requirement already satisfied: jinja2 in /opt/conda/lib/python3.6/site-packages (from notebook->jupyter) (2.10.1)
Collecting terminado>=0.8.1 (from notebook->jupyter)
Downloading https://files.pythonhosted.org/packages/ff/96/1d9a2c23990aea8f8e0b5c3b6627d03196a73771a17a2d9860bbe9823ab6/terminado-0.8.3-py2.py3-none-any.whl
Collecting bleach (from nbconvert->jupyter)
Downloading https://files.pythonhosted.org/packages/9a/1e/7d6cb3b27cd2c490558349ca5d5cc05b390b017da1c704cac807ac8bd9fb/bleach-3.1.5-py2.py3-none-any.whl (151kB)
Collecting entrypoints>=0.2.2 (from nbconvert->jupyter)
Downloading https://files.pythonhosted.org/packages/ac/c6/44694103f8c221443ee6b0041f69e2740d89a25641e62fb4f2ee568f2f9c/entrypoints-0.3-py2.py3-none-any.whl
Collecting defusedxml (from nbconvert->jupyter)
Downloading https://files.pythonhosted.org/packages/06/74/9b387472866358ebc08732de3da6dc48e44b0aacd2ddaa5cb85ab7e986a2/defusedxml-0.6.0-py2.py3-none-any.whl
Collecting pandocfilters>=1.4.1 (from nbconvert->jupyter)
Downloading https://files.pythonhosted.org/packages/4c/ea/236e2584af67bb6df960832731a6e5325fd4441de001767da328c33368ce/pandocfilters-1.4.2.tar.gz
Collecting testpath (from nbconvert->jupyter)
Downloading https://files.pythonhosted.org/packages/1b/9e/1a170feaa54f22aeb5a5d16c9015e82234275a3c8ab630b552493f9cb8a9/testpath-0.4.4-py2.py3-none-any.whl (163kB)
Collecting mistune<2,>=0.8.1 (from nbconvert->jupyter)
Downloading https://files.pythonhosted.org/packages/09/ec/4b43dae793655b7d8a25f76119624350b4d65eb663459eb9603d7f1f0345/mistune-0.8.4-py2.py3-none-any.whl
Requirement already satisfied: pexpect; sys_platform != "win32" in /opt/conda/lib/python3.6/site-packages (from ipython->jupyter-console->jupyter) (4.7.0)
Requirement already satisfied: pickleshare in /opt/conda/lib/python3.6/site-packages (from ipython->jupyter-console->jupyter) (0.7.5)
Requirement already satisfied: backcall in /opt/conda/lib/python3.6/site-packages (from ipython->jupyter-console->jupyter) (0.1.0)
Requirement already satisfied: jedi>=0.10 in /opt/conda/lib/python3.6/site-packages (from ipython->jupyter-console->jupyter) (0.13.3)
Requirement already satisfied: decorator in /opt/conda/lib/python3.6/site-packages (from ipython->jupyter-console->jupyter) (4.4.0)
Requirement already satisfied: setuptools>=18.5 in /opt/conda/lib/python3.6/site-packages (from ipython->jupyter-console->jupyter) (41.0.1)
Requirement already satisfied: six>=1.9.0 in /opt/conda/lib/python3.6/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->jupyter-console->jupyter) (1.12.0)
Requirement already satisfied: wcwidth in /opt/conda/lib/python3.6/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->jupyter-console->jupyter) (0.1.7)
Collecting python-dateutil>=2.1 (from jupyter-client->jupyter-console->jupyter)
Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
Collecting jsonschema!=2.5.0,>=2.4 (from nbformat>=4.2.0->ipywidgets->jupyter)
Downloading https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl (56kB)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/conda/lib/python3.6/site-packages (from jinja2->notebook->jupyter) (1.1.1)
Requirement already satisfied: ptyprocess; os_name != "nt" in /opt/conda/lib/python3.6/site-packages (from terminado>=0.8.1->notebook->jupyter) (0.6.0)
Requirement already satisfied: packaging in /opt/conda/lib/python3.6/site-packages (from bleach->nbconvert->jupyter) (20.4)
Collecting webencodings (from bleach->nbconvert->jupyter)
Downloading https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl
Requirement already satisfied: parso>=0.3.0 in /opt/conda/lib/python3.6/site-packages (from jedi>=0.10->ipython->jupyter-console->jupyter) (0.4.0)
Collecting pyrsistent>=0.14.0 (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter)
Downloading https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz (108kB)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in /opt/conda/lib/python3.6/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (1.6.0)
Collecting attrs>=17.4.0 (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter)
Downloading https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
Requirement already satisfied: pyparsing>=2.0.2 in /opt/conda/lib/python3.6/site-packages (from packaging->bleach->nbconvert->jupyter) (2.4.7)
Requirement already satisfied: zipp>=0.5 in /opt/conda/lib/python3.6/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (3.1.0)
Building wheels for collected packages: tornado, prometheus-client, pandocfilters, pyrsistent
Building wheel for tornado (setup.py): started
Building wheel for tornado (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/93/84/2f/409c7b2bb3afc3aa727f7ee8787975e0793f74d1165f4d0104
Building wheel for prometheus-client (setup.py): started
Building wheel for prometheus-client (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/1c/54/34/fd47cd9b308826cc4292b54449c1899a30251ef3b506bc91ea
Building wheel for pandocfilters (setup.py): started
Building wheel for pandocfilters (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/39/01/56/f1b08a6275acc59e846fa4c1e1b65dbc1919f20157d9e66c20
Building wheel for pyrsistent (setup.py): started
Building wheel for pyrsistent (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/c2/85/ad/bc6d41e2c4b35c9fdfed48f0fcd411ffc4164e67755ddf9ebb
Successfully built tornado prometheus-client pandocfilters pyrsistent
Installing collected packages: tornado, jupyter-core, python-dateutil, pyzmq, jupyter-client, ipykernel, jupyter-console, qtpy, qtconsole, prometheus-client, Send2Trash, pyrsistent, attrs, jsonschema, nbformat, webencodings, bleach, entrypoints, defusedxml, pandocfilters, testpath, mistune, nbconvert, terminado, notebook, widgetsnbextension, ipywidgets, jupyter
Successfully installed Send2Trash-1.5.0 attrs-19.3.0 bleach-3.1.5 defusedxml-0.6.0 entrypoints-0.3 ipykernel-5.3.0 ipywidgets-7.5.1 jsonschema-3.2.0 jupyter-1.0.0 jupyter-client-6.1.3 jupyter-console-6.1.0 jupyter-core-4.6.3 mistune-0.8.4 nbconvert-5.6.1 nbformat-5.0.6 notebook-6.0.3 pandocfilters-1.4.2 prometheus-client-0.7.1 pyrsistent-0.16.0 python-dateutil-2.8.1 pyzmq-19.0.1 qtconsole-4.7.4 qtpy-1.9.0 terminado-0.8.3 testpath-0.4.4 tornado-6.0.4 webencodings-0.5.1 widgetsnbextension-3.5.1
Removing intermediate container 11fb24fc9163
---> 72bbf3b30d87
Step 25/57 : RUN pip install netron
---> Running in b4339a3330e6
Collecting netron
Downloading https://files.pythonhosted.org/packages/3b/57/01f85a7f7645d3fbd6f01411fd376c207890f1152a7a3221cfdec4384f7e/netron-4.1.8-py2.py3-none-any.whl (1.4MB)
Installing collected packages: netron
Successfully installed netron-4.1.8
Removing intermediate container b4339a3330e6
---> 1bab1fc101e0
Step 26/57 : RUN pip install matplotlib
---> Running in 2c5bf960b0f4
Collecting matplotlib
Downloading https://files.pythonhosted.org/packages/93/4b/52da6b1523d5139d04e02d9e26ceda6146b48f2a4e5d2abfdf1c7bac8c40/matplotlib-3.2.1-cp36-cp36m-manylinux1_x86_64.whl (12.4MB)
Collecting kiwisolver>=1.0.1 (from matplotlib)
Downloading https://files.pythonhosted.org/packages/ae/23/147de658aabbf968324551ea22c0c13a00284c4ef49a77002e91f79657b7/kiwisolver-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (88kB)
Requirement already satisfied: numpy>=1.11 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (1.18.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (2.8.1)
Collecting cycler>=0.10 (from matplotlib)
Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.6/site-packages (from python-dateutil>=2.1->matplotlib) (1.12.0)
Installing collected packages: kiwisolver, cycler, matplotlib
Successfully installed cycler-0.10.0 kiwisolver-1.2.0 matplotlib-3.2.1
Removing intermediate container 2c5bf960b0f4
---> c6821607a60d
Step 27/57 : RUN pip install pytest-dependency
---> Running in 5c2c548cda90
Collecting pytest-dependency
Downloading https://files.pythonhosted.org/packages/69/6d/cfd6d654877f75e0368e4040f1cf0350dd9f427b578bf7b685af629f8167/pytest-dependency-0.5.1.tar.gz
Collecting pytest>=3.6.0 (from pytest-dependency)
Downloading https://files.pythonhosted.org/packages/6c/f9/9f2b6c672c8f8bb87a4c1bd52c1b57213627b035305aad745d015b2a62ae/pytest-5.4.2-py3-none-any.whl (247kB)
Collecting more-itertools>=4.0.0 (from pytest>=3.6.0->pytest-dependency)
Downloading https://files.pythonhosted.org/packages/06/b1/2dcadc4861c505a807d5c6d88928450fe5afcf352f205432572a10d74657/more_itertools-8.3.0-py3-none-any.whl (44kB)
Collecting pluggy<1.0,>=0.12 (from pytest>=3.6.0->pytest-dependency)
Downloading https://files.pythonhosted.org/packages/a0/28/85c7aa31b80d150b772fbe4a229487bc6644da9ccb7e427dd8cc60cb8a62/pluggy-0.13.1-py2.py3-none-any.whl
Collecting py>=1.5.0 (from pytest>=3.6.0->pytest-dependency)
Downloading https://files.pythonhosted.org/packages/99/8d/21e1767c009211a62a8e3067280bfce76e89c9f876180308515942304d2d/py-1.8.1-py2.py3-none-any.whl (83kB)
Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in /opt/conda/lib/python3.6/site-packages (from pytest>=3.6.0->pytest-dependency) (1.6.0)
Requirement already satisfied: packaging in /opt/conda/lib/python3.6/site-packages (from pytest>=3.6.0->pytest-dependency) (20.4)
Requirement already satisfied: wcwidth in /opt/conda/lib/python3.6/site-packages (from pytest>=3.6.0->pytest-dependency) (0.1.7)
Requirement already satisfied: attrs>=17.4.0 in /opt/conda/lib/python3.6/site-packages (from pytest>=3.6.0->pytest-dependency) (19.3.0)
Requirement already satisfied: zipp>=0.5 in /opt/conda/lib/python3.6/site-packages (from importlib-metadata>=0.12; python_version < "3.8"->pytest>=3.6.0->pytest-dependency) (3.1.0)
Requirement already satisfied: pyparsing>=2.0.2 in /opt/conda/lib/python3.6/site-packages (from packaging->pytest>=3.6.0->pytest-dependency) (2.4.7)
Requirement already satisfied: six in /opt/conda/lib/python3.6/site-packages (from packaging->pytest>=3.6.0->pytest-dependency) (1.12.0)
Building wheels for collected packages: pytest-dependency
Building wheel for pytest-dependency (setup.py): started
Building wheel for pytest-dependency (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/d0/32/57/2b5f4997722ef4021bc4f32b793c0798ccf734a954bd9533ab
Successfully built pytest-dependency
Installing collected packages: more-itertools, pluggy, py, pytest, pytest-dependency
Successfully installed more-itertools-8.3.0 pluggy-0.13.1 py-1.8.1 pytest-5.4.2 pytest-dependency-0.5.1
Removing intermediate container 5c2c548cda90
---> 74cf2e2cdfc1
Step 28/57 : RUN pip install sphinx
---> Running in 302ad97d6514
Requirement already satisfied: sphinx in /opt/conda/lib/python3.6/site-packages (3.0.3)
Requirement already satisfied: imagesize in /opt/conda/lib/python3.6/site-packages (from sphinx) (1.2.0)
Requirement already satisfied: packaging in /opt/conda/lib/python3.6/site-packages (from sphinx) (20.4)
Requirement already satisfied: sphinxcontrib-applehelp in /opt/conda/lib/python3.6/site-packages (from sphinx) (1.0.2)
Requirement already satisfied: sphinxcontrib-jsmath in /opt/conda/lib/python3.6/site-packages (from sphinx) (1.0.1)
Requirement already satisfied: alabaster<0.8,>=0.7 in /opt/conda/lib/python3.6/site-packages (from sphinx) (0.7.12)
Requirement already satisfied: sphinxcontrib-qthelp in /opt/conda/lib/python3.6/site-packages (from sphinx) (1.0.3)
Requirement already satisfied: snowballstemmer>=1.1 in /opt/conda/lib/python3.6/site-packages (from sphinx) (2.0.0)
Requirement already satisfied: sphinxcontrib-htmlhelp in /opt/conda/lib/python3.6/site-packages (from sphinx) (1.0.3)
Requirement already satisfied: Jinja2>=2.3 in /opt/conda/lib/python3.6/site-packages (from sphinx) (2.10.1)
Requirement already satisfied: setuptools in /opt/conda/lib/python3.6/site-packages (from sphinx) (41.0.1)
Requirement already satisfied: docutils>=0.12 in /opt/conda/lib/python3.6/site-packages (from sphinx) (0.16)
Requirement already satisfied: babel>=1.3 in /opt/conda/lib/python3.6/site-packages (from sphinx) (2.8.0)
Requirement already satisfied: Pygments>=2.0 in /opt/conda/lib/python3.6/site-packages (from sphinx) (2.3.1)
Requirement already satisfied: sphinxcontrib-serializinghtml in /opt/conda/lib/python3.6/site-packages (from sphinx) (1.1.4)
Requirement already satisfied: requests>=2.5.0 in /opt/conda/lib/python3.6/site-packages (from sphinx) (2.21.0)
Requirement already satisfied: sphinxcontrib-devhelp in /opt/conda/lib/python3.6/site-packages (from sphinx) (1.0.2)
Requirement already satisfied: six in /opt/conda/lib/python3.6/site-packages (from packaging->sphinx) (1.12.0)
Requirement already satisfied: pyparsing>=2.0.2 in /opt/conda/lib/python3.6/site-packages (from packaging->sphinx) (2.4.7)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/conda/lib/python3.6/site-packages (from Jinja2>=2.3->sphinx) (1.1.1)
Requirement already satisfied: pytz>=2015.7 in /opt/conda/lib/python3.6/site-packages (from babel>=1.3->sphinx) (2019.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx) (2019.3.9)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx) (1.24.2)
Removing intermediate container 302ad97d6514
---> a8a00eb5f14d
Step 29/57 : RUN pip install sphinx_rtd_theme
---> Running in 1752dc02a081
Collecting sphinx_rtd_theme
Downloading https://files.pythonhosted.org/packages/60/b4/4df37087a1d36755e3a3bfd2a30263f358d2dea21938240fa02313d45f51/sphinx_rtd_theme-0.4.3-py2.py3-none-any.whl (6.4MB)
Requirement already satisfied: sphinx in /opt/conda/lib/python3.6/site-packages (from sphinx_rtd_theme) (3.0.3)
Requirement already satisfied: sphinxcontrib-qthelp in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (1.0.3)
Requirement already satisfied: Pygments>=2.0 in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (2.3.1)
Requirement already satisfied: babel>=1.3 in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (2.8.0)
Requirement already satisfied: Jinja2>=2.3 in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (2.10.1)
Requirement already satisfied: alabaster<0.8,>=0.7 in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (0.7.12)
Requirement already satisfied: sphinxcontrib-serializinghtml in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (1.1.4)
Requirement already satisfied: sphinxcontrib-devhelp in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (1.0.2)
Requirement already satisfied: requests>=2.5.0 in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (2.21.0)
Requirement already satisfied: snowballstemmer>=1.1 in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (2.0.0)
Requirement already satisfied: packaging in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (20.4)
Requirement already satisfied: sphinxcontrib-htmlhelp in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (1.0.3)
Requirement already satisfied: docutils>=0.12 in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (0.16)
Requirement already satisfied: sphinxcontrib-jsmath in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (1.0.1)
Requirement already satisfied: setuptools in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (41.0.1)
Requirement already satisfied: sphinxcontrib-applehelp in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (1.0.2)
Requirement already satisfied: imagesize in /opt/conda/lib/python3.6/site-packages (from sphinx->sphinx_rtd_theme) (1.2.0)
Requirement already satisfied: pytz>=2015.7 in /opt/conda/lib/python3.6/site-packages (from babel>=1.3->sphinx->sphinx_rtd_theme) (2019.1)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/conda/lib/python3.6/site-packages (from Jinja2>=2.3->sphinx->sphinx_rtd_theme) (1.1.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx->sphinx_rtd_theme) (3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx->sphinx_rtd_theme) (1.24.2)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx->sphinx_rtd_theme) (2019.3.9)
Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.6/site-packages (from requests>=2.5.0->sphinx->sphinx_rtd_theme) (2.8)
Requirement already satisfied: six in /opt/conda/lib/python3.6/site-packages (from packaging->sphinx->sphinx_rtd_theme) (1.12.0)
Requirement already satisfied: pyparsing>=2.0.2 in /opt/conda/lib/python3.6/site-packages (from packaging->sphinx->sphinx_rtd_theme) (2.4.7)
Installing collected packages: sphinx-rtd-theme
Successfully installed sphinx-rtd-theme-0.4.3
Removing intermediate container 1752dc02a081
---> 80689274b4b3
Step 30/57 : RUN groupadd -g $GID $GNAME
---> Running in 91859d9eeecf
Removing intermediate container 91859d9eeecf
---> 80a63f034d82
Step 31/57 : RUN useradd -M -u $UID $UNAME -g $GNAME
---> Running in c8f3621d7ad8
Removing intermediate container c8f3621d7ad8
---> 4b48301c079b
Step 32/57 : RUN usermod -aG sudo $UNAME
---> Running in e6f9f4cf61fe
Removing intermediate container e6f9f4cf61fe
---> 30973f688780
Step 33/57 : RUN echo "$UNAME:$PASSWD" | chpasswd
---> Running in 3a467f0ae30f
Removing intermediate container 3a467f0ae30f
---> 17c60b1142b2
Step 34/57 : RUN echo "root:$PASSWD" | chpasswd
---> Running in 73d65794355c
Removing intermediate container 73d65794355c
---> 67281fd95826
Step 35/57 : RUN ln -s /workspace /home/$UNAME
---> Running in a28d336641ec
Removing intermediate container a28d336641ec
---> 4576b4491141
Step 36/57 : RUN chown -R $UNAME:$GNAME /home/$UNAME
---> Running in 7245a163e257
Removing intermediate container 7245a163e257
---> e6b8772f78ca
Step 37/57 : USER $UNAME
---> Running in 229a77ff47f0
Removing intermediate container 229a77ff47f0
---> 528f1a9e5081
Step 38/57 : RUN git clone https://github.com/Xilinx/brevitas.git /workspace/brevitas
---> Running in a91356742e08
Cloning into '/workspace/brevitas'...
Removing intermediate container a91356742e08
---> 99286b41d5c2
Step 39/57 : RUN git clone https://github.com/maltanar/brevitas_cnv_lfc.git /workspace/brevitas_cnv_lfc
---> Running in e4d743f8610d
Cloning into '/workspace/brevitas_cnv_lfc'...
Removing intermediate container e4d743f8610d
---> 095dfd543443
Step 40/57 : RUN git clone https://github.com/rogersce/cnpy.git /workspace/cnpy
---> Running in 058918d1e8d8
Cloning into '/workspace/cnpy'...
Removing intermediate container 058918d1e8d8
---> aff25c3a5747
Step 41/57 : RUN git clone https://github.com/maltanar/finn-hlslib.git /workspace/finn-hlslib
---> Running in f3d99c1401a1
Cloning into '/workspace/finn-hlslib'...
Removing intermediate container f3d99c1401a1
---> 648dd63ad6ef
Step 42/57 : RUN git clone https://github.com/maltanar/pyverilator /workspace/pyverilator
---> Running in e81c8620897f
Cloning into '/workspace/pyverilator'...
Removing intermediate container e81c8620897f
---> 5a0c720b4bf9
Step 43/57 : RUN git clone https://github.com/maltanar/PYNQ-HelloWorld.git /workspace/PYNQ-HelloWorld
---> Running in 459552bcd651
Cloning into '/workspace/PYNQ-HelloWorld'...
Removing intermediate container 459552bcd651
---> 001752faf746
Step 44/57 : ENV PYTHONPATH "${PYTHONPATH}:/workspace/finn/src"
---> Running in 86d8a472713f
Removing intermediate container 86d8a472713f
---> baa34ec49ffc
Step 45/57 : ENV PYTHONPATH "${PYTHONPATH}:/workspace/brevitas_cnv_lfc/training_scripts"
---> Running in b33e552229b9
Removing intermediate container b33e552229b9
---> fc7a3d2b8091
Step 46/57 : ENV PYTHONPATH "${PYTHONPATH}:/workspace/brevitas"
---> Running in a016dd17cb91
Removing intermediate container a016dd17cb91
---> a8fcf3ca85a1
Step 47/57 : ENV PYTHONPATH "${PYTHONPATH}:/workspace/pyverilator"
---> Running in 6767307a63e1
Removing intermediate container 6767307a63e1
---> 7e4443ce6faa
Step 48/57 : ENV PYNQSHELL_PATH "/workspace/PYNQ-HelloWorld/boards"
---> Running in 05b42d9dc1cf
Removing intermediate container 05b42d9dc1cf
---> 336f86960fae
Step 49/57 : WORKDIR /home/$UNAME/finn
---> Running in c426e41a435a
Removing intermediate container c426e41a435a
---> d75359fba622
Step 50/57 : RUN echo "PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '" >> /home/$UNAME/.bashrc
---> Running in 9057e4d5bb42
Removing intermediate container 9057e4d5bb42
---> 88d50fe94d06
Step 51/57 : RUN echo "source \$VIVADO_PATH/settings64.sh" >> /home/$UNAME/.bashrc
---> Running in eeff83633e3f
Removing intermediate container eeff83633e3f
---> 95d16841fc88
Step 52/57 : USER root
---> Running in 0930112e9065
Removing intermediate container 0930112e9065
---> b432fa433116
Step 53/57 : COPY docker/finn_entrypoint.sh /usr/local/bin/
---> 1b3c96d8775d
Step 54/57 : RUN chmod 755 /usr/local/bin/finn_entrypoint.sh
---> Running in 3039ce325a87
Removing intermediate container 3039ce325a87
---> ffbfbf4e601b
Step 55/57 : USER $UNAME
---> Running in 10d4e0bb4a1f
Removing intermediate container 10d4e0bb4a1f
---> 7aea18ce16c0
Step 56/57 : ENTRYPOINT ["finn_entrypoint.sh"]
---> Running in e457b6cc2d97
Removing intermediate container e457b6cc2d97
---> 623541d58bfb
Step 57/57 : CMD ["bash"]
---> Running in b945b8daad3a
Removing intermediate container b945b8daad3a
---> 4c0fecd316fe
Successfully built 4c0fecd316fe
Successfully tagged finn_dev_masaaki:latest
Setting up known-good commit versions for FINN dependencies
brevitas @ 215cf44c76d562339fca368c8c3afee3110033e8
brevitas_cnv_lfc @ 2059f96bd576bf71f32c757e7f92617a70190c90
cnpy @ 4e8810b1a8637695171ed346ce68f6984e585ef4
finn-hlslib @ 6b88db826bb023937506913a23d964775a7606af
PyVerilator @ fb1afefa5b207acf6fec28f8abb72a862f2ca1d2
PYNQ shell @ 0c82a61b0ec1a07fa275a14146233824ded7a13d
/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2019.2/settings64.sh: line 5: /media/masaaki/Ubuntu_Disk/tools/Xilinx/DocNav/.settings64-DocNav.sh: No such file or directory
/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2019.2/settings64.sh: line 7: /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2019.2/.settings64-Vitis.sh: No such file or directory
bash: /media/masaaki/Ubuntu_Disk/tools/Xilinx/DocNav/.settings64-DocNav.sh: No such file or directory
bash: /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2019.2/.settings64-Vitis.sh: No such file or directory
masaaki@finn_dev_masaaki:/workspace/finn$
を入力して、OKボタンをクリックした。https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
git clone https://github.com/Xilinx/RapidWright.git
cd RapidWright/
mkdir releases
cd releases
export RAPIDWRIGHT_PATH=/media/masaaki/Ubuntu_Disk/Xilinx_github/RapidWright/RapidWright
export CLASSPATH=$RAPIDWRIGHT_PATH/bin:$(echo $RAPIDWRIGHT_PATH/jars/*.jar | tr ' ' ':')
だそうです。(RapidWright Documentation の Introduction の記述の Google 翻訳を引用)RapidWright は、最新のザイリンクスFPGAおよびSoCデザインのネットリストおよび実装操作を可能にするオープンソースのJavaフレームワークです。
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)
aeroplane
bicycle
bird
boat
bottle
bus
car
cat
chair
cow
diningtable
dog
horse
motorbike
person
pottedplant
sheep
sofa
train
tvmonitor
C:/Xilinx/Vivado/2019.2/bin/vivado_hls.bat C:/Users/masaaki/Documents/Vivado_HLS/HDLab/mnist_nn/solution1/csim.tcl
INFO: [HLS 200-10] Running 'C:/Xilinx/Vivado/2019.2/bin/unwrapped/win64.o/vivado_hls.exe'
INFO: [HLS 200-10] For user 'masaaki' on host 'marsee-lenovo' (Windows NT_amd64 version 6.2) on Sun May 17 05:46:41 +0900 2020
INFO: [HLS 200-10] In directory 'C:/Users/masaaki/Documents/Vivado_HLS/HDLab'
Sourcing Tcl script 'C:/Users/masaaki/Documents/Vivado_HLS/HDLab/mnist_nn/solution1/csim.tcl'
INFO: [HLS 200-10] Opening project 'C:/Users/masaaki/Documents/Vivado_HLS/HDLab/mnist_nn'.
INFO: [HLS 200-10] Opening solution 'C:/Users/masaaki/Documents/Vivado_HLS/HDLab/mnist_nn/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [SYN 201-201] Setting up clock 'default' with an uncertainty of 1.25ns.
INFO: [HLS 200-10] Setting target device to 'xc7z010-clg400-1'
INFO: [HLS 200-435] Setting 'config_sdx -target' configuration: config_export -vivado_optimization_level=2
INFO: [HLS 200-435] Setting 'config_sdx -target' configuration: set_clock_uncertainty default
INFO: [SIM 211-2] *************** CSIM start ***************
INFO: [SIM 211-4] CSIM will launch GCC as the compiler.
Compiling ../../../mnist_nn_tb.cpp in debug mode
csim.mk:74: recipe for target 'obj/mnist_nn_tb.o' failed
In file included from C:/Xilinx/Vivado/2019.2/include/floating_point_v7_0_bitacc_cmodel.h:143:0,
from C:/Xilinx/Vivado/2019.2/include/hls_fpo.h:186,
from C:/Xilinx/Vivado/2019.2/include/hls_half.h:44,
from C:/Xilinx/Vivado/2019.2/include/etc/ap_private.h:90,
from C:/Xilinx/Vivado/2019.2/include/ap_common.h:641,
from C:/Xilinx/Vivado/2019.2/include/ap_fixed.h:54,
from ../../../mnist_nn_tb.cpp:6:
C:/Xilinx/Vivado/2019.2/include/gmp.h:62:0: warning: "__GMP_LIBGMP_DLL" redefined
#define __GMP_LIBGMP_DLL 0
In file included from C:/Xilinx/Vivado/2019.2/include/hls_fpo.h:186:0,
from C:/Xilinx/Vivado/2019.2/include/hls_half.h:44,
from C:/Xilinx/Vivado/2019.2/include/etc/ap_private.h:90,
from C:/Xilinx/Vivado/2019.2/include/ap_common.h:641,
from C:/Xilinx/Vivado/2019.2/include/ap_fixed.h:54,
from ../../../mnist_nn_tb.cpp:6:
C:/Xilinx/Vivado/2019.2/include/floating_point_v7_0_bitacc_cmodel.h:135:0: note: this is the location of the previous definition
#define __GMP_LIBGMP_DLL 1
make: *** [obj/mnist_nn_tb.o] Error 1
ERROR: [SIM 211-100] 'csim_design' failed: compilation error(s).
INFO: [SIM 211-3] *************** CSIM finish ***************
4
while executing
"source C:/Users/masaaki/Documents/Vivado_HLS/HDLab/mnist_nn/solution1/csim.tcl"
invoked from within
"hls::main C:/Users/masaaki/Documents/Vivado_HLS/HDLab/mnist_nn/solution1/csim.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"
Finished C simulation.
で以下の C++ コードが実行できるようだ。%%pybind11 resnet50;{cflags};{ldflags}
rom pynq_dpu import DpuOverlay
overlay = DpuOverlay("dpu.bit")
overlay.load_model("dpu_mnist_classifier_0.elf")
#!/bin/sh
jupyter notebook --ip=* --no-browser
#!/bin/sh
sudo jupyter notebook --ip=* --no-browser --allow-root
overlay.load_model("dpu_inception_v1_0.elf")
DNNDKのPython APIを使用してDPUタスクを実行します。この例では、反復回数を500に設定します。つまり、1枚の写真が撮られ、500回分類されます。ユーザーは必要に応じてこの値を調整できます。
n2cube.dpuOpen()
kernel = n2cube.dpuLoadKernel(KERNEL_CONV)
となった。Class label: Brabancon griffon
# input
input_layer = ng.placeholder(dtype=act_dtype,
shape=(1, 32, 32, 3), # N, H, W, C
name='input_layer')
w0 = ng.variable(dtype=weight_dtype,
shape=(64, 3, 3, 3), # Och, Ky, Kx, Ich
name='w0')
b0 = ng.variable(dtype=bias_dtype,
shape=(w0.shape[0],), name='b0')
s0 = ng.variable(dtype=scale_dtype,
shape=(w0.shape[0],), name='s0')
a0 = ng.conv2d(input_layer, w0,
strides=(1, 1, 1, 1),
bias=b0,
scale=s0,
act_func=ng.relu,
sum_dtype=ng.int64)
a0p = ng.max_pool_serial(a0,
ksize=(1, 2, 2, 1),
strides=(1, 2, 2, 1))
w1 = ng.variable(weight_dtype,
shape=(64, 3, 3, a0.shape[-1]),
name='w1')
b1 = ng.variable(bias_dtype,
shape=(w1.shape[0],),
name='b1')
s1 = ng.variable(scale_dtype,
shape=(w1.shape[0],),
name='s1')
a1 = ng.conv2d(a0p, w1,
strides=(1, 1, 1, 1),
bias=b1,
scale=s1,
act_func=ng.relu,
sum_dtype=ng.int64)
a1r = ng.reshape(a1, [1, -1])
w2 = ng.variable(weight_dtype,
shape=(256, a1r.shape[-1]),
name='w2')
b2 = ng.variable(bias_dtype,
shape=(w2.shape[0],),
name='b2')
s2 = ng.variable(scale_dtype,
shape=(w2.shape[0],),
name='s2')
a2 = ng.matmul(a1r, w2,
bias=b2,
scale=s2,
transposed_b=True,
act_func=ng.relu,
sum_dtype=ng.int64)
w3 = ng.variable(weight_dtype,
shape=(10, a2.shape[-1]),
name='w3')
b3 = ng.variable(bias_dtype,
shape=(w3.shape[0],),
name='b3')
s3 = ng.variable(scale_dtype,
shape=(w3.shape[0],),
name='s3')
# output
output_layer = ng.matmul(a2, w3,
bias=b3,
scale=s3,
transposed_b=True,
name='output_layer',
sum_dtype=ng.int64)
masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/shtaxxx/nngen$ python3 hello_nngen.py
[[-1286 4567 4251 -272 10540 -2785 2885 -1169 12138 -4471]]
NNgen: Neural Network Accelerator Generator (version 1.3.0)
[IP-XACT]
Output: hello_nngen
[Configuration]
(AXI Master Interface)
Data width : 32
Address width: 32
(AXI Slave Interface)
Data width : 32
Address width: 32
[Schedule Table]
(Stage 0)
(Stage 1)
<conv2d None dtype:int16 shape:(1, 32, 32, 64) strides:(1, 1, 1, 1) padding:'SAME'-(1, 1, 1, 1) bias:(64,) scale:(64,) cshamt_out:17 act_func:relu sum_dtype:int64 par_ich:2 par_och:2 concur_och:4 stationary:filter keep_input default_addr:8481984 g_index:0 l_index:1 word_alignment:2 aligned_shape:(1, 32, 32, 64) scale_factor:1.000000>
| <placeholder input_layer dtype:int16 shape:(1, 32, 32, 3) default_addr:64 g_index:2 word_alignment:2 aligned_shape:(1, 32, 32, 4) scale_factor:1.000000>
| <variable w0 dtype:int16 shape:(64, 3, 3, 3) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(64, 3, 3, 4) scale_factor:1.000000>
| <variable b0 dtype:int16 shape:(64,) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(64,) scale_factor:1.000000>
| <variable s0 dtype:int16 shape:(64,) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(64,) scale_factor:1.000000>
(Stage 2)
<max_pool_serial None dtype:int16 shape:(1, 16, 16, 64) ksize:(1, 2, 2, 1) strides:(1, 2, 2, 1) padding:'SAME'-(0, 0, 0, 0) par:2 no_reuse default_addr:8613056 g_index:0 l_index:2 word_alignment:2 aligned_shape:(1, 16, 16, 64) scale_factor:1.000000>
| <conv2d None dtype:int16 shape:(1, 32, 32, 64) strides:(1, 1, 1, 1) padding:'SAME'-(1, 1, 1, 1) bias:(64,) scale:(64,) cshamt_out:17 act_func:relu sum_dtype:int64 par_ich:2 par_och:2 concur_och:4 stationary:filter keep_input default_addr:8481984 g_index:0 l_index:1 word_alignment:2 aligned_shape:(1, 32, 32, 64) scale_factor:1.000000>
(Stage 3)
<conv2d None dtype:int16 shape:(1, 16, 16, 64) strides:(1, 1, 1, 1) padding:'SAME'-(1, 1, 1, 1) bias:(64,) scale:(64,) cshamt_out:17 act_func:relu sum_dtype:int64 par_ich:2 par_och:2 concur_och:4 stationary:filter default_addr:8645824 g_index:0 l_index:3 word_alignment:2 aligned_shape:(1, 16, 16, 64) scale_factor:1.000000>
| <max_pool_serial None dtype:int16 shape:(1, 16, 16, 64) ksize:(1, 2, 2, 1) strides:(1, 2, 2, 1) padding:'SAME'-(0, 0, 0, 0) par:2 no_reuse default_addr:8613056 g_index:0 l_index:2 word_alignment:2 aligned_shape:(1, 16, 16, 64) scale_factor:1.000000>
| <variable w1 dtype:int16 shape:(64, 3, 3, 64) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(64, 3, 3, 64) scale_factor:1.000000>
| <variable b1 dtype:int16 shape:(64,) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(64,) scale_factor:1.000000>
| <variable s1 dtype:int16 shape:(64,) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(64,) scale_factor:1.000000>
(Stage 4)
<_lazy_reshape None dtype:int16 shape:(1, 16384) alias_of:<conv2d> default_addr:8645824 g_index:0 l_index:3 word_alignment:2 aligned_shape:(1, 16384) scale_factor:1.000000>
| <conv2d None dtype:int16 shape:(1, 16, 16, 64) strides:(1, 1, 1, 1) padding:'SAME'-(1, 1, 1, 1) bias:(64,) scale:(64,) cshamt_out:17 act_func:relu sum_dtype:int64 par_ich:2 par_och:2 concur_och:4 stationary:filter default_addr:8645824 g_index:0 l_index:3 word_alignment:2 aligned_shape:(1, 16, 16, 64) scale_factor:1.000000>
(Stage 5)
<matmul None dtype:int16 shape:(1, 256) bias:(256,) scale:(256,) cshamt_out:17 act_func:relu sum_dtype:int64 par_left_col:2 par_out_col:2 concur_out_col:2 stationary:right keep_left default_addr:8678592 g_index:0 l_index:4 word_alignment:2 aligned_shape:(1, 256) scale_factor:1.000000>
| <_lazy_reshape None dtype:int16 shape:(1, 16384) alias_of:<conv2d> default_addr:8645824 g_index:0 l_index:3 word_alignment:2 aligned_shape:(1, 16384) scale_factor:1.000000>
| <variable w2 dtype:int16 shape:(256, 16384) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(256, 16384) scale_factor:1.000000>
| <variable b2 dtype:int16 shape:(256,) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(256,) scale_factor:1.000000>
| <variable s2 dtype:int16 shape:(256,) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(256,) scale_factor:1.000000>
(Stage 6)
<matmul output_layer dtype:int16 shape:(1, 10) bias:(10,) scale:(10,) cshamt_out:17 sum_dtype:int64 par_left_col:2 par_out_col:2 concur_out_col:128 stationary:right keep_left keep_right default_addr:0 g_index:1 word_alignment:2 aligned_shape:(1, 10) scale_factor:1.000000>
| <matmul None dtype:int16 shape:(1, 256) bias:(256,) scale:(256,) cshamt_out:17 act_func:relu sum_dtype:int64 par_left_col:2 par_out_col:2 concur_out_col:2 stationary:right keep_left default_addr:8678592 g_index:0 l_index:4 word_alignment:2 aligned_shape:(1, 256) scale_factor:1.000000>
| <variable w3 dtype:int16 shape:(10, 256) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(10, 256) scale_factor:1.000000>
| <variable b3 dtype:int16 shape:(10,) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(10,) scale_factor:1.000000>
| <variable s3 dtype:int16 shape:(10,) default_addr:8256 g_index:3 word_alignment:2 aligned_shape:(10,) scale_factor:1.000000>
[RAM (spec: num)]
32-bit 16384-entry 2-port 1-bank RAM: 2
32-bit 8192-entry 2-port 1-bank RAM: 1
32-bit 512-entry 2-port 1-bank RAM: 9
32-bit 256-entry 2-port 1-bank RAM: 2
32-bit 128-entry 2-port 1-bank RAM: 22
[Substream (spec: num)]
('acc_rshift_round_frac', (64, 0, True, 64, 0, True)): 2
('add_tree', (64, 0, True, 2)): 2
('add_tree', (64, 0, True, 18)): 2
('mul_rshift_clip', (64, 0, True, 16, 0, True, 80, 0, True, 16, 0, True)): 2
('mul_rshift_round_madd', (16, 0, True, 16, 0, True, 32, 0, True)): 36
('reduce_max', (16, 0, True)): 2
[Stream (spec: num)]
(((<class 'nngen.operator.conv2d.conv2d'>, <dtype int16>, <dtype int16>, <dtype int16>, <dtype int16>), <dtype int16>, 1), 3, 3, None, <dtype int64>, 2, 2, 1, 1, 9, 36): 1
(((<class 'nngen.operator.pool_serial.max_pool_serial'>, <dtype int16>), <dtype int16>, 2), 2, 2, True, 2): 1
(((<class 'nngen.operator.basic._lazy_reshape'>, <dtype int16>), <dtype int16>, 1), True): 1
(((<class 'nngen.operator.matmul.matmul'>, <dtype int16>, <dtype int16>, <dtype int16>, <dtype int16>), <dtype int16>, 1), 1, 1, None, <dtype int64>, 2, 2, 1, 1, 1, 4): 1
[Control (name (# states: num))]
main_fsm (# states: 58)
control_conv2d_4 (# states: 56)
control_max_pool_serial_6 (# states: 26)
control_matmul_16 (# states: 41)
[Register Map]
0 (R ): header0 (default: 0)
4 (R ): header1 (default: 0)
8 (R ): header2 (default: 0)
12 (R ): header3 (default: 0)
16 ( W): Start (set '1' to run)
20 (R ): Busy (returns '1' when running)
24 ( W): Reset (set '1' to initialize internal logic)
28 (R ): Opcode from extern objects to SW (returns '0' when idle)
32 ( W): Resume extern objects (set '1' to resume)
36 (RW): Global address offset (default: 0)
40 (RW): Address of temporal storages (size: 193KB)
44 (RW): Address of output (matmul) 'output_layer' (size: 64B, dtype: int16, shape: (1, 10), alignment: 2 words (4 bytes)), aligned shape: (1, 10)
48 (RW): Address of placeholder 'input_layer' (size: 8KB, dtype: int16, shape: (1, 32, 32, 3), alignment: 2 words (4 bytes)), aligned shape: (1, 32, 32, 4)
52 (RW): Address of variables 'w0', 'b0', 's0', 'w1', 'b1', 's1', 'w2', 'b2', 's2', 'w3', 'b3', 's3' (size: 8276KB)
[Default Memory Map (start - end)] (entire range: [0 - 8679103], size: 8476KB)
[ 0 - 63]: output (matmul) 'output_layer' (size: 64B, dtype: int16, shape: (1, 10), alignment: 2 words (4 bytes)), aligned shape: (1, 10)
[ 64 - 8255]: placeholder 'input_layer' (size: 8KB, dtype: int16, shape: (1, 32, 32, 3), alignment: 2 words (4 bytes)), aligned shape: (1, 32, 32, 4)
[ 8256 - 12863]: variable 'w0' (size: 5KB, dtype: int16, shape: (64, 3, 3, 3), alignment: 2 words (4 bytes)), aligned shape: (64, 3, 3, 4)
[ 12864 - 12991]: variable 'b0' (size: 128B, dtype: int16, shape: (64,), alignment: 2 words (4 bytes)), aligned shape: (64,)
[ 12992 - 13119]: variable 's0' (size: 128B, dtype: int16, shape: (64,), alignment: 2 words (4 bytes)), aligned shape: (64,)
[ 13120 - 86847]: variable 'w1' (size: 72KB, dtype: int16, shape: (64, 3, 3, 64), alignment: 2 words (4 bytes)), aligned shape: (64, 3, 3, 64)
[ 86848 - 86975]: variable 'b1' (size: 128B, dtype: int16, shape: (64,), alignment: 2 words (4 bytes)), aligned shape: (64,)
[ 86976 - 87103]: variable 's1' (size: 128B, dtype: int16, shape: (64,), alignment: 2 words (4 bytes)), aligned shape: (64,)
[ 87104 - 8475711]: variable 'w2' (size: 8192KB, dtype: int16, shape: (256, 16384), alignment: 2 words (4 bytes)), aligned shape: (256, 16384)
[8475712 - 8476223]: variable 'b2' (size: 512B, dtype: int16, shape: (256,), alignment: 2 words (4 bytes)), aligned shape: (256,)
[8476224 - 8476735]: variable 's2' (size: 512B, dtype: int16, shape: (256,), alignment: 2 words (4 bytes)), aligned shape: (256,)
[8476736 - 8481855]: variable 'w3' (size: 5KB, dtype: int16, shape: (10, 256), alignment: 2 words (4 bytes)), aligned shape: (10, 256)
[8481856 - 8481919]: variable 'b3' (size: 64B, dtype: int16, shape: (10,), alignment: 2 words (4 bytes)), aligned shape: (10,)
[8481920 - 8481983]: variable 's3' (size: 64B, dtype: int16, shape: (10,), alignment: 2 words (4 bytes)), aligned shape: (10,)
[8481984 - 8679103]: temporal storages (size: 193KB)
# IP-XACT was generated. Check the current directory.
# Skipping RTL simulation. If you simulate the RTL behavior, comment out the next line.
____________________________ ERROR at setup of test ____________________________
item = <Function test>
def pytest_runtest_setup(item):
> remote_data = item.get_marker('remote_data')
E AttributeError: 'Function' object has no attribute 'get_marker'
/home/masaaki/anaconda3/lib/python3.6/site-packages/pytest_remotedata/plugin.py:59: AttributeError
masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/shtaxxx/nngen$ python3 setup.py install
running install
running bdist_egg
running egg_info
creating nngen.egg-info
writing nngen.egg-info/PKG-INFO
writing dependency_links to nngen.egg-info/dependency_links.txt
writing requirements to nngen.egg-info/requires.txt
writing top-level names to nngen.egg-info/top_level.txt
writing manifest file 'nngen.egg-info/SOURCES.txt'
reading manifest file 'nngen.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'LICENSE.txt'
writing manifest file 'nngen.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/nngen
copying nngen/eval.py -> build/lib/nngen
copying nngen/util.py -> build/lib/nngen
copying nngen/basic_types.py -> build/lib/nngen
copying nngen/__init__.py -> build/lib/nngen
copying nngen/scheduler.py -> build/lib/nngen
copying nngen/version.py -> build/lib/nngen
copying nngen/sim.py -> build/lib/nngen
copying nngen/substreams.py -> build/lib/nngen
copying nngen/storage.py -> build/lib/nngen
copying nngen/verilog.py -> build/lib/nngen
copying nngen/dtype_list.py -> build/lib/nngen
creating build/lib/nngen/verify
copying nngen/verify/leaky_relu.py -> build/lib/nngen/verify
copying nngen/verify/concat.py -> build/lib/nngen/verify
copying nngen/verify/ternary_weight_conv2d.py -> build/lib/nngen/verify
copying nngen/verify/pool_serial.py -> build/lib/nngen/verify
copying nngen/verify/conv2d.py -> build/lib/nngen/verify
copying nngen/verify/relu.py -> build/lib/nngen/verify
copying nngen/verify/pad.py -> build/lib/nngen/verify
copying nngen/verify/__init__.py -> build/lib/nngen/verify
copying nngen/verify/sigmoid.py -> build/lib/nngen/verify
copying nngen/verify/exp.py -> build/lib/nngen/verify
copying nngen/verify/extern.py -> build/lib/nngen/verify
copying nngen/verify/binary_weight_conv2d.py -> build/lib/nngen/verify
copying nngen/verify/pool.py -> build/lib/nngen/verify
copying nngen/verify/log_weight_conv2d.py -> build/lib/nngen/verify
copying nngen/verify/matmul.py -> build/lib/nngen/verify
copying nngen/verify/slice_.py -> build/lib/nngen/verify
copying nngen/verify/upsampling2d.py -> build/lib/nngen/verify
copying nngen/verify/basic.py -> build/lib/nngen/verify
copying nngen/verify/normalize.py -> build/lib/nngen/verify
creating build/lib/nngen/operator
copying nngen/operator/leaky_relu.py -> build/lib/nngen/operator
copying nngen/operator/concat.py -> build/lib/nngen/operator
copying nngen/operator/ternary_weight_conv2d.py -> build/lib/nngen/operator
copying nngen/operator/pool_serial.py -> build/lib/nngen/operator
copying nngen/operator/conv2d.py -> build/lib/nngen/operator
copying nngen/operator/relu.py -> build/lib/nngen/operator
copying nngen/operator/pad.py -> build/lib/nngen/operator
copying nngen/operator/__init__.py -> build/lib/nngen/operator
copying nngen/operator/sigmoid.py -> build/lib/nngen/operator
copying nngen/operator/exp.py -> build/lib/nngen/operator
copying nngen/operator/extern.py -> build/lib/nngen/operator
copying nngen/operator/binary_weight_conv2d.py -> build/lib/nngen/operator
copying nngen/operator/pool.py -> build/lib/nngen/operator
copying nngen/operator/log_weight_conv2d.py -> build/lib/nngen/operator
copying nngen/operator/matmul.py -> build/lib/nngen/operator
copying nngen/operator/slice_.py -> build/lib/nngen/operator
copying nngen/operator/upsampling2d.py -> build/lib/nngen/operator
copying nngen/operator/basic.py -> build/lib/nngen/operator
copying nngen/operator/normalize.py -> build/lib/nngen/operator
creating build/lib/nngen/onnx
copying nngen/onnx/concat.py -> build/lib/nngen/onnx
copying nngen/onnx/reshape.py -> build/lib/nngen/onnx
copying nngen/onnx/gather.py -> build/lib/nngen/onnx
copying nngen/onnx/util.py -> build/lib/nngen/onnx
copying nngen/onnx/floor.py -> build/lib/nngen/onnx
copying nngen/onnx/transpose.py -> build/lib/nngen/onnx
copying nngen/onnx/flatten.py -> build/lib/nngen/onnx
copying nngen/onnx/pad.py -> build/lib/nngen/onnx
copying nngen/onnx/__init__.py -> build/lib/nngen/onnx
copying nngen/onnx/cast.py -> build/lib/nngen/onnx
copying nngen/onnx/exp.py -> build/lib/nngen/onnx
copying nngen/onnx/batchnormalization.py -> build/lib/nngen/onnx
copying nngen/onnx/conv.py -> build/lib/nngen/onnx
copying nngen/onnx/pool.py -> build/lib/nngen/onnx
copying nngen/onnx/upsample.py -> build/lib/nngen/onnx
copying nngen/onnx/squeeze.py -> build/lib/nngen/onnx
copying nngen/onnx/act_func.py -> build/lib/nngen/onnx
copying nngen/onnx/slice_.py -> build/lib/nngen/onnx
copying nngen/onnx/reduce.py -> build/lib/nngen/onnx
copying nngen/onnx/basic.py -> build/lib/nngen/onnx
copying nngen/onnx/shape.py -> build/lib/nngen/onnx
copying nngen/onnx/ceil.py -> build/lib/nngen/onnx
copying nngen/onnx/gemm.py -> build/lib/nngen/onnx
copying nngen/onnx/identity.py -> build/lib/nngen/onnx
creating build/lib/nngen/quantizer
copying nngen/quantizer/conv2d.py -> build/lib/nngen/quantizer
copying nngen/quantizer/util.py -> build/lib/nngen/quantizer
copying nngen/quantizer/__init__.py -> build/lib/nngen/quantizer
copying nngen/quantizer/sigmoid.py -> build/lib/nngen/quantizer
copying nngen/quantizer/exp.py -> build/lib/nngen/quantizer
copying nngen/quantizer/matmul.py -> build/lib/nngen/quantizer
copying nngen/quantizer/reduce.py -> build/lib/nngen/quantizer
copying nngen/quantizer/normalize.py -> build/lib/nngen/quantizer
copying nngen/VERSION -> build/lib/nngen
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/nngen
creating build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/leaky_relu.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/concat.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/ternary_weight_conv2d.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/pool_serial.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/conv2d.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/relu.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/pad.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/__init__.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/sigmoid.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/exp.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/extern.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/binary_weight_conv2d.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/pool.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/log_weight_conv2d.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/matmul.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/slice_.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/upsampling2d.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/basic.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/verify/normalize.py -> build/bdist.linux-x86_64/egg/nngen/verify
copying build/lib/nngen/eval.py -> build/bdist.linux-x86_64/egg/nngen
creating build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/leaky_relu.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/concat.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/ternary_weight_conv2d.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/pool_serial.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/conv2d.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/relu.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/pad.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/__init__.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/sigmoid.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/exp.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/extern.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/binary_weight_conv2d.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/pool.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/log_weight_conv2d.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/matmul.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/slice_.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/upsampling2d.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/basic.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/operator/normalize.py -> build/bdist.linux-x86_64/egg/nngen/operator
copying build/lib/nngen/util.py -> build/bdist.linux-x86_64/egg/nngen
copying build/lib/nngen/VERSION -> build/bdist.linux-x86_64/egg/nngen
copying build/lib/nngen/basic_types.py -> build/bdist.linux-x86_64/egg/nngen
copying build/lib/nngen/__init__.py -> build/bdist.linux-x86_64/egg/nngen
copying build/lib/nngen/scheduler.py -> build/bdist.linux-x86_64/egg/nngen
creating build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/concat.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/reshape.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/gather.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/util.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/floor.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/transpose.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/flatten.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/pad.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/__init__.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/cast.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/exp.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/batchnormalization.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/conv.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/pool.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/upsample.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/squeeze.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/act_func.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/slice_.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/reduce.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/basic.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/shape.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/ceil.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/gemm.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/onnx/identity.py -> build/bdist.linux-x86_64/egg/nngen/onnx
copying build/lib/nngen/version.py -> build/bdist.linux-x86_64/egg/nngen
copying build/lib/nngen/sim.py -> build/bdist.linux-x86_64/egg/nngen
copying build/lib/nngen/substreams.py -> build/bdist.linux-x86_64/egg/nngen
copying build/lib/nngen/storage.py -> build/bdist.linux-x86_64/egg/nngen
creating build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/quantizer/conv2d.py -> build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/quantizer/util.py -> build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/quantizer/__init__.py -> build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/quantizer/sigmoid.py -> build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/quantizer/exp.py -> build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/quantizer/matmul.py -> build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/quantizer/reduce.py -> build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/quantizer/normalize.py -> build/bdist.linux-x86_64/egg/nngen/quantizer
copying build/lib/nngen/verilog.py -> build/bdist.linux-x86_64/egg/nngen
copying build/lib/nngen/dtype_list.py -> build/bdist.linux-x86_64/egg/nngen
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/leaky_relu.py to leaky_relu.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/concat.py to concat.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/ternary_weight_conv2d.py to ternary_weight_conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/pool_serial.py to pool_serial.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/conv2d.py to conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/relu.py to relu.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/pad.py to pad.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/sigmoid.py to sigmoid.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/exp.py to exp.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/extern.py to extern.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/binary_weight_conv2d.py to binary_weight_conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/pool.py to pool.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/log_weight_conv2d.py to log_weight_conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/matmul.py to matmul.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/slice_.py to slice_.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/upsampling2d.py to upsampling2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/basic.py to basic.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verify/normalize.py to normalize.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/eval.py to eval.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/leaky_relu.py to leaky_relu.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/concat.py to concat.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/ternary_weight_conv2d.py to ternary_weight_conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/pool_serial.py to pool_serial.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/conv2d.py to conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/relu.py to relu.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/pad.py to pad.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/sigmoid.py to sigmoid.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/exp.py to exp.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/extern.py to extern.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/binary_weight_conv2d.py to binary_weight_conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/pool.py to pool.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/log_weight_conv2d.py to log_weight_conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/matmul.py to matmul.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/slice_.py to slice_.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/upsampling2d.py to upsampling2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/basic.py to basic.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/operator/normalize.py to normalize.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/util.py to util.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/basic_types.py to basic_types.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/scheduler.py to scheduler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/concat.py to concat.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/reshape.py to reshape.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/gather.py to gather.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/util.py to util.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/floor.py to floor.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/transpose.py to transpose.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/flatten.py to flatten.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/pad.py to pad.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/cast.py to cast.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/exp.py to exp.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/batchnormalization.py to batchnormalization.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/conv.py to conv.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/pool.py to pool.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/upsample.py to upsample.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/squeeze.py to squeeze.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/act_func.py to act_func.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/slice_.py to slice_.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/reduce.py to reduce.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/basic.py to basic.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/shape.py to shape.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/ceil.py to ceil.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/gemm.py to gemm.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/onnx/identity.py to identity.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/version.py to version.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/sim.py to sim.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/substreams.py to substreams.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/storage.py to storage.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/quantizer/conv2d.py to conv2d.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/quantizer/util.py to util.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/quantizer/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/quantizer/sigmoid.py to sigmoid.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/quantizer/exp.py to exp.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/quantizer/matmul.py to matmul.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/quantizer/reduce.py to reduce.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/quantizer/normalize.py to normalize.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/verilog.py to verilog.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/nngen/dtype_list.py to dtype_list.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying nngen.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying nngen.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying nngen.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying nngen.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying nngen.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
nngen.__pycache__.version.cpython-36: module references __file__
creating dist
creating 'dist/nngen-1.3.0-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing nngen-1.3.0-py3.6.egg
creating /home/masaaki/anaconda3/lib/python3.6/site-packages/nngen-1.3.0-py3.6.egg
Extracting nngen-1.3.0-py3.6.egg to /home/masaaki/anaconda3/lib/python3.6/site-packages
Adding nngen 1.3.0 to easy-install.pth file
Installed /home/masaaki/anaconda3/lib/python3.6/site-packages/nngen-1.3.0-py3.6.egg
Processing dependencies for nngen==1.3.0
Searching for onnx==1.6.0
Best match: onnx 1.6.0
Adding onnx 1.6.0 to easy-install.pth file
Installing backend-test-tools script to /home/masaaki/anaconda3/bin
Installing check-model script to /home/masaaki/anaconda3/bin
Installing check-node script to /home/masaaki/anaconda3/bin
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for numpy==1.18.4
Best match: numpy 1.18.4
Adding numpy 1.18.4 to easy-install.pth file
Installing f2py script to /home/masaaki/anaconda3/bin
Installing f2py3 script to /home/masaaki/anaconda3/bin
Installing f2py3.6 script to /home/masaaki/anaconda3/bin
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for veriloggen==1.8.2
Best match: veriloggen 1.8.2
Adding veriloggen 1.8.2 to easy-install.pth file
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for pyverilog==1.2.1
Best match: pyverilog 1.2.1
Adding pyverilog 1.2.1 to easy-install.pth file
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for Jinja2==2.11.2
Best match: Jinja2 2.11.2
Adding Jinja2 2.11.2 to easy-install.pth file
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for six==1.14.0
Best match: six 1.14.0
Adding six 1.14.0 to easy-install.pth file
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for typing-extensions==3.7.4.2
Best match: typing-extensions 3.7.4.2
Adding typing-extensions 3.7.4.2 to easy-install.pth file
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for protobuf==3.11.3
Best match: protobuf 3.11.3
Adding protobuf 3.11.3 to easy-install.pth file
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for MarkupSafe==1.1.1
Best match: MarkupSafe 1.1.1
Adding MarkupSafe 1.1.1 to easy-install.pth file
Using /home/masaaki/.local/lib/python3.6/site-packages
Searching for setuptools==46.1.3
Best match: setuptools 46.1.3
Adding setuptools 46.1.3 to easy-install.pth file
Installing easy_install script to /home/masaaki/anaconda3/bin
Installing easy_install-3.8 script to /home/masaaki/anaconda3/bin
Using /home/masaaki/.local/lib/python3.6/site-packages
Finished processing dependencies for nngen==1.3.0
fpga@ubuntu-fpga:~/Vitis_work/work_192/lap_axis_dma_cam_dp$ sudo ../dtbocfg.rb --install zocl --dts zocl_laps_dma_cam_dp.dts
[sudo] password for fpga:
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/zyxclmm_drm has a reg or ranges property, but no unit name
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/mt9d111_inf_axis-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/axi_iic-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/disp_dmar_axis-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/vflip_dma_write-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/axi_gpio_0-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/axi_gpio_1-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200505-4888-101fwsg: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/lap_filter_axis_dma-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200505-4888-101fwsg: Warning (clocks_property): Property 'clocks', cell 1 is not a phandle reference in /fragment@1/__overlay__/fclk0
/tmp/dtovly20200505-4888-101fwsg: Warning (clocks_property): Could not get phandle node for /fragment@1/__overlay__/fclk0:clocks(cell 1)
[ 1553.374483] fpga_manager fpga0: writing lap_axis_dma_cam_dp.bit to Xilinx ZynqMP FPGA Manager
[ 1557.331298] fclkcfg: loading out-of-tree module taints kernel.
[ 1557.333851] fclkcfg amba_pl@0:fclk0: driver installed.
[ 1557.333863] fclkcfg amba_pl@0:fclk0: device name : amba_pl@0:fclk0
[ 1557.333868] fclkcfg amba_pl@0:fclk0: clock name : pl0_ref
[ 1557.333874] fclkcfg amba_pl@0:fclk0: clock rate : 99999999
[ 1557.333898] fclkcfg amba_pl@0:fclk0: clock enabled : 1
[ 1557.333904] fclkcfg amba_pl@0:fclk0: remove rate : 1000000
[ 1557.333907] fclkcfg amba_pl@0:fclk0: remove enable : 0
[ 1557.345087] [drm] Probing for xlnx,zocl
[ 1557.345185] [drm] FPGA programming device pcap founded.
[ 1557.345190] [drm] PR Isolation addr 0x0
[ 1557.345854] [drm] Initialized zocl 2018.2.1 20180313 for b0000000.zyxclmm_drm on minor 1
[ 1557.349844] [drm] Pid 3393 opened device
[ 1557.349911] [drm] Pid 3393 closed device
[ 1557.367180] [drm] Pid 3393 opened device
[ 1557.367298] [drm] Pid 3393 closed device
[ 1557.378360] udmabuf udmabuf4: driver version = 1.4.6
[ 1557.378367] udmabuf udmabuf4: major number = 240
[ 1557.378371] udmabuf udmabuf4: minor number = 0
[ 1557.378376] udmabuf udmabuf4: phys address = 0x0000000071600000
[ 1557.378380] udmabuf udmabuf4: buffer size = 33554432
[ 1557.378385] udmabuf udmabuf4: dma device = amba_pl@0:cam_dp-udmabuf4
[ 1557.378389] udmabuf udmabuf4: dma coherent = 0
[ 1557.378395] udmabuf amba_pl@0:cam_dp-udmabuf4: driver installed.
// cam_dp_ov5642_lap.cpp (for Ultra96)
// 2018/12/14 by marsee
//
// This software converts the left and right of the camera image to BMP file.
// -f : image file name
// -n : Start File Number
// -r : resolution 0:SVGA, 1:XGA, 1:HD : defalut is XGA
// -b : bmp file output
// -h : help
//
// 2018/12/20 : completed.
// I am using the SVGA driver register setting of https://github.com/virajkanwade/rk3188_android_kernel/blob/master/drivers/media/video/ov5642.c
// 2018/12/22 : fixed
// 2018/12/30 : ov5642_inf_axis[0] fixed
// 2019/02/06 : for DisplayPort
// 2020/04/30 : Supportted ikwzm Ubuntu 18.04 LTS
// 2020/05/04 : laplacian filter
// 2020/05/05 : Changed the default image to JPG file.
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <assert.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <string.h>
#define PIXEL_NUM_OF_BYTES 4
#define NUMBER_OF_WRITE_FRAMES 3
#define SVGA_HORIZONTAL_PIXELS 800
#define SVGA_VERTICAL_LINES 600
#define SVGA_ALL_DISP_ADDRESS (SVGA_HORIZONTAL_PIXELS * SVGA_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define SVGA_3_PICTURES (SVGA_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
#define XGA_HORIZONTAL_PIXELS 1024
#define XGA_VERTICAL_LINES 768
#define XGA_ALL_DISP_ADDRESS (XGA_HORIZONTAL_PIXELS * XGA_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define XGA_3_PICTURES (XGA_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
#define HD_HORIZONTAL_PIXELS 1920
#define HD_VERTICAL_LINES 1080
#define HD_ALL_DISP_ADDRESS (HD_HORIZONTAL_PIXELS * HD_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define HD_3_PICTURES (HD_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
int WriteBMPfile(char *image_file, volatile uint32_t *frame_buffer, int active_frame, int resolution);
void cam_i2c_init(volatile unsigned *ov5642_axi_iic) {
ov5642_axi_iic[64] = 0x2; // reset tx fifo ,address is 0x100, i2c_control_reg
ov5642_axi_iic[64] = 0x1; // enable i2c
}
void cam_i2x_write_sync(void) {
// unsigned c;
// c = *cam_i2c_rx_fifo;
// while ((c & 0x84) != 0x80)
// c = *cam_i2c_rx_fifo; // No Bus Busy and TX_FIFO_Empty = 1
usleep(1000);
}
void cam_i2c_write(volatile uint32_t *ov5642_axi_iic, uint32_t device_addr, uint32_t write_addr, uint32_t write_data){
ov5642_axi_iic[66] = 0x100 | (device_addr & 0xfe); // Slave IIC Write Address, address is 0x108, i2c_tx_fifo
ov5642_axi_iic[66] = (write_addr >> 8) & 0xff; // address upper byte
ov5642_axi_iic[66] = write_addr & 0xff; // address lower byte
ov5642_axi_iic[66] = 0x200 | (write_data & 0xff); // data
cam_i2x_write_sync();
}
int cam_reg_set(volatile uint32_t *axi_iic, uint32_t device_addr);
int main(int argc, char *argv[]){
int opt;
int c, help_flag=0;
char image_fn[256] = "image_file";
char attr[1024];
unsigned long phys_addr;
int file_no = -1;
int fd4, fd5, fd6, fd7, fd8, fd9, fd10, fd20, fd21;
volatile uint32_t *ov5642_inf_axis, *axi_iic, *disp_dmar_axis, *vflip_dma_write;
volatile uint32_t *axi_gpio_0, *axi_gpio_1, *lap_filter_axis_dma;
volatile uint32_t *frame_buffer;
int active_frame;
int resolution;
int all_disp_addr;
int bmp_file = 0;
resolution = 1; // XGA
while ((opt=getopt(argc, argv, "f:n:r:bh")) != -1){
switch (opt){
case 'f':
strcpy(image_fn, optarg);
break;
case 'n':
file_no = atoi(optarg);
printf("file_no = %d\n", file_no+1);
break;
case 'r':
resolution = atoi(optarg);
break;
case 'b' : // bmp file output
bmp_file = 1;
case 'h':
help_flag = 1;
break;
}
}
if(resolution == 0){
printf("SVGA\n");
} else if(resolution == 1){
printf("XGA\n");
} else {
printf("HD\n");
}
if (help_flag == 1){ // help
printf("Usage : cam_capture [-f <image file name>] [-n <Start File Number>] [-b] [-h]\n");
printf(" -r [0|1|2](0:SVGA, 1:XGA, 2:HD)\n");
printf(" -b is bmp file output. -h is help menu.");
exit(0);
}
int h_reso, v_reso;
switch(resolution){
case 0 :
all_disp_addr = SVGA_ALL_DISP_ADDRESS;
h_reso = SVGA_HORIZONTAL_PIXELS;
v_reso = SVGA_VERTICAL_LINES;
break;
case 1 :
all_disp_addr = XGA_ALL_DISP_ADDRESS;
h_reso = XGA_HORIZONTAL_PIXELS;
v_reso = XGA_VERTICAL_LINES;
break;
default : // 2
all_disp_addr = HD_ALL_DISP_ADDRESS;
h_reso = HD_HORIZONTAL_PIXELS;
v_reso = HD_VERTICAL_LINES;
break;
}
// ov5642_inf_axis-uio IP
fd4 = open("/dev/uio4", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd4 < 1){
fprintf(stderr, "/dev/uio4 (ov5642_inf_axis) open error\n");
exit(-1);
}
ov5642_inf_axis = (volatile unsigned *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd4, 0);
if (!ov5642_inf_axis){
fprintf(stderr, "ov5642_inf_axis mmap error\n");
exit(-1);
}
// axi_iic-uio IP
fd5 = open("/dev/uio5", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd5 < 1){
fprintf(stderr, "/dev/uio5 (axi_iic) open error\n");
exit(-1);
}
axi_iic = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd5, 0);
if (!axi_iic){
fprintf(stderr, "axi_iic mmap error\n");
exit(-1);
}
// disp_dmar_axis-uio IP
fd6 = open("/dev/uio6", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd6 < 1){
fprintf(stderr, "/dev/uio6 (disp_dmar_axis) open error\n");
exit(-1);
}
disp_dmar_axis = (volatile uint32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd6, 0);
if (!disp_dmar_axis){
fprintf(stderr, "disp_dmar_axis mmap error\n");
exit(-1);
}
// vflip_dma_write-uio IP
fd7 = open("/dev/uio7", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd7 < 1){
fprintf(stderr, "/dev/uio7 (vflip_dma_write) open error\n");
exit(-1);
}
vflip_dma_write = (volatile uint32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd7, 0);
if (!vflip_dma_write){
fprintf(stderr, "vflip_dma_write mmap error\n");
exit(-1);
}
// axi_gpio_0-uio IP (init_done output)
fd8 = open("/dev/uio8", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd8 < 1){
fprintf(stderr, "/dev/uio5 (axi_gpio_0) open error\n");
exit(-1);
}
axi_gpio_0 = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd8, 0);
if (!axi_gpio_0){
fprintf(stderr, "axi_gpio_0 mmap error\n");
exit(-1);
}
// axi_gpio_1-uio IP (active_frame input)
fd9 = open("/dev/uio9", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd9 < 1){
fprintf(stderr, "/dev/uio9 (axi_gpio_1) open error\n");
exit(-1);
}
axi_gpio_1 = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd9, 0);
if (!axi_gpio_1){
fprintf(stderr, "axi_gpio_1 mmap error\n");
exit(-1);
}
// lap_filter_axis_dma-uio IP
fd10 = open("/dev/uio10", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd7 < 1){
fprintf(stderr, "/dev/uio10 (lap_filter_axis_dma) open error\n");
exit(-1);
}
lap_filter_axis_dma = (volatile uint32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd10, 0);
if (!lap_filter_axis_dma){
fprintf(stderr, "lap_filter_axis_dma mmap error\n");
exit(-1);
}
// udmabuf4
fd20 = open("/dev/udmabuf4", O_RDWR | O_SYNC); // frame_buffer, The chache is disabled.
if (fd20 == -1){
fprintf(stderr, "/dev/udmabuf4 open error\n");
exit(-1);
}
frame_buffer = (volatile uint32_t *)mmap(NULL, all_disp_addr*(NUMBER_OF_WRITE_FRAMES+1), PROT_READ|PROT_WRITE, MAP_SHARED, fd20, 0);
if (!frame_buffer){
fprintf(stderr, "frame_buffer4 mmap error\n");
exit(-1);
}
// phys_addr of udmabuf4
fd21 = open("/sys/class/udmabuf/udmabuf4/phys_addr", O_RDONLY);
if (fd21 == -1){
fprintf(stderr, "/sys/class/udmabuf/udmabuf4/phys_addr open error\n");
exit(-1);
}
read(fd21, attr, 1024);
sscanf(attr, "%lx", &phys_addr);
close(fd21);
printf("phys_addr = %x\n", (int)phys_addr);
// vflip_dma_write start
vflip_dma_write[6] = phys_addr; // fb0
vflip_dma_write[8] = phys_addr+all_disp_addr; // fb1
vflip_dma_write[10] = phys_addr+2*all_disp_addr; // fb2
vflip_dma_write[12] = resolution;
vflip_dma_write[0] = 0x1; // start
vflip_dma_write[0] = 0x80; // EnableAutoRestart
// CMOS Camera initialize, ov5642
cam_i2c_init(axi_iic);
cam_reg_set(axi_iic, 0x78); // OV5642 register set
ov5642_inf_axis[0] = phys_addr; // ov5642 AXI4-Stream Start
ov5642_inf_axis[1] = 0;
// disp_dmar_axis start
int32_t fb0 = phys_addr;
int32_t fb1 = phys_addr+all_disp_addr;
int32_t fb2 = phys_addr+2*all_disp_addr;
int32_t fb3_lap = phys_addr+3*all_disp_addr;
disp_dmar_axis[4] = fb0;
disp_dmar_axis[6] = fb1;
disp_dmar_axis[8] = fb2;
disp_dmar_axis[10] = resolution;
axi_gpio_0[0] = 1; // disp_dmar_axis start(init_done = 1)
char image_file[256];
// All 0 set
int all_disp_frame_index = all_disp_addr/PIXEL_NUM_OF_BYTES*NUMBER_OF_WRITE_FRAMES;
for (int i=0; i<all_disp_frame_index; i++){
frame_buffer[i] = 0x0;
}
// lap_filter_axis_dma settings
lap_filter_axis_dma[10] = h_reso; // 0x28 : Data signal of x_size
lap_filter_axis_dma[12] = v_reso; // 0x30 : Data signal of y_size
lap_filter_axis_dma[8] = 0; // 0x20 : Data signal of outm // bit 31~0 - outm[63:32] (Read/Write)
lap_filter_axis_dma[7] = phys_addr+3*all_disp_addr; // 0x1c : Data signal of outm // bit 31~0 - outm[31:0] (Read/Write)
lap_filter_axis_dma[5] = 0; // 0x14 : Data signal of inm // bit 31~0 - inm[63:32] (Read/Write)
lap_filter_axis_dma[4] = phys_addr; // 0x10 : Data signal of inm // bit 31~0 - inm[31:0] (Read/Write)
// w - writed the left and right eye's bmp files. q - exit.
int lapf_mode = 0;
c = getc(stdin);
while(c != 'q'){
switch ((char)c) {
case 'w' : // w - writed a bmp files.
// writed the frame buffer
file_no++;
if (bmp_file)
sprintf(image_file, "%s%d.bmp", image_fn, file_no);
else
sprintf(image_file, "%s%d.jpg", image_fn, file_no);
active_frame = (int)(axi_gpio_1[0] & 0x3); // Data signal of active_frame_V
if (lapf_mode == 0)
WriteBMPfile(image_file, frame_buffer, active_frame, resolution);
else
WriteBMPfile(image_file, frame_buffer, 3, resolution);
printf("file No. = %d\n", file_no);
break;
case 'e' : // e - writed a same bmp files.
// writed the frame buffer
if (file_no == -1)
file_no = 0;
if (bmp_file)
sprintf(image_file, "%s%d.bmp", image_fn, file_no);
else
sprintf(image_file, "%s%d.jpg", image_fn, file_no);
active_frame = (int)(axi_gpio_1[0] & 0x3); // Data signal of active_frame_V
WriteBMPfile(image_file, frame_buffer, active_frame, resolution);
printf("file No. = %d\n", file_no);
break;
case 'l' : // l - Displaied laplacian filter
lapf_mode = 1; // laplacian filter display mode
active_frame = (int)(axi_gpio_1[0] & 0x3); // Data signal of active_frame_V
if (active_frame == 0)
lap_filter_axis_dma[4] = fb2;
else if (active_frame == 1)
lap_filter_axis_dma[4] = fb0;
else // active_frame == 2
lap_filter_axis_dma[4] = fb1;
lap_filter_axis_dma[0] = 1; // laplacian filter start
disp_dmar_axis[4] = fb3_lap; // fb0
disp_dmar_axis[6] = fb3_lap; // fb1
disp_dmar_axis[8] = fb3_lap; // fb2
break;
case 'c' : // c - Displaied camera image
lapf_mode = 0; // camera image display mode
disp_dmar_axis[4] = fb0;
disp_dmar_axis[6] = fb1;
disp_dmar_axis[8] = fb2;
break;
}
c = getc(stdin);
}
vflip_dma_write[0] = 0; // stop
axi_gpio_0[0] = 0; // disp_dmar_axis stop (init_done = 0)
munmap((void *)ov5642_inf_axis, 0x1000);
munmap((void *)axi_iic, 0x1000);
munmap((void *)disp_dmar_axis, 0x10000);
munmap((void *)vflip_dma_write, 0x10000);
munmap((void *)axi_gpio_0, 0x1000);
munmap((void *)axi_gpio_1, 0x1000);
munmap((void *)lap_filter_axis_dma, 0x10000);
munmap((void *)frame_buffer, all_disp_addr*3);
close(fd4);
close(fd5);
close(fd6);
close(fd7);
close(fd8);
close(fd9);
close(fd10);
close(fd20);
return(0);
}
int WriteBMPfile(char *image_file, volatile uint32_t *frame_buffer, int active_frame, int resolution){
int read_frame;
int img_width, img_height;
if (active_frame == 0)
read_frame = 2;
else if (active_frame == 1)
read_frame = 0;
else if (active_frame == 2)
read_frame = 1;
else
read_frame = 3;
switch(resolution){
case 0 :
img_width = SVGA_HORIZONTAL_PIXELS;
img_height = SVGA_VERTICAL_LINES;
break;
case 1 :
img_width = XGA_HORIZONTAL_PIXELS;
img_height = XGA_VERTICAL_LINES;
break;
default : // case 2 :
img_width = HD_HORIZONTAL_PIXELS;
img_height = HD_VERTICAL_LINES;
break;
}
int offset_addr = read_frame * img_width * img_height;
cv::Mat img(img_height, img_width, CV_8UC3);
cv::Mat_<cv::Vec3b> dst_vec3b = cv::Mat_<cv::Vec3b>(img);
for(int y=0; y<img.rows; y++){
for(int x=0; x<img.cols; x++){
cv::Vec3b pixel;
int rgb = frame_buffer[offset_addr+y*img.cols+x];
pixel[0] = (rgb & 0xff); // blue
pixel[1] = (rgb & 0xff00) >> 8; // green
pixel[2] = (rgb & 0xff0000) >> 16; // red
dst_vec3b(y,x) = pixel;
}
}
cv::imwrite(image_file, img);
return(0);
}
int cam_reg_set(volatile unsigned *axi_iic, uint32_t device_addr){
cam_i2c_write(axi_iic, device_addr, 0x3103, 0x93);
cam_i2c_write(axi_iic, device_addr, 0x3008, 0x82);
cam_i2c_write(axi_iic, device_addr, 0x3017, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x3018, 0xfc);
cam_i2c_write(axi_iic, device_addr, 0x3810, 0xc2);
cam_i2c_write(axi_iic, device_addr, 0x3615, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x3000, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3001, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3002, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3003, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3000, 0xf8);
cam_i2c_write(axi_iic, device_addr, 0x3001, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x3002, 0x5c);
cam_i2c_write(axi_iic, device_addr, 0x3003, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3004, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3005, 0xb7);
cam_i2c_write(axi_iic, device_addr, 0x3006, 0x43);
cam_i2c_write(axi_iic, device_addr, 0x3007, 0x37);
cam_i2c_write(axi_iic, device_addr, 0x3011, 0x08); // 0x08 - 15fps, 0x10 - 30fps
cam_i2c_write(axi_iic, device_addr, 0x3010, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x460c, 0x22);
cam_i2c_write(axi_iic, device_addr, 0x3815, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x370d, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x370c, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3602, 0xfc);
cam_i2c_write(axi_iic, device_addr, 0x3612, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x3634, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3613, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3605, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x3621, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x3622, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3604, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x3603, 0xa7);
cam_i2c_write(axi_iic, device_addr, 0x3603, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x4000, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x401d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3600, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x3605, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3606, 0x3f);
cam_i2c_write(axi_iic, device_addr, 0x3c01, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0x4f);
cam_i2c_write(axi_iic, device_addr, 0x5020, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x79);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x22);
cam_i2c_write(axi_iic, device_addr, 0x5197, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x5500, 0x0a);
cam_i2c_write(axi_iic, device_addr, 0x5504, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5505, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5080, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x300e, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x4610, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x471d, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x4708, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x3710, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3632, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x3702, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x37);
cam_i2c_write(axi_iic, device_addr, 0x3631, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x3808, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3809, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380a, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x380b, 0xe0);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x501f, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0x4f);
cam_i2c_write(axi_iic, device_addr, 0x4300, 0x61); // RGB565
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x73);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3824, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x380c, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x380d, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xe8);
cam_i2c_write(axi_iic, device_addr, 0x3a0d, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3a0e, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x3818, 0xc1);
cam_i2c_write(axi_iic, device_addr, 0x3705, 0xdb);
cam_i2c_write(axi_iic, device_addr, 0x370a, 0x81);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x3621, 0xc7);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x3803, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3827, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3810, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3804, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x3805, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3806, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x3807, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3a00, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x3a1a, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3a13, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a18, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a19, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x3a08, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x3a09, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3a0a, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x3a0b, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3004, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x350c, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x350d, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x3500, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x350a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3a0f, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a10, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a1b, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a1e, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a11, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3a1f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3030, 0x0b);
cam_i2c_write(axi_iic, device_addr, 0x3a02, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a03, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x3a04, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a14, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a15, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x3a16, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a00, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x3a08, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x3a09, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x3a0a, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3a0b, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x3a0d, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3a0e, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x57);
cam_i2c_write(axi_iic, device_addr, 0x3703, 0x98);
cam_i2c_write(axi_iic, device_addr, 0x3704, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x589b, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x589a, 0xc5);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5380, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5381, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5382, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5383, 0x4e);
cam_i2c_write(axi_iic, device_addr, 0x5384, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5385, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x5386, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5387, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5388, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5389, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x538a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538b, 0x31);
cam_i2c_write(axi_iic, device_addr, 0x538c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538d, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538f, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x5390, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5391, 0xab);
cam_i2c_write(axi_iic, device_addr, 0x5392, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5393, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x5394, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5480, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5481, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x5482, 0x36);
cam_i2c_write(axi_iic, device_addr, 0x5483, 0x57);
cam_i2c_write(axi_iic, device_addr, 0x5484, 0x65);
cam_i2c_write(axi_iic, device_addr, 0x5485, 0x71);
cam_i2c_write(axi_iic, device_addr, 0x5486, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x5487, 0x87);
cam_i2c_write(axi_iic, device_addr, 0x5488, 0x91);
cam_i2c_write(axi_iic, device_addr, 0x5489, 0x9a);
cam_i2c_write(axi_iic, device_addr, 0x548a, 0xaa);
cam_i2c_write(axi_iic, device_addr, 0x548b, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x548c, 0xcd);
cam_i2c_write(axi_iic, device_addr, 0x548d, 0xdd);
cam_i2c_write(axi_iic, device_addr, 0x548e, 0xea);
cam_i2c_write(axi_iic, device_addr, 0x548f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5490, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5491, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5492, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5493, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5494, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5495, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x5496, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5497, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x5498, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5499, 0x86);
cam_i2c_write(axi_iic, device_addr, 0x549a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549b, 0x5b);
cam_i2c_write(axi_iic, device_addr, 0x549c, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549d, 0x3b);
cam_i2c_write(axi_iic, device_addr, 0x549e, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549f, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x54a0, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x54a1, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x54a2, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a3, 0xed);
cam_i2c_write(axi_iic, device_addr, 0x54a4, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a5, 0xc5);
cam_i2c_write(axi_iic, device_addr, 0x54a6, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a7, 0xa5);
cam_i2c_write(axi_iic, device_addr, 0x54a8, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a9, 0x6c);
cam_i2c_write(axi_iic, device_addr, 0x54aa, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ab, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x54ac, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ad, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x54ae, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x54af, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x3406, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5192, 0x04); // 0x04
cam_i2c_write(axi_iic, device_addr, 0x5191, 0xf8); // 0xf8
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x5194, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5195, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x518d, 0x3d);
cam_i2c_write(axi_iic, device_addr, 0x518f, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x518e, 0x3d);
cam_i2c_write(axi_iic, device_addr, 0x5190, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x518b, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x518c, 0xbd);
cam_i2c_write(axi_iic, device_addr, 0x5187, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5188, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5189, 0x6e);
cam_i2c_write(axi_iic, device_addr, 0x518a, 0x68);
cam_i2c_write(axi_iic, device_addr, 0x5186, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5183, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x24);
cam_i2c_write(axi_iic, device_addr, 0x5025, 0x82);
cam_i2c_write(axi_iic, device_addr, 0x5583, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5584, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5580, 0x02); // 0x02
cam_i2c_write(axi_iic, device_addr, 0x3633, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3702, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3703, 0xb2);
cam_i2c_write(axi_iic, device_addr, 0x3704, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x370b, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x370d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x52);
cam_i2c_write(axi_iic, device_addr, 0x3c00, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0xFF);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5500, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5502, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5503, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5504, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5505, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5025, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5380, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5381, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5382, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5383, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5384, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5385, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5386, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5387, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5388, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5389, 0xE1);
cam_i2c_write(axi_iic, device_addr, 0x538A, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538B, 0x2B);
cam_i2c_write(axi_iic, device_addr, 0x538C, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538D, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538E, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538F, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5390, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5391, 0xB3);
cam_i2c_write(axi_iic, device_addr, 0x5392, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5393, 0xA6);
cam_i2c_write(axi_iic, device_addr, 0x5394, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5480, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5481, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5482, 0x2a);
cam_i2c_write(axi_iic, device_addr, 0x5483, 0x49);
cam_i2c_write(axi_iic, device_addr, 0x5484, 0x56);
cam_i2c_write(axi_iic, device_addr, 0x5485, 0x62);
cam_i2c_write(axi_iic, device_addr, 0x5486, 0x6c);
cam_i2c_write(axi_iic, device_addr, 0x5487, 0x76);
cam_i2c_write(axi_iic, device_addr, 0x5488, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5489, 0x88);
cam_i2c_write(axi_iic, device_addr, 0x548a, 0x96);
cam_i2c_write(axi_iic, device_addr, 0x548b, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x548c, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x548d, 0xcc);
cam_i2c_write(axi_iic, device_addr, 0x548e, 0xe0);
cam_i2c_write(axi_iic, device_addr, 0x548f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5490, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5491, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5492, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5493, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5494, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5495, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x5496, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5497, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x5498, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5499, 0x26);
cam_i2c_write(axi_iic, device_addr, 0x549a, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x549b, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x549c, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x549d, 0xee);
cam_i2c_write(axi_iic, device_addr, 0x549e, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x549f, 0xd8);
cam_i2c_write(axi_iic, device_addr, 0x54a0, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a1, 0xc7);
cam_i2c_write(axi_iic, device_addr, 0x54a2, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a3, 0xb3);
cam_i2c_write(axi_iic, device_addr, 0x54a4, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a5, 0x90);
cam_i2c_write(axi_iic, device_addr, 0x54a6, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a7, 0x62);
cam_i2c_write(axi_iic, device_addr, 0x54a8, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a9, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x54aa, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ab, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x54ac, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ad, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x54ae, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x54af, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x54b0, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b1, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x54b2, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b3, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x54b4, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x54b5, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x54b6, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b7, 0xdf);
cam_i2c_write(axi_iic, device_addr, 0x5583, 0x5d);
cam_i2c_write(axi_iic, device_addr, 0x5584, 0x5d);
cam_i2c_write(axi_iic, device_addr, 0x5580, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5587, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5588, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x558a, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x5589, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0xcf);
cam_i2c_write(axi_iic, device_addr, 0x5800, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x5801, 0x31);
cam_i2c_write(axi_iic, device_addr, 0x5802, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x5803, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x5804, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5805, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5806, 0x29);
cam_i2c_write(axi_iic, device_addr, 0x5807, 0x38);
cam_i2c_write(axi_iic, device_addr, 0x5808, 0x26);
cam_i2c_write(axi_iic, device_addr, 0x5809, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x580a, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x580b, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x580c, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x580d, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x580e, 0x13);
cam_i2c_write(axi_iic, device_addr, 0x580f, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5810, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x5811, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5812, 0x8);
cam_i2c_write(axi_iic, device_addr, 0x5813, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5814, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x5815, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5816, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x5817, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5818, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5819, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x581a, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x581b, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x581c, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x581d, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x581e, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x581f, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x5820, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x5821, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x5822, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x5823, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5824, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5825, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x5826, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x5827, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5828, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5829, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x582a, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x582b, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x582c, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x582d, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x582e, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x582f, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5830, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x5831, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5832, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5833, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5834, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5835, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5836, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x5837, 0x1d);
cam_i2c_write(axi_iic, device_addr, 0x5838, 0x6e);
cam_i2c_write(axi_iic, device_addr, 0x5839, 0x39);
cam_i2c_write(axi_iic, device_addr, 0x583a, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x583b, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x583c, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x583d, 0x23);
cam_i2c_write(axi_iic, device_addr, 0x583e, 0x2f);
cam_i2c_write(axi_iic, device_addr, 0x583f, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x5840, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5841, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5842, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5843, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5844, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5845, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5846, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5847, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5848, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5849, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584a, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584b, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x584c, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584d, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584e, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x584f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5850, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5851, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5852, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5853, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5854, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5855, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5856, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5857, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5858, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5859, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x585a, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585b, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585c, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585d, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x585e, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x585f, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5860, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5861, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x5862, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5863, 0x7);
cam_i2c_write(axi_iic, device_addr, 0x5864, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5865, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5866, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5867, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5868, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x5869, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x586a, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x586b, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x586c, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x586d, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x586e, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x586f, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5870, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5871, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x5872, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5873, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5874, 0x13);
cam_i2c_write(axi_iic, device_addr, 0x5875, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5876, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5877, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5878, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5879, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x587a, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x587b, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x587c, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x587d, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x587e, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x587f, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5880, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x5881, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5882, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5883, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5884, 0x1d);
cam_i2c_write(axi_iic, device_addr, 0x5885, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5886, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5887, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5680, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5681, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5684, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5685, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5180, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x52);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5183, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x24);
cam_i2c_write(axi_iic, device_addr, 0x5186, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5187, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5188, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5189, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x518a, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x518b, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x518c, 0x9c);
cam_i2c_write(axi_iic, device_addr, 0x518d, 0x36);
cam_i2c_write(axi_iic, device_addr, 0x518e, 0x34);
cam_i2c_write(axi_iic, device_addr, 0x518f, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x5190, 0x4c);
cam_i2c_write(axi_iic, device_addr, 0x5191, 0xf8);
cam_i2c_write(axi_iic, device_addr, 0x5192, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x5194, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5195, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5196, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5197, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5198, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5199, 0x2f);
cam_i2c_write(axi_iic, device_addr, 0x519a, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x519b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x519c, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x519d, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x519e, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3a0f, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a10, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a1b, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a1e, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a11, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3a1f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3800, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x3802, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x3803, 0x8);
cam_i2c_write(axi_iic, device_addr, 0x3804, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x3805, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x3806, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x3807, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3808, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x3809, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x380a, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x380b, 0x58);
cam_i2c_write(axi_iic, device_addr, 0x380c, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x380d, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xe8);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5680, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5681, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5684, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5685, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3815, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3818, 0x81); // No Mirror
cam_i2c_write(axi_iic, device_addr, 0x3621, 0xa7);
cam_i2c_write(axi_iic, device_addr, 0x4740, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x501e, 0x2a);
cam_i2c_write(axi_iic, device_addr, 0x5002, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x501f, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x4300, 0x61);
return(0);
}
// ==============================================================
// Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC v2019.2 (64-bit)
// Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.
// ==============================================================
// control
// 0x00 : Control signals
// bit 0 - ap_start (Read/Write/COH)
// bit 1 - ap_done (Read/COR)
// bit 2 - ap_idle (Read)
// bit 3 - ap_ready (Read)
// bit 7 - auto_restart (Read/Write)
// others - reserved
// 0x04 : Global Interrupt Enable Register
// bit 0 - Global Interrupt Enable (Read/Write)
// others - reserved
// 0x08 : IP Interrupt Enable Register (Read/Write)
// bit 0 - Channel 0 (ap_done)
// bit 1 - Channel 1 (ap_ready)
// others - reserved
// 0x0c : IP Interrupt Status Register (Read/TOW)
// bit 0 - Channel 0 (ap_done)
// bit 1 - Channel 1 (ap_ready)
// others - reserved
// 0x10 : Data signal of inm
// bit 31~0 - inm[31:0] (Read/Write)
// 0x14 : Data signal of inm
// bit 31~0 - inm[63:32] (Read/Write)
// 0x18 : reserved
// 0x1c : Data signal of outm
// bit 31~0 - outm[31:0] (Read/Write)
// 0x20 : Data signal of outm
// bit 31~0 - outm[63:32] (Read/Write)
// 0x24 : reserved
// 0x28 : Data signal of x_size
// bit 31~0 - x_size[31:0] (Read/Write)
// 0x2c : reserved
// 0x30 : Data signal of y_size
// bit 31~0 - y_size[31:0] (Read/Write)
// 0x34 : reserved
// (SC = Self Clear, COR = Clear on Read, TOW = Toggle on Write, COH = Clear on Handshake)
/dts-v1/; /plugin/;
/ {
fragment@0 {
target-path = "/fpga-full";
__overlay__ {
firmware-name = "lap_axis_dma_cam_dp.bit";
};
};
fragment@1 {
target-path = "/amba_pl@0";
__overlay__ {
#address-cells = <2>;
#size-cells = <1>;
zyxclmm_drm {
compatible = "xlnx,zocl";
status = "okay";
reg = <0x0 0xB0000000 0x10000>;
};
fclk0 {
compatible = "ikwzm,fclkcfg-0.10.a";
clocks = <&zynqmp_clk 0x47>;
insert-rate = "100000000";
insert-enable = <1>;
remove-rate = "1000000";
remove-enable = <0>;
};
mt9d111_inf_axis-uio {
compatible = "generic-uio";
reg = <0x0 0xA0010000 0x1000>;
};
axi_iic-uio {
compatible = "generic-uio";
reg = <0x0 0xA0011000 0x1000>;
};
disp_dmar_axis-uio {
compatible = "generic-uio";
reg = <0x0 0xA0000000 0x10000>;
};
vflip_dma_write-uio {
compatible = "generic-uio";
reg = <0x0 0xA0020000 0x10000>;
};
axi_gpio_0-uio {
compatible = "generic-uio";
reg = <0x0 0xA0012000 0x1000>;
};
axi_gpio_1-uio {
compatible = "generic-uio";
reg = <0x0 0xA0013000 0x1000>;
};
lap_filter_axis_dma-uio {
compatible = "generic-uio";
reg = <0x0 0xB0000000 0x10000>;
};
cam_dp-udmabuf4 {
compatible = "ikwzm,udmabuf-0.10.a";
device-name = "udmabuf4";
size = <0x02000000>;
};
};
};
};
// lap_filter_axis_dma_host.cpp
// 2019/12/12 by marsee
// 2019/12/25 : getProfilingInfo()による時間計測を追加
// 2020/05/03 : カメラ画像からラプラシアン・フィルタ処理を行う(1 コピー)
//
// Vitis-Tutorials/docs/mixing-c-rtl-kernels/reference-files/src/host/host_step1.cpp のコードを引用します
// https://github.com/Xilinx/Vitis-Tutorials/blob/master/docs/mixing-c-rtl-kernels/reference-files/src/host/host_step1.cpp
#define CL_HPP_CL_1_2_DEFAULT_BUILD
#define CL_HPP_TARGET_OPENCL_VERSION 120
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
#define CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY 1
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <CL/cl2.hpp>
#include <iostream>
#include <fstream>
#include <CL/cl_ext_xilinx.h>
#include <unistd.h>
#include <limits.h>
#include <ap_int.h>
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include <fcntl.h>
#include <sys/mman.h>
#include "bmp_header.h"
#define PIXEL_NUM_OF_BYTES 4
#define NUMBER_OF_WRITE_FRAMES 3
#define SVGA_HORIZONTAL_PIXELS 800
#define SVGA_VERTICAL_LINES 600
#define SVGA_ALL_DISP_ADDRESS (SVGA_HORIZONTAL_PIXELS * SVGA_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define SVGA_3_PICTURES (SVGA_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
#define XGA_HORIZONTAL_PIXELS 1024
#define XGA_VERTICAL_LINES 768
#define XGA_ALL_DISP_ADDRESS (XGA_HORIZONTAL_PIXELS * XGA_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define XGA_3_PICTURES (XGA_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
#define HD_HORIZONTAL_PIXELS 1920
#define HD_VERTICAL_LINES 1080
#define HD_ALL_DISP_ADDRESS (HD_HORIZONTAL_PIXELS * HD_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define HD_3_PICTURES (HD_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
int WriteBMPfile(char *bmp_file, volatile uint32_t *frame_buffer, int active_frame, int resolution);
void cam_i2c_init(volatile unsigned *ov5642_axi_iic) {
ov5642_axi_iic[64] = 0x2; // reset tx fifo ,address is 0x100, i2c_control_reg
ov5642_axi_iic[64] = 0x1; // enable i2c
}
void cam_i2x_write_sync(void) {
// unsigned c;
// c = *cam_i2c_rx_fifo;
// while ((c & 0x84) != 0x80)
// c = *cam_i2c_rx_fifo; // No Bus Busy and TX_FIFO_Empty = 1
usleep(1000);
}
void cam_i2c_write(volatile uint32_t *ov5642_axi_iic, uint32_t device_addr, uint32_t write_addr, uint32_t write_data){
ov5642_axi_iic[66] = 0x100 | (device_addr & 0xfe); // Slave IIC Write Address, address is 0x108, i2c_tx_fifo
ov5642_axi_iic[66] = (write_addr >> 8) & 0xff; // address upper byte
ov5642_axi_iic[66] = write_addr & 0xff; // address lower byte
ov5642_axi_iic[66] = 0x200 | (write_data & 0xff); // data
cam_i2x_write_sync();
}
int cam_reg_set(volatile uint32_t *axi_iic, uint32_t device_addr);
int laplacian_fil_soft(int32_t x0y0, int32_t x1y0, int32_t x2y0, int32_t x0y1, int32_t x1y1, int32_t x2y1, int32_t x0y2, int32_t x1y2, int32_t x2y2);
int32_t conv_rgb2y_soft(int32_t rgb);
int32_t lap_filter_axis_soft(hls::stream<ap_axis<32,1,1,1> >& ins, hls::stream<ap_axis<32,1,1,1> >& outs, int32_t width, int32_t height); // software
static const std::string error_message =
"Error: Result mismatch:\n"
"i = %d CPU result = %d Device result = %d\n";
//Some Library functions to be used.
template <typename T>
struct aligned_allocator
{
using value_type = T;
T* allocate(std::size_t num)
{
void* ptr = nullptr;
if (posix_memalign(&ptr,4096,num*sizeof(T)))
throw std::bad_alloc();
return reinterpret_cast<T*>(ptr);
}
void deallocate(T* p, std::size_t num)
{
free(p);
}
};
#define OCL_CHECK(error,call) \
call; \
if (error != CL_SUCCESS) { \
printf("%s:%d Error calling " #call ", error code is: %d\n", \
__FILE__,__LINE__, error); \
exit(EXIT_FAILURE); \
}
namespace xcl {
std::vector<cl::Device> get_devices(const std::string& vendor_name) {
size_t i;
cl_int err;
std::vector<cl::Platform> platforms;
OCL_CHECK(err, err = cl::Platform::get(&platforms));
cl::Platform platform;
for (i = 0 ; i < platforms.size(); i++){
platform = platforms[i];
OCL_CHECK(err, std::string platformName = platform.getInfo<CL_PLATFORM_NAME>(&err));
if (platformName == vendor_name){
std::cout << "Found Platform" << std::endl;
std::cout << "Platform Name: " << platformName.c_str() << std::endl;
break;
}
}
if (i == platforms.size()) {
std::cout << "Error: Failed to find Xilinx platform" << std::endl;
exit(EXIT_FAILURE);
}
//Getting ACCELERATOR Devices and selecting 1st such device
std::vector<cl::Device> devices;
OCL_CHECK(err, err = platform.getDevices(CL_DEVICE_TYPE_ACCELERATOR, &devices));
return devices;
}
std::vector<cl::Device> get_xil_devices() {
return get_devices("Xilinx");
}
char* read_binary_file(const std::string &xclbin_file_name, unsigned &nb)
{
std::cout << "INFO: Reading " << xclbin_file_name << std::endl;
if(access(xclbin_file_name.c_str(), R_OK) != 0) {
printf("ERROR: %s xclbin not available please build\n", xclbin_file_name.c_str());
exit(EXIT_FAILURE);
}
//Loading XCL Bin into char buffer
std::cout << "Loading: '" << xclbin_file_name.c_str() << "'\n";
std::ifstream bin_file(xclbin_file_name.c_str(), std::ifstream::binary);
bin_file.seekg (0, bin_file.end);
nb = bin_file.tellg();
bin_file.seekg (0, bin_file.beg);
char *buf = new char [nb];
bin_file.read(buf, nb);
return buf;
}
};
int main(int argc, char* argv[])
{
long x, y;
const char* xclbinFilename;
hls::stream<ap_axis<32,1,1,1> > ins_soft;
hls::stream<ap_axis<32,1,1,1> > outs_soft;
ap_axis<32,1,1,1> pix;
ap_axis<32,1,1,1> vals_soft;
int opt;
int help_flag=0;
char bmp_fn[256] = "bmp_file";
char attr[1024];
unsigned long phys_addr;
int file_no = -1;
int fd4, fd5, fd6, fd7, fd8, fd9, fd10, fd11;
volatile uint32_t *ov5642_inf_axis, *axi_iic, *disp_dmar_axis, *vflip_dma_write;
volatile uint32_t *axi_gpio_0, *axi_gpio_1;
volatile uint32_t *frame_buffer;
int resolution;
int all_disp_addr;
if (argc>=2) {
xclbinFilename = argv[1];
std::cout <<"Using FPGA binary file specfied through the command line: " << xclbinFilename << std::endl;
}
else {
xclbinFilename = "../lap_filter_axim.xclbin";
std::cout << "No FPGA binary file specified through the command line, using:" << xclbinFilename <<std::endl;
}
resolution = 1; // XGA
while ((opt=getopt(argc, argv, "b:n:h:r:")) != -1){
switch (opt){
case 'b':
strcpy(bmp_fn, optarg);
break;
case 'n':
file_no = atoi(optarg);
printf("file_no = %d\n", file_no+1);
break;
case 'r':
resolution = atoi(optarg);
break;
case 'h':
help_flag = 1;
break;
}
}
if(resolution == 0){
printf("SVGA\n");
} else if(resolution == 1){
printf("XGA\n");
} else {
printf("HD\n");
}
if (help_flag == 1){ // help
printf("Usage : cam_capture [-b <bmp file name>] [-n <Start File Number>] [-h]\n");
printf(" -r [0|1|2](0:SVGA, 1:XGA, 2:HD)\n");
exit(0);
}
// all_disp_addr, h_reso, v_reso
int h_reso, v_reso;
switch(resolution){
case 0 :
all_disp_addr = SVGA_ALL_DISP_ADDRESS;
h_reso = SVGA_HORIZONTAL_PIXELS;
v_reso = SVGA_VERTICAL_LINES;
break;
case 1 :
all_disp_addr = XGA_ALL_DISP_ADDRESS;
h_reso = XGA_HORIZONTAL_PIXELS;
v_reso = XGA_VERTICAL_LINES;
break;
default : // 2
all_disp_addr = HD_ALL_DISP_ADDRESS;
h_reso = HD_HORIZONTAL_PIXELS;
v_reso = HD_VERTICAL_LINES;
break;
}
// ov5642_inf_axis-uio IP
fd4 = open("/dev/uio4", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd4 < 1){
fprintf(stderr, "/dev/uio4 (ov5642_inf_axis) open error\n");
exit(-1);
}
ov5642_inf_axis = (volatile unsigned *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd4, 0);
if (!ov5642_inf_axis){
fprintf(stderr, "ov5642_inf_axis mmap error\n");
exit(-1);
}
// axi_iic-uio IP
fd5 = open("/dev/uio5", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd5 < 1){
fprintf(stderr, "/dev/uio5 (axi_iic) open error\n");
exit(-1);
}
axi_iic = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd5, 0);
if (!axi_iic){
fprintf(stderr, "axi_iic mmap error\n");
exit(-1);
}
// disp_dmar_axis-uio IP
fd6 = open("/dev/uio6", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd6 < 1){
fprintf(stderr, "/dev/uio6 (disp_dmar_axis) open error\n");
exit(-1);
}
disp_dmar_axis = (volatile uint32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd6, 0);
if (!disp_dmar_axis){
fprintf(stderr, "disp_dmar_axis mmap error\n");
exit(-1);
}
// vflip_dma_write-uio IP
fd7 = open("/dev/uio7", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd7 < 1){
fprintf(stderr, "/dev/uio7 (vflip_dma_write) open error\n");
exit(-1);
}
vflip_dma_write = (volatile uint32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd7, 0);
if (!vflip_dma_write){
fprintf(stderr, "vflip_dma_write mmap error\n");
exit(-1);
}
// axi_gpio_0-uio IP (init_done output)
fd8 = open("/dev/uio8", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd8 < 1){
fprintf(stderr, "/dev/uio5 (axi_gpio_0) open error\n");
exit(-1);
}
axi_gpio_0 = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd8, 0);
if (!axi_gpio_0){
fprintf(stderr, "axi_gpio_0 mmap error\n");
exit(-1);
}
// axi_gpio_1-uio IP (active_frame input)
fd9 = open("/dev/uio9", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd9 < 1){
fprintf(stderr, "/dev/uio9 (axi_gpio_1) open error\n");
exit(-1);
}
axi_gpio_1 = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd9, 0);
if (!axi_gpio_1){
fprintf(stderr, "axi_gpio_1 mmap error\n");
exit(-1);
}
// udmabuf4
fd10 = open("/dev/udmabuf4", O_RDWR | O_SYNC); // frame_buffer, The chache is disabled.
if (fd10 == -1){
fprintf(stderr, "/dev/udmabuf4 open error\n");
exit(-1);
}
frame_buffer = (volatile uint32_t *)mmap(NULL, all_disp_addr*(NUMBER_OF_WRITE_FRAMES+1), PROT_READ|PROT_WRITE, MAP_SHARED, fd10, 0);
if (!frame_buffer){
fprintf(stderr, "frame_buffer4 mmap error\n");
exit(-1);
}
// phys_addr of udmabuf4
fd11 = open("/sys/class/udmabuf/udmabuf4/phys_addr", O_RDONLY);
if (fd11 == -1){
fprintf(stderr, "/sys/class/udmabuf/udmabuf4/phys_addr open error\n");
exit(-1);
}
read(fd11, attr, 1024);
sscanf(attr, "%lx", &phys_addr);
close(fd11);
printf("phys_addr = %x\n", (int)phys_addr);
// vflip_dma_write start
vflip_dma_write[6] = phys_addr; // fb0
vflip_dma_write[8] = phys_addr+all_disp_addr; // fb1
vflip_dma_write[10] = phys_addr+2*all_disp_addr; // fb2
vflip_dma_write[12] = resolution;
vflip_dma_write[0] = 0x1; // start
vflip_dma_write[0] = 0x80; // EnableAutoRestart
// CMOS Camera initialize, ov5642
cam_i2c_init(axi_iic);
cam_reg_set(axi_iic, 0x78); // OV5642 register set
ov5642_inf_axis[0] = phys_addr; // ov5642 AXI4-Stream Start
ov5642_inf_axis[1] = 0;
// disp_dmar_axis start
disp_dmar_axis[4] = phys_addr; // fb0
disp_dmar_axis[6] = phys_addr+all_disp_addr; // fb1
disp_dmar_axis[8] = phys_addr+2*all_disp_addr; // fb2
disp_dmar_axis[10] = resolution;
axi_gpio_0[0] = 1; // disp_dmar_axis start(init_done = 1)
//char bmp_file[256];
// All 0 set
int all_disp_frame_index = all_disp_addr/PIXEL_NUM_OF_BYTES*NUMBER_OF_WRITE_FRAMES;
for (int i=0; i<all_disp_frame_index; i++){
frame_buffer[i] = 0x0;
}
// ピクセルを入れるメモリをアロケートする
std::vector<int32_t,aligned_allocator<int32_t>> rd_bmp(h_reso * v_reso);
std::vector<int32_t,aligned_allocator<int32_t>> hw_lapd(h_reso * v_reso);
size_t size_in_bytes = (h_reso * v_reso) * sizeof(int32_t);
usleep(200000); // 200 ms sleep
for(y=0; y<v_reso; y++){ // カメラ画像をコピー
for(x=0; x<h_reso; x++){
rd_bmp[y*h_reso+x] = frame_buffer[y*h_reso+x];
}
}
std::vector<cl::Device> devices = xcl::get_xil_devices();
cl::Device device = devices[0];
devices.resize(1);
// Creating Context and Command Queue for selected device
cl::Context context(device);
cl::CommandQueue q(context, device, CL_QUEUE_PROFILING_ENABLE);
// Load xclbin
std::cout << "Loading: '" << xclbinFilename << "'\n";
std::ifstream bin_file(xclbinFilename, std::ifstream::binary);
bin_file.seekg (0, bin_file.end);
unsigned nb = bin_file.tellg();
bin_file.seekg (0, bin_file.beg);
char *buf = new char [nb];
bin_file.read(buf, nb);
// Creating Program from Binary File
cl::Program::Binaries bins;
bins.push_back({buf,nb});
cl::Program program(context, devices, bins);
// This call will get the kernel object from program. A kernel is an
// OpenCL function that is executed on the FPGA.
cl::Kernel krnl_lap_filter(program,"lap_filter_axis_dma");
// These commands will allocate memory on the Device. The cl::Buffer objects can
// be used to reference the memory locations on the device.
cl::Buffer rd_bmp_buf(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_ONLY,
size_in_bytes, rd_bmp.data());
cl::Buffer hw_lapd_buf(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE,
size_in_bytes, hw_lapd.data());
// Data will be transferred from system memory over PCIe to the FPGA on-board
// DDR memory.
q.enqueueMigrateMemObjects({rd_bmp_buf},0/* 0 means from host*/);
//set the kernel Arguments
krnl_lap_filter.setArg(0,rd_bmp_buf);
krnl_lap_filter.setArg(1,hw_lapd_buf);
krnl_lap_filter.setArg(2,h_reso);
krnl_lap_filter.setArg(3,v_reso);
cl::Event event;
uint64_t lapf_start, lapf_end;
//Launch the Kernel
q.enqueueTask(krnl_lap_filter, NULL, &event);
// The result of the previous kernel execution will need to be retrieved in
// order to view the results. This call will transfer the data from FPGA to
// source_results vector
q.enqueueMigrateMemObjects({hw_lapd_buf},CL_MIGRATE_MEM_OBJECT_HOST);
q.finish();
// 時間計測
event.getProfilingInfo<uint64_t>(CL_PROFILING_COMMAND_START, &lapf_start);
event.getProfilingInfo<uint64_t>(CL_PROFILING_COMMAND_END, &lapf_end);
auto lapf_time = lapf_end - lapf_start;
printf("lap_filter_axis_dma: %lu ns\n", lapf_time);
FILE *fbmpw;
BITMAPFILEHEADER bmpfhr; // BMPファイルのファイルヘッダ(for Read)
BITMAPINFOHEADER bmpihr; // BMPファイルのINFOヘッダ(for Read)
bmpfhr.bfType = 0x4d42;
bmpfhr.bfSize = (h_reso * v_reso * 3)+54;
bmpfhr.bfReserved1 = 0x0;
bmpfhr.bfReserved2 = 0x0;
bmpfhr.bfOffBits = 0x36;
bmpihr.biSize = 0x28;
bmpihr.biWidth = h_reso;
bmpihr.biHeight = v_reso;
bmpihr.biPlanes = 0x1;
bmpihr.biBitCount = 0x18;
bmpihr.biCompression = 0x0;
bmpihr.biSizeImage = h_reso * v_reso * 3;
bmpihr.biXPixPerMeter = 0x0;
bmpihr.biYPixPerMeter = 0x0;
bmpihr.biClrUsed = 0x0;
bmpihr.biClrImporant = 0x0;
// ハードウェアのラプラシアンフィルタの結果を cam_lap.bmp へ出力する
if ((fbmpw=fopen("cam_lap.bmp", "wb")) == NULL){
fprintf(stderr, "Can't open cam_lap.bmp by binary write mode\n");
exit(1);
}
// BMPファイルヘッダの書き込み
fwrite(&bmpfhr.bfType, sizeof(uint16_t), 1, fbmpw);
fwrite(&bmpfhr.bfSize, sizeof(uint32_t), 1, fbmpw);
fwrite(&bmpfhr.bfReserved1, sizeof(uint16_t), 1, fbmpw);
fwrite(&bmpfhr.bfReserved2, sizeof(uint16_t), 1, fbmpw);
fwrite(&bmpfhr.bfOffBits, sizeof(uint32_t), 1, fbmpw);
fwrite(&bmpihr, sizeof(BITMAPINFOHEADER), 1, fbmpw);
int32_t blue, green, red;
// RGB データの書き込み、逆順にする
for (y=0; y<bmpihr.biHeight; y++){
for (x=0; x<bmpihr.biWidth; x++){
blue = hw_lapd[((bmpihr.biHeight-1)-y)*bmpihr.biWidth+x] & 0xff;
green = (hw_lapd[((bmpihr.biHeight-1)-y)*bmpihr.biWidth+x] >> 8) & 0xff;
red = (hw_lapd[((bmpihr.biHeight-1)-y)*bmpihr.biWidth+x]>>16) & 0xff;
//blue = rd_bmp[((bmpihr.biHeight-1)-y)*bmpihr.biWidth+x] & 0xff;
//green = (rd_bmp[((bmpihr.biHeight-1)-y)*bmpihr.biWidth+x] >> 8) & 0xff;
//red = (rd_bmp[((bmpihr.biHeight-1)-y)*bmpihr.biWidth+x]>>16) & 0xff;
fputc(blue, fbmpw);
fputc(green, fbmpw);
fputc(red, fbmpw);
}
}
fclose(fbmpw);
return(0);
}
int cam_reg_set(volatile unsigned *axi_iic, uint32_t device_addr){
cam_i2c_write(axi_iic, device_addr, 0x3103, 0x93);
cam_i2c_write(axi_iic, device_addr, 0x3008, 0x82);
cam_i2c_write(axi_iic, device_addr, 0x3017, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x3018, 0xfc);
cam_i2c_write(axi_iic, device_addr, 0x3810, 0xc2);
cam_i2c_write(axi_iic, device_addr, 0x3615, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x3000, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3001, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3002, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3003, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3000, 0xf8);
cam_i2c_write(axi_iic, device_addr, 0x3001, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x3002, 0x5c);
cam_i2c_write(axi_iic, device_addr, 0x3003, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3004, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3005, 0xb7);
cam_i2c_write(axi_iic, device_addr, 0x3006, 0x43);
cam_i2c_write(axi_iic, device_addr, 0x3007, 0x37);
cam_i2c_write(axi_iic, device_addr, 0x3011, 0x08); // 0x08 - 15fps, 0x10 - 30fps
cam_i2c_write(axi_iic, device_addr, 0x3010, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x460c, 0x22);
cam_i2c_write(axi_iic, device_addr, 0x3815, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x370d, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x370c, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3602, 0xfc);
cam_i2c_write(axi_iic, device_addr, 0x3612, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x3634, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3613, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3605, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x3621, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x3622, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3604, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x3603, 0xa7);
cam_i2c_write(axi_iic, device_addr, 0x3603, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x4000, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x401d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3600, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x3605, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3606, 0x3f);
cam_i2c_write(axi_iic, device_addr, 0x3c01, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0x4f);
cam_i2c_write(axi_iic, device_addr, 0x5020, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x79);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x22);
cam_i2c_write(axi_iic, device_addr, 0x5197, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x5500, 0x0a);
cam_i2c_write(axi_iic, device_addr, 0x5504, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5505, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5080, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x300e, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x4610, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x471d, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x4708, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x3710, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3632, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x3702, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x37);
cam_i2c_write(axi_iic, device_addr, 0x3631, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x3808, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3809, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380a, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x380b, 0xe0);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x501f, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0x4f);
cam_i2c_write(axi_iic, device_addr, 0x4300, 0x61); // RGB565
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x73);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3824, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x380c, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x380d, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xe8);
cam_i2c_write(axi_iic, device_addr, 0x3a0d, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3a0e, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x3818, 0xc1);
cam_i2c_write(axi_iic, device_addr, 0x3705, 0xdb);
cam_i2c_write(axi_iic, device_addr, 0x370a, 0x81);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x3621, 0xc7);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x3803, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3827, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3810, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3804, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x3805, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3806, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x3807, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3a00, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x3a1a, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3a13, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a18, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a19, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x3a08, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x3a09, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3a0a, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x3a0b, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3004, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x350c, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x350d, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x3500, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x350a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3a0f, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a10, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a1b, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a1e, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a11, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3a1f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3030, 0x0b);
cam_i2c_write(axi_iic, device_addr, 0x3a02, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a03, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x3a04, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a14, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a15, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x3a16, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a00, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x3a08, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x3a09, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x3a0a, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3a0b, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x3a0d, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3a0e, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x57);
cam_i2c_write(axi_iic, device_addr, 0x3703, 0x98);
cam_i2c_write(axi_iic, device_addr, 0x3704, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x589b, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x589a, 0xc5);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5380, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5381, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5382, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5383, 0x4e);
cam_i2c_write(axi_iic, device_addr, 0x5384, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5385, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x5386, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5387, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5388, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5389, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x538a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538b, 0x31);
cam_i2c_write(axi_iic, device_addr, 0x538c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538d, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538f, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x5390, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5391, 0xab);
cam_i2c_write(axi_iic, device_addr, 0x5392, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5393, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x5394, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5480, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5481, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x5482, 0x36);
cam_i2c_write(axi_iic, device_addr, 0x5483, 0x57);
cam_i2c_write(axi_iic, device_addr, 0x5484, 0x65);
cam_i2c_write(axi_iic, device_addr, 0x5485, 0x71);
cam_i2c_write(axi_iic, device_addr, 0x5486, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x5487, 0x87);
cam_i2c_write(axi_iic, device_addr, 0x5488, 0x91);
cam_i2c_write(axi_iic, device_addr, 0x5489, 0x9a);
cam_i2c_write(axi_iic, device_addr, 0x548a, 0xaa);
cam_i2c_write(axi_iic, device_addr, 0x548b, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x548c, 0xcd);
cam_i2c_write(axi_iic, device_addr, 0x548d, 0xdd);
cam_i2c_write(axi_iic, device_addr, 0x548e, 0xea);
cam_i2c_write(axi_iic, device_addr, 0x548f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5490, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5491, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5492, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5493, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5494, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5495, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x5496, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5497, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x5498, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5499, 0x86);
cam_i2c_write(axi_iic, device_addr, 0x549a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549b, 0x5b);
cam_i2c_write(axi_iic, device_addr, 0x549c, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549d, 0x3b);
cam_i2c_write(axi_iic, device_addr, 0x549e, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549f, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x54a0, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x54a1, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x54a2, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a3, 0xed);
cam_i2c_write(axi_iic, device_addr, 0x54a4, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a5, 0xc5);
cam_i2c_write(axi_iic, device_addr, 0x54a6, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a7, 0xa5);
cam_i2c_write(axi_iic, device_addr, 0x54a8, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a9, 0x6c);
cam_i2c_write(axi_iic, device_addr, 0x54aa, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ab, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x54ac, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ad, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x54ae, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x54af, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x3406, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5192, 0x04); // 0x04
cam_i2c_write(axi_iic, device_addr, 0x5191, 0xf8); // 0xf8
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x5194, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5195, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x518d, 0x3d);
cam_i2c_write(axi_iic, device_addr, 0x518f, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x518e, 0x3d);
cam_i2c_write(axi_iic, device_addr, 0x5190, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x518b, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x518c, 0xbd);
cam_i2c_write(axi_iic, device_addr, 0x5187, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5188, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5189, 0x6e);
cam_i2c_write(axi_iic, device_addr, 0x518a, 0x68);
cam_i2c_write(axi_iic, device_addr, 0x5186, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5183, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x24);
cam_i2c_write(axi_iic, device_addr, 0x5025, 0x82);
cam_i2c_write(axi_iic, device_addr, 0x5583, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5584, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5580, 0x02); // 0x02
cam_i2c_write(axi_iic, device_addr, 0x3633, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3702, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3703, 0xb2);
cam_i2c_write(axi_iic, device_addr, 0x3704, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x370b, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x370d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x52);
cam_i2c_write(axi_iic, device_addr, 0x3c00, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0xFF);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5500, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5502, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5503, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5504, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5505, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5025, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5380, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5381, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5382, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5383, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5384, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5385, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5386, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5387, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5388, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5389, 0xE1);
cam_i2c_write(axi_iic, device_addr, 0x538A, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538B, 0x2B);
cam_i2c_write(axi_iic, device_addr, 0x538C, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538D, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538E, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538F, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5390, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5391, 0xB3);
cam_i2c_write(axi_iic, device_addr, 0x5392, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5393, 0xA6);
cam_i2c_write(axi_iic, device_addr, 0x5394, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5480, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5481, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5482, 0x2a);
cam_i2c_write(axi_iic, device_addr, 0x5483, 0x49);
cam_i2c_write(axi_iic, device_addr, 0x5484, 0x56);
cam_i2c_write(axi_iic, device_addr, 0x5485, 0x62);
cam_i2c_write(axi_iic, device_addr, 0x5486, 0x6c);
cam_i2c_write(axi_iic, device_addr, 0x5487, 0x76);
cam_i2c_write(axi_iic, device_addr, 0x5488, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5489, 0x88);
cam_i2c_write(axi_iic, device_addr, 0x548a, 0x96);
cam_i2c_write(axi_iic, device_addr, 0x548b, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x548c, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x548d, 0xcc);
cam_i2c_write(axi_iic, device_addr, 0x548e, 0xe0);
cam_i2c_write(axi_iic, device_addr, 0x548f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5490, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5491, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5492, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5493, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5494, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5495, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x5496, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5497, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x5498, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5499, 0x26);
cam_i2c_write(axi_iic, device_addr, 0x549a, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x549b, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x549c, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x549d, 0xee);
cam_i2c_write(axi_iic, device_addr, 0x549e, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x549f, 0xd8);
cam_i2c_write(axi_iic, device_addr, 0x54a0, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a1, 0xc7);
cam_i2c_write(axi_iic, device_addr, 0x54a2, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a3, 0xb3);
cam_i2c_write(axi_iic, device_addr, 0x54a4, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a5, 0x90);
cam_i2c_write(axi_iic, device_addr, 0x54a6, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a7, 0x62);
cam_i2c_write(axi_iic, device_addr, 0x54a8, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a9, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x54aa, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ab, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x54ac, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ad, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x54ae, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x54af, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x54b0, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b1, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x54b2, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b3, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x54b4, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x54b5, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x54b6, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b7, 0xdf);
cam_i2c_write(axi_iic, device_addr, 0x5583, 0x5d);
cam_i2c_write(axi_iic, device_addr, 0x5584, 0x5d);
cam_i2c_write(axi_iic, device_addr, 0x5580, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5587, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5588, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x558a, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x5589, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0xcf);
cam_i2c_write(axi_iic, device_addr, 0x5800, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x5801, 0x31);
cam_i2c_write(axi_iic, device_addr, 0x5802, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x5803, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x5804, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5805, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5806, 0x29);
cam_i2c_write(axi_iic, device_addr, 0x5807, 0x38);
cam_i2c_write(axi_iic, device_addr, 0x5808, 0x26);
cam_i2c_write(axi_iic, device_addr, 0x5809, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x580a, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x580b, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x580c, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x580d, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x580e, 0x13);
cam_i2c_write(axi_iic, device_addr, 0x580f, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5810, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x5811, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5812, 0x8);
cam_i2c_write(axi_iic, device_addr, 0x5813, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5814, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x5815, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5816, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x5817, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5818, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5819, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x581a, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x581b, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x581c, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x581d, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x581e, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x581f, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x5820, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x5821, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x5822, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x5823, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5824, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5825, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x5826, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x5827, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5828, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5829, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x582a, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x582b, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x582c, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x582d, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x582e, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x582f, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5830, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x5831, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5832, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5833, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5834, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5835, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5836, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x5837, 0x1d);
cam_i2c_write(axi_iic, device_addr, 0x5838, 0x6e);
cam_i2c_write(axi_iic, device_addr, 0x5839, 0x39);
cam_i2c_write(axi_iic, device_addr, 0x583a, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x583b, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x583c, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x583d, 0x23);
cam_i2c_write(axi_iic, device_addr, 0x583e, 0x2f);
cam_i2c_write(axi_iic, device_addr, 0x583f, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x5840, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5841, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5842, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5843, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5844, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5845, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5846, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5847, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5848, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5849, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584a, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584b, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x584c, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584d, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584e, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x584f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5850, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5851, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5852, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5853, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5854, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5855, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5856, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5857, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5858, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5859, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x585a, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585b, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585c, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585d, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x585e, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x585f, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5860, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5861, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x5862, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5863, 0x7);
cam_i2c_write(axi_iic, device_addr, 0x5864, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5865, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5866, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5867, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5868, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x5869, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x586a, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x586b, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x586c, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x586d, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x586e, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x586f, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5870, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5871, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x5872, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5873, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5874, 0x13);
cam_i2c_write(axi_iic, device_addr, 0x5875, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5876, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5877, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5878, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5879, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x587a, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x587b, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x587c, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x587d, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x587e, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x587f, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5880, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x5881, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5882, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5883, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5884, 0x1d);
cam_i2c_write(axi_iic, device_addr, 0x5885, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5886, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5887, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5680, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5681, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5684, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5685, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5180, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x52);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5183, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x24);
cam_i2c_write(axi_iic, device_addr, 0x5186, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5187, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5188, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5189, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x518a, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x518b, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x518c, 0x9c);
cam_i2c_write(axi_iic, device_addr, 0x518d, 0x36);
cam_i2c_write(axi_iic, device_addr, 0x518e, 0x34);
cam_i2c_write(axi_iic, device_addr, 0x518f, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x5190, 0x4c);
cam_i2c_write(axi_iic, device_addr, 0x5191, 0xf8);
cam_i2c_write(axi_iic, device_addr, 0x5192, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x5194, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5195, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5196, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5197, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5198, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5199, 0x2f);
cam_i2c_write(axi_iic, device_addr, 0x519a, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x519b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x519c, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x519d, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x519e, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3a0f, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a10, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a1b, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a1e, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a11, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3a1f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3800, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x3802, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x3803, 0x8);
cam_i2c_write(axi_iic, device_addr, 0x3804, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x3805, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x3806, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x3807, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3808, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x3809, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x380a, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x380b, 0x58);
cam_i2c_write(axi_iic, device_addr, 0x380c, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x380d, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xe8);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5680, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5681, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5684, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5685, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3815, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3818, 0x81); // No Mirror
cam_i2c_write(axi_iic, device_addr, 0x3621, 0xa7);
cam_i2c_write(axi_iic, device_addr, 0x4740, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x501e, 0x2a);
cam_i2c_write(axi_iic, device_addr, 0x5002, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x501f, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x4300, 0x61);
return(0);
}
だが、zocl_laps_dma_cam_dp.dts は#address-cells = <2>; #size-cells = <2>;
となっているので、size-cells が 1 つだけのようだ。よって、zocl_laps_dma_cam_dp.dts を以下のように書き換えた。#address-cells = <2>; #size-cells = <1>;
/dts-v1/; /plugin/;
/ {
fragment@0 {
target-path = "/fpga-full";
__overlay__ {
firmware-name = "lap_axis_dma_cam_dp.bit";
};
};
fragment@1 {
target-path = "/amba_pl@0";
__overlay__ {
#address-cells = <2>;
#size-cells = <1>;
zyxclmm_drm {
compatible = "xlnx,zocl";
status = "okay";
reg = <0x0 0xB0000000 0x10000>;
};
fclk0 {
compatible = "ikwzm,fclkcfg-0.10.a";
clocks = <&zynqmp_clk 0x47>;
insert-rate = "100000000";
insert-enable = <1>;
remove-rate = "1000000";
remove-enable = <0>;
};
mt9d111_inf_axis-uio {
compatible = "generic-uio";
reg = <0x0 0xA0010000 0x1000>;
};
axi_iic-uio {
compatible = "generic-uio";
reg = <0x0 0xA0011000 0x1000>;
};
disp_dmar_axis-uio {
compatible = "generic-uio";
reg = <0x0 0xA0000000 0x10000>;
};
vflip_dma_write-uio {
compatible = "generic-uio";
reg = <0x0 0xA0020000 0x10000>;
};
axi_gpio_0-uio {
compatible = "generic-uio";
reg = <0x0 0xA0012000 0x1000>;
};
axi_gpio_1-uio {
compatible = "generic-uio";
reg = <0x0 0xA0013000 0x1000>;
};
cam_dp-udmabuf4 {
compatible = "ikwzm,udmabuf-0.10.a";
device-name = "udmabuf4";
size = <0x02000000>;
};
};
};
};
fpga@ubuntu-fpga:~/Vitis_work/work_192/lap_axis_dma_cam_dp$ sudo ../dtbocfg.rb --install zocl --dts zocl_laps_dma_cam_dp.dts
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/zyxclmm_drm has a reg or ranges property, but no unit name
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/mt9d111_inf_axis-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/axi_iic-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/disp_dmar_axis-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/vflip_dma_write-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/axi_gpio_0-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200501-5715-f2mvqc: Warning (unit_address_vs_reg): Node /fragment@1/__overlay__/axi_gpio_1-uio has a reg or ranges property, but no unit name
/tmp/dtovly20200501-5715-f2mvqc: Warning (clocks_property): Property 'clocks', cell 1 is not a phandle reference in /fragment@1/__overlay__/fclk0
/tmp/dtovly20200501-5715-f2mvqc: Warning (clocks_property): Could not get phandle node for /fragment@1/__overlay__/fclk0:clocks(cell 1)
[ 6530.247049] fpga_manager fpga0: writing lap_axis_dma_cam_dp.bit to Xilinx ZynqMP FPGA Manager
[ 6530.395754] [drm] Probing for xlnx,zocl
[ 6530.395868] [drm] FPGA programming device pcap founded.
[ 6530.395873] [drm] PR Isolation addr 0x0
[ 6530.396979] [drm] Initialized zocl 2018.2.1 20180313 for b0000000.zyxclmm_drm on minor 1
[ 6530.399129] fclkcfg amba_pl@0:fclk0: driver installed.
[ 6530.399139] fclkcfg amba_pl@0:fclk0: device name : amba_pl@0:fclk0
[ 6530.399144] fclkcfg amba_pl@0:fclk0: clock name : pl0_ref
[ 6530.399149] fclkcfg amba_pl@0:fclk0: clock rate : 99999999
[ 6530.399172] fclkcfg amba_pl@0:fclk0: clock enabled : 1
[ 6530.399177] fclkcfg amba_pl@0:fclk0: remove rate : 1000000
[ 6530.399180] fclkcfg amba_pl@0:fclk0: remove enable : 0
[ 6530.421913] [drm] Pid 3335 opened device
[ 6530.422040] [drm] Pid 3335 closed device
[ 6530.427031] [drm] Pid 3335 opened device
[ 6530.427073] [drm] Pid 3335 closed device
[ 6530.429847] udmabuf udmabuf4: driver version = 1.4.6
[ 6530.429859] udmabuf udmabuf4: major number = 240
[ 6530.429864] udmabuf udmabuf4: minor number = 0
[ 6530.429870] udmabuf udmabuf4: phys address = 0x0000000071600000
[ 6530.429874] udmabuf udmabuf4: buffer size = 33554432
[ 6530.429879] udmabuf udmabuf4: dma device = amba_pl@0:cam_dp-udmabuf4
[ 6530.429883] udmabuf udmabuf4: dma coherent = 0
[ 6530.429889] udmabuf amba_pl@0:cam_dp-udmabuf4: driver installed.
#!/bin/bash
sudo ../memwrite fd4ab070 54
sudo ../memwrite fd4aa00c 01
// cam_dp_ov5642.cpp (for Ultra96)
// 2018/12/14 by marsee
//
// This software converts the left and right of the camera image to BMP file.
// -b : bmp file name
// -n : Start File Number
// -h : help
//
// 2018/12/20 : completed.
// I am using the SVGA driver register setting of https://github.com/virajkanwade/rk3188_android_kernel/blob/master/drivers/media/video/ov5642.c
// 2018/12/22 : fixed
// 2018/12/30 : ov5642_inf_axis[0] fixed
// 2019/02/06 : for DisplayPort
// 2020/04/30 : Supportted ikwzm Ubuntu 18.04 LTS
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <assert.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <string.h>
#define PIXEL_NUM_OF_BYTES 4
#define NUMBER_OF_WRITE_FRAMES 3
#define SVGA_HORIZONTAL_PIXELS 800
#define SVGA_VERTICAL_LINES 600
#define SVGA_ALL_DISP_ADDRESS (SVGA_HORIZONTAL_PIXELS * SVGA_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define SVGA_3_PICTURES (SVGA_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
#define XGA_HORIZONTAL_PIXELS 1024
#define XGA_VERTICAL_LINES 768
#define XGA_ALL_DISP_ADDRESS (XGA_HORIZONTAL_PIXELS * XGA_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define XGA_3_PICTURES (XGA_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
#define HD_HORIZONTAL_PIXELS 1920
#define HD_VERTICAL_LINES 1080
#define HD_ALL_DISP_ADDRESS (HD_HORIZONTAL_PIXELS * HD_VERTICAL_LINES * PIXEL_NUM_OF_BYTES)
#define HD_3_PICTURES (HD_ALL_DISP_ADDRESS * NUMBER_OF_WRITE_FRAMES)
int WriteBMPfile(char *bmp_file, volatile uint32_t *frame_buffer, int active_frame, int resolution);
void cam_i2c_init(volatile unsigned *ov5642_axi_iic) {
ov5642_axi_iic[64] = 0x2; // reset tx fifo ,address is 0x100, i2c_control_reg
ov5642_axi_iic[64] = 0x1; // enable i2c
}
void cam_i2x_write_sync(void) {
// unsigned c;
// c = *cam_i2c_rx_fifo;
// while ((c & 0x84) != 0x80)
// c = *cam_i2c_rx_fifo; // No Bus Busy and TX_FIFO_Empty = 1
usleep(1000);
}
void cam_i2c_write(volatile uint32_t *ov5642_axi_iic, uint32_t device_addr, uint32_t write_addr, uint32_t write_data){
ov5642_axi_iic[66] = 0x100 | (device_addr & 0xfe); // Slave IIC Write Address, address is 0x108, i2c_tx_fifo
ov5642_axi_iic[66] = (write_addr >> 8) & 0xff; // address upper byte
ov5642_axi_iic[66] = write_addr & 0xff; // address lower byte
ov5642_axi_iic[66] = 0x200 | (write_data & 0xff); // data
cam_i2x_write_sync();
}
int cam_reg_set(volatile uint32_t *axi_iic, uint32_t device_addr);
int main(int argc, char *argv[]){
int opt;
int c, help_flag=0;
char bmp_fn[256] = "bmp_file";
char attr[1024];
unsigned long phys_addr;
int file_no = -1;
int fd4, fd5, fd6, fd7, fd8, fd9, fd10, fd11;
volatile uint32_t *ov5642_inf_axis, *axi_iic, *disp_dmar_axis, *vflip_dma_write;
volatile uint32_t *axi_gpio_0, *axi_gpio_1;
volatile uint32_t *frame_buffer;
int active_frame;
int resolution;
int all_disp_addr;
resolution = 1; // XGA
while ((opt=getopt(argc, argv, "b:n:h:r:")) != -1){
switch (opt){
case 'b':
strcpy(bmp_fn, optarg);
break;
case 'n':
file_no = atoi(optarg);
printf("file_no = %d\n", file_no+1);
break;
case 'r':
resolution = atoi(optarg);
break;
case 'h':
help_flag = 1;
break;
}
}
if(resolution == 0){
printf("SVGA\n");
} else if(resolution == 1){
printf("XGA\n");
} else {
printf("HD\n");
}
if (help_flag == 1){ // help
printf("Usage : cam_capture [-b <bmp file name>] [-n <Start File Number>] [-h]\n");
printf(" -r [0|1|2](0:SVGA, 1:XGA, 2:HD)\n");
exit(0);
}
// all_disp_addr
switch(resolution){
case 0 :
all_disp_addr = SVGA_ALL_DISP_ADDRESS;
break;
case 1 :
all_disp_addr = XGA_ALL_DISP_ADDRESS;
break;
default : // 2
all_disp_addr = HD_ALL_DISP_ADDRESS;
break;
}
// ov5642_inf_axis-uio IP
fd4 = open("/dev/uio4", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd4 < 1){
fprintf(stderr, "/dev/uio4 (ov5642_inf_axis) open error\n");
exit(-1);
}
ov5642_inf_axis = (volatile unsigned *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd4, 0);
if (!ov5642_inf_axis){
fprintf(stderr, "ov5642_inf_axis mmap error\n");
exit(-1);
}
// axi_iic-uio IP
fd5 = open("/dev/uio5", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd5 < 1){
fprintf(stderr, "/dev/uio5 (axi_iic) open error\n");
exit(-1);
}
axi_iic = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd5, 0);
if (!axi_iic){
fprintf(stderr, "axi_iic mmap error\n");
exit(-1);
}
// disp_dmar_axis-uio IP
fd6 = open("/dev/uio6", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd6 < 1){
fprintf(stderr, "/dev/uio6 (disp_dmar_axis) open error\n");
exit(-1);
}
disp_dmar_axis = (volatile uint32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd6, 0);
if (!disp_dmar_axis){
fprintf(stderr, "disp_dmar_axis mmap error\n");
exit(-1);
}
// vflip_dma_write-uio IP
fd7 = open("/dev/uio7", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd7 < 1){
fprintf(stderr, "/dev/uio7 (vflip_dma_write) open error\n");
exit(-1);
}
vflip_dma_write = (volatile uint32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd7, 0);
if (!vflip_dma_write){
fprintf(stderr, "vflip_dma_write mmap error\n");
exit(-1);
}
// axi_gpio_0-uio IP (init_done output)
fd8 = open("/dev/uio8", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd8 < 1){
fprintf(stderr, "/dev/uio5 (axi_gpio_0) open error\n");
exit(-1);
}
axi_gpio_0 = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd8, 0);
if (!axi_gpio_0){
fprintf(stderr, "axi_gpio_0 mmap error\n");
exit(-1);
}
// axi_gpio_1-uio IP (active_frame input)
fd9 = open("/dev/uio9", O_RDWR|O_SYNC); // Read/Write, The chache is disable
if (fd9 < 1){
fprintf(stderr, "/dev/uio9 (axi_gpio_1) open error\n");
exit(-1);
}
axi_gpio_1 = (volatile uint32_t *)mmap(NULL, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd9, 0);
if (!axi_gpio_1){
fprintf(stderr, "axi_gpio_1 mmap error\n");
exit(-1);
}
// udmabuf4
fd10 = open("/dev/udmabuf4", O_RDWR | O_SYNC); // frame_buffer, The chache is disabled.
if (fd10 == -1){
fprintf(stderr, "/dev/udmabuf4 open error\n");
exit(-1);
}
frame_buffer = (volatile uint32_t *)mmap(NULL, all_disp_addr*NUMBER_OF_WRITE_FRAMES, PROT_READ|PROT_WRITE, MAP_SHARED, fd10, 0);
if (!frame_buffer){
fprintf(stderr, "frame_buffer4 mmap error\n");
exit(-1);
}
// phys_addr of udmabuf4
fd11 = open("/sys/class/udmabuf/udmabuf4/phys_addr", O_RDONLY);
if (fd11 == -1){
fprintf(stderr, "/sys/class/udmabuf/udmabuf4/phys_addr open error\n");
exit(-1);
}
read(fd11, attr, 1024);
sscanf(attr, "%lx", &phys_addr);
close(fd11);
printf("phys_addr = %x\n", (int)phys_addr);
// vflip_dma_write start
vflip_dma_write[6] = phys_addr; // fb0
vflip_dma_write[8] = phys_addr+all_disp_addr; // fb1
vflip_dma_write[10] = phys_addr+2*all_disp_addr; // fb2
vflip_dma_write[12] = resolution;
vflip_dma_write[0] = 0x1; // start
vflip_dma_write[0] = 0x80; // EnableAutoRestart
// CMOS Camera initialize, ov5642
cam_i2c_init(axi_iic);
cam_reg_set(axi_iic, 0x78); // OV5642 register set
ov5642_inf_axis[0] = phys_addr; // ov5642 AXI4-Stream Start
ov5642_inf_axis[1] = 0;
// disp_dmar_axis start
disp_dmar_axis[4] = phys_addr; // fb0
disp_dmar_axis[6] = phys_addr+all_disp_addr; // fb1
disp_dmar_axis[8] = phys_addr+2*all_disp_addr; // fb2
disp_dmar_axis[10] = resolution;
axi_gpio_0[0] = 1; // disp_dmar_axis start(init_done = 1)
char bmp_file[256];
// All 0 set
int all_disp_frame_index = all_disp_addr/PIXEL_NUM_OF_BYTES*NUMBER_OF_WRITE_FRAMES;
for (int i=0; i<all_disp_frame_index; i++){
frame_buffer[i] = 0x0;
}
// w - writed the left and right eye's bmp files. q - exit.
c = getc(stdin);
while(c != 'q'){
switch ((char)c) {
case 'w' : // w - writed a bmp files.
// writed the frame buffer
file_no++;
sprintf(bmp_file, "%s%d.bmp", bmp_fn, file_no);
active_frame = (int)(axi_gpio_1[0] & 0x3); // Data signal of active_frame_V
WriteBMPfile(bmp_file, frame_buffer, active_frame, resolution);
printf("file No. = %d\n", file_no);
break;
case 'e' : // e - writed a same bmp files.
// writed the frame buffer
if (file_no == -1)
file_no = 0;
sprintf(bmp_file, "%s%d.bmp", bmp_fn, file_no);
active_frame = (int)(axi_gpio_1[0] & 0x3); // Data signal of active_frame_V
WriteBMPfile(bmp_file, frame_buffer, active_frame, resolution);
printf("file No. = %d\n", file_no);
break;
}
c = getc(stdin);
}
munmap((void *)ov5642_inf_axis, 0x1000);
munmap((void *)axi_iic, 0x1000);
munmap((void *)disp_dmar_axis, 0x10000);
munmap((void *)vflip_dma_write, 0x10000);
munmap((void *)axi_gpio_0, 0x1000);
munmap((void *)axi_gpio_1, 0x1000);
munmap((void *)frame_buffer, all_disp_addr*3);
close(fd4);
close(fd5);
close(fd6);
close(fd7);
close(fd8);
close(fd9);
close(fd10);
return(0);
}
int WriteBMPfile(char *bmp_file, volatile uint32_t *frame_buffer, int active_frame, int resolution){
int read_frame;
int img_width, img_height;
if (active_frame == 0)
read_frame = 2;
else if (active_frame == 1)
read_frame = 0;
else // active_frame == 2
read_frame = 1;
switch(resolution){
case 0 :
img_width = SVGA_HORIZONTAL_PIXELS;
img_height = SVGA_VERTICAL_LINES;
break;
case 1 :
img_width = XGA_HORIZONTAL_PIXELS;
img_height = XGA_VERTICAL_LINES;
break;
default : // case 2 :
img_width = HD_HORIZONTAL_PIXELS;
img_height = HD_VERTICAL_LINES;
break;
}
int offset_addr = read_frame * img_width * img_height;
cv::Mat img(img_height, img_width, CV_8UC3);
cv::Mat_<cv::Vec3b> dst_vec3b = cv::Mat_<cv::Vec3b>(img);
for(int y=0; y<img.rows; y++){
for(int x=0; x<img.cols; x++){
cv::Vec3b pixel;
int rgb = frame_buffer[offset_addr+y*img.cols+x];
pixel[0] = (rgb & 0xff); // blue
pixel[1] = (rgb & 0xff00) >> 8; // green
pixel[2] = (rgb & 0xff0000) >> 16; // red
dst_vec3b(y,x) = pixel;
}
}
cv::imwrite(bmp_file, img);
return(0);
}
int cam_reg_set(volatile unsigned *axi_iic, uint32_t device_addr){
cam_i2c_write(axi_iic, device_addr, 0x3103, 0x93);
cam_i2c_write(axi_iic, device_addr, 0x3008, 0x82);
cam_i2c_write(axi_iic, device_addr, 0x3017, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x3018, 0xfc);
cam_i2c_write(axi_iic, device_addr, 0x3810, 0xc2);
cam_i2c_write(axi_iic, device_addr, 0x3615, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x3000, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3001, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3002, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3003, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3000, 0xf8);
cam_i2c_write(axi_iic, device_addr, 0x3001, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x3002, 0x5c);
cam_i2c_write(axi_iic, device_addr, 0x3003, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3004, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3005, 0xb7);
cam_i2c_write(axi_iic, device_addr, 0x3006, 0x43);
cam_i2c_write(axi_iic, device_addr, 0x3007, 0x37);
cam_i2c_write(axi_iic, device_addr, 0x3011, 0x08); // 0x08 - 15fps, 0x10 - 30fps
cam_i2c_write(axi_iic, device_addr, 0x3010, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x460c, 0x22);
cam_i2c_write(axi_iic, device_addr, 0x3815, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x370d, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x370c, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3602, 0xfc);
cam_i2c_write(axi_iic, device_addr, 0x3612, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x3634, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3613, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3605, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x3621, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x3622, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3604, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x3603, 0xa7);
cam_i2c_write(axi_iic, device_addr, 0x3603, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x4000, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x401d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3600, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x3605, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3606, 0x3f);
cam_i2c_write(axi_iic, device_addr, 0x3c01, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0x4f);
cam_i2c_write(axi_iic, device_addr, 0x5020, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x79);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x22);
cam_i2c_write(axi_iic, device_addr, 0x5197, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x5500, 0x0a);
cam_i2c_write(axi_iic, device_addr, 0x5504, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5505, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5080, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x300e, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x4610, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x471d, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x4708, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x3710, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3632, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x3702, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x37);
cam_i2c_write(axi_iic, device_addr, 0x3631, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x3808, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3809, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380a, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x380b, 0xe0);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x501f, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0x4f);
cam_i2c_write(axi_iic, device_addr, 0x4300, 0x61); // RGB565
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x73);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3824, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x380c, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x380d, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xe8);
cam_i2c_write(axi_iic, device_addr, 0x3a0d, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3a0e, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x3818, 0xc1);
cam_i2c_write(axi_iic, device_addr, 0x3705, 0xdb);
cam_i2c_write(axi_iic, device_addr, 0x370a, 0x81);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x3621, 0xc7);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x3803, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3827, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3810, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3804, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x3805, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3806, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x3807, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3a00, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x3a1a, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x3a13, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a18, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a19, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x3a08, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x3a09, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3a0a, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x3a0b, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3004, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x350c, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x350d, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x3500, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3501, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3502, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x350a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x350b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3a0f, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a10, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a1b, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a1e, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a11, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3a1f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3030, 0x0b);
cam_i2c_write(axi_iic, device_addr, 0x3a02, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a03, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x3a04, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a14, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a15, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x3a16, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3a00, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x3a08, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x3a09, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x3a0a, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3a0b, 0xd0);
cam_i2c_write(axi_iic, device_addr, 0x3a0d, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x3a0e, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x57);
cam_i2c_write(axi_iic, device_addr, 0x3703, 0x98);
cam_i2c_write(axi_iic, device_addr, 0x3704, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x589b, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x589a, 0xc5);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5380, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5381, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5382, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5383, 0x4e);
cam_i2c_write(axi_iic, device_addr, 0x5384, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5385, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x5386, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5387, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5388, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5389, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x538a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538b, 0x31);
cam_i2c_write(axi_iic, device_addr, 0x538c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538d, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538f, 0x0f);
cam_i2c_write(axi_iic, device_addr, 0x5390, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5391, 0xab);
cam_i2c_write(axi_iic, device_addr, 0x5392, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5393, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x5394, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5480, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5481, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x5482, 0x36);
cam_i2c_write(axi_iic, device_addr, 0x5483, 0x57);
cam_i2c_write(axi_iic, device_addr, 0x5484, 0x65);
cam_i2c_write(axi_iic, device_addr, 0x5485, 0x71);
cam_i2c_write(axi_iic, device_addr, 0x5486, 0x7d);
cam_i2c_write(axi_iic, device_addr, 0x5487, 0x87);
cam_i2c_write(axi_iic, device_addr, 0x5488, 0x91);
cam_i2c_write(axi_iic, device_addr, 0x5489, 0x9a);
cam_i2c_write(axi_iic, device_addr, 0x548a, 0xaa);
cam_i2c_write(axi_iic, device_addr, 0x548b, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x548c, 0xcd);
cam_i2c_write(axi_iic, device_addr, 0x548d, 0xdd);
cam_i2c_write(axi_iic, device_addr, 0x548e, 0xea);
cam_i2c_write(axi_iic, device_addr, 0x548f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5490, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5491, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5492, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5493, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5494, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5495, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x5496, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5497, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x5498, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5499, 0x86);
cam_i2c_write(axi_iic, device_addr, 0x549a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549b, 0x5b);
cam_i2c_write(axi_iic, device_addr, 0x549c, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549d, 0x3b);
cam_i2c_write(axi_iic, device_addr, 0x549e, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x549f, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x54a0, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x54a1, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x54a2, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a3, 0xed);
cam_i2c_write(axi_iic, device_addr, 0x54a4, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a5, 0xc5);
cam_i2c_write(axi_iic, device_addr, 0x54a6, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a7, 0xa5);
cam_i2c_write(axi_iic, device_addr, 0x54a8, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54a9, 0x6c);
cam_i2c_write(axi_iic, device_addr, 0x54aa, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ab, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x54ac, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ad, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x54ae, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x54af, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x3406, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5192, 0x04); // 0x04
cam_i2c_write(axi_iic, device_addr, 0x5191, 0xf8); // 0xf8
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x5194, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5195, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x518d, 0x3d);
cam_i2c_write(axi_iic, device_addr, 0x518f, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x518e, 0x3d);
cam_i2c_write(axi_iic, device_addr, 0x5190, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x518b, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x518c, 0xbd);
cam_i2c_write(axi_iic, device_addr, 0x5187, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5188, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5189, 0x6e);
cam_i2c_write(axi_iic, device_addr, 0x518a, 0x68);
cam_i2c_write(axi_iic, device_addr, 0x5186, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5183, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x24);
cam_i2c_write(axi_iic, device_addr, 0x5025, 0x82);
cam_i2c_write(axi_iic, device_addr, 0x5583, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5584, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5580, 0x02); // 0x02
cam_i2c_write(axi_iic, device_addr, 0x3633, 0x07);
cam_i2c_write(axi_iic, device_addr, 0x3702, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3703, 0xb2);
cam_i2c_write(axi_iic, device_addr, 0x3704, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x370b, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x370d, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3620, 0x52);
cam_i2c_write(axi_iic, device_addr, 0x3c00, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0xFF);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5500, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5502, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5503, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5504, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5505, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5025, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5300, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5301, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5302, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5303, 0x7c);
cam_i2c_write(axi_iic, device_addr, 0x530c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x530d, 0x0c);
cam_i2c_write(axi_iic, device_addr, 0x530e, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x530f, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5310, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5311, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5308, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5309, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5304, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5305, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5306, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5307, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5314, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5315, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x5319, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5316, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5317, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5318, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5380, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5381, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5382, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5383, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5384, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5385, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5386, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5387, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5388, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5389, 0xE1);
cam_i2c_write(axi_iic, device_addr, 0x538A, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538B, 0x2B);
cam_i2c_write(axi_iic, device_addr, 0x538C, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538D, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538E, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x538F, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5390, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5391, 0xB3);
cam_i2c_write(axi_iic, device_addr, 0x5392, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5393, 0xA6);
cam_i2c_write(axi_iic, device_addr, 0x5394, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5480, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5481, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5482, 0x2a);
cam_i2c_write(axi_iic, device_addr, 0x5483, 0x49);
cam_i2c_write(axi_iic, device_addr, 0x5484, 0x56);
cam_i2c_write(axi_iic, device_addr, 0x5485, 0x62);
cam_i2c_write(axi_iic, device_addr, 0x5486, 0x6c);
cam_i2c_write(axi_iic, device_addr, 0x5487, 0x76);
cam_i2c_write(axi_iic, device_addr, 0x5488, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x5489, 0x88);
cam_i2c_write(axi_iic, device_addr, 0x548a, 0x96);
cam_i2c_write(axi_iic, device_addr, 0x548b, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x548c, 0xb8);
cam_i2c_write(axi_iic, device_addr, 0x548d, 0xcc);
cam_i2c_write(axi_iic, device_addr, 0x548e, 0xe0);
cam_i2c_write(axi_iic, device_addr, 0x548f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5490, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5491, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x5492, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5493, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5494, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5495, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x5496, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5497, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x5498, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x5499, 0x26);
cam_i2c_write(axi_iic, device_addr, 0x549a, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x549b, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x549c, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x549d, 0xee);
cam_i2c_write(axi_iic, device_addr, 0x549e, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x549f, 0xd8);
cam_i2c_write(axi_iic, device_addr, 0x54a0, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a1, 0xc7);
cam_i2c_write(axi_iic, device_addr, 0x54a2, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a3, 0xb3);
cam_i2c_write(axi_iic, device_addr, 0x54a4, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a5, 0x90);
cam_i2c_write(axi_iic, device_addr, 0x54a6, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a7, 0x62);
cam_i2c_write(axi_iic, device_addr, 0x54a8, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54a9, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x54aa, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ab, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x54ac, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x54ad, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x54ae, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x54af, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x54b0, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b1, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x54b2, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b3, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x54b4, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x54b5, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x54b6, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x54b7, 0xdf);
cam_i2c_write(axi_iic, device_addr, 0x5583, 0x5d);
cam_i2c_write(axi_iic, device_addr, 0x5584, 0x5d);
cam_i2c_write(axi_iic, device_addr, 0x5580, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x5587, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5588, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x558a, 0x09);
cam_i2c_write(axi_iic, device_addr, 0x5589, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5000, 0xcf);
cam_i2c_write(axi_iic, device_addr, 0x5800, 0x48);
cam_i2c_write(axi_iic, device_addr, 0x5801, 0x31);
cam_i2c_write(axi_iic, device_addr, 0x5802, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x5803, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x5804, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5805, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5806, 0x29);
cam_i2c_write(axi_iic, device_addr, 0x5807, 0x38);
cam_i2c_write(axi_iic, device_addr, 0x5808, 0x26);
cam_i2c_write(axi_iic, device_addr, 0x5809, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x580a, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x580b, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x580c, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x580d, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x580e, 0x13);
cam_i2c_write(axi_iic, device_addr, 0x580f, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5810, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x5811, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5812, 0x8);
cam_i2c_write(axi_iic, device_addr, 0x5813, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5814, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x5815, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5816, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x5817, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5818, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5819, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x581a, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x581b, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x581c, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x581d, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x581e, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x581f, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x5820, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x5821, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x5822, 0x4);
cam_i2c_write(axi_iic, device_addr, 0x5823, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5824, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5825, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x5826, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x5827, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5828, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5829, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x582a, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x582b, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x582c, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x582d, 0x6);
cam_i2c_write(axi_iic, device_addr, 0x582e, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x582f, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5830, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x5831, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5832, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5833, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5834, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5835, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5836, 0x15);
cam_i2c_write(axi_iic, device_addr, 0x5837, 0x1d);
cam_i2c_write(axi_iic, device_addr, 0x5838, 0x6e);
cam_i2c_write(axi_iic, device_addr, 0x5839, 0x39);
cam_i2c_write(axi_iic, device_addr, 0x583a, 0x27);
cam_i2c_write(axi_iic, device_addr, 0x583b, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x583c, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x583d, 0x23);
cam_i2c_write(axi_iic, device_addr, 0x583e, 0x2f);
cam_i2c_write(axi_iic, device_addr, 0x583f, 0x41);
cam_i2c_write(axi_iic, device_addr, 0x5840, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5841, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5842, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5843, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5844, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5845, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5846, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5847, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5848, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5849, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584a, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584b, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x584c, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584d, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x584e, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x584f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5850, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5851, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5852, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5853, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5854, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5855, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5856, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5857, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x5858, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x5859, 0xe);
cam_i2c_write(axi_iic, device_addr, 0x585a, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585b, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585c, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x585d, 0xa);
cam_i2c_write(axi_iic, device_addr, 0x585e, 0x9);
cam_i2c_write(axi_iic, device_addr, 0x585f, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5860, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x5861, 0xb);
cam_i2c_write(axi_iic, device_addr, 0x5862, 0xd);
cam_i2c_write(axi_iic, device_addr, 0x5863, 0x7);
cam_i2c_write(axi_iic, device_addr, 0x5864, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5865, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5866, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5867, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x5868, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x5869, 0x12);
cam_i2c_write(axi_iic, device_addr, 0x586a, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x586b, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x586c, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x586d, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x586e, 0x18);
cam_i2c_write(axi_iic, device_addr, 0x586f, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5870, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5871, 0x16);
cam_i2c_write(axi_iic, device_addr, 0x5872, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x5873, 0xf);
cam_i2c_write(axi_iic, device_addr, 0x5874, 0x13);
cam_i2c_write(axi_iic, device_addr, 0x5875, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x5876, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5877, 0x17);
cam_i2c_write(axi_iic, device_addr, 0x5878, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5879, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x587a, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x587b, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x587c, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x587d, 0x1c);
cam_i2c_write(axi_iic, device_addr, 0x587e, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x587f, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5880, 0x1b);
cam_i2c_write(axi_iic, device_addr, 0x5881, 0x1f);
cam_i2c_write(axi_iic, device_addr, 0x5882, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5883, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5884, 0x1d);
cam_i2c_write(axi_iic, device_addr, 0x5885, 0x1e);
cam_i2c_write(axi_iic, device_addr, 0x5886, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x5887, 0x1a);
cam_i2c_write(axi_iic, device_addr, 0x528a, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x528b, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x528c, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x528d, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x528e, 0x40);
cam_i2c_write(axi_iic, device_addr, 0x528f, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x5290, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x5292, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5293, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x5294, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5295, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5296, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5297, 0x08);
cam_i2c_write(axi_iic, device_addr, 0x5298, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5299, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x529a, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529b, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x529c, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529d, 0x28);
cam_i2c_write(axi_iic, device_addr, 0x529e, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x529f, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x5282, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5680, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5681, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5684, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5685, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5180, 0xff);
cam_i2c_write(axi_iic, device_addr, 0x5181, 0x52);
cam_i2c_write(axi_iic, device_addr, 0x5182, 0x11);
cam_i2c_write(axi_iic, device_addr, 0x5183, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5184, 0x25);
cam_i2c_write(axi_iic, device_addr, 0x5185, 0x24);
cam_i2c_write(axi_iic, device_addr, 0x5186, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5187, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5188, 0x14);
cam_i2c_write(axi_iic, device_addr, 0x5189, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x518a, 0x60);
cam_i2c_write(axi_iic, device_addr, 0x518b, 0xa2);
cam_i2c_write(axi_iic, device_addr, 0x518c, 0x9c);
cam_i2c_write(axi_iic, device_addr, 0x518d, 0x36);
cam_i2c_write(axi_iic, device_addr, 0x518e, 0x34);
cam_i2c_write(axi_iic, device_addr, 0x518f, 0x54);
cam_i2c_write(axi_iic, device_addr, 0x5190, 0x4c);
cam_i2c_write(axi_iic, device_addr, 0x5191, 0xf8);
cam_i2c_write(axi_iic, device_addr, 0x5192, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x5193, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x5194, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5195, 0xf0);
cam_i2c_write(axi_iic, device_addr, 0x5196, 0x03);
cam_i2c_write(axi_iic, device_addr, 0x5197, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x5198, 0x05);
cam_i2c_write(axi_iic, device_addr, 0x5199, 0x2f);
cam_i2c_write(axi_iic, device_addr, 0x519a, 0x04);
cam_i2c_write(axi_iic, device_addr, 0x519b, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x519c, 0x06);
cam_i2c_write(axi_iic, device_addr, 0x519d, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x519e, 0xa0);
cam_i2c_write(axi_iic, device_addr, 0x3a0f, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a10, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a1b, 0x3c);
cam_i2c_write(axi_iic, device_addr, 0x3a1e, 0x30);
cam_i2c_write(axi_iic, device_addr, 0x3a11, 0x70);
cam_i2c_write(axi_iic, device_addr, 0x3a1f, 0x10);
cam_i2c_write(axi_iic, device_addr, 0x3800, 0x1);
cam_i2c_write(axi_iic, device_addr, 0x3801, 0x50);
cam_i2c_write(axi_iic, device_addr, 0x3802, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x3803, 0x8);
cam_i2c_write(axi_iic, device_addr, 0x3804, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x3805, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x3806, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x3807, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3808, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x3809, 0x20);
cam_i2c_write(axi_iic, device_addr, 0x380a, 0x2);
cam_i2c_write(axi_iic, device_addr, 0x380b, 0x58);
cam_i2c_write(axi_iic, device_addr, 0x380c, 0xc);
cam_i2c_write(axi_iic, device_addr, 0x380d, 0x80);
cam_i2c_write(axi_iic, device_addr, 0x380e, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x380f, 0xe8);
cam_i2c_write(axi_iic, device_addr, 0x5001, 0x7f);
cam_i2c_write(axi_iic, device_addr, 0x5680, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5681, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5682, 0x5);
cam_i2c_write(axi_iic, device_addr, 0x5683, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5684, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5685, 0x0);
cam_i2c_write(axi_iic, device_addr, 0x5686, 0x3);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x5687, 0xc0);
cam_i2c_write(axi_iic, device_addr, 0x3815, 0x02);
cam_i2c_write(axi_iic, device_addr, 0x3503, 0x00);
cam_i2c_write(axi_iic, device_addr, 0x3818, 0x81); // No Mirror
cam_i2c_write(axi_iic, device_addr, 0x3621, 0xa7);
cam_i2c_write(axi_iic, device_addr, 0x4740, 0x21);
cam_i2c_write(axi_iic, device_addr, 0x501e, 0x2a);
cam_i2c_write(axi_iic, device_addr, 0x5002, 0x78);
cam_i2c_write(axi_iic, device_addr, 0x501f, 0x01);
cam_i2c_write(axi_iic, device_addr, 0x4300, 0x61);
return(0);
}
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | - | - | - | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | - | - | - | - | - | - |