以下是代码片段:
reg [3:0] key_press_r; reg [3:0] key_press_rr; wire [3:0] countdown_value_set;
reg key_countdown_r; reg key_countdown_rr; wire key_countdown_start; always @(posedge clk,negedge rst_n) begin if(!rst_n) begin key_press_r <= 1'b0; key_press_rr <= 1'b0; key_countdown_r <= 1'b0; key_countdown_rr <= 1'b0; end else begin key_press_r <= key_press; key_press_rr <= key_press_r; key_countdown_r <= key_countdown; key_countdown_rr <= key_countdown_r; end end
|
用户403664 2014-5-8 15:00
用户349856 2014-5-3 20:40