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

Subversion Repositories dma_axi

[/] [dma_axi/] [trunk/] [src/] [dma_axi32/] [dma_axi32_core0_channels_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 2 eyalhoc
//---------------------------------------------------------
30
//-- File generated by RobustVerilog parser
31
//-- Version: 1.0
32
//-- Invoked Fri Mar 25 23:34:52 2011
33
//--
34
//-- Source file: dma_core_channels_apb_mux.v
35
//---------------------------------------------------------
36
 
37
 
38
 
39
module  dma_axi32_core0_channels_apb_mux (clk,reset,pclken,psel,penable,paddr,prdata,pslverr,ch_psel,ch_prdata,ch_pslverr);
40
 
41
   input                 clk;
42
   input                 reset;
43
 
44
   input          pclken;
45
   input          psel;
46
   input                 penable;
47
   input [10:8]          paddr;
48
   output [31:0]         prdata;
49
   output          pslverr;
50
 
51
   output [7:0]      ch_psel;
52
   input [32*8-1:0]      ch_prdata;
53
   input [7:0]          ch_pslverr;
54
 
55
 
56
   wire [2:0]          paddr_sel;
57
   reg [2:0]          paddr_sel_d;
58
 
59
 
60
 
61
   always @(posedge clk or posedge reset)
62
     if (reset)
63
       paddr_sel_d <= #1 3'b000;
64
     else if (psel & (~penable))
65
       paddr_sel_d <= #1 paddr_sel;
66
     else if ((~psel) & pclken) //release for empty channels after error
67
       paddr_sel_d <= #1 3'b000;
68
 
69
 
70
 
71
   assign          paddr_sel = paddr[10:8];
72
 
73
   prgen_demux8 #(1) mux_psel(
74
                  .sel(paddr_sel),
75
                  .x(psel),
76
                  .ch_x(ch_psel)
77
                  );
78
 
79
 
80
   prgen_mux8 #(32) mux_prdata(
81
                   .sel(paddr_sel_d),
82
 
83
                   .ch_x(ch_prdata),
84
                   .x(prdata)
85
                   );
86
 
87
 
88
   assign                pslverr = ch_pslverr[paddr_sel_d];
89
 
90
endmodule
91
 
92
 
93
 
94
 
95
 
96
 
97
 
98
 
99
 
100
 

powered by: WebSVN 2.1.0

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