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_offsets.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_offsets.v
35
//---------------------------------------------------------
36
 
37
 
38
 
39
module dma_axi64_core0_ch_offsets(clk,reset,ch_update,burst_start,burst_last,burst_size,load_req_in_prog,x_size,y_size,x_offset,y_offset,x_remain,clr_remain,ch_end,go_next_line,incr,clr_line,line_empty,empty,start_align,width_align,align);
40
 
41
   input             clk;
42
   input             reset;
43
 
44
   input             ch_update;
45
   input             burst_start;
46
   input             burst_last;
47
   input [8-1:0]   burst_size;
48
   input             load_req_in_prog;
49
 
50
   input [10-1:0]    x_size;
51
   input [10-`X_BITS-1:0]         y_size;
52
 
53
   output [10-1:0]   x_offset;
54
   output [10-`X_BITS-1:0]         y_offset;
55
   output [10-1:0]   x_remain;
56
   output [10-`X_BITS-1:0]         clr_remain;
57
   output             ch_end;
58
   output             go_next_line;
59
   input             incr;
60
   input             clr_line;
61
   output             line_empty;
62
   output             empty;
63
 
64
   input [3-1:0]    start_align;
65
   input [3-1:0]    width_align;
66
   output [3-1:0]   align;
67
 
68
 
69
   wire             update_line;
70
   wire             go_next_line;
71
   wire             line_end_pre;
72
   wire             line_empty;
73
   reg [10-1:0]         x_remain;
74
   wire             ch_end_pre;
75
   reg                 ch_end;
76
   wire             ch_update_d;
77
 
78
 
79
 
80
   assign             ch_end_pre   = burst_start & burst_last;
81
   assign             go_next_line = 1'b0;
82
   assign             line_empty   = 1'b0;
83
   assign             empty        = ch_end_pre | ch_end;
84
 
85
 
86
   always @(posedge clk or posedge reset)
87
     if (reset)
88
       ch_end <= #1 1'b0;
89
     else if (ch_update)
90
       ch_end <= #1 1'b0;
91
     else if (ch_end_pre)
92
       ch_end <= #1 1'b1;
93
 
94
   always @(posedge clk or posedge reset)
95
     if (reset)
96
       x_remain <= #1 {10{1'b0}};
97
     else if (ch_update | go_next_line)
98
       x_remain <= #1 x_size;
99
     else if (burst_start & (~load_req_in_prog))
100
       x_remain <= #1 x_remain - burst_size;
101
 
102
 
103
   assign             x_offset   = {10{1'b0}};
104
   assign             y_offset   = {10-`X_BITS{1'b0}};
105
   assign             clr_remain = {10-`X_BITS{1'b0}};
106
   assign             align      = start_align;
107
 
108
 
109
 
110
endmodule
111
 
112
 
113
 
114
 
115
 

powered by: WebSVN 2.1.0

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