question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XGMII Driver initialization incomplete

See original GitHub issue

The XGMII Driver initialization is incomplete resulting in a corrupted word on the first transfer.

The _XGMII_Bus helper class sets it’s value to XGMII IDLE during the __init__: https://github.com/cocotb/cocotb/blob/97e28803308d09d2bd885e4279d5036ef9861d42/cocotb/drivers/xgmii.py#L61-L83

But this value is never read during initialization of XGMII(Driver)https://github.com/cocotb/cocotb/blob/97e28803308d09d2bd885e4279d5036ef9861d42/cocotb/drivers/xgmii.py#L122-L140

… and as reading the value clears the internal _integer buffer of the helper class … https://github.com/cocotb/cocotb/blob/97e28803308d09d2bd885e4279d5036ef9861d42/cocotb/drivers/xgmii.py#L104-L113

… the first word of the first transaction (actually the PREAMBLE and START byte) is OR’ed with the IDLE value corrupting the transmission.

One way of fixing would be to simply read the value of the bus during __init__ of XGMII(Driver) and thus clearing the buffer.

self.signal <= self.bus.value

Alternatively (and maybe cleaner) we could remove the default value of the helper class and use the idle helper of XGMII(Driver).

I’ll submit a pull for the latter, as I feel it’s cleaner. Thoughts?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ktbarrettcommented, Jun 18, 2020

This was resolved by #1905, right?

0reactions
ktbarrettcommented, Oct 28, 2020

@ecg173-bi Have a look here at the type annotation for the XGMIIDriver, the signal argument is supposed to be a sim handle not a Bus. I’d suggest the following, assuming stream_in is your XGMII bus.

XGMII(dut.stream_in, dut.stream_in_gmii_clk, interleaved = True)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Macb Driver - Confluence
Macb common MDIO bus enhancements in initialization and suspend/resume flows including SGMII phy handling. Fixes on ethtool WOL helper and inclusion of macb...
Read more >
Xilinx Zynq Ultrascale+ SGMII mode with TI DP83867 PHY ...
I'm having issues with the Ethernet on a custom board with a ZynqMP and the Ti83867 PHY running in SGMII mode.
Read more >
axiethernet: Main Page - GitHub Pages
The Xilinx AXI Ethernet MAC driver component. This driver supports hard Ethernet core for Virtex-6(TM) devices and soft Ethernet core for Spartan-6(TM) and ......
Read more >
HB0765 Handbook Core10GMAC Version 2.2 - Microsemi
When Core10GMAC is configured for XGMII design the PCS Interface is used, ... driver handles the auto-negotiation process and the initialization and ...
Read more >
Qlogic BNX2 RHEL7 Driver for 2019A - Lenovo Support US
Problem: CQ87673 - Driver initialization might fail after preboot. Change: (FW) Remove initialization of PXP2_REG_PGL_INT_TSDM_*. Introduced: Day 1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found