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

Subversion Repositories versatile_fft

[/] [versatile_fft/] [trunk/] [multiple_units/] [src/] [fft_support.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 wzab
-------------------------------------------------------------------------------
2
-- Title      : vhdl_support
3
-- Project    : 
4
-------------------------------------------------------------------------------
5
-- File       : fft_support.vhd
6
-- Author     : Wojciech Zabolotny
7
-- Company    : 
8
-- License    : BSD
9
-- Created    : 2014-01-20
10
-- Last update: 2014-05-02
11
-- Platform   : 
12
-- Standard   : VHDL'87
13
-------------------------------------------------------------------------------
14
-- Description: 
15
-------------------------------------------------------------------------------
16
-- Copyright (c) 2014 
17
-------------------------------------------------------------------------------
18
-- Revisions  :
19
-- Date        Version  Author  Description
20
-- 2014-01-20  1.0      wzab    Created
21
-------------------------------------------------------------------------------
22
library ieee;
23
use ieee.std_logic_1164.all;
24
use ieee.numeric_std.all;
25
use ieee.math_real.all;
26
use ieee.math_complex.all;
27
library work;
28
use work.icpx.all;
29
 
30
package fft_support_pkg is
31
 
32
  -- In the synthesizable version, we should replace functions
33
  -- with precalculated tables (probably)
34
 
35
  function rev(a : in unsigned)
36
    return unsigned;
37
  function rev(a : in std_logic_vector)
38
    return std_logic_vector;
39
 
40
end fft_support_pkg;
41
 
42
package body fft_support_pkg is
43
 
44
   function rev(a : in std_logic_vector)
45
    return std_logic_vector is
46
    variable result : std_logic_vector(a'range);
47
    alias aa        : std_logic_vector(a'reverse_range) is a;
48
  begin
49
    for i in aa'range loop
50
      result(i) := aa(i);
51
    end loop;
52
    return result;
53
  end;  -- function reverse_any_bus
54
 
55
   function rev(a : in unsigned)
56
    return unsigned is
57
    variable result : unsigned(a'range);
58
    alias aa        : unsigned(a'reverse_range) is a;
59
  begin
60
    for i in aa'range loop
61
      result(i) := aa(i);
62
    end loop;
63
    return result;
64
  end;  -- function reverse_any_bus
65
 
66
 
67
end package body fft_support_pkg;
68
 

powered by: WebSVN 2.1.0

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