修改一些说明

main
阳光少年 8 months ago
parent f0caf83860
commit 26044eecd5

@ -41,34 +41,33 @@ always @(posedge sys_clk or negedge sys_rst) begin
end
end
reg [2:0]ram_data; // , 0~7, ram_rw
reg [2:0]ram_addr; // 0~7
always @(posedge sys_clk or negedge sys_rst) begin
if (!sys_rst) begin
ram_data <= 3'b0;
ram_addr <= 3'b0;
end
// ,
else if (ram_rw && ram_data < 3'b111) begin
ram_data <= ram_data + 3'b1;
else if (ram_en && ram_addr < 3'b111) begin
ram_addr <= ram_addr + 3'b1;
end
else begin
ram_data <= 3'b0;
ram_addr <= 3'b0;
end
end
reg [2:0]ram_addr; // 0~7
reg [2:0]ram_data; // , 0~7, ram_rw
always @(posedge sys_clk or negedge sys_rst) begin
if (!sys_rst) begin
ram_addr <= 3'b0;
ram_data <= 3'b0;
end
else if (ram_en && ram_addr < 3'b111) begin
ram_addr <= ram_addr + 3'b1;
// ,
else if (ram_rw && ram_data < 3'b111) begin
ram_data <= ram_data + 3'b1;
end
else begin
ram_addr <= 3'b0;
ram_data <= 3'b0;
end
end
endmodule
Loading…
Cancel
Save