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

Subversion Repositories hssdrc

[/] [hssdrc/] [trunk/] [rtl/] [hssdrc_mux.v] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 des00
//
2
// Project      : High-Speed SDRAM Controller with adaptive bank management and command pipeline
3
// 
4
// Project Nick : HSSDRC
5
// 
6
// Version      : 1.0-beta 
7
//  
8
// Revision     : $Revision: 1.1 $ 
9
// 
10
// Date         : $Date: 2008-03-06 13:52:43 $ 
11
// 
12
// Workfile     : hssdrc_mux.v
13
// 
14
// Description  : multiplexer for sdram signals
15
// 
16
// HSSDRC is licensed under MIT License
17
// 
18
// Copyright (c) 2007-2008, Denis V.Shekhalev (des00@opencores.org) 
19
// 
20
// Permission  is hereby granted, free of charge, to any person obtaining a copy of
21
// this  software  and  associated documentation files (the "Software"), to deal in
22
// the  Software  without  restriction,  including without limitation the rights to
23
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
24
// the  Software, and to permit persons to whom the Software is furnished to do so,
25
// subject to the following conditions:
26
// 
27
// The  above  copyright notice and this permission notice shall be included in all
28
// copies or substantial portions of the Software.
29
// 
30
// THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
32
// FOR  A  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
33
// COPYRIGHT  HOLDERS  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
34
// IN  AN  ACTION  OF  CONTRACT,  TORT  OR  OTHERWISE,  ARISING  FROM, OUT OF OR IN
35
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36
//
37
 
38
 
39
`include "hssdrc_timescale.vh"
40
 
41
`include "hssdrc_define.vh"
42
 
43
module hssdrc_mux
44
  (
45
  init_done           ,
46
  //
47
  init_state_pre_all  ,
48
  init_state_refr     ,
49
  init_state_lmr      ,
50
  init_state_rowa     ,
51
  //
52
  arb_pre_all         ,
53
  arb_refr            ,
54
  arb_pre             ,
55
  arb_act             ,
56
  arb_read            ,
57
  arb_write           ,
58
  arb_rowa            ,
59
  arb_cola            ,
60
  arb_ba              ,
61
  arb_chid            ,
62
  arb_burst           ,
63
  //
64
  mux_pre_all         ,
65
  mux_refr            ,
66
  mux_pre             ,
67
  mux_act             ,
68
  mux_read            ,
69
  mux_write           ,
70
  mux_lmr             ,
71
  mux_rowa            ,
72
  mux_cola            ,
73
  mux_ba              ,
74
  mux_chid            ,
75
  mux_burst
76
  );
77
 
78
  input wire init_done;
79
 
80
  //-------------------------------------------------------------------------------------------------- 
81
  // interface from inis state controller 
82
  //-------------------------------------------------------------------------------------------------- 
83
 
84
  input wire          init_state_pre_all  ;
85
  input wire          init_state_refr     ;
86
  input wire          init_state_lmr      ;
87
  input rowa_t        init_state_rowa     ;
88
 
89
  //-------------------------------------------------------------------------------------------------- 
90
  // interface from output arbiter 
91
  //-------------------------------------------------------------------------------------------------- 
92
 
93
  input wire          arb_pre_all  ;
94
  input wire          arb_refr     ;
95
  input wire          arb_pre      ;
96
  input wire          arb_act      ;
97
  input wire          arb_read     ;
98
  input wire          arb_write    ;
99
  input rowa_t        arb_rowa     ;
100
  input cola_t        arb_cola     ;
101
  input ba_t          arb_ba       ;
102
  input chid_t        arb_chid     ;
103
  input sdram_burst_t arb_burst    ;
104
 
105
  //-------------------------------------------------------------------------------------------------- 
106
  // interface to data/addr path units 
107
  //-------------------------------------------------------------------------------------------------- 
108
 
109
  output logic         mux_pre_all  ;
110
  output logic         mux_refr     ;
111
  output logic         mux_pre      ;
112
  output logic         mux_act      ;
113
  output logic         mux_read     ;
114
  output logic         mux_write    ;
115
  output logic         mux_lmr      ;
116
  output rowa_t        mux_rowa     ;
117
  output cola_t        mux_cola     ;
118
  output ba_t          mux_ba       ;
119
  output chid_t        mux_chid     ;
120
  output sdram_burst_t mux_burst    ;
121
 
122
  //------------------------------------------------------------------------------------------------- 
123
  // there is no reason to mask or mux arbiter_if signals, becouse during init state phase 
124
  // init_done == 0 and this signals is cleared inside decoders and after init state phase 
125
  // init_done == 1 and init_state_if signals will be cleared also 
126
  //-------------------------------------------------------------------------------------------------  
127
 
128
  assign mux_pre_all = arb_pre_all | init_state_pre_all;
129
  assign mux_refr    = arb_refr    | init_state_refr   ;
130
 
131
  // this will be synthesis as simple logic, becouse init_state_rowa is constant  
132
  assign mux_rowa    = init_done ? arb_rowa  : init_state_rowa   ;
133
 
134
  assign mux_pre     = arb_pre   ;
135
  assign mux_act     = arb_act   ;
136
  assign mux_read    = arb_read  ;
137
  assign mux_write   = arb_write ;
138
 
139
  assign mux_lmr     = init_state_lmr;
140
 
141
  // 
142
  // no mux becouse init state phase not use this sdram ports 
143
  //
144
 
145
  assign mux_cola    = arb_cola ;
146
  assign mux_ba      = arb_ba   ;
147
  assign mux_burst   = arb_burst;
148
  assign mux_chid    = arb_chid ;
149
 
150
endmodule
151
 
152
 
153
 

powered by: WebSVN 2.1.0

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