[6] | 1 | ///////////////////////////////////////////////////////////////////// |
---|
| 2 | //// //// |
---|
| 3 | //// WISHBONE Connection Bus Top Level //// |
---|
| 4 | //// //// |
---|
| 5 | //// //// |
---|
| 6 | //// Author: Johny Chi //// |
---|
| 7 | //// chisuhua@yahoo.com.cn //// |
---|
| 8 | //// //// |
---|
| 9 | //// //// |
---|
| 10 | //// //// |
---|
| 11 | ///////////////////////////////////////////////////////////////////// |
---|
| 12 | //// //// |
---|
| 13 | //// Copyright (C) 2000 Authors and OPENCORES.ORG //// |
---|
| 14 | //// //// |
---|
| 15 | //// This source file may be used and distributed without //// |
---|
| 16 | //// restriction provided that this copyright statement is not //// |
---|
| 17 | //// removed from the file and that any derivative work contains //// |
---|
| 18 | //// the original copyright notice and the associated disclaimer. //// |
---|
| 19 | //// //// |
---|
| 20 | //// This source file is free software; you can redistribute it //// |
---|
| 21 | //// and/or modify it under the terms of the GNU Lesser General //// |
---|
| 22 | //// Public License as published by the Free Software Foundation; //// |
---|
| 23 | //// either version 2.1 of the License, or (at your option) any //// |
---|
| 24 | //// later version. //// |
---|
| 25 | //// //// |
---|
| 26 | //// This source is distributed in the hope that it will be //// |
---|
| 27 | //// useful, but WITHOUT ANY WARRANTY; without even the implied //// |
---|
| 28 | //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //// |
---|
| 29 | //// PURPOSE. See the GNU Lesser General Public License for more //// |
---|
| 30 | //// details. //// |
---|
| 31 | //// //// |
---|
| 32 | //// You should have received a copy of the GNU Lesser General //// |
---|
| 33 | //// Public License along with this source; if not, download it //// |
---|
| 34 | //// from http://www.opencores.org/lgpl.shtml //// |
---|
| 35 | //// //// |
---|
| 36 | ////////////////////////////////////////////////////////////////////// |
---|
| 37 | // |
---|
| 38 | // Description |
---|
| 39 | // 1. Up to 8 masters and 8 slaves share bus Wishbone connection |
---|
| 40 | // 2. no priorty arbitor , 8 masters are processed in a round |
---|
| 41 | // robin way, |
---|
| 42 | // 3. if WB_USE_TRISTATE was defined, the share bus is a tristate |
---|
| 43 | // bus, and use less logic resource. |
---|
| 44 | // 4. wb_conbus was synthesis to XC2S100-5-PQ208 using synplify, |
---|
| 45 | // Max speed >60M , and 374 SLICE if using Multiplexor bus |
---|
| 46 | // or 150 SLICE if using tri-state bus. |
---|
| 47 | // |
---|
| 48 | `include "wb_conbus_defines.v" |
---|
| 49 | `define dw 64 // Data bus Width |
---|
| 50 | `define aw 64 // Address bus Width |
---|
| 51 | `define sw `dw / 8 // Number of Select Lines |
---|
| 52 | `define mbusw `aw + `sw + `dw +4 //address width + byte select width + dat width + cyc + we + stb +cab , input from master interface |
---|
| 53 | `define sbusw 3 // ack + err + rty, input from slave interface |
---|
| 54 | `define mselectw 8 // number of masters |
---|
| 55 | `define sselectw 8 // number of slavers |
---|
| 56 | |
---|
| 57 | //`define WB_USE_TRISTATE |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | module wb_conbus_top( |
---|
| 61 | clk_i, rst_i, |
---|
| 62 | |
---|
| 63 | // Master 0 Interface |
---|
| 64 | m0_dat_i, m0_dat_o, m0_adr_i, m0_sel_i, m0_we_i, m0_cyc_i, |
---|
| 65 | m0_stb_i, m0_ack_o, m0_err_o, m0_rty_o, m0_cab_i, |
---|
| 66 | |
---|
| 67 | // Master 1 Interface |
---|
| 68 | m1_dat_i, m1_dat_o, m1_adr_i, m1_sel_i, m1_we_i, m1_cyc_i, |
---|
| 69 | m1_stb_i, m1_ack_o, m1_err_o, m1_rty_o, m1_cab_i, |
---|
| 70 | |
---|
| 71 | // Master 2 Interface |
---|
| 72 | m2_dat_i, m2_dat_o, m2_adr_i, m2_sel_i, m2_we_i, m2_cyc_i, |
---|
| 73 | m2_stb_i, m2_ack_o, m2_err_o, m2_rty_o, m2_cab_i, |
---|
| 74 | |
---|
| 75 | // Master 3 Interface |
---|
| 76 | m3_dat_i, m3_dat_o, m3_adr_i, m3_sel_i, m3_we_i, m3_cyc_i, |
---|
| 77 | m3_stb_i, m3_ack_o, m3_err_o, m3_rty_o, m3_cab_i, |
---|
| 78 | |
---|
| 79 | // Master 4 Interface |
---|
| 80 | m4_dat_i, m4_dat_o, m4_adr_i, m4_sel_i, m4_we_i, m4_cyc_i, |
---|
| 81 | m4_stb_i, m4_ack_o, m4_err_o, m4_rty_o, m4_cab_i, |
---|
| 82 | |
---|
| 83 | // Master 5 Interface |
---|
| 84 | m5_dat_i, m5_dat_o, m5_adr_i, m5_sel_i, m5_we_i, m5_cyc_i, |
---|
| 85 | m5_stb_i, m5_ack_o, m5_err_o, m5_rty_o, m5_cab_i, |
---|
| 86 | |
---|
| 87 | // Master 6 Interface |
---|
| 88 | m6_dat_i, m6_dat_o, m6_adr_i, m6_sel_i, m6_we_i, m6_cyc_i, |
---|
| 89 | m6_stb_i, m6_ack_o, m6_err_o, m6_rty_o, m6_cab_i, |
---|
| 90 | |
---|
| 91 | // Master 7 Interface |
---|
| 92 | m7_dat_i, m7_dat_o, m7_adr_i, m7_sel_i, m7_we_i, m7_cyc_i, |
---|
| 93 | m7_stb_i, m7_ack_o, m7_err_o, m7_rty_o, m7_cab_i, |
---|
| 94 | |
---|
| 95 | // Slave 0 Interface |
---|
| 96 | s0_dat_i, s0_dat_o, s0_adr_o, s0_sel_o, s0_we_o, s0_cyc_o, |
---|
| 97 | s0_stb_o, s0_ack_i, s0_err_i, s0_rty_i, s0_cab_o, |
---|
| 98 | |
---|
| 99 | // Slave 1 Interface |
---|
| 100 | s1_dat_i, s1_dat_o, s1_adr_o, s1_sel_o, s1_we_o, s1_cyc_o, |
---|
| 101 | s1_stb_o, s1_ack_i, s1_err_i, s1_rty_i, s1_cab_o, |
---|
| 102 | |
---|
| 103 | // Slave 2 Interface |
---|
| 104 | s2_dat_i, s2_dat_o, s2_adr_o, s2_sel_o, s2_we_o, s2_cyc_o, |
---|
| 105 | s2_stb_o, s2_ack_i, s2_err_i, s2_rty_i, s2_cab_o, |
---|
| 106 | |
---|
| 107 | // Slave 3 Interface |
---|
| 108 | s3_dat_i, s3_dat_o, s3_adr_o, s3_sel_o, s3_we_o, s3_cyc_o, |
---|
| 109 | s3_stb_o, s3_ack_i, s3_err_i, s3_rty_i, s3_cab_o, |
---|
| 110 | |
---|
| 111 | // Slave 4 Interface |
---|
| 112 | s4_dat_i, s4_dat_o, s4_adr_o, s4_sel_o, s4_we_o, s4_cyc_o, |
---|
| 113 | s4_stb_o, s4_ack_i, s4_err_i, s4_rty_i, s4_cab_o, |
---|
| 114 | |
---|
| 115 | // Slave 5 Interface |
---|
| 116 | s5_dat_i, s5_dat_o, s5_adr_o, s5_sel_o, s5_we_o, s5_cyc_o, |
---|
| 117 | s5_stb_o, s5_ack_i, s5_err_i, s5_rty_i, s5_cab_o, |
---|
| 118 | |
---|
| 119 | // Slave 6 Interface |
---|
| 120 | s6_dat_i, s6_dat_o, s6_adr_o, s6_sel_o, s6_we_o, s6_cyc_o, |
---|
| 121 | s6_stb_o, s6_ack_i, s6_err_i, s6_rty_i, s6_cab_o, |
---|
| 122 | |
---|
| 123 | // Slave 7 Interface |
---|
| 124 | s7_dat_i, s7_dat_o, s7_adr_o, s7_sel_o, s7_we_o, s7_cyc_o, |
---|
| 125 | s7_stb_o, s7_ack_i, s7_err_i, s7_rty_i, s7_cab_o |
---|
| 126 | |
---|
| 127 | ); |
---|
| 128 | |
---|
| 129 | //////////////////////////////////////////////////////////////////// |
---|
| 130 | // |
---|
| 131 | // Module Parameters |
---|
| 132 | // |
---|
| 133 | |
---|
| 134 | |
---|
[22] | 135 | // address for DDR from 0x0 to 0x7fffffff_ffffffff (64'h00000000_00000000 to 64'h7fffffff_ffffffff) |
---|
[6] | 136 | parameter s0_addr_w = 1 ; // slave 0 address decode width |
---|
[22] | 137 | parameter s0_addr = 1'b0; // slave 0 address |
---|
[17] | 138 | |
---|
[22] | 139 | //address for a 32MB flash from 0x800000ff_f0800000 to 0x800000ff_f0ffffff |
---|
| 140 | //Check address_w |
---|
| 141 | // 32 MB --> 8 MW X32 bits --> 2^23 --> addr_w=64-23=41 |
---|
[6] | 142 | parameter s1_addr_w = 41 ; // slave 1 address decode width |
---|
[22] | 143 | parameter s1_addr = {40'h800000FFF0,1'b0}; // slave 1 address |
---|
[17] | 144 | |
---|
[6] | 145 | parameter s2_addr_w = 56 ; |
---|
[22] | 146 | parameter s2_addr = {56'h800000FFF0C2C1}; // slave 2 address |
---|
[6] | 147 | parameter s3_addr_w = 60 ; |
---|
| 148 | parameter s3_addr = {60'h800000FFF0C2C00}; // slave 3 address |
---|
| 149 | parameter s4_addr_w = 37 ; |
---|
[22] | 150 | parameter s4_addr = {36'h800000FFF,1'b1}; // slave 4 address |
---|
[6] | 151 | parameter s5_addr_w = 60 ; |
---|
| 152 | parameter s5_addr = {60'h400000F00000000}; // slave 5 address |
---|
| 153 | parameter s6_addr_w = 60 ; |
---|
| 154 | parameter s6_addr = {60'h500000F00000000}; // slave 6 address |
---|
| 155 | parameter s7_addr_w = 60 ; |
---|
| 156 | parameter s7_addr = {60'h600000F00000000}; // slave 7 address |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | //////////////////////////////////////////////////////////////////// |
---|
| 160 | // |
---|
| 161 | // Module IOs |
---|
| 162 | // |
---|
| 163 | |
---|
| 164 | input clk_i, rst_i; |
---|
| 165 | |
---|
| 166 | // Master 0 Interface |
---|
| 167 | input [`dw-1:0] m0_dat_i; |
---|
| 168 | output [`dw-1:0] m0_dat_o; |
---|
| 169 | input [`aw-1:0] m0_adr_i; |
---|
| 170 | input [`sw-1:0] m0_sel_i; |
---|
| 171 | input m0_we_i; |
---|
| 172 | input m0_cyc_i; |
---|
| 173 | input m0_stb_i; |
---|
| 174 | input m0_cab_i; |
---|
| 175 | output m0_ack_o; |
---|
| 176 | output m0_err_o; |
---|
| 177 | output m0_rty_o; |
---|
| 178 | |
---|
| 179 | // Master 1 Interface |
---|
| 180 | input [`dw-1:0] m1_dat_i; |
---|
| 181 | output [`dw-1:0] m1_dat_o; |
---|
| 182 | input [`aw-1:0] m1_adr_i; |
---|
| 183 | input [`sw-1:0] m1_sel_i; |
---|
| 184 | input m1_we_i; |
---|
| 185 | input m1_cyc_i; |
---|
| 186 | input m1_stb_i; |
---|
| 187 | input m1_cab_i; |
---|
| 188 | output m1_ack_o; |
---|
| 189 | output m1_err_o; |
---|
| 190 | output m1_rty_o; |
---|
| 191 | |
---|
| 192 | // Master 2 Interface |
---|
| 193 | input [`dw-1:0] m2_dat_i; |
---|
| 194 | output [`dw-1:0] m2_dat_o; |
---|
| 195 | input [`aw-1:0] m2_adr_i; |
---|
| 196 | input [`sw-1:0] m2_sel_i; |
---|
| 197 | input m2_we_i; |
---|
| 198 | input m2_cyc_i; |
---|
| 199 | input m2_stb_i; |
---|
| 200 | input m2_cab_i; |
---|
| 201 | output m2_ack_o; |
---|
| 202 | output m2_err_o; |
---|
| 203 | output m2_rty_o; |
---|
| 204 | |
---|
| 205 | // Master 3 Interface |
---|
| 206 | input [`dw-1:0] m3_dat_i; |
---|
| 207 | output [`dw-1:0] m3_dat_o; |
---|
| 208 | input [`aw-1:0] m3_adr_i; |
---|
| 209 | input [`sw-1:0] m3_sel_i; |
---|
| 210 | input m3_we_i; |
---|
| 211 | input m3_cyc_i; |
---|
| 212 | input m3_stb_i; |
---|
| 213 | input m3_cab_i; |
---|
| 214 | output m3_ack_o; |
---|
| 215 | output m3_err_o; |
---|
| 216 | output m3_rty_o; |
---|
| 217 | |
---|
| 218 | // Master 4 Interface |
---|
| 219 | input [`dw-1:0] m4_dat_i; |
---|
| 220 | output [`dw-1:0] m4_dat_o; |
---|
| 221 | input [`aw-1:0] m4_adr_i; |
---|
| 222 | input [`sw-1:0] m4_sel_i; |
---|
| 223 | input m4_we_i; |
---|
| 224 | input m4_cyc_i; |
---|
| 225 | input m4_stb_i; |
---|
| 226 | input m4_cab_i; |
---|
| 227 | output m4_ack_o; |
---|
| 228 | output m4_err_o; |
---|
| 229 | output m4_rty_o; |
---|
| 230 | |
---|
| 231 | // Master 5 Interface |
---|
| 232 | input [`dw-1:0] m5_dat_i; |
---|
| 233 | output [`dw-1:0] m5_dat_o; |
---|
| 234 | input [`aw-1:0] m5_adr_i; |
---|
| 235 | input [`sw-1:0] m5_sel_i; |
---|
| 236 | input m5_we_i; |
---|
| 237 | input m5_cyc_i; |
---|
| 238 | input m5_stb_i; |
---|
| 239 | input m5_cab_i; |
---|
| 240 | output m5_ack_o; |
---|
| 241 | output m5_err_o; |
---|
| 242 | output m5_rty_o; |
---|
| 243 | |
---|
| 244 | // Master 6 Interface |
---|
| 245 | input [`dw-1:0] m6_dat_i; |
---|
| 246 | output [`dw-1:0] m6_dat_o; |
---|
| 247 | input [`aw-1:0] m6_adr_i; |
---|
| 248 | input [`sw-1:0] m6_sel_i; |
---|
| 249 | input m6_we_i; |
---|
| 250 | input m6_cyc_i; |
---|
| 251 | input m6_stb_i; |
---|
| 252 | input m6_cab_i; |
---|
| 253 | output m6_ack_o; |
---|
| 254 | output m6_err_o; |
---|
| 255 | output m6_rty_o; |
---|
| 256 | |
---|
| 257 | // Master 7 Interface |
---|
| 258 | input [`dw-1:0] m7_dat_i; |
---|
| 259 | output [`dw-1:0] m7_dat_o; |
---|
| 260 | input [`aw-1:0] m7_adr_i; |
---|
| 261 | input [`sw-1:0] m7_sel_i; |
---|
| 262 | input m7_we_i; |
---|
| 263 | input m7_cyc_i; |
---|
| 264 | input m7_stb_i; |
---|
| 265 | input m7_cab_i; |
---|
| 266 | output m7_ack_o; |
---|
| 267 | output m7_err_o; |
---|
| 268 | output m7_rty_o; |
---|
| 269 | |
---|
| 270 | // Slave 0 Interface |
---|
| 271 | input [`dw-1:0] s0_dat_i; |
---|
| 272 | output [`dw-1:0] s0_dat_o; |
---|
| 273 | output [`aw-1:0] s0_adr_o; |
---|
| 274 | output [`sw-1:0] s0_sel_o; |
---|
| 275 | output s0_we_o; |
---|
| 276 | output s0_cyc_o; |
---|
| 277 | output s0_stb_o; |
---|
| 278 | output s0_cab_o; |
---|
| 279 | input s0_ack_i; |
---|
| 280 | input s0_err_i; |
---|
| 281 | input s0_rty_i; |
---|
| 282 | |
---|
| 283 | // Slave 1 Interface |
---|
| 284 | input [`dw-1:0] s1_dat_i; |
---|
| 285 | output [`dw-1:0] s1_dat_o; |
---|
| 286 | output [`aw-1:0] s1_adr_o; |
---|
| 287 | output [`sw-1:0] s1_sel_o; |
---|
| 288 | output s1_we_o; |
---|
| 289 | output s1_cyc_o; |
---|
| 290 | output s1_stb_o; |
---|
| 291 | output s1_cab_o; |
---|
| 292 | input s1_ack_i; |
---|
| 293 | input s1_err_i; |
---|
| 294 | input s1_rty_i; |
---|
| 295 | |
---|
| 296 | // Slave 2 Interface |
---|
| 297 | input [`dw-1:0] s2_dat_i; |
---|
| 298 | output [`dw-1:0] s2_dat_o; |
---|
| 299 | output [`aw-1:0] s2_adr_o; |
---|
| 300 | output [`sw-1:0] s2_sel_o; |
---|
| 301 | output s2_we_o; |
---|
| 302 | output s2_cyc_o; |
---|
| 303 | output s2_stb_o; |
---|
| 304 | output s2_cab_o; |
---|
| 305 | input s2_ack_i; |
---|
| 306 | input s2_err_i; |
---|
| 307 | input s2_rty_i; |
---|
| 308 | |
---|
| 309 | // Slave 3 Interface |
---|
| 310 | input [`dw-1:0] s3_dat_i; |
---|
| 311 | output [`dw-1:0] s3_dat_o; |
---|
| 312 | output [`aw-1:0] s3_adr_o; |
---|
| 313 | output [`sw-1:0] s3_sel_o; |
---|
| 314 | output s3_we_o; |
---|
| 315 | output s3_cyc_o; |
---|
| 316 | output s3_stb_o; |
---|
| 317 | output s3_cab_o; |
---|
| 318 | input s3_ack_i; |
---|
| 319 | input s3_err_i; |
---|
| 320 | input s3_rty_i; |
---|
| 321 | |
---|
| 322 | // Slave 4 Interface |
---|
| 323 | input [`dw-1:0] s4_dat_i; |
---|
| 324 | output [`dw-1:0] s4_dat_o; |
---|
| 325 | output [`aw-1:0] s4_adr_o; |
---|
| 326 | output [`sw-1:0] s4_sel_o; |
---|
| 327 | output s4_we_o; |
---|
| 328 | output s4_cyc_o; |
---|
| 329 | output s4_stb_o; |
---|
| 330 | output s4_cab_o; |
---|
| 331 | input s4_ack_i; |
---|
| 332 | input s4_err_i; |
---|
| 333 | input s4_rty_i; |
---|
| 334 | |
---|
| 335 | // Slave 5 Interface |
---|
| 336 | input [`dw-1:0] s5_dat_i; |
---|
| 337 | output [`dw-1:0] s5_dat_o; |
---|
| 338 | output [`aw-1:0] s5_adr_o; |
---|
| 339 | output [`sw-1:0] s5_sel_o; |
---|
| 340 | output s5_we_o; |
---|
| 341 | output s5_cyc_o; |
---|
| 342 | output s5_stb_o; |
---|
| 343 | output s5_cab_o; |
---|
| 344 | input s5_ack_i; |
---|
| 345 | input s5_err_i; |
---|
| 346 | input s5_rty_i; |
---|
| 347 | |
---|
| 348 | // Slave 6 Interface |
---|
| 349 | input [`dw-1:0] s6_dat_i; |
---|
| 350 | output [`dw-1:0] s6_dat_o; |
---|
| 351 | output [`aw-1:0] s6_adr_o; |
---|
| 352 | output [`sw-1:0] s6_sel_o; |
---|
| 353 | output s6_we_o; |
---|
| 354 | output s6_cyc_o; |
---|
| 355 | output s6_stb_o; |
---|
| 356 | output s6_cab_o; |
---|
| 357 | input s6_ack_i; |
---|
| 358 | input s6_err_i; |
---|
| 359 | input s6_rty_i; |
---|
| 360 | |
---|
| 361 | // Slave 7 Interface |
---|
| 362 | input [`dw-1:0] s7_dat_i; |
---|
| 363 | output [`dw-1:0] s7_dat_o; |
---|
| 364 | output [`aw-1:0] s7_adr_o; |
---|
| 365 | output [`sw-1:0] s7_sel_o; |
---|
| 366 | output s7_we_o; |
---|
| 367 | output s7_cyc_o; |
---|
| 368 | output s7_stb_o; |
---|
| 369 | output s7_cab_o; |
---|
| 370 | input s7_ack_i; |
---|
| 371 | input s7_err_i; |
---|
| 372 | input s7_rty_i; |
---|
| 373 | |
---|
| 374 | |
---|
| 375 | //////////////////////////////////////////////////////////////////// |
---|
| 376 | // |
---|
| 377 | // Local wires |
---|
| 378 | // |
---|
| 379 | |
---|
| 380 | wire [`mselectw -1:0] i_gnt_arb; |
---|
| 381 | wire [2:0] gnt; |
---|
| 382 | reg [`sselectw -1:0] i_ssel_dec; |
---|
| 383 | `ifdef WB_USE_TRISTATE |
---|
| 384 | wire [`mbusw -1:0] i_bus_m; |
---|
| 385 | `else |
---|
| 386 | reg [`mbusw -1:0] i_bus_m; // internal share bus, master data and control to slave |
---|
| 387 | `endif |
---|
| 388 | wire [`dw -1:0] i_dat_s; // internal share bus , slave data to master |
---|
| 389 | wire [`sbusw -1:0] i_bus_s; // internal share bus , slave control to master |
---|
| 390 | |
---|
| 391 | |
---|
| 392 | |
---|
| 393 | //////////////////////////////////////////////////////////////////// |
---|
| 394 | // |
---|
| 395 | // Master output Interfaces |
---|
| 396 | // |
---|
| 397 | |
---|
| 398 | // master0 |
---|
| 399 | assign m0_dat_o = i_dat_s; |
---|
| 400 | assign {m0_ack_o, m0_err_o, m0_rty_o} = i_bus_s & {3{i_gnt_arb[0]}}; |
---|
| 401 | |
---|
| 402 | // master1 |
---|
| 403 | assign m1_dat_o = i_dat_s; |
---|
| 404 | assign {m1_ack_o, m1_err_o, m1_rty_o} = i_bus_s & {3{i_gnt_arb[1]}}; |
---|
| 405 | |
---|
| 406 | // master2 |
---|
| 407 | |
---|
| 408 | assign m2_dat_o = i_dat_s; |
---|
| 409 | assign {m2_ack_o, m2_err_o, m2_rty_o} = i_bus_s & {3{i_gnt_arb[2]}}; |
---|
| 410 | |
---|
| 411 | // master3 |
---|
| 412 | |
---|
| 413 | assign m3_dat_o = i_dat_s; |
---|
| 414 | assign {m3_ack_o, m3_err_o, m3_rty_o} = i_bus_s & {3{i_gnt_arb[3]}}; |
---|
| 415 | |
---|
| 416 | // master4 |
---|
| 417 | |
---|
| 418 | assign m4_dat_o = i_dat_s; |
---|
| 419 | assign {m4_ack_o, m4_err_o, m4_rty_o} = i_bus_s & {3{i_gnt_arb[4]}}; |
---|
| 420 | |
---|
| 421 | // master5 |
---|
| 422 | |
---|
| 423 | assign m5_dat_o = i_dat_s; |
---|
| 424 | assign {m5_ack_o, m5_err_o, m5_rty_o} = i_bus_s & {3{i_gnt_arb[5]}}; |
---|
| 425 | |
---|
| 426 | // master6 |
---|
| 427 | |
---|
| 428 | assign m6_dat_o = i_dat_s; |
---|
| 429 | assign {m6_ack_o, m6_err_o, m6_rty_o} = i_bus_s & {3{i_gnt_arb[6]}}; |
---|
| 430 | |
---|
| 431 | // master7 |
---|
| 432 | |
---|
| 433 | assign m7_dat_o = i_dat_s; |
---|
| 434 | assign {m7_ack_o, m7_err_o, m7_rty_o} = i_bus_s & {3{i_gnt_arb[7]}}; |
---|
| 435 | |
---|
| 436 | |
---|
| 437 | assign i_bus_s = {s0_ack_i | s1_ack_i | s2_ack_i | s3_ack_i | s4_ack_i | s5_ack_i | s6_ack_i | s7_ack_i , |
---|
| 438 | s0_err_i | s1_err_i | s2_err_i | s3_err_i | s4_err_i | s5_err_i | s6_err_i | s7_err_i , |
---|
| 439 | s0_rty_i | s1_rty_i | s2_rty_i | s3_rty_i | s4_rty_i | s5_rty_i | s6_rty_i | s7_rty_i }; |
---|
| 440 | |
---|
| 441 | //////////////////////////////// |
---|
| 442 | // Slave output interface |
---|
| 443 | // |
---|
| 444 | // slave0 |
---|
| 445 | assign {s0_adr_o, s0_sel_o, s0_dat_o, s0_we_o, s0_cab_o,s0_cyc_o} = i_bus_m[`mbusw -1:1]; |
---|
| 446 | assign s0_stb_o = i_bus_m[1] & i_bus_m[0] & i_ssel_dec[0]; // stb_o = cyc_i & stb_i & i_ssel_dec |
---|
| 447 | |
---|
| 448 | // slave1 |
---|
| 449 | |
---|
| 450 | assign {s1_adr_o, s1_sel_o, s1_dat_o, s1_we_o, s1_cab_o, s1_cyc_o} = i_bus_m[`mbusw -1:1]; |
---|
| 451 | assign s1_stb_o = i_bus_m[1] & i_bus_m[0] & i_ssel_dec[1]; |
---|
| 452 | |
---|
| 453 | // slave2 |
---|
| 454 | |
---|
| 455 | assign {s2_adr_o, s2_sel_o, s2_dat_o, s2_we_o, s2_cab_o, s2_cyc_o} = i_bus_m[`mbusw -1:1]; |
---|
| 456 | assign s2_stb_o = i_bus_m[1] & i_bus_m[0] & i_ssel_dec[2]; |
---|
| 457 | |
---|
| 458 | // slave3 |
---|
| 459 | |
---|
| 460 | assign {s3_adr_o, s3_sel_o, s3_dat_o, s3_we_o, s3_cab_o, s3_cyc_o} = i_bus_m[`mbusw -1:1]; |
---|
| 461 | assign s3_stb_o = i_bus_m[1] & i_bus_m[0] & i_ssel_dec[3]; |
---|
| 462 | |
---|
| 463 | // slave4 |
---|
| 464 | |
---|
| 465 | assign {s4_adr_o, s4_sel_o, s4_dat_o, s4_we_o, s4_cab_o, s4_cyc_o} = i_bus_m[`mbusw -1:1]; |
---|
| 466 | assign s4_stb_o = i_bus_m[1] & i_bus_m[0] & i_ssel_dec[4]; |
---|
| 467 | |
---|
| 468 | // slave5 |
---|
| 469 | |
---|
| 470 | assign {s5_adr_o, s5_sel_o, s5_dat_o, s5_we_o, s5_cab_o, s5_cyc_o} = i_bus_m[`mbusw -1:1]; |
---|
| 471 | assign s5_stb_o = i_bus_m[1] & i_bus_m[0] & i_ssel_dec[5]; |
---|
| 472 | |
---|
| 473 | // slave6 |
---|
| 474 | |
---|
| 475 | assign {s6_adr_o, s6_sel_o, s6_dat_o, s6_we_o, s6_cab_o, s6_cyc_o} = i_bus_m[`mbusw -1:1]; |
---|
| 476 | assign s6_stb_o = i_bus_m[1] & i_bus_m[0] & i_ssel_dec[6]; |
---|
| 477 | |
---|
| 478 | // slave7 |
---|
| 479 | |
---|
| 480 | assign {s7_adr_o, s7_sel_o, s7_dat_o, s7_we_o, s7_cab_o, s7_cyc_o} = i_bus_m[`mbusw -1:1]; |
---|
| 481 | assign s7_stb_o = i_bus_m[1] & i_bus_m[0] & i_ssel_dec[7]; |
---|
| 482 | |
---|
| 483 | /////////////////////////////////////// |
---|
| 484 | // Master and Slave input interface |
---|
| 485 | // |
---|
| 486 | |
---|
| 487 | `ifdef WB_USE_TRISTATE |
---|
| 488 | // input from master interface |
---|
| 489 | assign i_bus_m = i_gnt_arb[0] ? {m0_adr_i, m0_sel_i, m0_dat_i, m0_we_i, m0_cab_i, m0_cyc_i, m0_stb_i} : 72'bz ; |
---|
| 490 | assign i_bus_m = i_gnt_arb[1] ? {m1_adr_i, m1_sel_i, m1_dat_i, m1_we_i, m1_cab_i,m1_cyc_i, m1_stb_i} : 72'bz ; |
---|
| 491 | assign i_bus_m = i_gnt_arb[2] ? {m2_adr_i, m2_sel_i, m2_dat_i, m2_we_i, m2_cab_i, m2_cyc_i, m2_stb_i} : 72'bz ; |
---|
| 492 | assign i_bus_m = i_gnt_arb[3] ? {m3_adr_i, m3_sel_i, m3_dat_i, m3_we_i, m3_cab_i, m3_cyc_i, m3_stb_i} : 72'bz ; |
---|
| 493 | assign i_bus_m = i_gnt_arb[4] ? {m4_adr_i, m4_sel_i, m4_dat_i, m4_we_i, m4_cab_i, m4_cyc_i, m4_stb_i} : 72'bz ; |
---|
| 494 | assign i_bus_m = i_gnt_arb[5] ? {m5_adr_i, m5_sel_i, m5_dat_i, m5_we_i, m5_cab_i, m5_cyc_i, m5_stb_i} : 72'bz ; |
---|
| 495 | assign i_bus_m = i_gnt_arb[6] ? {m6_adr_i, m6_sel_i, m6_dat_i, m6_we_i, m6_cab_i, m6_cyc_i, m6_stb_i} : 72'bz ; |
---|
| 496 | assign i_bus_m = i_gnt_arb[7] ? {m7_adr_i, m7_sel_i, m7_dat_i, m7_we_i, m7_cab_i, m7_cyc_i,m7_stb_i} : 72'bz ; |
---|
| 497 | // input from slave interface |
---|
| 498 | assign i_dat_s = i_ssel_dec[0] ? s0_dat_i: 32'bz; |
---|
| 499 | assign i_dat_s = i_ssel_dec[1] ? s1_dat_i: 32'bz; |
---|
| 500 | assign i_dat_s = i_ssel_dec[2] ? s2_dat_i: 32'bz; |
---|
| 501 | assign i_dat_s = i_ssel_dec[3] ? s3_dat_i: 32'bz; |
---|
| 502 | assign i_dat_s = i_ssel_dec[4] ? s4_dat_i: 32'bz; |
---|
| 503 | assign i_dat_s = i_ssel_dec[5] ? s5_dat_i: 32'bz; |
---|
| 504 | assign i_dat_s = i_ssel_dec[6] ? s6_dat_i: 32'bz; |
---|
| 505 | assign i_dat_s = i_ssel_dec[7] ? s7_dat_i: 32'bz; |
---|
| 506 | |
---|
| 507 | `else |
---|
| 508 | |
---|
| 509 | always @(gnt , m0_adr_i, m0_sel_i, m0_dat_i, m0_we_i, m0_cab_i, m0_cyc_i,m0_stb_i, |
---|
| 510 | m1_adr_i, m1_sel_i, m1_dat_i, m1_we_i, m1_cab_i, m1_cyc_i,m1_stb_i, |
---|
| 511 | m2_adr_i, m2_sel_i, m2_dat_i, m2_we_i, m2_cab_i, m2_cyc_i,m2_stb_i, |
---|
| 512 | m3_adr_i, m3_sel_i, m3_dat_i, m3_we_i, m3_cab_i, m3_cyc_i,m3_stb_i, |
---|
| 513 | m4_adr_i, m4_sel_i, m4_dat_i, m4_we_i, m4_cab_i, m4_cyc_i,m4_stb_i, |
---|
| 514 | m5_adr_i, m5_sel_i, m5_dat_i, m5_we_i, m5_cab_i, m5_cyc_i,m5_stb_i, |
---|
| 515 | m6_adr_i, m6_sel_i, m6_dat_i, m6_we_i, m6_cab_i, m6_cyc_i,m6_stb_i, |
---|
| 516 | m7_adr_i, m7_sel_i, m7_dat_i, m7_we_i, m7_cab_i, m7_cyc_i,m7_stb_i) |
---|
| 517 | case(gnt) |
---|
| 518 | 3'h0: i_bus_m = {m0_adr_i, m0_sel_i, m0_dat_i, m0_we_i, m0_cab_i, m0_cyc_i,m0_stb_i}; |
---|
| 519 | 3'h1: i_bus_m = {m1_adr_i, m1_sel_i, m1_dat_i, m1_we_i, m1_cab_i, m1_cyc_i,m1_stb_i}; |
---|
| 520 | 3'h2: i_bus_m = {m2_adr_i, m2_sel_i, m2_dat_i, m2_we_i, m2_cab_i, m2_cyc_i,m2_stb_i}; |
---|
| 521 | 3'h3: i_bus_m = {m3_adr_i, m3_sel_i, m3_dat_i, m3_we_i, m3_cab_i, m3_cyc_i,m3_stb_i}; |
---|
| 522 | 3'h4: i_bus_m = {m4_adr_i, m4_sel_i, m4_dat_i, m4_we_i, m4_cab_i, m4_cyc_i,m4_stb_i}; |
---|
| 523 | 3'h5: i_bus_m = {m5_adr_i, m5_sel_i, m5_dat_i, m5_we_i, m5_cab_i, m5_cyc_i,m5_stb_i}; |
---|
| 524 | 3'h6: i_bus_m = {m6_adr_i, m6_sel_i, m6_dat_i, m6_we_i, m6_cab_i, m6_cyc_i,m6_stb_i}; |
---|
| 525 | 3'h7: i_bus_m = {m7_adr_i, m7_sel_i, m7_dat_i, m7_we_i, m7_cab_i, m7_cyc_i,m7_stb_i}; |
---|
| 526 | default:i_bus_m = 72'b0;//{m0_adr_i, m0_sel_i, m0_dat_i, m0_we_i, m0_cab_i, m0_cyc_i,m0_stb_i}; |
---|
| 527 | endcase |
---|
| 528 | |
---|
| 529 | assign i_dat_s = i_ssel_dec[0] ? s0_dat_i : |
---|
| 530 | i_ssel_dec[1] ? s1_dat_i : |
---|
| 531 | i_ssel_dec[2] ? s2_dat_i : |
---|
| 532 | i_ssel_dec[3] ? s3_dat_i : |
---|
| 533 | i_ssel_dec[4] ? s4_dat_i : |
---|
| 534 | i_ssel_dec[5] ? s5_dat_i : |
---|
| 535 | i_ssel_dec[6] ? s6_dat_i : |
---|
| 536 | i_ssel_dec[7] ? s7_dat_i : {`dw{1'b0}}; |
---|
| 537 | `endif |
---|
| 538 | // |
---|
| 539 | // arbitor |
---|
| 540 | // |
---|
| 541 | assign i_gnt_arb[0] = (gnt == 3'd0); |
---|
| 542 | assign i_gnt_arb[1] = (gnt == 3'd1); |
---|
| 543 | assign i_gnt_arb[2] = (gnt == 3'd2); |
---|
| 544 | assign i_gnt_arb[3] = (gnt == 3'd3); |
---|
| 545 | assign i_gnt_arb[4] = (gnt == 3'd4); |
---|
| 546 | assign i_gnt_arb[5] = (gnt == 3'd5); |
---|
| 547 | assign i_gnt_arb[6] = (gnt == 3'd6); |
---|
| 548 | assign i_gnt_arb[7] = (gnt == 3'd7); |
---|
| 549 | |
---|
| 550 | wb_conbus_arb wb_conbus_arb( |
---|
| 551 | .clk(clk_i), |
---|
| 552 | .rst(rst_i), |
---|
| 553 | .req({ m7_cyc_i, |
---|
| 554 | m6_cyc_i, |
---|
| 555 | m5_cyc_i, |
---|
| 556 | m4_cyc_i, |
---|
| 557 | m3_cyc_i, |
---|
| 558 | m2_cyc_i, |
---|
| 559 | m1_cyc_i, |
---|
| 560 | m0_cyc_i}), |
---|
| 561 | .gnt(gnt) |
---|
| 562 | ); |
---|
| 563 | |
---|
| 564 | ////////////////////////////////// |
---|
| 565 | // address decode logic |
---|
| 566 | // |
---|
| 567 | wire [7:0] m0_ssel_dec, m1_ssel_dec, m2_ssel_dec, m3_ssel_dec, m4_ssel_dec, m5_ssel_dec, m6_ssel_dec, m7_ssel_dec; |
---|
| 568 | always @(gnt, m0_ssel_dec, m1_ssel_dec, m2_ssel_dec, m3_ssel_dec, m4_ssel_dec, m5_ssel_dec, m6_ssel_dec, m7_ssel_dec) |
---|
| 569 | case(gnt) |
---|
| 570 | 3'h0: i_ssel_dec = m0_ssel_dec; |
---|
| 571 | 3'h1: i_ssel_dec = m1_ssel_dec; |
---|
| 572 | 3'h2: i_ssel_dec = m2_ssel_dec; |
---|
| 573 | 3'h3: i_ssel_dec = m3_ssel_dec; |
---|
| 574 | 3'h4: i_ssel_dec = m4_ssel_dec; |
---|
| 575 | 3'h5: i_ssel_dec = m5_ssel_dec; |
---|
| 576 | 3'h6: i_ssel_dec = m6_ssel_dec; |
---|
| 577 | 3'h7: i_ssel_dec = m7_ssel_dec; |
---|
| 578 | default: i_ssel_dec = 7'b0; |
---|
| 579 | endcase |
---|
| 580 | // |
---|
| 581 | // decode all master address before arbitor for running faster |
---|
| 582 | // |
---|
| 583 | assign m0_ssel_dec[0] = (m0_adr_i[`aw -1 : `aw - s0_addr_w ] == s0_addr); |
---|
| 584 | assign m0_ssel_dec[1] = (m0_adr_i[`aw -1 : `aw - s1_addr_w ] == s1_addr); |
---|
| 585 | assign m0_ssel_dec[2] = (m0_adr_i[`aw -1 : `aw - s2_addr_w ] == s2_addr); |
---|
| 586 | assign m0_ssel_dec[3] = (m0_adr_i[`aw -1 : `aw - s3_addr_w ] == s3_addr); |
---|
| 587 | assign m0_ssel_dec[4] = (m0_adr_i[`aw -1 : `aw - s4_addr_w ] == s4_addr); |
---|
| 588 | assign m0_ssel_dec[5] = (m0_adr_i[`aw -1 : `aw - s5_addr_w ] == s5_addr); |
---|
| 589 | assign m0_ssel_dec[6] = (m0_adr_i[`aw -1 : `aw - s6_addr_w ] == s6_addr); |
---|
| 590 | assign m0_ssel_dec[7] = (m0_adr_i[`aw -1 : `aw - s7_addr_w ] == s7_addr); |
---|
| 591 | |
---|
| 592 | assign m1_ssel_dec[0] = (m1_adr_i[`aw -1 : `aw - s0_addr_w ] == s0_addr); |
---|
| 593 | assign m1_ssel_dec[1] = (m1_adr_i[`aw -1 : `aw - s1_addr_w ] == s1_addr); |
---|
| 594 | assign m1_ssel_dec[2] = (m1_adr_i[`aw -1 : `aw - s2_addr_w ] == s2_addr); |
---|
| 595 | assign m1_ssel_dec[3] = (m1_adr_i[`aw -1 : `aw - s3_addr_w ] == s3_addr); |
---|
| 596 | assign m1_ssel_dec[4] = (m1_adr_i[`aw -1 : `aw - s4_addr_w ] == s4_addr); |
---|
| 597 | assign m1_ssel_dec[5] = (m1_adr_i[`aw -1 : `aw - s5_addr_w ] == s5_addr); |
---|
| 598 | assign m1_ssel_dec[6] = (m1_adr_i[`aw -1 : `aw - s6_addr_w ] == s6_addr); |
---|
| 599 | assign m1_ssel_dec[7] = (m1_adr_i[`aw -1 : `aw - s7_addr_w ] == s7_addr); |
---|
| 600 | |
---|
| 601 | assign m2_ssel_dec[0] = (m2_adr_i[`aw -1 : `aw - s0_addr_w ] == s0_addr); |
---|
| 602 | assign m2_ssel_dec[1] = (m2_adr_i[`aw -1 : `aw - s1_addr_w ] == s1_addr); |
---|
| 603 | assign m2_ssel_dec[2] = (m2_adr_i[`aw -1 : `aw - s2_addr_w ] == s2_addr); |
---|
| 604 | assign m2_ssel_dec[3] = (m2_adr_i[`aw -1 : `aw - s3_addr_w ] == s3_addr); |
---|
| 605 | assign m2_ssel_dec[4] = (m2_adr_i[`aw -1 : `aw - s4_addr_w ] == s4_addr); |
---|
| 606 | assign m2_ssel_dec[5] = (m2_adr_i[`aw -1 : `aw - s5_addr_w ] == s5_addr); |
---|
| 607 | assign m2_ssel_dec[6] = (m2_adr_i[`aw -1 : `aw - s6_addr_w ] == s6_addr); |
---|
| 608 | assign m2_ssel_dec[7] = (m2_adr_i[`aw -1 : `aw - s7_addr_w ] == s7_addr); |
---|
| 609 | |
---|
| 610 | assign m3_ssel_dec[0] = (m3_adr_i[`aw -1 : `aw - s0_addr_w ] == s0_addr); |
---|
| 611 | assign m3_ssel_dec[1] = (m3_adr_i[`aw -1 : `aw - s1_addr_w ] == s1_addr); |
---|
| 612 | assign m3_ssel_dec[2] = (m3_adr_i[`aw -1 : `aw - s2_addr_w ] == s2_addr); |
---|
| 613 | assign m3_ssel_dec[3] = (m3_adr_i[`aw -1 : `aw - s3_addr_w ] == s3_addr); |
---|
| 614 | assign m3_ssel_dec[4] = (m3_adr_i[`aw -1 : `aw - s4_addr_w ] == s4_addr); |
---|
| 615 | assign m3_ssel_dec[5] = (m3_adr_i[`aw -1 : `aw - s5_addr_w ] == s5_addr); |
---|
| 616 | assign m3_ssel_dec[6] = (m3_adr_i[`aw -1 : `aw - s6_addr_w ] == s6_addr); |
---|
| 617 | assign m3_ssel_dec[7] = (m3_adr_i[`aw -1 : `aw - s7_addr_w ] == s7_addr); |
---|
| 618 | |
---|
| 619 | assign m4_ssel_dec[0] = (m4_adr_i[`aw -1 : `aw - s0_addr_w ] == s0_addr); |
---|
| 620 | assign m4_ssel_dec[1] = (m4_adr_i[`aw -1 : `aw - s1_addr_w ] == s1_addr); |
---|
| 621 | assign m4_ssel_dec[2] = (m4_adr_i[`aw -1 : `aw - s2_addr_w ] == s2_addr); |
---|
| 622 | assign m4_ssel_dec[3] = (m4_adr_i[`aw -1 : `aw - s3_addr_w ] == s3_addr); |
---|
| 623 | assign m4_ssel_dec[4] = (m4_adr_i[`aw -1 : `aw - s4_addr_w ] == s4_addr); |
---|
| 624 | assign m4_ssel_dec[5] = (m4_adr_i[`aw -1 : `aw - s5_addr_w ] == s5_addr); |
---|
| 625 | assign m4_ssel_dec[6] = (m4_adr_i[`aw -1 : `aw - s6_addr_w ] == s6_addr); |
---|
| 626 | assign m4_ssel_dec[7] = (m4_adr_i[`aw -1 : `aw - s7_addr_w ] == s7_addr); |
---|
| 627 | |
---|
| 628 | assign m5_ssel_dec[0] = (m5_adr_i[`aw -1 : `aw - s0_addr_w ] == s0_addr); |
---|
| 629 | assign m5_ssel_dec[1] = (m5_adr_i[`aw -1 : `aw - s1_addr_w ] == s1_addr); |
---|
| 630 | assign m5_ssel_dec[2] = (m5_adr_i[`aw -1 : `aw - s2_addr_w ] == s2_addr); |
---|
| 631 | assign m5_ssel_dec[3] = (m5_adr_i[`aw -1 : `aw - s3_addr_w ] == s3_addr); |
---|
| 632 | assign m5_ssel_dec[4] = (m5_adr_i[`aw -1 : `aw - s4_addr_w ] == s4_addr); |
---|
| 633 | assign m5_ssel_dec[5] = (m5_adr_i[`aw -1 : `aw - s5_addr_w ] == s5_addr); |
---|
| 634 | assign m5_ssel_dec[6] = (m5_adr_i[`aw -1 : `aw - s6_addr_w ] == s6_addr); |
---|
| 635 | assign m5_ssel_dec[7] = (m5_adr_i[`aw -1 : `aw - s7_addr_w ] == s7_addr); |
---|
| 636 | |
---|
| 637 | assign m6_ssel_dec[0] = (m6_adr_i[`aw -1 : `aw - s0_addr_w ] == s0_addr); |
---|
| 638 | assign m6_ssel_dec[1] = (m6_adr_i[`aw -1 : `aw - s1_addr_w ] == s1_addr); |
---|
| 639 | assign m6_ssel_dec[2] = (m6_adr_i[`aw -1 : `aw - s2_addr_w ] == s2_addr); |
---|
| 640 | assign m6_ssel_dec[3] = (m6_adr_i[`aw -1 : `aw - s3_addr_w ] == s3_addr); |
---|
| 641 | assign m6_ssel_dec[4] = (m6_adr_i[`aw -1 : `aw - s4_addr_w ] == s4_addr); |
---|
| 642 | assign m6_ssel_dec[5] = (m6_adr_i[`aw -1 : `aw - s5_addr_w ] == s5_addr); |
---|
| 643 | assign m6_ssel_dec[6] = (m6_adr_i[`aw -1 : `aw - s6_addr_w ] == s6_addr); |
---|
| 644 | assign m6_ssel_dec[7] = (m6_adr_i[`aw -1 : `aw - s7_addr_w ] == s7_addr); |
---|
| 645 | |
---|
| 646 | assign m7_ssel_dec[0] = (m7_adr_i[`aw -1 : `aw - s0_addr_w ] == s0_addr); |
---|
| 647 | assign m7_ssel_dec[1] = (m7_adr_i[`aw -1 : `aw - s1_addr_w ] == s1_addr); |
---|
| 648 | assign m7_ssel_dec[2] = (m7_adr_i[`aw -1 : `aw - s2_addr_w ] == s2_addr); |
---|
| 649 | assign m7_ssel_dec[3] = (m7_adr_i[`aw -1 : `aw - s3_addr_w ] == s3_addr); |
---|
| 650 | assign m7_ssel_dec[4] = (m7_adr_i[`aw -1 : `aw - s4_addr_w ] == s4_addr); |
---|
| 651 | assign m7_ssel_dec[5] = (m7_adr_i[`aw -1 : `aw - s5_addr_w ] == s5_addr); |
---|
| 652 | assign m7_ssel_dec[6] = (m7_adr_i[`aw -1 : `aw - s6_addr_w ] == s6_addr); |
---|
| 653 | assign m7_ssel_dec[7] = (m7_adr_i[`aw -1 : `aw - s7_addr_w ] == s7_addr); |
---|
| 654 | |
---|
| 655 | //assign i_ssel_dec[0] = (i_bus_m[`mbusw -1 : `mbusw - s0_addr_w ] == s0_addr); |
---|
| 656 | //assign i_ssel_dec[1] = (i_bus_m[`mbusw -1 : `mbusw - s1_addr_w ] == s1_addr); |
---|
| 657 | //assign i_ssel_dec[2] = (i_bus_m[`mbusw -1 : `mbusw - s27_addr_w ] == s2_addr); |
---|
| 658 | //assign i_ssel_dec[3] = (i_bus_m[`mbusw -1 : `mbusw - s27_addr_w ] == s3_addr); |
---|
| 659 | //assign i_ssel_dec[4] = (i_bus_m[`mbusw -1 : `mbusw - s27_addr_w ] == s4_addr); |
---|
| 660 | //assign i_ssel_dec[5] = (i_bus_m[`mbusw -1 : `mbusw - s27_addr_w ] == s5_addr); |
---|
| 661 | //assign i_ssel_dec[6] = (i_bus_m[`mbusw -1 : `mbusw - s27_addr_w ] == s6_addr); |
---|
| 662 | //assign i_ssel_dec[7] = (i_bus_m[`mbusw -1 : `mbusw - s27_addr_w ] == s7_addr); |
---|
| 663 | |
---|
| 664 | |
---|
| 665 | endmodule |
---|
| 666 | |
---|