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

Subversion Repositories z80control

[/] [z80control/] [trunk/] [CII_Starter_USB_API_v1/] [HW/] [Multi_Sram.v] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 tylerapohl
//Legal Notice: (C)2006 Altera Corporation. All rights reserved. Your
2
//use of Altera Corporation's design tools, logic functions and other
3
//software and tools, and its AMPP partner logic functions, and any
4
//output files any of the foregoing (including device programming or
5
//simulation files), and any associated documentation or information are
6
//expressly subject to the terms and conditions of the Altera Program
7
//License Subscription Agreement or other applicable license agreement,
8
//including, without limitation, that your use is for the sole purpose
9
//of programming logic devices manufactured by Altera and sold by Altera
10
//or its authorized distributors.  Please refer to the applicable
11
//agreement for further details.
12
 
13
module  Multi_Sram(     //      Host Side
14
                                        oHS_DATA,iHS_DATA,iHS_ADDR,iHS_WE_N,iHS_OE_N,
15
                                        //      Async Side 1
16
                                        oAS1_DATA,iAS1_DATA,iAS1_ADDR,iAS1_WE_N,iAS1_OE_N,
17
                                        //      Async Side 2
18
                                        oAS2_DATA,iAS2_DATA,iAS2_ADDR,iAS2_WE_N,iAS2_OE_N,
19
                                        //      Async Side 3
20
                                        oAS3_DATA,iAS3_DATA,iAS3_ADDR,iAS3_WE_N,iAS3_OE_N,
21
                                        //      Control Signals
22
                                        iSelect,iRST_n,
23
                                        //      SRAM
24
                                        SRAM_DQ,
25
                                        SRAM_ADDR,
26
                                        SRAM_UB_N,
27
                                        SRAM_LB_N,
28
                                        SRAM_WE_N,
29
                                        SRAM_CE_N,
30
                                        SRAM_OE_N       );
31
 
32
//      Host Side
33
input   [17:0]   iHS_ADDR;
34
input   [15:0]   iHS_DATA;
35
output  [15:0]   oHS_DATA;
36
input                   iHS_WE_N;
37
input                   iHS_OE_N;
38
//      Async Side 1
39
input   [17:0]   iAS1_ADDR;
40
input   [15:0]   iAS1_DATA;
41
output  [15:0]   oAS1_DATA;
42
input                   iAS1_WE_N;
43
input                   iAS1_OE_N;
44
//      Async Side 2
45
input   [17:0]   iAS2_ADDR;
46
input   [15:0]   iAS2_DATA;
47
output  [15:0]   oAS2_DATA;
48
input                   iAS2_WE_N;
49
input                   iAS2_OE_N;
50
//      Async Side 3
51
input   [17:0]   iAS3_ADDR;
52
input   [15:0]   iAS3_DATA;
53
output  [15:0]   oAS3_DATA;
54
input                   iAS3_WE_N;
55
input                   iAS3_OE_N;
56
//      Control Signals
57
input   [1:0]    iSelect;
58
input                   iRST_n;
59
//      SRAM Side
60
inout   [15:0]   SRAM_DQ;
61
output  [17:0]   SRAM_ADDR;
62
output                  SRAM_UB_N,
63
                                SRAM_LB_N,
64
                                SRAM_WE_N,
65
                                SRAM_CE_N,
66
                                SRAM_OE_N;
67
 
68
assign  SRAM_DQ         =       SRAM_WE_N        ?      16'hzzzz  :
69
                                                (iSelect==0) ?   iHS_DATA  :
70
                                                (iSelect==1) ?  iAS1_DATA :
71
                                                (iSelect==2) ?  iAS2_DATA :
72
                                                                                iAS3_DATA ;
73
 
74
assign  oHS_DATA        =       (iSelect==0) ?  SRAM_DQ : 16'h0000 ;
75
assign  oAS1_DATA       =       (iSelect==1) ?  SRAM_DQ : 16'h0000 ;
76
assign  oAS2_DATA       =       (iSelect==2) ?  SRAM_DQ : 16'h0000 ;
77
assign  oAS3_DATA       =       (iSelect==3) ?  SRAM_DQ : 16'h0000 ;
78
 
79
assign  SRAM_ADDR       =       (iSelect==0) ?   iHS_ADDR        :
80
                                                (iSelect==1) ?  iAS1_ADDR       :
81
                                                (iSelect==2) ?  iAS2_ADDR       :
82
                                                                                iAS3_ADDR       ;
83
 
84
assign  SRAM_WE_N       =       (iSelect==0) ?   iHS_WE_N        :
85
                                                (iSelect==1) ?  iAS1_WE_N       :
86
                                                (iSelect==2) ?  iAS2_WE_N       :
87
                                                                                iAS3_WE_N       ;
88
 
89
assign  SRAM_OE_N       =       (iSelect==0) ?   iHS_OE_N        :
90
                                                (iSelect==1) ?  iAS1_OE_N       :
91
                                                (iSelect==2) ?  iAS2_OE_N       :
92
                                                                                iAS3_OE_N       ;
93
 
94
assign  SRAM_CE_N       =       1'b0;
95
assign  SRAM_UB_N       =       1'b0;
96
assign  SRAM_LB_N       =       1'b0;
97
 
98
endmodule

powered by: WebSVN 2.1.0

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