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

Subversion Repositories dma_axi

[/] [dma_axi/] [trunk/] [src/] [dma_axi32/] [dma_axi32_core0_axim_resp.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_axim_resp.v
35
//---------------------------------------------------------
36
 
37
 
38
 
39
module dma_axi32_core0_axim_resp(clk,reset,slverr,decerr,clr,clr_last,ch_num_resp,resp_full,AID,AVALID,AREADY,RESP,ID,VALID,READY,LAST);
40
 
41
   parameter                  CMD_DEPTH = 8;
42
 
43
   input               clk;
44
   input               reset;
45
 
46
   output               slverr;
47
   output               decerr;
48
   output               clr;
49
   output               clr_last;
50
   output [2:0]           ch_num_resp;
51
   output               resp_full;
52
 
53
 
54
   input [`CMD_BITS-1:0]      AID;
55
   input               AVALID;
56
   input               AREADY;
57
   input [1:0]               RESP;
58
   output [`CMD_BITS-1:0]     ID;
59
   input               VALID;
60
   input               READY;
61
   input               LAST;
62
 
63
 
64
 
65
   parameter                  RESP_SLVERR = 2'b10;
66
   parameter                  RESP_DECERR = 2'b11;
67
 
68
 
69
   wire               clr_pre;
70
   wire [2:0]               ch_num_resp_pre;
71
   wire               clr_last_pre;
72
   wire               slverr_pre;
73
   wire               decerr_pre;
74
   reg [2:0]               ch_num_resp;
75
 
76
   wire               resp_push;
77
   wire               resp_pop;
78
   wire               resp_empty;
79
   wire               resp_full;
80
   wire [`CMD_BITS-1:0]       ID;
81
 
82
 
83
   assign               resp_push       = AVALID & AREADY;
84
   assign               resp_pop        = VALID & READY & LAST;
85
 
86
   assign               clr_pre         = resp_pop;
87
 
88
   assign               ch_num_resp_pre = ID[2:0] ;
89
 
90
   assign               slverr_pre      = clr_pre & RESP == RESP_SLVERR;
91
   assign               decerr_pre      = clr_pre & RESP == RESP_DECERR;
92
 
93
   assign               clr_last_pre    = clr_pre & ID[3];
94
 
95
   prgen_delay #(1) delay_clr(.clk(clk), .reset(reset), .din(clr_pre), .dout(clr));
96
   prgen_delay #(1) delay_clr_last(.clk(clk), .reset(reset), .din(clr_last_pre), .dout(clr_last));
97
   prgen_delay #(1) delay_slverr(.clk(clk), .reset(reset), .din(slverr_pre), .dout(slverr));
98
   prgen_delay #(1) delay_decerr(.clk(clk), .reset(reset), .din(decerr_pre), .dout(decerr));
99
 
100
   always @(posedge clk or posedge reset)
101
     if (reset)
102
       ch_num_resp <= #1 3'b000;
103
     else if (clr_pre)
104
       ch_num_resp <= #1 ch_num_resp_pre;
105
 
106
 
107
 
108
   prgen_fifo #(`CMD_BITS, CMD_DEPTH)
109
   resp_fifo(
110
         .clk(clk),
111
         .reset(reset),
112
         .push(resp_push),
113
         .pop(resp_pop),
114
         .din(AID),
115
         .dout(ID),
116
         .empty(resp_empty),
117
         .full(resp_full)
118
         );
119
 
120
 
121
endmodule
122
 
123
 
124
 
125
 
126
 

powered by: WebSVN 2.1.0

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