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

Subversion Repositories ofdm

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tmsiqueira
library IEEE;
2
use IEEE.STD_LOGIC_1164.all;
3
use IEEE.STD_LOGIC_ARITH.all;
4
use IEEE.STD_LOGIC_UNSIGNED.all;
5
 
6
--  Uncomment the following lines to use the declarations that are
7
--  provided for instantiating Xilinx primitive components.
8
--library UNISIM;
9
--use UNISIM.VComponents.all;
10
 
11
entity parallel is
12
  port (
13
    clk    : in  std_logic;
14
    rst    : in  std_logic;
15
    input  : in  std_logic;
16
    output : out std_logic_vector(1 downto 0));
17
end parallel;
18
 
19
architecture parallel of parallel is
20
  type states is (st0, st1);
21
  signal state : states;
22
 
23
  signal aux       : std_logic_vector(1 downto 0);
24
 
25
begin
26
 
27
  process(clk, rst)
28
  begin
29
    if rst = '1' then
30
      aux <= (others => '0');
31
      output    <= (others => '0');
32
                state <= st0;
33
    elsif clk'event and clk = '1' then
34
           case state is
35
                   when st0 =>
36
                           aux(1) <= input;
37
                                output <= aux;
38
                                state <= st1;
39
                   when st1 =>
40
                           aux(0) <= input;
41
                                state <= st0;
42
                end case;
43
    end if;
44
  end process;
45
 
46
end parallel;

powered by: WebSVN 2.1.0

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