level 8
专业代做FPGA方面的相关项目(ISE/QII,Verilog/VHDL CPLD)专业代做FPGA方面的相关项目(ISE/QII,Verilog/VHDL CPLD)精通vhdl verilog。ise modelsim等各种编程,专业值得信赖,详情请加qq1210584701,淘宝交易
2012年07月02日 05点07分
1
level 1
楼主,下面这段是VHDL语言吗?
module ccd(clk,sh,s1,s2,rs,cp,clr);--定义时钟信号,复位信号和脉冲信号
input clk;
input clr;
output sh,s1,s2,rs,cp;
reg[11:0]count; --设置count为12位reg型用于对时钟个数计数
reg[40:0]bb; --定义bb和ars从0到40的变量
reg[40:0]ars;
reg sh,s1,s2,cp,rs;
always@(posedge clk or negedge clr)
begin --使ars保持1~16位的反复循环
if(clr==0)
ars=1;
else if(count==0)
ars=1;
else if(ars==16)
ars=1;
else
ars=ars+1;
end
always@(posedge clk)
begin --使cp和rs保持1MHZ输出,且保持1:3的占空比
if(count>8&&count<32)
cp=0;
else
cp=(ars<3&&ars>0)?1:0;
end
always@(negedge clk)
begin
if(count>8&&count<32)
rs=0;
else
rs=(ars<3&&ars>0)?1:0;
end
always@(posedge clk or negedge clr)
begin --使count保持0~3725的循环,因为本课题采用
if(clr==0) --的ccd有OS1和OS2两个输出端,
count<=0;
else if(count==3725)
count<=0; --TCD1708有7450个像元
else
count<=count+1;
end
endmodule
2013年05月22日 09点05分
14