1 module wb_7seg_new (clk_i, nrst_i, wb_adr_i, wb_dat_o, wb_dat_i, wb_sel_i, wb_we_i,
2 wb_stb_i, wb_cyc_i, wb_ack_o, wb_err_o, wb_int_o, DISP_SEL, DISP_LED);
7 output [15:0] wb_dat_o;
16 output reg [3:0] DISP_SEL;
17 output reg [6:0] DISP_LED;
22 wire [6:0] disp_data_led;
25 always @(posedge clk_i or negedge nrst_i)
30 if (wb_stb_i && wb_we_i)
34 assign wb_ack_o = wb_stb_i;
35 assign wb_err_o = 1'b0;
36 assign wb_int_o = 1'b0;
37 assign wb_dat_o = data_reg;
39 always @(posedge clk_i or negedge nrst_i)
42 disp_cnt <= 7'b0000000;
44 disp_cnt <= disp_cnt + 1;
47 always @(posedge clk_i or negedge nrst_i)
52 if (disp_cnt == 7'b1111111)
53 disp_pos <= {DISP_SEL[2] , DISP_SEL[1] , DISP_SEL[0] , DISP_SEL[3]};
56 always @(posedge clk_i or negedge nrst_i)
62 4'b1000: disp_data <= data_reg[3:0];
63 4'b0100: disp_data <= data_reg[7:4];
64 4'b0010: disp_data <= data_reg[11:8];
65 4'b0001: disp_data <= data_reg[15:12];
69 disp_dec u0 (disp_data, disp_data_led);
71 always @(posedge clk_i or negedge nrst_i)
74 DISP_LED <= 7'b0000000;
76 DISP_LED <= disp_data_led;
79 always @(posedge clk_i or negedge nrst_i)