zynq-sandbox

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 08545e39000228bd097d3ddc103c130d985e60b1
parent 336e64a11c05c140869de796d479a5dfe7036c10
Author: Brian Swetland <swetland@frotz.net>
Date:   Tue, 22 Jul 2014 07:51:11 -0700

mdio: sample input at posedge mdc

Diffstat:
Mhdl/eth_mdio.sv | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hdl/eth_mdio.sv b/hdl/eth_mdio.sv @@ -38,9 +38,9 @@ parameter CLKDIV = 16; // on phase entry: // ------------------------- -// .-----. A mdc=0 shift -// | | B mdc=1 -// --' '-- C mdc=1 capture=i_mdio +// .-----. A mdc=0 shift (new data on o_mdio) +// | | B mdc=1 capture=i_mdio +// --' '-- C mdc=1 // A B C D D mdc=0 // // always: o_mdio=shift[31] @@ -71,7 +71,7 @@ reg step; assign o_mdio = shift[31]; assign t_mdio = tristate; -assign rxdata = shift[16:1]; +assign rxdata = shift[15:0]; always_comb begin next_tristate = tristate; @@ -113,12 +113,12 @@ always_comb begin PHA: if (step) begin next_state = PHB; next_mdc = 1; + // acquire debounced input + next_capture1 = capture0; end PHB: if (step) begin next_state = PHC; next_mdc = 1; - // acquire debounced input - next_capture1 = capture0; end PHC: if (step) begin next_state = PHD;