版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
通过FPGA和芯片实现视频处理的电路设计图像是用各种观测系统以不同形式和手段观测客观世界而获得的,可以直接或间接作用于人眼进而产生视知觉的实体。随着电子技术和计算机技术的飞速发展,数字图像技术近年来得到极大的重视和长足的发展,并在科学研究、工业生产、医疗卫生、通信等方面得到广泛的应用。视频信号由一系列连续的图像组成。对视频信号的处理已经成为数字图像处理领域中重要的一部分。例如机器人模式识别的过程就是一个视频信号处理的过程,电视制导导弹识别目标就是充分利用视频信号处理技术不断判断目标是否和预先设定目标图像一致。本篇将讲解如何用FPGA技术实现基本的视频信号处理。本篇的例子可以作为各位大侠进行视频信号处理时的一个参考,也可以在这个基础上根据需要进行扩展。第三篇内容摘要:本篇会介绍程序测试与运行,包括测试程序、测试结果以及总结等相关内容。五、程序测试与运行由于整个FPGA程序包括3部分:处于TOP的主体程序,控制其他各个部分程序的运行;视频图像数据采集程序,从SAA7113获得数字图像数据并保存到SRAM中;SRAM读写程序实现对SRAM的数据读写。测试程序需要仿真数据的全部流程。5.1测试程序测试程序代码如下:`include"timescale.v"moduletst_saa7113(error,dsprst,xreset,saareset,ARDY,ED_O,ED_OEN_O,SRAM_1_EA,SRAM_2_EA,SRAM_1_O_ED,SRAM_2_O_ED);//内部寄存器regreset;regclk;//50MHz时钟regllck;//SAA7113的时钟reg[7:0]vpo;//来自saa7113的图像数据regcapture;//采集数据标志regtoggle;//总线切换标志reg[1:0]rst;//输入inputerror;inputdsprst,xreset,saareset;inputARDY;input[7:0]ED_O;inputED_OEN_O;input[18:0]SRAM_1_EA;input[7:0]SRAM_1_O_ED;input[18:0]SRAM_2_EA;input[7:0]SRAM_2_O_ED;//来自dsp的信号regCE3_;regARE_;regAWE_;reg[21:2]EA;reg[7:0]ED_I;//TOSRAMreg[7:0]SRAM_1_IN_ED;reg[7:0]SRAM_2_IN_ED;//wires//fromsaa7113wireSRAM_CE_;wireSRAM_OE_;wireSRAM_WE_;wire[18:0]la;wire[7:0]ld;//FROMDSPwireCE_SRAM;wireWE_SRAM;wireOE_SRAM;wire[7:0]ED_SRAM;wire[18:0]EA_SRAM;//连接各个子程序LWBSAA7113L_SAA7113(.reset(reset),.clk(clk),.llck(llck),.vpo(vpo),.rst(rst),.capture(capture),.error(error),.SRAM_CE_(SRAM_CE_),.SRAM_OE_(SRAM_OE_),.SRAM_WE_(SRAM_WE_),.la(la),.ld(ld));LWBDECODEL_DECODE(.reset(reset),.CE3_(CE3_),.ARE_(ARE_),.AWE_(AWE_),.EA(EA),.ED_I(ED_I),.ED_O(ED_O),.ED_OEN_O(ED_OEN_O),.ARDY(ARDY),.EA_SRAM(EA_SRAM),.ED_SRAM(ED_SRAM),.CE_SRAM(CE_SRAM),.WE_SRAM(WE_SRAM),.OE_SRAM(OE_SRAM),.dsprst(dsprst),.xreset(xreset),.saareset(saareset));LWBBUSCHANGEL_BUSCHANGE(.EA_SRAM(EA_SRAM),.ED_SRAM(ED_SRAM),.CE_SRAM(CE_SRAM),.WE_SRAM(WE_SRAM),.OE_SRAM(OE_SRAM),.la(la),.ld(ld),.SRAM_CE_(SRAM_CE_),.SRAM_WE_(SRAM_WE_),.SRAM_OE_(SRAM_OE_),.SRAM_1_IN_ED(SRAM_1_IN_ED),.SRAM_2_IN_ED(SRAM_2_IN_ED),.toggle(toggle),.SRAM_1_EA(SRAM_1_EA),.SRAM_1_O_ED(SRAM_1_O_ED),.SRAM_2_EA(SRAM_2_EA),.SRAM_2_O_ED(SRAM_2_O_ED));//产生时钟信号always#10clk=~clk;always#20llck=~llck;initialbegin$display("status:%tTestBenchofsaa7113started!",$time);//initialvalueclk=0;#7;llck=0;//resetreset=1;//dsp初始化ARE_=1;AWE_=1;CE3_=1;//初始化capture=0;toggle=1;#2;reset=0;repeat(20)@(posedgeclk);reset=1'b1;//negatereset//dsp读取数据内容SRAM_1_IN_ED=8'h1d;SRAM_2_IN_ED=8'h2d;//dsp地址总线EA[21:16]=6'b000000;EA[15:7]=9'b000000000;EA[6:2]=5'b00001;#5;CE3_=0;ARE_=0;//saa7113输出内容capture=1;#5;@(posedgellck)vpo=8'haa;@(posedgellck)vpo=8'hbb;@(posedgellck)vpo=8'hcc;@(posedgellck)vpo=8'hdd;@(posedgellck)vpo=8'hee;//场同步信号//1@(posedgellck)vpo=8'hff;//begin@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'b00100000;//sav//2@(posedgellck)vpo=8'hff;//begin@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'b00100000;//数据开始@(posedgellck)vpo=8'hff;//begin@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'b00000000;//data@(posedgellck)vpo=8'h01;//Cb@(posedgellck)vpo=8'h02;//Yb@(posedgellck)vpo=8'h03;//Cr@(posedgellck)vpo=8'h04;//Yr--1@(posedgellck)vpo=8'h05;//Cb@(posedgellck)vpo=8'h06;//Yb@(posedgellck)vpo=8'h07;//Cr@(posedgellck)vpo=8'h08;//Yr--2@(posedgellck)vpo=8'h09;//Cb@(posedgellck)vpo=8'h0a;//Yb@(posedgellck)vpo=8'h0b;//Cr@(posedgellck)vpo=8'h0c;//Yr--3@(posedgellck)vpo=8'h0d;//Cb@(posedgellck)vpo=8'h0e;//Yb@(posedgellck)vpo=8'h0f;//Cr@(posedgellck)vpo=8'h10;//Yr--4@(posedgellck)vpo=8'h11;//Cb@(posedgellck)vpo=8'h12;//Yb@(posedgellck)vpo=8'h13;//Cr@(posedgellck)vpo=8'h14;//Yr--5@(posedgellck)vpo=8'h15;//Cb@(posedgellck)vpo=8'h16;//Yb@(posedgellck)vpo=8'h17;//Cr@(posedgellck)vpo=8'h18;//Yr--6@(posedgellck)vpo=8'h19;//Cb@(posedgellck)vpo=8'h1a;//Yb@(posedgellck)vpo=8'h1b;//Cr@(posedgellck)vpo=8'h1c;//Yr--7@(posedgellck)vpo=8'h1d;//Cb@(posedgellck)vpo=8'h1e;//Yb@(posedgellck)vpo=8'h1f;//Cr@(posedgellck)vpo=8'h20;//Yr--8@(posedgellck)vpo=8'h21;//Cb@(posedgellck)vpo=8'h22;//Yb@(posedgellck)vpo=8'h23;//Cr@(posedgellck)vpo=8'h24;//Yr--9@(posedgellck)vpo=8'h25;//Cb@(posedgellck)vpo=8'h26;//Yb@(posedgellck)vpo=8'h27;//Cr@(posedgellck)vpo=8'h28;//Yr--10@(posedgellck)vpo=8'h29;//Cb@(posedgellck)vpo=8'h3a;//Yb@(posedgellck)vpo=8'h3b;//Cr@(posedgellck)vpo=8'h3c;//Yr--11//数据结束@(posedgellck)vpo=8'hff;//ff@(posedgellck)vpo=8'h00;//00@(posedgellck)vpo=8'h00;//00@(posedgellck)vpo=8'b01110000;//endoffield1#20;ARE_=1;capture=0;#200;//开始切换toggle=0;#100;ARE_=0;//开始采集数据capture=1;//verticalblankingstage//1@(posedgellck)vpo=8'hff;//begin@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'b00100000;//sav//2@(posedgellck)vpo=8'hff;//begin@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'b00100000;//datastart@(posedgellck)vpo=8'hff;//begin@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'h00;@(posedgellck)vpo=8'b00000000;//data@(posedgellck)vpo=8'h01;//Cb@(posedgellck)vpo=8'h02;//Yb@(posedgellck)vpo=8'h03;//Cr@(posedgellck)vpo=8'h04;//Yr--1@(posedgellck)vpo=8'h05;//Cb@(posedgellck)vpo=8'h06;//Yb@(posedgellck)vpo=8'h07;//Cr@(posedgellck)vpo=8'h08;//Yr--2@(posedgellck)vpo=8'h09;//Cb@(posedgellck)vpo=8'h0a;//Yb@(posedgellck)vpo=8'h0b;//Cr@(posedgellck)vpo=8'h0c;//Yr--3@(posedgellck)vpo=8'h0d;//Cb@(posedgellck)vpo=8'h0e;//Yb@(posedgellck)vpo=8'h0f;//Cr@(posedgellck)vpo=8'h10;//Yr--4@(posedgellck)vpo=8'h11;//Cb@(posedgellck)vpo=8'h12;//Yb@(posedgellck)vpo=8'h13;//Cr@(posedgellck)vpo=8'h14;//Yr--5@(posedgellck)vpo=8'h15;//Cb@(posedgellck)vpo=8'h16;//Yb@(posedgellck)vpo=8'h17;//Cr@(posedgellck)vpo=8'h18;//Yr--6@(posedgellck)vpo=8'h19;//Cb@(posedgellck)vpo=8'h1a;//Yb@(posedgellck)vpo=8'h1b;//Cr@(posedgellck)vpo=8'h1c;//Yr--7@(posedgellck)vpo=8'h1d;//Cb@(posedgellck)vpo=8'h1e;//Yb@(posedgellck)vpo=8'h1f;//Cr@(posedgellck)vpo=8'h20;//Yr--8@(posedgellck)vpo=8'h21;//Cb@(posedgellck)vpo=8'h22;//Yb@(posedgellck)vpo=8'h23;//Cr@(posedgellck)vpo=8'h24;//Yr--9@(posedgellck)vpo=8'h25;//Cb@(posedgellck
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 生物支架设计优化-第1篇-洞察与解读
- 初中地理八年级下册大概念统摄复习教案-从区域认知到人地协调观的全息建构
- 小学科学一年级下册《校园模型设计师》项目式学习教案
- 小学英语三年级下册单元整合复习教案
- 初中七年级英语下册Unit5Reading1深度学习与素养导向教案
- 慢阻肺患者护理研究进展
- 心梗患者整体护理模式
- 隐喻在初中《道德与法治》教学中的应用研究
- 守门员扑点球动作预判的眼动特征研究
- 考虑乘客信任程度的营运车辆合乘线路规划研究
- JJF 2214-2025 机动车检测用气象单元校准规范
- 电网络分析知到智慧树期末考试答案题库2025年浙江大学
- T/CECS 10284-2023输配水阀门防腐涂层工艺及性能通用技术条件
- 临沂市平邑县事业单位招聘教师笔试真题2024
- 2025年广东广州市高三二模高考数学试卷试题(含答案详解)
- 班本课程:颜色蹦蹦跳(小班)
- 环境卫生考核细则和考核办法
- 企业内部沟通与协作机制优化研究
- 广东广州历年中考作文题及审题指导(2001-2024)
- 英语等级考试《PETS一级》试题真题及答案三
- 煤炭购销居间合同协议书
评论
0/150
提交评论