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

Subversion Repositories ofdm

[/] [ofdm/] [branches/] [avendor/] [ofdm.vhd] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 tmsiqueira
library IEEE;
2
use IEEE.STD_LOGIC_1164.all;
3
 
4
entity ofdm is
5
  generic (
6
    Tx_nRx : natural := 1;
7
    WIDTH : natural := 12;
8
    POINT : natural := 64;
9
    STAGE : natural := 3               -- STAGE=log4(POINT)
10
    );
11
  port (
12
    clk       : in std_logic;
13
    rst       : in std_logic;
14
    mem_ready : in std_logic;
15
    Iin  : in  std_logic_vector(WIDTH-1 downto 0);
16
    Qin  : in  std_logic_vector(WIDTH-1 downto 0);
17
    Iout : out std_logic_vector(WIDTH+1 downto 0);
18
    Qout : out std_logic_vector(WIDTH+1 downto 0);
19
    mem_block    : out std_logic;
20
    Output_enable : out std_logic;
21
    bank0_busy : out std_logic;
22
    bank1_busy : out std_logic;
23
    wen_in    : in std_logic;
24
    addrin_in : in std_logic_vector(2*stage-Tx_nRX downto 0);
25
    addrout_out : in std_logic_vector(2*stage-1 downto 0));
26
 
27
end ofdm;
28
 
29
architecture ofdm of ofdm is
30
 
31
  component cfft_control
32
    generic (
33
      Tx_nRx : natural;
34
      stage : natural);
35
    port (
36
      clk          : in  std_logic;
37
      rst          : in  std_logic;
38
      mem_ready    : in  std_logic;
39
      sel_mux      : out std_logic;
40
      factorstart  : out std_logic;
41
      cfft4start   : out std_logic;
42
      inv          : out std_logic;
43
      Output_enable : out std_logic;
44
      bank0_busy : out std_logic;
45
      bank1_busy : out std_logic;
46
      mem_block    : out std_logic;
47
      addrout_in   : out std_logic_vector(stage*2-Tx_nRX downto 0);
48
      wen_proc     : out std_logic;
49
      addrin_proc  : out std_logic_vector(stage*2-1 downto 0);
50
      addrout_proc : out std_logic_vector(stage*2-1 downto 0);
51
      wen_out      : out std_logic;
52
      addrin_out   : out std_logic_vector(stage*2-1 downto 0));
53
  end component;
54
 
55
  component cfft
56
    generic (
57
      Tx_nRx : natural;
58
      WIDTH : natural;
59
      POINT : natural;
60
      STAGE : natural);
61
    port (
62
      rst          : in  std_logic;
63
      Iin          : in  std_logic_vector(WIDTH-1 downto 0);
64
      Qin          : in  std_logic_vector(WIDTH-1 downto 0);
65
      Iout         : out std_logic_vector(WIDTH+1 downto 0);
66
      Qout         : out std_logic_vector(WIDTH+1 downto 0);
67
      factorstart  : in  std_logic;
68
      cfft4start   : in  std_logic;
69
      ClkIn        : in  std_logic;
70
      sel_mux      : in  std_logic;
71
      inv          : in  std_logic;
72
      wen_in       : in  std_logic;
73
      addrin_in    : in  std_logic_vector(2*stage-Tx_nRx downto 0);
74
      addrout_in   : in  std_logic_vector(2*stage-Tx_nRx downto 0);
75
      wen_proc     : in  std_logic;
76
      addrin_proc  : in  std_logic_vector(2*stage-1 downto 0);
77
      addrout_proc : in  std_logic_vector(2*stage-1 downto 0);
78
      wen_out      : in  std_logic;
79
      addrin_out   : in  std_logic_vector(2*stage-1 downto 0);
80
      addrout_out  : in  std_logic_vector(2*stage-1 downto 0));
81
  end component;
82
 
83
  signal sel_mux      : std_logic;
84
  signal factorstart  : std_logic;
85
  signal cfft4start   : std_logic;
86
  signal inv          : std_logic;
87
  signal addrout_in   : std_logic_vector(stage*2-Tx_nRx downto 0);
88
  signal wen_proc     : std_logic;
89
  signal addrin_proc  : std_logic_vector(stage*2-1 downto 0);
90
  signal addrout_proc : std_logic_vector(stage*2-1 downto 0);
91
  signal wen_out      : std_logic;
92
  signal addrin_out   : std_logic_vector(stage*2-1 downto 0);
93
 
94
begin
95
 
96
  cfft_control_1 : cfft_control
97
    generic map (
98
      Tx_nRx => Tx_nRx,
99
      stage => stage)
100
    port map (
101
      clk          => clk,
102
      rst          => rst,
103
      mem_ready    => mem_ready,
104
      sel_mux      => sel_mux,
105
      factorstart  => factorstart,
106
      cfft4start   => cfft4start,
107
      inv          => inv,
108
      Output_enable => Output_enable,
109
                bank0_busy    => bank0_busy,
110
                bank1_busy    => bank1_busy,
111
      mem_block    => mem_block,
112
      addrout_in   => addrout_in,
113
      wen_proc     => wen_proc,
114
      addrin_proc  => addrin_proc,
115
      addrout_proc => addrout_proc,
116
      wen_out      => wen_out,
117
      addrin_out   => addrin_out);
118
 
119
  cfft_1 : cfft
120
    generic map (
121
      Tx_nRx => Tx_nRx,
122
      WIDTH => WIDTH,
123
      POINT => POINT,
124
      STAGE => STAGE)
125
    port map (
126
      rst          => rst,
127
      Iin          => Iin,
128
      Qin          => Qin,
129
      Iout         => Iout,
130
      Qout         => Qout,
131
      factorstart  => factorstart,
132
      cfft4start   => cfft4start,
133
      ClkIn        => Clk,
134
      sel_mux      => sel_mux,
135
      inv          => inv,
136
      wen_in       => wen_in,
137
      addrin_in    => addrin_in,
138
      addrout_in   => addrout_in,
139
      wen_proc     => wen_proc,
140
      addrin_proc  => addrin_proc,
141
      addrout_proc => addrout_proc,
142
      wen_out      => wen_out,
143
      addrin_out   => addrin_out,
144
      addrout_out  => addrout_out);
145
end ofdm;

powered by: WebSVN 2.1.0

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