MICHIN
Newbie
I need some helps!
What's wrong here that doesn't work as I want?
What's wrong here that doesn't work as I want?
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 [/ wire clk_nco; textgen_nco #( .FREQDIV (50000000 ) ) u_textgen_nco( .o_clk (clk_nco ), .i_clk (i_clk ), .i_rstn (i_rstn ) ); localparam MODE_CLOCK_OPR = 2'b00; localparam MODE_CLOCK_SET = 2'b01; localparam MODE_ALARM_SET = 2'b10; always @(posedge clk_nco or negedge i_rstn) begin if (!i_rstn) begin o_line_data_valid <= 0; {o_line_data1, o_line_data2} <= 128'd0; end else begin case (i_mode_lcd) MODE_CLOCK_OPR: begin o_line_data_valid <= 1; {o_line_data1, o_line_data2} <= line_dataset[0]; end MODE_CLOCK_SET: begin o_line_data_valid <= 1; {o_line_data1, o_line_data2} <= line_dataset[1]; end MODE_ALARM_SET: begin o_line_data_valid <= 1; {o_line_data1, o_line_data2} <= line_dataset[2]; end default: begin o_line_data_valid <= 0; {o_line_data1, o_line_data2} <= 128'd0; end endcase end end endmodule ]
Last edited: