Add yocto register definition and a TPG test configuration
* Define yocto system register address map
* Add a TPG test in raw and bypass modes with 128x64 resolution
Change-Id: I29f0716160fb741c2a29a45fc958aad6db4417ee
diff --git a/ispyocto/dv/test/tc_vi_case_0016/dump_register_frame0.txt b/ispyocto/dv/test/tc_vi_case_0016/dump_register_frame0.txt
new file mode 100644
index 0000000..c6e1e7a
--- /dev/null
+++ b/ispyocto/dv/test/tc_vi_case_0016/dump_register_frame0.txt
@@ -0,0 +1,157 @@
+0 00000b00 ffffffff
+0 00000ef8 ffffffff
+0 00000000 00000002
+0 00000010 00000059
+0 00000014 00000000
+0 00000408 00000000
+0 0000040c 00000000
+0 00000410 00000080
+0 00000414 00000040
+0 00000504 00bfc25f
+0 00000508 00200040
+0 0000050c 002bc11b
+0 00000510 0039c0a7
+0 00000514 003a405d
+0 00000518 000a8015
+0 0000051c 00000010
+0 00000520 b6ccff1c
+0 00000524 00000001
+0 00000604 00000000
+0 00000608 00000000
+0 0000060c 00000080
+0 00000610 00000040
+0 00000700 00000001
+0 00000704 00000000
+0 00000708 00000000
+0 0000070c 00000000
+0 00000710 00000000
+0 00000720 00000000
+0 00000724 00000012
+0 00000728 0000001f
+0 0000072c 00000012
+0 00000730 00000004
+0 00000800 006600ba
+0 00000804 00dd00e3
+0 00000810 00000462
+0 00000814 00000a12
+0 00000818 0000036d
+0 0000081c 0000028e
+0 00000820 000003c8
+0 00000824 000003e2
+0 00000828 000259b5
+0 0000082c 0000003e
+0 00000830 0000003d
+0 00000834 0000002c
+0 00000838 00000021
+0 0000083c 0000000c
+0 00000870 0000000a
+0 00000874 00200040
+0 00000878 01f4018c
+0 0000087c 012e01ca
+0 00000880 003401a4
+0 00000884 00030008
+0 00000888 00020015
+0 00000900 00000001
+0 00000904 000001ae
+0 00000908 000002b0
+0 0000090c 000002db
+0 00000910 000002f9
+0 00000914 000002fd
+0 00000918 000002fe
+0 0000091c 000002fe
+0 00000920 000002fe
+0 00000924 000002fe
+0 00000928 000002fe
+0 0000092c 000002fe
+0 00000930 000002fe
+0 00000934 000002fe
+0 00000938 000002fe
+0 0000093c 000002fe
+0 00000940 000002fe
+0 00000944 000002fe
+0 00000950 80000007
+0 00000954 0000005b
+0 00000958 00000022
+0 0000095c 00000005
+0 00000960 00000009
+0 00000964 00000000
+0 00000968 00006b55
+0 0000096c eaef51fa
+0 00000a00 00000004
+0 00000a04 0000011b
+0 00000a08 000001af
+0 00000a0c 000001e0
+0 00000a10 00000020
+0 00000a14 00000140
+0 00000a18 00000053
+0 00000a1c 0000002e
+0 00000a20 000001b7
+0 00000a24 00000001
+0 00000a30 00000588
+0 00000a34 000005d9
+0 00000a38 000004ea
+0 00000a3c 000004f9
+0 00000a40 0000031e
+0 00000a44 000006db
+0 00000a48 000004f6
+0 00000a4c 00000307
+0 00000a50 00000085
+0 00000a54 00000310
+0 00000a58 00000592
+0 00000a5c 00000d58
+0 00000b00 000400fc
+0 00000b18 00000001
+0 00000e08 5a000000
+0 00000e0c 0000a800
+0 00000e10 00000000
+0 00000e18 00000000
+0 00000e1c 5a00a800
+0 00000e20 00005400
+0 00000e24 00000000
+0 00000e2c 5a00a800
+0 00000e30 00005400
+0 00000e34 00000000
+0 00000ef8 000003ff
+0 00000f10 00000053
+0 00000f30 5a01f800
+0 00000f34 5a02a000
+0 00000f38 5a02f800
+0 00000f50 00000080
+0 00000f5c 00000401
+0 00000f60 00000000
+0 00000f64 00000080
+0 00000f68 00000040
+0 00000f6c 00002000
+0 00001000 0000011c
+0 00001004 0000c177
+0 00001008 0000ec82
+0 0000100c 00000057
+0 00001010 000075d8
+0 00001014 000075d8
+0 00001018 00000000
+0 0000101c 00000000
+0 00001020 00000000
+0 00001024 00000000
+0 0000106c 000000fa
+0 00000e3c 2354d5f8
+0 00000e40 00008000
+0 00000e44 00000000
+0 00000e4c 00000080
+0 00000e50 9fff2d98
+0 00000e54 01673858
+0 00000e58 00000000
+0 00000e60 d3bbca68
+0 00000e64 0f8bf230
+0 00000e68 00000000
+0 00000f14 00000080
+0 00000f18 00000040
+0 00000f1c 00002000
+0 00000f3c 1939f6d8
+0 00000f40 f9f91948
+0 00000f44 8335a0b0
+0 00000404 00000089
+0 00001000 0000011c
+0 00000400 80007250
+0 00000500 00000d95
+0 00000e00 68360808
+0 00000e04 000000b0
diff --git a/ispyocto/dv/test/tc_vi_case_0016/isp_test_description.md b/ispyocto/dv/test/tc_vi_case_0016/isp_test_description.md
new file mode 100644
index 0000000..977b458
--- /dev/null
+++ b/ispyocto/dv/test/tc_vi_case_0016/isp_test_description.md
@@ -0,0 +1,19 @@
+|ISP pipeline release case for soc| |
+| :----: | :----: |
+|case type|TPG MP RAW|
+|BYPASS MODE|1|
+|Y base address|0x5a000000|
+|Y size|0x0000a800|
+|Cb/Cr base address|0x5a00a800|
+|Cb/Cr size|0x00005400|
+|case function|TPG resolution 128 * 64|
+|frame num|1|
+|input| |
+|in__x000D_hsize|128|
+|in__x000D_vsize|64|
+|data_type|gray bar|
+|data mode|8-bit bayer|
+|output| |
+|mp out_format|RAW|
+|mp out_hsize|128|
+|mp out_vsize|64|
diff --git a/ispyocto/include/BUILD b/ispyocto/include/BUILD
new file mode 100644
index 0000000..d0a37bd
--- /dev/null
+++ b/ispyocto/include/BUILD
@@ -0,0 +1,11 @@
+# Copyright 2023 Google LLC
+# Copyright 2023 Vivante Corporation
+# Licensed under the Apache License, Version 2.0, see LICENSE for details.
+# SPDX-License-Identifier: Apache-2.0
+
+package(default_visibility = ["//visibility:public"])
+
+filegroup(
+ name = "all_files",
+ srcs = glob(["**"]),
+)
diff --git a/ispyocto/include/yocto_isp_register_address.h b/ispyocto/include/yocto_isp_register_address.h
new file mode 100644
index 0000000..8b148fe
--- /dev/null
+++ b/ispyocto/include/yocto_isp_register_address.h
@@ -0,0 +1,201 @@
+/*
+ * Copyright 2023 Google LLC
+ * Copyright 2023 Vivante Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/************************************************/
+/* Yocto ISP register address enumeration */
+/************************************************/
+#ifndef ISPYOCTO_INCLUDE_YOCTO_ISP_REGISTER_ADDRESS_H_
+#define ISPYOCTO_INCLUDE_YOCTO_ISP_REGISTER_ADDRESS_H_
+enum register_address_index{
+ VI_CCL = 0x00000000,
+ VI_ICCL = 0x00000010,
+ VI_IRCL = 0x00000014,
+ ISP_CTRL = 0x00000400,
+ ISP_ACQ_PROP = 0x00000404,
+ ISP_ACQ_H_OFFS = 0x00000408,
+ ISP_ACQ_V_OFFS = 0x0000040c,
+ ISP_ACQ_H_SIZE = 0x00000410,
+ ISP_ACQ_V_SIZE = 0x00000414,
+ ISP_TPG_CTRL = 0x00000500,
+ ISP_TPG_TOTAL_IN = 0x00000504,
+ ISP_TPG_ACT_IN = 0x00000508,
+ ISP_TPG_FP_IN = 0x0000050c,
+ ISP_TPG_BP_IN = 0x00000510,
+ ISP_TPG_W_IN = 0x00000514,
+ ISP_TPG_GAP_IN = 0x00000518,
+ ISP_TPG_GAP_STD_IN = 0x0000051c,
+ ISP_TPG_RANDOM_SEED = 0x00000520,
+ ISP_TPG_FRAME_NUM = 0x00000524,
+ ISP_FRAME_RATE = 0x00000600,
+ ISP_OUT_H_OFFS = 0x00000604,
+ ISP_OUT_V_OFFS = 0x00000608,
+ ISP_OUT_H_SIZE = 0x0000060c,
+ ISP_OUT_V_SIZE = 0x00000610,
+ ISP_BINNING_BASE = 0x00000624,
+ ISP_BINNING_NUM = 0x00000628,
+ ISP_BLS_CTRL = 0x00000700,
+ ISP_BLS_A_FIXED = 0x00000704,
+ ISP_BLS_B_FIXED = 0x00000708,
+ ISP_BLS_C_FIXED = 0x0000070c,
+ ISP_BLS_D_FIXED = 0x00000710,
+ ISP_EXP_CONF = 0x00000720,
+ ISP_EXP_H_OFFSET = 0x00000724,
+ ISP_EXP_V_OFFSET = 0x00000728,
+ ISP_EXP_H_SIZE = 0x0000072c,
+ ISP_EXP_V_SIZE = 0x00000730,
+ ISP_DGAIN_RB = 0x00000800,
+ ISP_DGAIN_G = 0x00000804,
+ ISP_DEMOSAIC = 0x00000810,
+ ISP_FILT_MODE = 0x00000814,
+ ISP_FILT_THRES_BL0 = 0x00000818,
+ ISP_FILT_THRES_BL1 = 0x0000081c,
+ ISP_FILT_THRES_SH0 = 0x00000820,
+ ISP_FILT_THRES_SH1 = 0x00000824,
+ ISP_FILT_LUM_WEIGHT = 0x00000828,
+ ISP_FILT_FAC_SH1 = 0x0000082c,
+ ISP_FILT_FAC_SH0 = 0x00000830,
+ ISP_FILT_FAC_MID = 0x00000834,
+ ISP_FILT_FAC_BL0 = 0x00000838,
+ ISP_FILT_FAC_BL1 = 0x0000083c,
+ ISP_CAC_CTRL = 0x00000870,
+ ISP_CAC_COUNT_START = 0x00000874,
+ ISP_CAC_A = 0x00000878,
+ ISP_CAC_B = 0x0000087c,
+ ISP_CAC_C = 0x00000880,
+ ISP_CAC_X_NORM = 0x00000884,
+ ISP_CAC_Y_NORM = 0x00000888,
+ ISP_GAMMA_OUT_MODE = 0x00000900,
+ ISP_GAMMA_OUT_Y_0 = 0x00000904,
+ ISP_GAMMA_OUT_Y_1 = 0x00000908,
+ ISP_GAMMA_OUT_Y_2 = 0x0000090c,
+ ISP_GAMMA_OUT_Y_3 = 0x00000910,
+ ISP_GAMMA_OUT_Y_4 = 0x00000914,
+ ISP_GAMMA_OUT_Y_5 = 0x00000918,
+ ISP_GAMMA_OUT_Y_6 = 0x0000091c,
+ ISP_GAMMA_OUT_Y_7 = 0x00000920,
+ ISP_GAMMA_OUT_Y_8 = 0x00000924,
+ ISP_GAMMA_OUT_Y_9 = 0x00000928,
+ ISP_GAMMA_OUT_Y_10 = 0x0000092c,
+ ISP_GAMMA_OUT_Y_11 = 0x00000930,
+ ISP_GAMMA_OUT_Y_12 = 0x00000934,
+ ISP_GAMMA_OUT_Y_13 = 0x00000938,
+ ISP_GAMMA_OUT_Y_14 = 0x0000093c,
+ ISP_GAMMA_OUT_Y_15 = 0x00000940,
+ ISP_GAMMA_OUT_Y_16 = 0x00000944,
+ ISP_AWB_PROP = 0x00000950,
+ ISP_AWB_H_OFFS = 0x00000954,
+ ISP_AWB_V_OFFS = 0x00000958,
+ ISP_AWB_H_SIZE = 0x0000095c,
+ ISP_AWB_V_SIZE = 0x00000960,
+ ISP_AWB_FRAMES = 0x00000964,
+ ISP_AWB_REF = 0x00000968,
+ ISP_AWB_THRESH = 0x0000096c,
+ ISP_CC_COEFF_0 = 0x00000a00,
+ ISP_CC_COEFF_1 = 0x00000a04,
+ ISP_CC_COEFF_2 = 0x00000a08,
+ ISP_CC_COEFF_3 = 0x00000a0c,
+ ISP_CC_COEFF_4 = 0x00000a10,
+ ISP_CC_COEFF_5 = 0x00000a14,
+ ISP_CC_COEFF_6 = 0x00000a18,
+ ISP_CC_COEFF_7 = 0x00000a1c,
+ ISP_CC_COEFF_8 = 0x00000a20,
+ FORMAT_CONV_CTRL = 0x00000a24,
+ ISP_CT_COEFF_0 = 0x00000a30,
+ ISP_CT_COEFF_1 = 0x00000a34,
+ ISP_CT_COEFF_2 = 0x00000a38,
+ ISP_CT_COEFF_3 = 0x00000a3c,
+ ISP_CT_COEFF_4 = 0x00000a40,
+ ISP_CT_COEFF_5 = 0x00000a44,
+ ISP_CT_COEFF_6 = 0x00000a48,
+ ISP_CT_COEFF_7 = 0x00000a4c,
+ ISP_CT_COEFF_8 = 0x00000a50,
+ ISP_CT_OFFSET_R = 0x00000a54,
+ ISP_CT_OFFSET_G = 0x00000a58,
+ ISP_CT_OFFSET_B = 0x00000a5c,
+ ISP_IMSC = 0x00000b00,
+ ISP_RIS = 0x00000b04,
+ ISP_MIS = 0x00000b08,
+ ISP_ICR = 0x00000b0c,
+ ISP_ISR = 0x00000b10,
+ ISP_ERR_CLR = 0x00000b18,
+ ISP_MRSZ_BASE = 0x00000c00,
+ ISP_MRSZ_SCALE_HY = 0x00000c04,
+ ISP_MRSZ_SCALE_HCB = 0x00000c08,
+ ISP_MRSZ_SCALE_HCR = 0x00000c0C,
+ ISP_MRSZ_SCALE_VY = 0x00000c10,
+ ISP_MRSZ_SCALE_VC = 0x00000c14,
+ ISP_MRSZ_PHASE_HY = 0x00000c18,
+ ISP_MRSZ_PHASE_HC = 0x00000c1C,
+ ISP_MRSZ_PHASE_VY = 0x00000c20,
+ ISP_MRSZ_PHASE_VC = 0x00000c24,
+ ISP_MRSZ_FORMAT_CONV_CTRL = 0x00000c6c,
+ MI_CTRL = 0x00000e00,
+ MI_INIT = 0x00000e04,
+ MI_MP_Y_BASE_AD_INIT = 0x00000e08,
+ MI_MP_Y_SIZE_INIT = 0x00000e0c,
+ MI_MP_Y_OFFS_CNT_INIT = 0x00000e10,
+ MI_MP_Y_IRQ_OFFS_INIT = 0x00000e18,
+ MI_MP_CB_BASE_AD_INIT = 0x00000e1c,
+ MI_MP_CB_SIZE_INIT = 0x00000e20,
+ MI_MP_CB_OFFS_CNT_INIT = 0x00000e24,
+ MI_MP_CR_BASE_AD_INIT = 0x00000e2c,
+ MI_MP_CR_SIZE_INIT = 0x00000e30,
+ MI_MP_CR_OFFS_CNT_INIT = 0x00000e34,
+ MI_SP_Y_BASE_AD_INIT = 0x00000e3c,
+ MI_SP_Y_SIZE_INIT = 0x00000e40,
+ MI_SP_Y_OFFS_CNT_INIT = 0x00000e44,
+ MI_SP_Y_LLENGTH = 0x00000e4c,
+ MI_SP_CB_BASE_AD_INIT = 0x00000e50,
+ MI_SP_CB_SIZE_INIT = 0x00000e54,
+ MI_SP_CB_OFFS_CNT_INIT = 0x00000e58,
+ MI_SP_CR_BASE_AD_INIT = 0x00000e60,
+ MI_SP_CR_SIZE_INIT = 0x00000e64,
+ MI_SP_CR_OFFS_CNT_INIT = 0x00000e68,
+ MI_IMSC = 0x00000ef8,
+ MI_RIS = 0x00000efc,
+ MI_MIS = 0x00000f00,
+ MI_ICR = 0x00000f04,
+ MI_ISR = 0x00000f08,
+ MI_STATUS_CLR = 0x00000f10,
+ MI_SP_Y_PIC_WIDTH = 0x00000f14,
+ MI_SP_Y_PIC_HEIGHT = 0x00000f18,
+ MI_SP_Y_PIC_SIZE = 0x00000f1c,
+ MI_MP_Y_BASE_AD_INIT2 = 0x00000f30,
+ MI_MP_CB_BASE_AD_INIT2 = 0x00000f34,
+ MI_MP_CR_BASE_AD_INIT2 = 0x00000f38,
+ MI_SP_Y_BASE_AD_INIT2 = 0x00000f3c,
+ MI_SP_CB_BASE_AD_INIT2 = 0x00000f40,
+ MI_SP_CR_BASE_AD_INIT2 = 0x00000f44,
+ MI_MP_Y_LLENGTH = 0x00000f50,
+ MI_OUTPUT_ALIGN_FORMAT = 0x00000f5c,
+ MI_MP_OUTPUT_FIFO_SIZE = 0x00000f60,
+ MI_MP_Y_PIC_WIDTH = 0x00000f64,
+ MI_MP_Y_PIC_HEIGHT = 0x00000f68,
+ MI_MP_Y_PIC_SIZE = 0x00000f6c,
+ SRSZ_CTRL = 0x00001000,
+ SRSZ_SCALE_HY = 0x00001004,
+ SRSZ_SCALE_HCB = 0x00001008,
+ SRSZ_SCALE_HCR = 0x0000100c,
+ SRSZ_SCALE_VY = 0x00001010,
+ SRSZ_SCALE_VC = 0x00001014,
+ SRSZ_PHASE_HY = 0x00001018,
+ SRSZ_PHASE_HC = 0x0000101c,
+ SRSZ_PHASE_VY = 0x00001020,
+ SRSZ_PHASE_VC = 0x00001024,
+ SRSZ_FORMAT_CONV_CTRL = 0x0000106c,
+};
+#endif // ISPYOCTO_INCLUDE_YOCTO_ISP_REGISTER_ADDRESS_H_