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

Subversion Repositories uart_fiber

[/] [uart_fiber/] [trunk/] [main.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 chipmaker7
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    22:13:04 11/11/2013 
6
-- Design Name: 
7
-- Module Name:    main - 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
 
23
-- Uncomment the following library declaration if using
24
-- arithmetic functions with Signed or Unsigned values
25
--use IEEE.NUMERIC_STD.ALL;
26
 
27
-- Uncomment the following library declaration if instantiating
28
-- any Xilinx primitives in this code.
29
--library UNISIM;
30
--use UNISIM.VComponents.all;
31
 
32
entity main is
33
    Port ( iCLK : in  STD_LOGIC;
34
           RX : out  STD_LOGIC;
35
           TX : in  STD_LOGIC;
36
           optic_out : out  STD_LOGIC;
37
           optic_in : in  STD_LOGIC;
38
 
39
           RX2 : out  STD_LOGIC;
40
           TX2 : in  STD_LOGIC;
41
           optic_out2 : out  STD_LOGIC;
42
           optic_in2 : in  STD_LOGIC;
43
 
44
                          led1 : out  STD_LOGIC;
45
                          led2 : out  STD_LOGIC;
46
                          led3 : out  STD_LOGIC;
47
                          led4 : out  STD_LOGIC
48
 
49
                          );
50
end main;
51
 
52
architecture Behavioral of main is
53
 
54
 
55
COMPONENT TX_to_spdif_full
56
        PORT(
57
                iCLK : IN std_logic;
58
                TX : IN std_logic;
59
                OPTIC_OUT : OUT std_logic
60
 
61
                );
62
        END COMPONENT;
63
COMPONENT spdif_to_RX
64
        PORT(
65
                iCLK : IN std_logic;
66
                OPTIC_IN : IN std_logic;
67
                RX : OUT std_logic;
68
                learn_out : OUT std_logic
69
                );
70
        END COMPONENT;
71
 
72
--signal nled1 : STD_LOGIC_VECTOR(3 downto 0);
73
 
74
 
75
begin
76
--led1<=not nled1(3);
77
--led2<=not nled1(2);
78
--led3<=not nled1(1);
79
--led4<=not nled1(0);
80
 
81
 
82
TX_to_spdif_full_inst:TX_to_spdif_full
83
    Port map ( iCLK=> iCLK,
84
              TX => TX,
85
                                  optic_out => optic_out
86
                                  );
87
spdif_to_RX_inst:spdif_to_RX
88
    Port map ( iCLK=>iCLK,
89
              optic_in => optic_in,
90
                                  RX => RX,
91
                                  learn_out=>open
92
                                  );
93
 
94
TX_to_spdif_full_inst2:TX_to_spdif_full
95
    Port map ( iCLK=> iCLK,
96
              TX => TX2,
97
                                  optic_out => optic_out2
98
                                  );
99
spdif_to_RX_inst2:spdif_to_RX
100
    Port map ( iCLK=>iCLK,
101
              optic_in => optic_in2,
102
                                  RX => RX2,
103
                                  learn_out=>open
104
                                  );
105
 
106
 
107
 
108
end Behavioral;
109
 

powered by: WebSVN 2.1.0

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