X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/raggedstone/blobdiff_plain/c53499b10a5c0836953dc19d662088f2d789b7c3..30273618403fd6512926c89f999f97b4722e1709:/dhwk_old/source/wb_fifo.v?ds=sidebyside diff --git a/dhwk_old/source/wb_fifo.v b/dhwk_old/source/wb_fifo.v index 5ffd1b1..8605504 100644 --- a/dhwk_old/source/wb_fifo.v +++ b/dhwk_old/source/wb_fifo.v @@ -1,4 +1,4 @@ -module wb_7seg_new (clk_i, nrst_i, wb_adr_i, wb_dat_o, wb_dat_i, wb_sel_i, wb_we_i, +module wb_fifo (clk_i, nrst_i, wb_adr_i, wb_dat_o, wb_dat_i, wb_sel_i, wb_we_i, wb_stb_i, wb_cyc_i, wb_ack_o, wb_err_o, wb_int_o, fifo_data_i, fifo_data_o, fifo_we_o, fifo_re_o); input clk_i; @@ -13,22 +13,25 @@ module wb_7seg_new (clk_i, nrst_i, wb_adr_i, wb_dat_o, wb_dat_i, wb_sel_i, wb_we output wb_ack_o; output wb_err_o; output wb_int_o; - input reg [7:0] fifo_data_i; - output reg [7:0] fifo_data_o; - output fifo_we_i; + input [7:0] fifo_data_i; + output [7:0] fifo_data_o; output fifo_we_o; + output fifo_re_o; - reg [15:0] data_reg; + reg [15:0] data_reg; always @(posedge clk_i or negedge nrst_i) begin if (nrst_i == 0) - data_reg <= 16'hABCD; + data_reg <= 16'h0000; else - if (wb_stb_i && wb_we_i) - data_reg <= wb_dat_i; + if (wb_stb_i && wb_we_i) + data_reg <= wb_dat_i; end + assign fifo_we_o = 1'b1; + assign fifo_data_o = data_reg; + assign wb_ack_o = wb_stb_i; assign wb_err_o = 1'b0; assign wb_int_o = 1'b0;