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

Subversion Repositories or1200_soc

[/] [or1200_soc/] [trunk/] [src/] [soc_mem_bank_2.v] - Blame information for rev 22

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

Line No. Rev Author Line
1 22 qaztronic
 
2
 
3
 
4
module soc_mem_bank_2(
5
                              input   [31:0]  mem_data_i,
6
                              output  [31:0]  mem_data_o,
7
                              input   [31:0]  mem_addr_i,
8
                              input   [3:0]   mem_sel_i,
9
                              input           mem_we_i,
10
                              input           mem_cyc_i,
11
                              input           mem_stb_i,
12
                              output          mem_ack_o,
13
                              output          mem_err_o,
14
                              output          mem_rty_o,
15
 
16
                        inout   [7:0]   fl_dq,
17
                        output  [21:0]  fl_addr,
18
                        output          fl_we_n,
19
                        output          fl_rst_n,
20
                        output          fl_oe_n,
21
                        output          fl_ce_n,
22
 
23
                              input           mem_clk_i,
24
                              input           mem_rst_i
25
                            );
26
 
27
        parameter USE_NOR_FLASH           = 1;
28
 
29
        generate
30
                if( USE_NOR_FLASH )
31
                  begin
32
        //---------------------------------------------------
33
        // nor flash
34
        async_mem_if #( .AW(22), .DW(8) )
35
        i_flash (
36
                  .async_dq(fl_dq),
37
                  .async_addr(fl_addr),
38
                  .async_ub_n(),
39
                  .async_lb_n(),
40
                  .async_we_n(fl_we_n),
41
                  .async_ce_n(fl_ce_n),
42
                  .async_oe_n(fl_oe_n),
43
                  .wb_clk_i(mem_clk_i),
44
                  .wb_rst_i(mem_rst_i),
45
                  .wb_adr_i( {13'h0000, mem_addr_i[18:0]} ),
46
                  .wb_dat_i(mem_data_i),
47
                  .wb_we_i(mem_we_i),
48
                  .wb_stb_i(mem_stb_i),
49
                  .wb_cyc_i(mem_cyc_i),
50
                  .wb_sel_i(mem_sel_i),
51
                  .wb_dat_o(mem_data_o),
52
                  .wb_ack_o(mem_ack_o),
53
                  .ce_setup(4'h1),
54
                  .op_hold(4'h3),
55
                  .ce_hold(4'h1),
56
                  .big_endian_if_i(1'b1),
57
                  .lo_byte_if_i(1'b1)
58
                );
59
 
60
        //---------------------------------------------------
61
        // outputs for stub
62
        assign mem_err_o = 1'b0;
63
        assign mem_rty_o = 1'b0;
64
        assign fl_rst_n = ~mem_rst_i;
65
 
66
      end
67
    else
68
      begin
69
        //---------------------------------------------------
70
        // outputs for stub
71
        assign mem_data_o = 32'h1bad_c0de;
72
        assign mem_ack_o = mem_cyc_i & mem_stb_i;
73
        assign mem_err_o = 1'b0;
74
        assign mem_rty_o = 1'b0;
75
      end
76
 
77
        endgenerate
78
 
79
endmodule
80
 

powered by: WebSVN 2.1.0

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