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

Subversion Repositories ofdm

[/] [ofdm/] [branches/] [avendor/] [starts.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
use IEEE.STD_LOGIC_ARITH.all;
4
use IEEE.STD_LOGIC_SIGNED.all;
5
 
6
entity starts is
7
  generic (
8
    stage : natural);
9
 
10
  port (
11
    clk         : in  std_logic;
12
    rst         : in  std_logic;
13
    Gen_state   : in  std_logic_vector(2*stage+2 downto 0);
14
    factorstart : out std_logic;
15
    cfft4start  : out std_logic);
16
end starts;
17
 
18
architecture starts of starts is
19
 
20
  alias state   : std_logic_vector(2 downto 0) is Gen_state(2*stage+2 downto 2*stage);
21
  alias counter : std_logic_vector(2*stage-1 downto 0) is Gen_state(2*stage-1 downto 0);
22
 
23
begin
24
 
25
  process( clk, rst )
26
  begin
27
    if rst = '1' then
28
      factorstart <= '0';
29
      cfft4start  <= '0';
30
    elsif clk'event and clk = '1' then
31
      if unsigned(state) = 0 and unsigned(counter) = 2 then
32
        cfft4start <= '1';
33
      else
34
        cfft4start <= '0';
35
      end if;
36
      if unsigned(state) = 0 and unsigned(counter) = 8 then
37
        factorstart <= '1';
38
      else
39
        factorstart <= '0';
40
      end if;
41
    end if;
42
  end process;
43
 
44
end starts;

powered by: WebSVN 2.1.0

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