Initial commit

This commit is contained in:
Myfro9
2026-05-09 01:12:34 -05:00
commit 61b4731d06
44 changed files with 104560 additions and 0 deletions
@@ -0,0 +1,19 @@
// 8位计数器模块
module counter8 (
input wire clk, // 系统时钟
input wire rst_n, // 低有效复位
input wire en, // 使能信号
output reg [7:0] count, // 计数输出
output wire overflow // 溢出标志(count == 8'hFF)
);
assign overflow = (count == 8'hFF) & en;
always @(posedge clk or negedge rst_n) begin
if (!rst_n)
count <= 8'h00;
else if (en)
count <= count + 1'b1;
end
endmodule