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

Subversion Repositories dma_axi

[/] [dma_axi/] [trunk/] [src/] [dma_axi32/] [dma_axi32_core0_ch_offsets.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:53 2011
5
//--
6
//-- Source file: dma_ch_offsets.v
7
//---------------------------------------------------------
8
 
9
 
10
 
11
module dma_axi32_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);
12
 
13
   input             clk;
14
   input             reset;
15
 
16
   input             ch_update;
17
   input             burst_start;
18
   input             burst_last;
19
   input [7-1:0]   burst_size;
20
   input             load_req_in_prog;
21
 
22
   input [10-1:0]    x_size;
23
   input [10-`X_BITS-1:0]         y_size;
24
 
25
   output [10-1:0]   x_offset;
26
   output [10-`X_BITS-1:0]         y_offset;
27
   output [10-1:0]   x_remain;
28
   output [10-`X_BITS-1:0]         clr_remain;
29
   output             ch_end;
30
   output             go_next_line;
31
   input             incr;
32
   input             clr_line;
33
   output             line_empty;
34
   output             empty;
35
 
36
   input [2-1:0]    start_align;
37
   input [2-1:0]    width_align;
38
   output [2-1:0]   align;
39
 
40
 
41
   wire             update_line;
42
   wire             go_next_line;
43
   wire             line_end_pre;
44
   wire             line_empty;
45
   reg [10-1:0]         x_remain;
46
   wire             ch_end_pre;
47
   reg                 ch_end;
48
   wire             ch_update_d;
49
 
50
 
51
 
52
   assign             ch_end_pre   = burst_start & burst_last;
53
   assign             go_next_line = 1'b0;
54
   assign             line_empty   = 1'b0;
55
   assign             empty        = ch_end_pre | ch_end;
56
 
57
 
58
   always @(posedge clk or posedge reset)
59
     if (reset)
60
       ch_end <= #1 1'b0;
61
     else if (ch_update)
62
       ch_end <= #1 1'b0;
63
     else if (ch_end_pre)
64
       ch_end <= #1 1'b1;
65
 
66
   always @(posedge clk or posedge reset)
67
     if (reset)
68
       x_remain <= #1 {10{1'b0}};
69
     else if (ch_update | go_next_line)
70
       x_remain <= #1 x_size;
71
     else if (burst_start & (~load_req_in_prog))
72
       x_remain <= #1 x_remain - burst_size;
73
 
74
 
75
   assign             x_offset   = {10{1'b0}};
76
   assign             y_offset   = {10-`X_BITS{1'b0}};
77
   assign             clr_remain = {10-`X_BITS{1'b0}};
78
   assign             align      = start_align;
79
 
80
 
81
 
82
endmodule
83
 
84
 
85
 
86
 
87
 

powered by: WebSVN 2.1.0

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