Xilinx / Xilinx/embeddedsw

Vphy using unnecessary functions

Open
#360 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Looking at the compiled result when only GTYE4 is present, I see GTHE4 functions still in my output. Totaling up all the Gthe4 symbol sizes is 7 KB (almost a full BRAM) of code that's not ever going get used. Presumably it was done this way because some devices can have both GTH and GTY, so if you have a system with multiply VPHYs on the multiple types you could need this. But, it's a waste of resources for everybody else.

https://github.com/Xilinx/embeddedsw/blob/45a18907084e77bb3a450a035d280130d7ff6e26/XilinxProcessorIPLib/drivers/vphy/src/xvphy.c#L124-L130

Proposed fix is to find a better way at compiling out unused functionality. Possibly some macro magic can be done with XPAR_XVPHY_NUM_INSTANCES instead or the xparameter generator script can add an output for which transceiver types are present (this is likely the better option).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the VPHY conditional code in XilinxProcessorIPLib/drivers/vphy/src/xvphy.c at lines 124-130 and inspect the compiled output when only GTYE4 is present. Trace how XPAR_XVPHY_NUM_INSTANCES and the xparameter generator describe transceiver types. Done means unused GTHE4 functionality is excluded without breaking configurations that contain both GTH and GTY.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.