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

Subversion Repositories dma_axi

[/] [dma_axi/] [trunk/] [src/] [dma_axi64/] [dma_axi64_core0_ch_reg_size.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:36:56 2011
33
//--
34
//-- Source file: dma_ch_reg_size.v
35
//---------------------------------------------------------
36
 
37
 
38
 
39
module dma_axi64_core0_ch_reg_size(clk,reset,update,start_addr,burst_max_size_reg,burst_max_size_other,allow_full_burst,allow_full_fifo,joint_flush,burst_max_size);
40
 
41
   parameter              MAX_BURST     = 0 ? 64 : 128; //16 strobes
42
   parameter              HALF_BYTES    = 32/2;
43
   parameter              LARGE_FIFO    = 32 > MAX_BURST;
44
   parameter              SMALL_FIFO    = 32 == 16;
45
 
46
   input                  clk;
47
   input              reset;
48
 
49
   input              update;
50
 
51
   input [32-1:0]      start_addr;
52
   input [8-1:0]      burst_max_size_reg;
53
   input [8-1:0]      burst_max_size_other;
54
 
55
   input              allow_full_burst;
56
   input              allow_full_fifo;
57
   input              joint_flush;
58
   output [8-1:0]      burst_max_size;
59
 
60
 
61
 
62
   wire [8-1:0]      burst_max_size_fifo;
63
   wire [8-1:0]      burst_max_size_pre;
64
   reg [8-1:0]      burst_max_size;
65
 
66
 
67
 
68
 
69
   assign              burst_max_size_fifo =
70
                 allow_full_burst | LARGE_FIFO ? MAX_BURST  :
71
                 joint_flush & SMALL_FIFO      ? HALF_BYTES :
72
                 (burst_max_size_other > HALF_BYTES) & (burst_max_size_reg > HALF_BYTES) & (burst_max_size_other != burst_max_size_reg)
73
                                                               ? HALF_BYTES :
74
                 allow_full_fifo               ? 32 : HALF_BYTES;
75
 
76
 
77
   prgen_min2 #(8) min2_max(
78
                   .a(burst_max_size_reg),
79
                   .b(burst_max_size_fifo),
80
                   .min(burst_max_size_pre)
81
                   );
82
 
83
   always @(posedge clk or posedge reset)
84
     if (reset)
85
       burst_max_size <= #1 {8{1'b0}};
86
     else if (update)
87
       burst_max_size <= #1 burst_max_size_pre > MAX_BURST ? MAX_BURST : burst_max_size_pre;
88
 
89
 
90
endmodule
91
 
92
 

powered by: WebSVN 2.1.0

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