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

Subversion Repositories ofdm

[/] [ofdm/] [trunk/] [vhdl/] [starts.vhd] - Diff between revs 3 and 13

Only display areas with differences | Details | Blame | View Log

Rev 3 Rev 13
library IEEE;
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_ARITH.all;
use IEEE.STD_LOGIC_ARITH.all;
use IEEE.STD_LOGIC_SIGNED.all;
use IEEE.STD_LOGIC_SIGNED.all;
 
 
entity starts is
entity starts is
  generic (
  generic (
    stage : natural);
    stage : natural);
 
 
  port (
  port (
    clk         : in  std_logic;
    clk         : in  std_logic;
    rst         : in  std_logic;
    rst         : in  std_logic;
    Gen_state   : in  std_logic_vector(2*stage+2 downto 0);
    Gen_state   : in  std_logic_vector(2*stage+2 downto 0);
    factorstart : out std_logic;
    factorstart : out std_logic;
    cfft4start  : out std_logic);
    cfft4start  : out std_logic);
end starts;
end starts;
 
 
architecture starts of starts is
architecture starts of starts is
 
 
  alias state   : std_logic_vector(2 downto 0) is Gen_state(2*stage+2 downto 2*stage);
  alias state   : std_logic_vector(2 downto 0) is Gen_state(2*stage+2 downto 2*stage);
  alias counter : std_logic_vector(2*stage-1 downto 0) is Gen_state(2*stage-1 downto 0);
  alias counter : std_logic_vector(2*stage-1 downto 0) is Gen_state(2*stage-1 downto 0);
 
 
begin
begin
 
 
  process( clk, rst )
  process( clk, rst )
  begin
  begin
    if rst = '1' then
    if rst = '1' then
      factorstart <= '0';
      factorstart <= '0';
      cfft4start  <= '0';
      cfft4start  <= '0';
    elsif clk'event and clk = '1' then
    elsif clk'event and clk = '1' then
      if unsigned(state) = 0 and unsigned(counter) = 2 then
      if unsigned(state) = 0 and unsigned(counter) = 2 then
        cfft4start <= '1';
        cfft4start <= '1';
      else
      else
        cfft4start <= '0';
        cfft4start <= '0';
      end if;
      end if;
      if unsigned(state) = 0 and unsigned(counter) = 8 then
      if unsigned(state) = 0 and unsigned(counter) = 8 then
        factorstart <= '1';
        factorstart <= '1';
      else
      else
        factorstart <= '0';
        factorstart <= '0';
      end if;
      end if;
    end if;
    end if;
  end process;
  end process;
 
 
end starts;
end starts;
 
 

powered by: WebSVN 2.1.0

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