day5 22/01/21

博客主要提及使用寄存器点亮stm32单片机,这属于嵌入式硬件开发范畴,涉及到单片机的操作与控制。

寄存器点亮stm32单片机!

后面赶赶进度啊

module CODE_B( input wire clk_125mhz, input wire rst_n, input wire ex_CODE, output reg [3:0] second_gewei, output reg [2:0] second_shiwei, output reg [3:0] min_gewei, output reg [2:0] min_shiwei, output reg [3:0] hour_gewei, output reg [1:0] hour_shiwei, output reg [3:0] day_gewei, output reg [3:0] day_shiwei, output reg [1:0] day_baiwei, output reg [3:0] year_gewei, output reg [3:0] year_shiwei ); reg ex_CODE_r1 = 1'b0; //ex == ex_device_b_code_r1 reg ex_CODE_r2 = 1'b0; reg ex_CODE_r3 = 1'b0; reg fall = 1'b0; //fall == ex_device_b_code_fall_edge reg fall_r1 = 1'b0; reg fall_r2 = 1'b0; reg fall_r3 = 1'b0; reg fall_r4 = 1'b0; reg fall_r5 = 1'b0; reg fall_r6 = 1'b0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin ex_CODE_r1 <= 1'b0; ex_CODE_r2 <= 1'b0; ex_CODE_r3 <= 1'b0; fall <= 1'b0; fall_r1 <= 1'b0; fall_r2 <= 1'b0; fall_r3 <= 1'b0; fall_r4 <= 1'b0; fall_r5 <= 1'b0; fall_r6 <= 1'b0; end else begin ex_CODE_r1 <= ex_CODE; ex_CODE_r2 <= ex_CODE_r1; ex_CODE_r3 <= ex_CODE_r2; fall <= (~ex_CODE_r2) && ex_CODE_r3; fall_r1 <= fall; fall_r2 <= fall_r1; fall_r3 <= fall_r2; fall_r4 <= fall_r3; fall_r5 <= fall_r4; fall_r6 <= fall_r5; end end reg [31:0] high = 32'd0; //high == b_code_high_cycles_cnt always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin high <= 32'd0; end else if(fall_r6) begin high <= 32'd0; end else if(ex_CODE) begin high <= high + 1'b1; end else begin high <= high; end end //////////latch pre bcode high time reg [31:0] pre_high = 32'd0; //pre_high == previous_b_code_high_time_cnt always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin pre_high <= 32'd0; end else if(fall) begin pre_high <= high; end end //////识别b码开始位置, 参数定义 localparam time_2us = 250;/////误差值 localparam TIME_8MS = 1000; localparam TIME_5MS = 625; localparam TIME_2MS = 250; reg start = 1'b0; reg [7:0] start_fallnum = 8'd0; //start_fall_edge_num always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin start <= 1'b0; //start == CODE_B_start end else if(start_fallnum >= 8'd80) begin start <= 1'b0; end else if(fall && (pre_high >= (TIME_8MS - time_2us)) && (pre_high <= (TIME_8MS + time_2us)) && (high >= (TIME_8MS - time_2us)) && (high <= (TIME_8MS + time_2us))) begin start <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin start_fallnum <= 8'd0; end else if(~start) begin start_fallnum <= 8'd0; end else if(start && fall) begin start_fallnum <= start_fallnum + 1'b1; end end ///////判决当前码元是0码 1码 P码 reg [1:0] decode_0_1_p = 2'b00; /////0:2'b00 1:2'b01 P:2'b11 always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin decode_0_1_p <= 2'b00; end else begin if(fall && (high >= (TIME_8MS - time_2us)) && (high <= (TIME_8MS + time_2us))) begin decode_0_1_p <= 2'b11;/////判决为P码 end if(fall && (high >= (TIME_5MS - time_2us)) && (high <= (TIME_5MS + time_2us))) begin decode_0_1_p <= 2'b01;/////判决为1码 end if(fall && (high >= (TIME_2MS - time_2us)) && (high <= (TIME_2MS + time_2us))) begin decode_0_1_p <= 2'b00;/////判决为0码 end end end /////////解析结果输出////////////////////////////////////////////////////////// ///////解析秒个位 输出///////////////////////////////////////////////////// ///////解析秒个位 输出///////////////////////////////////////////////////// ///////解析秒个位 输出///////////////////////////////////////////////////// reg [3:0] second_gewei_r = 4'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin second_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd1) && (decode_0_1_p == 2'b00)) begin second_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd1) && (decode_0_1_p == 2'b01)) begin second_gewei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin second_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd2) && (decode_0_1_p == 2'b00)) begin second_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd2) && (decode_0_1_p == 2'b01)) begin second_gewei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin second_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd3) && (decode_0_1_p == 2'b00)) begin second_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd3) && (decode_0_1_p == 2'b01)) begin second_gewei_r[2] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin second_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd4) && (decode_0_1_p == 2'b00)) begin second_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd4) && (decode_0_1_p == 2'b01)) begin second_gewei_r[3] <= 1'b1; end end ///////解析秒十位 输出///////////////////////////////////////////////////// ///////解析秒十位 输出///////////////////////////////////////////////////// ///////解析秒十位 输出///////////////////////////////////////////////////// reg [2:0] second_shiwei_r = 3'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin second_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd6) && (decode_0_1_p == 2'b00)) begin second_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd6) && (decode_0_1_p == 2'b01)) begin second_shiwei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin second_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd7) && (decode_0_1_p == 2'b00)) begin second_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd7) && (decode_0_1_p == 2'b01)) begin second_shiwei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin second_shiwei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd8) && (decode_0_1_p == 2'b00)) begin second_shiwei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd8) && (decode_0_1_p == 2'b01)) begin second_shiwei_r[2] <= 1'b1; end end ///////解析分个位 输出///////////////////////////////////////////////////// ///////解析分个位 输出///////////////////////////////////////////////////// ///////解析分个位 输出///////////////////////////////////////////////////// reg [3:0] min_gewei_r = 4'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin min_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd10) && (decode_0_1_p == 2'b00)) begin min_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd10) && (decode_0_1_p == 2'b01)) begin min_gewei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin min_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd11) && (decode_0_1_p == 2'b00)) begin min_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd11) && (decode_0_1_p == 2'b01)) begin min_gewei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin min_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd12) && (decode_0_1_p == 2'b00)) begin min_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd12) && (decode_0_1_p == 2'b01)) begin min_gewei_r[2] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin min_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd13) && (decode_0_1_p == 2'b00)) begin min_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd13) && (decode_0_1_p == 2'b01)) begin min_gewei_r[3] <= 1'b1; end end ///////解析分十位 输出///////////////////////////////////////////////////// ///////解析分十位 输出///////////////////////////////////////////////////// ///////解析分十位 输出///////////////////////////////////////////////////// reg [2:0] min_shiwei_r = 3'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin min_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd15) && (decode_0_1_p == 2'b00)) begin min_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd15) && (decode_0_1_p == 2'b01)) begin min_shiwei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin min_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd16) && (decode_0_1_p == 2'b00)) begin min_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd16) && (decode_0_1_p == 2'b01)) begin min_shiwei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin min_shiwei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd17) && (decode_0_1_p == 2'b00)) begin min_shiwei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd17) && (decode_0_1_p == 2'b01)) begin min_shiwei_r[2] <= 1'b1; end end ///////解析时个位 输出///////////////////////////////////////////////////// ///////解析时个位 输出///////////////////////////////////////////////////// ///////解析时个位 输出///////////////////////////////////////////////////// reg [3:0] hour_gewei_r = 4'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin hour_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd20) && (decode_0_1_p == 2'b00)) begin hour_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd20) && (decode_0_1_p == 2'b01)) begin hour_gewei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin hour_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd21) && (decode_0_1_p == 2'b00)) begin hour_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd21) && (decode_0_1_p == 2'b01)) begin hour_gewei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin hour_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd22) && (decode_0_1_p == 2'b00)) begin hour_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd22) && (decode_0_1_p == 2'b01)) begin hour_gewei_r[2] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin hour_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd23) && (decode_0_1_p == 2'b00)) begin hour_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd23) && (decode_0_1_p == 2'b01)) begin hour_gewei_r[3] <= 1'b1; end end ///////解析时十位 输出///////////////////////////////////////////////////// ///////解析时十位 输出///////////////////////////////////////////////////// ///////解析时十位 输出///////////////////////////////////////////////////// reg [1:0] hour_shiwei_r = 2'b00; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin hour_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd25) && (decode_0_1_p == 2'b00)) begin hour_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd25) && (decode_0_1_p == 2'b01)) begin hour_shiwei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin hour_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd26) && (decode_0_1_p == 2'b00)) begin hour_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd26) && (decode_0_1_p == 2'b01)) begin hour_shiwei_r[1] <= 1'b1; end end ///////解析天个位 输出///////////////////////////////////////////////////// ///////解析天个位 输出///////////////////////////////////////////////////// ///////解析天个位 输出///////////////////////////////////////////////////// reg [3:0] day_gewei_r = 4'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd30) && (decode_0_1_p == 2'b00)) begin day_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd30) && (decode_0_1_p == 2'b01)) begin day_gewei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd31) && (decode_0_1_p == 2'b00)) begin day_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd31) && (decode_0_1_p == 2'b01)) begin day_gewei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd32) && (decode_0_1_p == 2'b00)) begin day_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd32) && (decode_0_1_p == 2'b01)) begin day_gewei_r[2] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd33) && (decode_0_1_p == 2'b00)) begin day_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd33) && (decode_0_1_p == 2'b01)) begin day_gewei_r[3] <= 1'b1; end end ///////解析天十位 输出///////////////////////////////////////////////////// ///////解析天十位 输出///////////////////////////////////////////////////// ///////解析天十位 输出///////////////////////////////////////////////////// reg [3:0] day_shiwei_r = 4'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd35) && (decode_0_1_p == 2'b00)) begin day_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd35) && (decode_0_1_p == 2'b01)) begin day_shiwei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd36) && (decode_0_1_p == 2'b00)) begin day_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd36) && (decode_0_1_p == 2'b01)) begin day_shiwei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_shiwei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd37) && (decode_0_1_p == 2'b00)) begin day_shiwei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd37) && (decode_0_1_p == 2'b01)) begin day_shiwei_r[2] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_shiwei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd38) && (decode_0_1_p == 2'b00)) begin day_shiwei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd38) && (decode_0_1_p == 2'b01)) begin day_shiwei_r[3] <= 1'b1; end end ///////解析天百位 输出///////////////////////////////////////////////////// ///////解析天百位 输出///////////////////////////////////////////////////// ///////解析天百位 输出///////////////////////////////////////////////////// reg [1:0] day_baiwei_r = 2'b00; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_baiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd40) && (decode_0_1_p == 2'b00)) begin day_baiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd40) && (decode_0_1_p == 2'b01)) begin day_baiwei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin day_baiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd41) && (decode_0_1_p == 2'b00)) begin day_baiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd41) && (decode_0_1_p == 2'b01)) begin day_baiwei_r[1] <= 1'b1; end end ///////解析年个位 输出///////////////////////////////////////////////////// ///////解析年个位 输出///////////////////////////////////////////////////// ///////解析年个位 输出///////////////////////////////////////////////////// reg [3:0] year_gewei_r = 4'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin year_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd50) && (decode_0_1_p == 2'b00)) begin year_gewei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd50) && (decode_0_1_p == 2'b01)) begin year_gewei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin year_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd51) && (decode_0_1_p == 2'b00)) begin year_gewei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd51) && (decode_0_1_p == 2'b01)) begin year_gewei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin year_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd52) && (decode_0_1_p == 2'b00)) begin year_gewei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd52) && (decode_0_1_p == 2'b01)) begin year_gewei_r[2] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin year_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd53) && (decode_0_1_p == 2'b00)) begin year_gewei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd53) && (decode_0_1_p == 2'b01)) begin year_gewei_r[3] <= 1'b1; end end ///////解析年十位 输出///////////////////////////////////////////////////// ///////解析年十位 输出///////////////////////////////////////////////////// ///////解析年十位 输出///////////////////////////////////////////////////// reg [3:0] year_shiwei_r = 4'd0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin year_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd55) && (decode_0_1_p == 2'b00)) begin year_shiwei_r[0] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd55) && (decode_0_1_p == 2'b01)) begin year_shiwei_r[0] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin year_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd56) && (decode_0_1_p == 2'b00)) begin year_shiwei_r[1] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd56) && (decode_0_1_p == 2'b01)) begin year_shiwei_r[1] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin year_shiwei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd57) && (decode_0_1_p == 2'b00)) begin year_shiwei_r[2] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd57) && (decode_0_1_p == 2'b01)) begin year_shiwei_r[2] <= 1'b1; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin year_shiwei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd58) && (decode_0_1_p == 2'b00)) begin year_shiwei_r[3] <= 1'b0; end else if(fall_r4 && (start_fallnum == 8'd58) && (decode_0_1_p == 2'b01)) begin year_shiwei_r[3] <= 1'b1; end end /////////////解析结束 数据输出///////////////////////////////////// /////////////解析结束 数据输出///////////////////////////////////// /////////////解析结束 数据输出///////////////////////////////////// reg start_r1 = 1'b0; reg start_r2 = 1'b0; reg decode_finish = 1'b0; always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin start_r1 <= 1'b0; start_r2 <= 1'b0; decode_finish <= 1'b0; end else begin start_r1 <= start ; start_r2 <= start_r1; decode_finish <= (~start_r1) && start_r2; end end always @ (posedge clk_125mhz or negedge rst_n) begin if(~rst_n) begin second_gewei <= 4'd0; second_shiwei <= 3'd0; min_gewei <= 4'd0; min_shiwei <= 3'd0; hour_gewei <= 4'd0; hour_shiwei <= 2'd0; day_gewei <= 4'd0; day_shiwei <= 4'd0; day_baiwei <= 2'd0; year_gewei <= 4'd0; year_shiwei <= 4'd0; end else if(decode_finish) begin second_gewei <= second_gewei_r; second_shiwei <= second_shiwei_r; min_gewei <= min_gewei_r; min_shiwei <= min_shiwei_r; hour_gewei <= hour_gewei_r; hour_shiwei <= hour_shiwei_r; day_gewei <= day_gewei_r; day_shiwei <= day_shiwei_r; day_baiwei <= day_baiwei_r; year_gewei <= year_gewei_r; year_shiwei <= year_shiwei_r; end end endmodule 帮我注释
12-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值