mirror of
https://github.com/pConst/basic_verilog.git
synced 2025-01-14 06:42:54 +08:00
27 lines
670 B
Coq
27 lines
670 B
Coq
|
//--------------------------------------------------------------------------------
|
|||
|
// ClkDivider.v
|
|||
|
// Konstantin Pavlov, pavlovconst@gmail.com
|
|||
|
//--------------------------------------------------------------------------------
|
|||
|
|
|||
|
// INFO --------------------------------------------------------------------------------
|
|||
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
|||
|
module ClkDivider(clk,nrst,out);
|
|||
|
|
|||
|
input wire clk;
|
|||
|
input wire nrst;
|
|||
|
output reg [(WIDTH-1):0] out = 0;
|
|||
|
|
|||
|
parameter WIDTH = 32;
|
|||
|
|
|||
|
always @ (posedge clk) begin
|
|||
|
if (~nrst) begin
|
|||
|
out <= 0;
|
|||
|
end
|
|||
|
else begin
|
|||
|
out <= out + 1;
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
endmodule
|