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

Subversion Repositories dma_axi

[/] [dma_axi/] [trunk/] [src/] [dma_axi64/] [prgen_swap_64.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:57 2011
33
//--
34
//-- Source file: prgen_swap64.v
35
//---------------------------------------------------------
36
 
37
 
38
 
39
module  prgen_swap64 (end_swap,data_in,data_out,bsel_in,bsel_out);
40
 
41
   input [1:0]            end_swap;
42
   input [63:0]        data_in;
43
   output [63:0]       data_out;
44
   input [7:0]            bsel_in;
45
   output [7:0]        bsel_out;
46
 
47
 
48
   wire [31:0]            data_in_low;
49
   wire [31:0]            data_in_high;
50
   wire [31:0]            data_out_low;
51
   wire [31:0]            data_out_high;
52
   wire [3:0]            bsel_in_low;
53
   wire [3:0]            bsel_in_high;
54
   wire [3:0]            bsel_out_low;
55
   wire [3:0]            bsel_out_high;
56
 
57
 
58
 
59
   assign            data_in_low  = end_swap == 2'b11 ? data_in[63:32] : data_in[31:0];
60
   assign            data_in_high = end_swap == 2'b11 ? data_in[31:0]  : data_in[63:32];
61
 
62
   assign            bsel_in_low  = end_swap == 2'b11 ? bsel_in[7:4] : bsel_in[3:0];
63
   assign            bsel_in_high = end_swap == 2'b11 ? bsel_in[3:0] : bsel_in[7:4];
64
 
65
   prgen_swap32 swap32_low(
66
               .end_swap(end_swap),
67
               .data_in(data_in_low),
68
               .data_out(data_out_low),
69
               .bsel_in(bsel_in_low),
70
               .bsel_out(bsel_out_low)
71
               );
72
 
73
   prgen_swap32 swap32_high(
74
                .end_swap(end_swap),
75
                .data_in(data_in_high),
76
                .data_out(data_out_high),
77
                .bsel_in(bsel_in_high),
78
                .bsel_out(bsel_out_high)
79
               );
80
 
81
   assign            data_out = {data_out_high, data_out_low};
82
   assign            bsel_out = {bsel_out_high, bsel_out_low};
83
 
84
endmodule
85
 
86
 
87
 

powered by: WebSVN 2.1.0

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