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 2

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

Line No. Rev Author Line
1 2 eyalhoc
//---------------------------------------------------------
2
//-- File generated by RobustVerilog parser
3
//-- Version: 1.0
4
//-- Invoked Fri Mar 25 23:34:52 2011
5
//--
6
//-- Source file: dma_core_axim_resp.v
7
//---------------------------------------------------------
8
 
9
 
10
 
11
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);
12
 
13
   parameter                  CMD_DEPTH = 8;
14
 
15
   input               clk;
16
   input               reset;
17
 
18
   output               slverr;
19
   output               decerr;
20
   output               clr;
21
   output               clr_last;
22
   output [2:0]           ch_num_resp;
23
   output               resp_full;
24
 
25
 
26
   input [`CMD_BITS-1:0]      AID;
27
   input               AVALID;
28
   input               AREADY;
29
   input [1:0]               RESP;
30
   output [`CMD_BITS-1:0]     ID;
31
   input               VALID;
32
   input               READY;
33
   input               LAST;
34
 
35
 
36
 
37
   parameter                  RESP_SLVERR = 2'b10;
38
   parameter                  RESP_DECERR = 2'b11;
39
 
40
 
41
   wire               clr_pre;
42
   wire [2:0]               ch_num_resp_pre;
43
   wire               clr_last_pre;
44
   wire               slverr_pre;
45
   wire               decerr_pre;
46
   reg [2:0]               ch_num_resp;
47
 
48
   wire               resp_push;
49
   wire               resp_pop;
50
   wire               resp_empty;
51
   wire               resp_full;
52
   wire [`CMD_BITS-1:0]       ID;
53
 
54
 
55
   assign               resp_push       = AVALID & AREADY;
56
   assign               resp_pop        = VALID & READY & LAST;
57
 
58
   assign               clr_pre         = resp_pop;
59
 
60
   assign               ch_num_resp_pre = ID[2:0] ;
61
 
62
   assign               slverr_pre      = clr_pre & RESP == RESP_SLVERR;
63
   assign               decerr_pre      = clr_pre & RESP == RESP_DECERR;
64
 
65
   assign               clr_last_pre    = clr_pre & ID[3];
66
 
67
   prgen_delay #(1) delay_clr(.clk(clk), .reset(reset), .din(clr_pre), .dout(clr));
68
   prgen_delay #(1) delay_clr_last(.clk(clk), .reset(reset), .din(clr_last_pre), .dout(clr_last));
69
   prgen_delay #(1) delay_slverr(.clk(clk), .reset(reset), .din(slverr_pre), .dout(slverr));
70
   prgen_delay #(1) delay_decerr(.clk(clk), .reset(reset), .din(decerr_pre), .dout(decerr));
71
 
72
   always @(posedge clk or posedge reset)
73
     if (reset)
74
       ch_num_resp <= #1 3'b000;
75
     else if (clr_pre)
76
       ch_num_resp <= #1 ch_num_resp_pre;
77
 
78
 
79
 
80
   prgen_fifo #(`CMD_BITS, CMD_DEPTH)
81
   resp_fifo(
82
         .clk(clk),
83
         .reset(reset),
84
         .push(resp_push),
85
         .pop(resp_pop),
86
         .din(AID),
87
         .dout(ID),
88
         .empty(resp_empty),
89
         .full(resp_full)
90
         );
91
 
92
 
93
endmodule
94
 
95
 
96
 
97
 
98
 

powered by: WebSVN 2.1.0

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