Motion JPEG视频压缩IP核的设计与实现之二
beginu1:fenpin port map(mclk,clr0,set,clk); //引用分频模块
u2:count8 port map(clk,clr1,set,countout8);//引用8位计数器
u3:count13 port map (clk,clr2,set,countout13);//引用13位计数器
set<='1';
clr1<='0';
dclk<=clk;
process(clk)
begin
if(clk'event and clk='1')then
if (countout13>=4096 and countout13<=4099)then
lval<='1';
data<=countout8;
else
lval<='0';
end if;
if(countout13=4099)then
dtrg<='1';
clr2<='1';
else
dtrg<='0';
clr2<='0';
end if;
if(countout13>=0 and countout13<=3071)then
data<=countout8;//输出有效像元
end if;
if (countout13>=3072 and countout13<=4095)then
data<=0;//输出零像元
end if;
end if;
end process;
end rtl;
时序仿真图如下图所示:
5总结
编译仿真通过后,在顶层用原理图进行综合实现,然后烧入芯片进行实验,并根据实际运行情况,对设计进行改进。如根据实际器件的延时特性,在设计中某些地方插入适当的延迟单元以保证各时延一致。
根据本文介绍的设计方案,采用CPLD技术设计的多路CCD图像信号模拟器结构简单,实现方便,易于修改。在图像采集卡的测试过程中,发挥了重要作用。
页:
[1]