|
发表于 2010-8-24 15:04:44
|
显示全部楼层
原文由 hsm 於 2010-8-24 14:40 發表 
跟晶片說話是難點~
我最近跟命蛙說話~它也不理我~唉~
//-----------------------------------------------------
// Design Name : counter
// File Name : counter.v
// Function : 4 bit up counter
// Coder : Deepak
// version 1.0, 2008/3/5
//-----------------------------------------------------
module counter99 (clk, reset, enable, count); // declare design module name
input clk, reset, enable;
output [3:0] count;
reg [3:0] count ;
always @ (posedge clk)
if (reset == 1'b1)
begin
count <= 0;
end
else if ( enable == 1'b1)
begin
count <= count + 1;
end
endmodule
這是第一堂課~~最簡單的範例~~
現在第四堂了~~硍~~還是看某~~
阿嚴~~您會這種東西嗎?? |
|