我在quartus II 中建了个工程,实现交通灯功能,代码如下:
module t3(red,green,yellow,clk);
input clk;
output reg red,green,yellow;
parameter
on = 0,
off = 1;
initial
begin
red = off;
green = off;
yellow = off;
end
always
begin
red <= on;
count(red,50);
green <= on;
count(green,100);
yellow <= on;
count(yellow,30);
end
task count(output color,input reg[13:0] times);
repeat(times) @(posedge clk);
color <= off;
endtask
endmodule
但综合时显示没有报错,但所用资源全部为0file:///C:/t3.jpg
请问问题出在哪里? |