We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 40314

Virtex-6 FPGA Embedded Tri-mode Ethernet MAC Wrapper v2.1 (AXI) - 1000BASE-X functional simulation does not complete


When 1000BASE-X or SGMII is selected and the PHY loopback enabled, additional waits need to be added to the testbench to ensure that the GTX has locked before data is sent. In this configuration, the transceiver drops sync after loopback is turned off. The demo_tb correctly waits to avoid corrupting data on the power on reset, but does not wait for the later resets. The demo_tb needs to be updated to add the required delays after each reset in the test.


In the demo_tb p_management process, each call to mac_reset is followed by a wait for the serial_response (or mdio_done) to assert. In the first call to mac_reset, there is an additional delay of 20 microseconds and a check to ensure the syncacqstatus output is asserted. This delay and check(highlighted in red) should be replicated for each call to mac_reset. i.e.,:


base_x_switch_edge <= '1';
wait until gtx_clk'event and gtx_clk = '1';
base_x_switch_edge <= '0';
wait until gtx_clk'event and gtx_clk = '1';
configuration_busy <= true;

wait until serial_response = '1';
-- wait until the gtx has acquired lock
wait for 20 us;
wait until gtx_clk'event and syncacqstatus = '1';

for j in 0 to 49 loop
wait until gtx_clk'event and gtx_clk = '1';
end loop;

base_x_switch_edge <= 1'b1;
@(posedge gtx_clk);
base_x_switch_edge <= 1'b0;
@(posedge gtx_clk);

@(posedge serial_response);
// ensure the sync has been acquired - may have already asserted so cannot just look for edge
while (syncacqstatus == 0) begin
@(posedge gtx_clk);

repeat (50) @(posedge gtx_clk);
AR# 40314
Date Created 01/10/2013
Last Updated 08/14/2014
Status Active
Type General Article
  • Virtex-6 FPGA Embedded Tri-Mode Ethernet MAC Wrapper