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

Subversion Repositories pc_fpga_com

[/] [pc_fpga_com/] [trunk/] [PC_FPGA_PLATFPORM/] [HARDWARE/] [MODE_SEL_REGISTER.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 NikosAl
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    13:38:55 03/02/2011 
6
-- Design Name: 
7
-- Module Name:    MODE_SEL_REGISTER - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
use IEEE.STD_LOGIC_ARITH.ALL;
23
use IEEE.STD_LOGIC_UNSIGNED.ALL;
24
 
25
---- Uncomment the following library declaration if instantiating
26
---- any Xilinx primitives in this code.
27
--library UNISIM;
28
--use UNISIM.VComponents.all;
29
 
30
entity MODE_SEL_REGISTER is
31
    Port ( rst : in  STD_LOGIC;
32
           clk : in  STD_LOGIC;
33
           rx_sof : in  STD_LOGIC;
34
           rx_eof : in  STD_LOGIC;
35
           en : in  STD_LOGIC;
36
           sel : out  STD_LOGIC);
37
end MODE_SEL_REGISTER;
38
 
39
architecture Behavioral of MODE_SEL_REGISTER is
40
 
41
signal sel_t: std_logic;
42
 
43
begin
44
 
45
process(clk)
46
begin
47
 
48
if rst='1' or rx_sof='0' or rx_eof='0' then
49
        sel_t <= '0';
50
else
51
        if clk'event and clk='1' then
52
                if en='1' then
53
                        sel_t <= '1';
54
                else
55
                        sel_t <= sel_t;
56
                end if;
57
        end if;
58
end if;
59
end process;
60
 
61
sel <= (en or sel_t) and rx_eof;
62
 
63
end Behavioral;
64
 

powered by: WebSVN 2.1.0

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