OpenCores
URL https://opencores.org/ocsvn/10_100m_ethernet-fifo_convertor/10_100m_ethernet-fifo_convertor/trunk

Subversion Repositories 10_100m_ethernet-fifo_convertor

[/] [10_100m_ethernet-fifo_convertor/] [verilog/] [test_feedback.v] - Blame information for rev 10

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 10 antiquity
//author :Renliang Gu
2
//Email: gurenliang@gmail.com
3
//note: if there are some errors, please feel free to contact me. Thank you very much!
4
 
5
//version 0.4, the test_feedback is created, main task is to test the top module, EthernetModule.v
6
//                              the ff_data_source is feed back to ff_data_sink
7
 
8
module test_feedback(reset, clk_in,
9
                                        phy_rxd, phy_rxen, phy_rxclk, phy_rxer,
10
                                        phy_txd, phy_txen, phy_txclk, phy_txer,
11
                                        phy_reset, phy_col, phy_linksts, phy_crs,
12
                                        test1, test2, test3, test4
13
                                        );
14
        input reset, clk_in;
15
        output phy_reset, test1, test2, test3, test4;
16
 
17
        input[3:0] phy_rxd;                      //MII interface for the phy chip
18
        input phy_rxclk, phy_rxer;
19
 
20
        output[3:0] phy_txd;
21
        output phy_txer, phy_txen;
22
 
23
        //declare them as inout port because when powerup reset, they act as output pins to config DM9161
24
        //after reset, phy_txclk and phy_rxen must be input ports
25
        inout phy_txclk, phy_col, phy_rxen, phy_linksts, phy_crs;
26
 
27
        wire ff_en, ff_data;
28
        wire clk_10K, ff_clk;
29
 
30
        EthernetModule EthernetModule_inst(.reset(reset), .clk_10K(clk_10K),
31
                                        .ff_clk(ff_clk), .ff_en_source(ff_en), .ff_en_sink(1'b1),
32
                                        .ff_data_source(ff_data), .ff_data_sink(ff_data),  //ff_clk should be a 270.33KHz clock
33
                                        .phy_rxd(phy_rxd), .phy_rxen(phy_rxen), .phy_rxclk(phy_rxclk), .phy_rxer(phy_rxer),
34
                                        .phy_txd(phy_txd), .phy_txen(phy_txen), .phy_txclk(phy_txclk), .phy_txer(phy_txer),
35
                                        .phy_reset(phy_reset), .phy_col(phy_col), .phy_linksts(phy_linksts), .phy_crs(phy_crs),
36
                                        .test1(test1), .test2(test2), .test3(test3), .test4(test4)
37
                                        );
38
 
39
        pll     pll_inst (
40
        .inclk0 ( clk_in ),
41
        .c0 ( clk_10K ),
42
        .c1 ( ff_clk )
43
        );
44
 
45
endmodule

powered by: WebSVN 2.1.0

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