OpenCores
URL https://opencores.org/ocsvn/wb_size_bridge/wb_size_bridge/trunk

Subversion Repositories wb_size_bridge

[/] [wb_size_bridge/] [trunk/] [src/] [asram_if.v] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 qaztronic
//
2
//
3
//
4
 
5
module asram_if(
6
                  inout   [15:0]  sram_dq,    //  SRAM Data bus 16 Bits
7
                  output  [17:0]  sram_addr,  //  SRAM Address bus 18 Bits
8
                  output          sram_ub_n,  //  SRAM High-byte Data Mask
9
                  output          sram_lb_n,  //  SRAM Low-byte Data Mask
10
                  output          sram_we_n,  //  SRAM Write Enable
11
                  output          sram_ce_n,  //  SRAM Chip Enable
12
                  output          sram_oe_n,  //  SRAM Output Enable
13
                  input           wb_clk_i,   // WISHBONE interface
14
                  input           wb_rst_i,
15
                  input   [18:0]  wb_adr_i,
16
                  input   [31:0]  wb_dat_i,
17
                  input           wb_we_i,
18
                  input           wb_stb_i,
19
                  input           wb_cyc_i,
20
                  input   [3:0]   wb_sel_i,
21
                  output  [31:0]  wb_dat_o,
22
                  output          wb_ack_o
23
                );
24
 
25
 
26
  //---------------------------------------------------
27
  // wb_size_bridge  
28
  wire [15:0] wb_lo_dat_o;
29
  wire [31:0] wb_lo_adr_o;
30
  wire        wb_lo_cyc_o;
31
  wire        wb_lo_stb_o;
32
  wire        wb_lo_we_o;
33
  wire [1:0]  wb_lo_sel_o;
34
  wire        wb_lo_ack_i = 1'b1;
35
  wire        wb_lo_err_i = 1'b0;
36
  wire        wb_lo_rty_i = 1'b0;
37
 
38
  wb_size_bridge i_wb_size_bridge(
39
                                    .wb_hi_clk_i(wb_clk_i),
40
                                    .wb_hi_rst_i(wb_rst_i),
41
                                    .wb_hi_dat_o(wb_dat_o),
42
                                    .wb_hi_dat_i(wb_dat_i),
43
                                    .wb_hi_adr_i( {13'h0000, wb_adr_i} ),
44
                                    .wb_hi_cyc_i(wb_cyc_i),
45
                                    .wb_hi_stb_i(wb_stb_i),
46
                                    .wb_hi_we_i(wb_we_i),
47
                                    .wb_hi_sel_i(wb_sel_i),
48
                                    .wb_hi_ack_o(wb_ack_o),
49
                                    .wb_hi_err_o(),
50
                                    .wb_hi_rty_o(),
51
 
52
                                    .wb_lo_clk_o(),
53
                                    .wb_lo_rst_o(),
54
                                    .wb_lo_dat_i(sram_dq),
55
                                    .wb_lo_dat_o(wb_lo_dat_o),
56
                                    .wb_lo_adr_o(wb_lo_adr_o),
57
                                    .wb_lo_cyc_o(wb_lo_cyc_o),
58
                                    .wb_lo_stb_o(wb_lo_stb_o),
59
                                    .wb_lo_we_o(wb_lo_we_o),
60
                                    .wb_lo_sel_o(wb_lo_sel_o),
61
                                    .wb_lo_ack_i(wb_lo_ack_i),
62
                                    .wb_lo_err_i(wb_lo_err_i),
63
                                    .wb_lo_rty_i(wb_lo_rty_i),
64
 
65
                                    .lo_byte_if_i(1'b0)
66
                                  );
67
 
68
 
69
  //---------------------------------------------------
70
  // outputs  
71
  assign sram_dq    = wb_lo_we_o ? wb_lo_dat_o : 16'hzz;
72
  assign sram_addr  = wb_lo_adr_o[18:1];
73
  assign sram_ub_n  = ~wb_lo_sel_o[1];
74
  assign sram_lb_n  = ~wb_lo_sel_o[0];
75
  assign sram_we_n  = ~wb_lo_we_o;
76
//   assign sram_ce_n  = ~(wb_lo_stb_o & wb_lo_cyc_o);
77
  assign sram_ce_n  = 1'b0;
78
  assign sram_oe_n  = wb_lo_we_o;
79
 
80
 
81
endmodule
82
 
83
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.