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

Subversion Repositories esoc

[/] [esoc/] [trunk/] [Sources/] [altera/] [esoc_port_mac/] [testbench/] [model/] [top_mdio_slave.vhd] - Blame information for rev 42

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 42 lmaarsen
-- -------------------------------------------------------------------------
2
-- -------------------------------------------------------------------------
3
--
4
-- Revision Control Information
5
--
6
-- $RCSfile: top_mdio_slave.vhd,v $
7
-- $Source: /ipbu/cvs/sio/projects/TriSpeedEthernet/src/testbench/models/vhdl/mdio/top_mdio_slave.vhd,v $
8
--
9
-- $Revision: #1 $
10
-- $Date: 2008/08/09 $
11
-- Check in by : $Author: sc-build $
12
-- Author      : SKNg/TTChong
13
--
14
-- Project     : Triple Speed Ethernet - 10/100/1000 MAC
15
--
16
-- Description : (Simulation only)
17
--
18
-- MDIO Slave model
19
-- Instantiates mdio_slave (mdio_slave.vhd) and mdio_reg_sim (mdio_reg.vhd)
20
--
21
-- 
22
-- ALTERA Confidential and Proprietary
23
-- Copyright 2006 (c) Altera Corporation
24
-- All rights reserved
25
--
26
-- -------------------------------------------------------------------------
27
-- -------------------------------------------------------------------------
28
 
29
 
30
library ieee ;
31
use     ieee.std_logic_1164.all ;
32
 
33
entity top_mdio_slave is port (
34
 
35
        reset           : in std_logic ;
36
        mdc             : in std_logic ;
37
        mdio            : inout std_logic ;
38
        dev_addr        : in std_logic_vector(4 downto 0) ;
39
        conf_done       : out std_logic) ;
40
 
41
end top_mdio_slave ;
42
 
43
architecture a of top_mdio_slave is
44
 
45
        component mdio_reg_sim port (
46
 
47
                reset           : in std_logic ;
48
                clk             : in std_logic ;                        -- MDIO 2.5MHz Clock
49
                reg_addr        : in std_logic_vector(4 downto 0);      -- Address Register
50
                reg_write       : in std_logic;                         -- Write Register       
51
                reg_read        : in std_logic;                         -- Read Register        
52
                reg_dout        : out std_logic_vector(15 downto 0);    -- Data Bus OUT
53
                reg_din         : in std_logic_vector(15 downto 0) ;    -- Data Bus IN
54
                conf_done       : out std_logic) ;                      -- PHY Config Done
55
 
56
        end component ;
57
 
58
        component mdio_slave port (
59
 
60
                reset           : in std_logic;                         -- asynch reset
61
                mdc             : in std_logic;                         -- system clock
62
                mdio            : inout std_logic;                      -- Data Bus
63
                dev_addr        : in  std_logic_vector(4 downto 0);     -- Device address
64
                reg_addr        : out std_logic_vector(4 downto 0);     -- Address register
65
                reg_read        : out std_logic;                        -- Read register         
66
                reg_write       : out std_logic;                        -- Write register         
67
                reg_dout        : out std_logic_vector(15 downto 0);    -- Data Bus OUT
68
                reg_din         : in  std_logic_vector(15 downto 0)) ;  -- Data Bus IN
69
 
70
        end component;
71
 
72
        signal reg_addr         : std_logic_vector(4 downto 0);         -- Address register
73
        signal reg_read         : std_logic;                            -- Read register         
74
        signal reg_write        : std_logic;                            -- Write register         
75
        signal reg_dout         : std_logic_vector(15 downto 0);        -- Data Bus OUT
76
        signal reg_din          : std_logic_vector(15 downto 0);        -- Data Bus IN 
77
 
78
begin
79
 
80
        MDIO_C: mdio_slave port map (
81
 
82
                reset           => reset ,
83
                mdc             => mdc ,
84
                mdio            => mdio ,
85
                dev_addr        => dev_addr ,
86
                reg_addr        => reg_addr ,
87
                reg_read        => reg_read ,
88
                reg_write       => reg_write ,
89
                reg_dout        => reg_din ,
90
                reg_din         => reg_dout) ;
91
 
92
        REG_C: mdio_reg_sim  port map (
93
 
94
                reset           => reset ,
95
                clk             => mdc ,
96
                reg_addr        => reg_addr ,
97
                reg_write       => reg_write ,
98
                reg_read        => reg_read ,
99
                reg_dout        => reg_dout ,
100
                reg_din         => reg_din ,
101
                conf_done       => conf_done) ;
102
 
103
end a ;

powered by: WebSVN 2.1.0

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