|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
module cvbs(clkin,clkout);
input clkin;
output clkout;
reg clkout;
//***********************************//
integer i;
always @(*)
for(i=0;i<5;i=i+1)
begin
v_pluse(clkin,clkout);
end
//**********实现场同步脉冲(M=512)**********//
task v_pluse;
input clkin;
output clkout;
reg [9:0] M=512;
reg [15:0] count=0;
always @(posedge clkin)
begin
if (count==(M-1))
count=0;
else
count=count + 1;
end
always
begin
if (count==437)
clkout=count[8];
else if (count==0)
clkout=count[8];
end
endtask
endmodule
下面是报的错:
Error (10170): Verilog HDL syntax error at cvbs.v(21) near text "always"; expecting ";", or "@", or an identifier ("always" is a reserved keyword ), or a system task, or "{", or a sequential statement,
Error (10170): Verilog HDL syntax error at cvbs.v(28) near text "always"; expecting ";", or "@", or an identifier ("always" is a reserved keyword ), or a system task, or "{", or a sequential statement,
[ 本帖最后由 libra811 于 2006-10-30 22:43 编辑 ] |
|