




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
通过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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 广东省深圳市桃源居中澳实验学校2025-2026学年高三上学期第一次月考历史试题
- 应届生安全培训内容
- 巡防安全卫士培训内容课件
- 2025年电商应用与品牌市场洞察分析报告
- 岩石学课件地大北京
- 输电安全培训特色亮点课件
- 小鸭过河课件
- 高级管理人员劳动局认可的特殊待遇劳动合同模板
- 多种担保保证方式在工程项目中的应用合同
- 个人股权变更及收益分配合同
- 5.2 氮及其化合物 课件高一下学期化学人教版(2019)必修第二册
- 城市道路与开放空间低影响开发雨水设施
- 历年学宪法讲宪法知识竞赛题(含答案)真题题库及参考答案(基础题)
- 装配式建筑装饰装修技术 课件 模块七 集成卫浴
- 人体解剖学(江西中医药大学)智慧树知到期末考试答案章节答案2024年江西中医药大学
- 2024-2030年中国移动DR产业发展动态及未来趋势预测报告
- 高中物理必修三第九章《静电场及其应用》测试题(有答案解析)
- 运梁车司机安全培训试题
- 市政道路工程竣工验收报告
- 机械制图(第2版)高职全套教学课件
- 钬激光前列腺剜除术培训课件
评论
0/150
提交评论