1 //////////////////////////////////////////////////////////////////////
5 //// This file is part of the Ethernet IP core project ////
6 //// http://www.opencores.org/projects.cgi/web/ethernet_tri_mode/////
9 //// - Jon Gao (gaojon@yahoo.com) ////
12 //////////////////////////////////////////////////////////////////////
14 //// Copyright (C) 2001 Authors ////
16 //// This source file may be used and distributed without ////
17 //// restriction provided that this copyright statement is not ////
18 //// removed from the file and that any derivative work contains ////
19 //// the original copyright notice and the associated disclaimer. ////
21 //// This source file is free software; you can redistribute it ////
22 //// and/or modify it under the terms of the GNU Lesser General ////
23 //// Public License as published by the Free Software Foundation; ////
24 //// either version 2.1 of the License, or (at your option) any ////
25 //// later version. ////
27 //// This source is distributed in the hope that it will be ////
28 //// useful, but WITHOUT ANY WARRANTY; without even the implied ////
29 //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
30 //// PURPOSE. See the GNU Lesser General Public License for more ////
33 //// You should have received a copy of the GNU Lesser General ////
34 //// Public License along with this source; if not, download it ////
35 //// from http://www.opencores.org/lgpl.shtml ////
37 //////////////////////////////////////////////////////////////////////
39 // CVS Revision History
41 // $Log: Phy_sim.v,v $
42 // Revision 1.3 2006/11/17 17:53:07 maverickist
45 // Revision 1.2 2006/01/19 14:07:50 maverickist
46 // verification is complete.
48 // Revision 1.1.1.1 2005/12/13 01:51:44 Administrator
54 module Phy_sim (input Gtx_clk ,//used only in GMII mode
56 output Tx_clk ,//used only in MII mode
68 // ////////////////////////////////////////////////////////////////////
69 // this file used to simulate Phy.
70 // generate clk and loop the Tx data to Rx data
71 // full duplex mode can be verified on loop mode.
72 // ////////////////////////////////////////////////////////////////////
73 // ////////////////////////////////////////////////////////////////////
75 // ////////////////////////////////////////////////////////////////////
76 reg Clk_25m ;//used for 100 Mbps mode
77 reg Clk_2_5m ;//used for 10 Mbps mode
79 //wire Tx_clk ;//used only in MII mode
80 // ////////////////////////////////////////////////////////////////////
93 assign Rx_clk=Speed[2]?Gtx_clk:Speed[1]?Clk_25m:Speed[0]?Clk_2_5m:0;
94 assign Tx_clk=Speed[2]?Gtx_clk:Speed[1]?Clk_25m:Speed[0]?Clk_2_5m:0;