摘要:
一段式状态机: 1 reg[3:0] cs, ns; 2 always @(posedge clk or negedge rst_n) begin 3 if (!rst_n) begin 4 cs <= IDLE; 5 cmd <= 3'b111; 6 end 7 else begin 8 case 阅读全文
摘要:
异步复位实例: 1 module async_rst ( 2 input din, 3 input clk, 4 input rst_n, 5 6 output reg dout 7 ); 8 9 always @ (posedge clk or negedge rst_n) 10 begin 11 阅读全文