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

Subversion Repositories ofdm

[/] [ofdm/] [trunk/] [vhdl/] [interface.vhd] - Blame information for rev 3

Go to most recent revision | 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 txrx is
12
    Port ( clk : in std_logic;
13
           rst : in std_logic;
14
           Output_enable : in std_logic;
15
           mem_block : in std_logic;
16
           --mem_ready : out std_logic;
17
           wen : out std_logic;
18
           address : out std_logic_vector(6 downto 0)
19
           );
20
end txrx;
21
 
22
architecture interface of txrx is
23
 
24
signal ifsel: boolean;
25
signal add : std_logic_vector(6 downto 0);
26
signal wen_aux : std_logic;
27
begin
28
 
29
wen <= wen_aux;
30
address <= add;
31
   process (clk,rst)
32
   begin
33
      if rst = '1' then
34
         add <= (others => '0');
35
         wen_aux <= '0';
36
      elsif clk'event and clk='1' then
37
         if Output_enable = '1' then
38
            wen_aux <= '1';
39
            if mem_block = '0' then
40
               add <= (others => '0');
41
            else
42
               add <= conv_std_logic_vector(64,7);
43
            end if;
44
         elsif wen_aux = '1' then
45
            if (add(5 downto 0) /= 63) then
46
               add <= add + 1;
47
            else
48
               wen_aux <= '0';
49
               add <= add;
50
            end if;
51
         end if;
52
      end if;
53
   end process;
54
 
55
end interface;

powered by: WebSVN 2.1.0

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