{"id":22880779,"url":"https://github.com/xuantie-rv/open_source_isp","last_synced_at":"2025-08-09T19:21:47.066Z","repository":{"id":39451485,"uuid":"506959420","full_name":"XUANTIE-RV/open_source_ISP","owner":"XUANTIE-RV","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-23T12:17:31.000Z","size":1521,"stargazers_count":43,"open_issues_count":0,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T05:32:23.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XUANTIE-RV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-06-24T09:52:10.000Z","updated_at":"2025-03-12T02:48:20.000Z","dependencies_parsed_at":"2024-01-16T02:09:12.852Z","dependency_job_id":null,"html_url":"https://github.com/XUANTIE-RV/open_source_ISP","commit_stats":null,"previous_names":["xuantie-rv/open_source_isp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XUANTIE-RV%2Fopen_source_ISP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XUANTIE-RV%2Fopen_source_ISP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XUANTIE-RV%2Fopen_source_ISP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XUANTIE-RV%2Fopen_source_ISP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XUANTIE-RV","download_url":"https://codeload.github.com/XUANTIE-RV/open_source_ISP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252802589,"owners_count":21806531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T17:27:12.307Z","updated_at":"2025-05-07T02:42:42.379Z","avatar_url":"https://github.com/XUANTIE-RV.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\nxk-isp is an open source image signal processor (ISP) based on Xilinx development tools. Up to now, it supports to process 12-bit raw image data of any resolution. The entire pipeline includes 17 function modules (latest 25 stages, we will update the details later) shown in the following:\n\n![输入图片说明](imgs/pipeline.png)\n\n##  File Structure\n\n```\nopenISP\n├─catapult (source file for catapult HLS)\n├─fpga\n│      host.cpp\n│      top.cpp\n│      top.h\n│      xcl2.cpp\n│      xcl2.h\n│     \n├─src\n│    isp_top.h\n│    file_define.h\n│    \"*module*\".cpp\n│    \"*module*\".h\n│    ...\n│   \n├─tb\n│     tb_\"*module*\".cpp\n│    ...\n│   \n├─tcl\n│      Makefile\n│      \"*module*\".tcl\n│      \"*module*\"_directives.tcl\n│    ...\n│   \n├─tv\n│     Makefile\n│     hls_param.txt\n│     input.raw\n│     isp\n│     readme_for_tv\n├─  LICENSE\n├─  setup_env.sh\n└─  README.md\n```\n\n\n  `fpga` contains code files for top level integration verification.\n  `src` contains source code files which are the single module of the xk-isp project and head files(`file_define.h`) for single module test.\n  `tb` contains  code files for verificating the function consistency with  Cmodel(`tv/isp`)  in the module level.\n  `tcl` contains  the scripts for  execuating the code files in the `tb`(\"*module*\".tcl) and adding the pragma command for the  code files in the `src` (\"*module*\"_directives.tcl). Makefile in the  `tcl`  is used for module level verification.\n  `tv` contains  the files for generating the test vectors. You can read the `readme_for_tv` for more details.\n`setup_env.sh`  is used to designate the development tools. (Vitis HLS or Vivado)\n# Usage\nClone this repo:\n\u003e git clone xxx.git\n\n\u003e cd xk-isp\n\n##  Environment setup\nModify `setup_env.sh` to add the installed *vivado* or *vitis hls* path under the current system. Then complete the environment setup.\n\u003e source setup_env.sh\n\n##  Test vector generate\nBefore starting the project, we need use xk-isp Cmodel `isp`to generate test vectors. These is an test image `input.raw`and default configuration  `hls_param.txt`  in `tv`.\n\u003e cd tv\n\n\u003e ./isp -i input.raw -c hls_param.txt\n\nIf you want to use your own image, please modify makefile\n\n\u003e ./isp -i \"your test image\" -c \"your configuration\"\n\n**Note**：the configuration is fixed in each module level verification. You should modify the verification code files( `tb_\"*module*\".cpp` in `tb`) to match the configuration of Cmodel. We will modify the  verification code files to read configuration file in the future update.\n\n## module level verification\nFor module level  verification, you can use the script `Makefile` in the  `tcl`. Of course, you can modify the `Makefile`as needed\n\u003e cd tcl\n\n\u003e make\n\n## Top level integration verification\nFor top level integration verification, you can use the vitis GUI. The example is shown as follows:\n1.Create a new project using the vitis. \nImport `top.h` and `top.cpp` under kernels and  `host.cpp`, `top.h`, `xcl2.cpp`, `xcl2.hpp` under host platform(x86).\n\n![输入图片说明](imgs/1.png)\n\n![输入图片说明](imgs/2.png)\n\n2.Set top file\nUnder the kernel directory, double-click `.prj` to enter its configuration interface, click ![输入图片说明](imgs/3.png) and set the “*isp_top*” function as the top level.\n\n![输入图片说明](imgs/5.png)\n\n3.Set test images path and configuration parameters\nEnter the `host.cpp`\n - image path\nModify the  \"*TOP_SRC1*\" and \"*TOP_DST1*\" to your image paths. \n - image resolution\n\"*IMAGE_HEIGHT*\" and \"*IMAGE_WIDTH*\" determine the input image height and witdh. \n\"*upper_left_x*\", \"*upper_left_y*\" , *\"lower_right_x**\" ,\"*lower_right_y*\"   determine the pixel positions of the upper left and lower right corners of the cropped image.\n\"*CROP_HEIGHT*\" and \"*CROP_WIDTH*\" determine the output image height and width. They need to be matched with  \"*upper_left_x*\", \"*upper_left_y*\" , *\"lower_right_x**\" ,\"*lower_right_y*\"\n - module configuration\n You can find them in the  `host.cpp` \n\n4.Compile and run\nClick the settings ![输入图片说明](imgs/6.png) in the Assistant window to select the target we compile (\"*emulation-SW\", \"emulation-HW\", \"HW*\")\n\n![输入图片说明](imgs/10.png)\n\n![输入图片说明](imgs/9.png)\n\nClick build ![输入图片说明](imgs/7.png) in the Assistant window to compile. Click run ![输入图片说明](imgs/8.png) to execute the project.\n\n \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuantie-rv%2Fopen_source_isp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuantie-rv%2Fopen_source_isp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuantie-rv%2Fopen_source_isp/lists"}