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

Subversion Repositories dma_ahb

[/] [dma_ahb/] [trunk/] [src/] [dma_ahb32/] [dma_ahb32_apb_mux.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 eyalhoc
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  Author: Eyal Hochberg                                      ////
4
////          eyal@provartec.com                                 ////
5
////                                                             ////
6
////  Downloaded from: http://www.opencores.org                  ////
7
/////////////////////////////////////////////////////////////////////
8
////                                                             ////
9
//// Copyright (C) 2010 Provartec LTD                            ////
10
//// www.provartec.com                                           ////
11
//// info@provartec.com                                          ////
12
////                                                             ////
13
//// This source file may be used and distributed without        ////
14
//// restriction provided that this copyright statement is not   ////
15
//// removed from the file and that any derivative work contains ////
16
//// the original copyright notice and the associated disclaimer.////
17
////                                                             ////
18
//// This source file is free software; you can redistribute it  ////
19
//// and/or modify it under the terms of the GNU Lesser General  ////
20
//// Public License as published by the Free Software Foundation.////
21
////                                                             ////
22
//// This source is distributed in the hope that it will be      ////
23
//// useful, but WITHOUT ANY WARRANTY; without even the implied  ////
24
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     ////
25
//// PURPOSE.  See the GNU Lesser General Public License for more////
26
//// details. http://www.gnu.org/licenses/lgpl.html              ////
27
////                                                             ////
28
/////////////////////////////////////////////////////////////////////
29
//---------------------------------------------------------
30
//-- File generated by RobustVerilog parser
31
//-- Version: 1.0
32
//-- Invoked Fri Mar 25 23:31:21 2011
33
//--
34
//-- Source file: dma_apb_mux.v
35
//---------------------------------------------------------
36
 
37
 
38
 
39
module  dma_ahb32_apb_mux (clk,reset,pclken,psel,penable,pwrite,paddr,prdata,pslverr,pready,psel0,prdata0,pslverr0,psel1,prdata1,pslverr1,psel_reg,prdata_reg,pslverr_reg);
40
 
41
   input                 clk;
42
   input                 reset;
43
 
44
   input                 pclken;
45
   input                 psel;
46
   input                 penable;
47
   input          pwrite;
48
   input [12:11]      paddr;
49
   output [31:0]         prdata;
50
   output          pslverr;
51
   output          pready;
52
 
53
   output          psel0;
54
   input [31:0]      prdata0;
55
   input           pslverr0;
56
 
57
   output          psel1;
58
   input [31:0]      prdata1;
59
   input           pslverr1;
60
 
61
   output          psel_reg;
62
   input [31:0]      prdata_reg;
63
   input           pslverr_reg;
64
 
65
   wire [31:0]          prdata_pre;
66
   wire          pslverr_pre;
67
 
68
 
69
   reg              pready;
70
 
71
 
72
   assign          psel0    = pclken & psel & (paddr[12:11] == 2'b00);
73
   assign          psel1    = pclken & psel & (paddr[12:11] == 2'b01);
74
   assign          psel_reg = pclken & psel & (paddr[12] == 1'b1);
75
 
76
   assign          prdata_pre  = prdata0 | prdata1 | prdata_reg;
77
   assign          pslverr_pre = pslverr0 | pslverr1 | pslverr_reg;
78
 
79
   assign          prdata = prdata_pre;
80
   assign          pslverr = pslverr_pre;
81
 
82
 
83
   always @(posedge clk or posedge reset)
84
     if (reset)
85
       pready <= #1 1'b0;
86
     else if (pclken)
87
       pready <= #1 psel & (~penable);
88
 
89
 
90
endmodule
91
 
92
 
93
 

powered by: WebSVN 2.1.0

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