Skip to content

Conversation

@arturum1
Copy link
Contributor

@arturum1 arturum1 commented Jan 4, 2026

Related to IObundle/py2hwsw#419

This fixes issue where the .sdc files were being generated in the setup
directory when the build dir was not provided via python parameters.

Resolves IObundle#99
Copy information from the following github issues into the repository:
- IObundle#55
- IObundle#56
Related to arturum1/py2hwsw@936b8ea

This fixes missing short hash string in LaTeX documents.
Resolves IObundle#98.
Rename iob_csrs subblock and ports to csrs.
Rename remaining subblocks to more closely match block diagram.
Finish moving internal ethernet logic (for no-auto csrs) into dedicated
module: iob_eth_logic.py
New block diagram has:
- Blocks with matching verilog instance names (except for 'space' characters which are not valid in verilog instance names).
- Remove internal blocks from TX, RX, and MII management modules.
- Add MII clock signals and connections. Don't represent system clock
  and reset to avoid cluttering diagram.

Addresses IObundle#96
@jjts jjts requested review from P-Miranda and Copilot and removed request for Copilot January 5, 2026 11:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request resolves multiple GitHub issues by refactoring the IOb-Eth core architecture and improving documentation. The main changes reorganize CDC (Clock Domain Crossing) and CSR logic into dedicated modules, fix SDC file generation, add Linux driver documentation, and update the py2hwsw commit handling.

Key changes:

  • Refactored CDC logic and no-auto CSR logic into separate modules (iob_eth_cdc and iob_eth_logic)
  • Fixed SDC file generation to always output to build directory regardless of module hierarchy
  • Added comprehensive Linux driver documentation in README with links to kernel sources and device-tree bindings
  • Updated py2hwsw commit with automatic shortHash.tex generation in Nix configuration

Reviewed changes

Copilot reviewed 7 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
iob_eth.py Refactored main module by moving CDC and CSR logic to dedicated submodules; updated subblock names and descriptions; added VERSION variable; improved build_dir handling
hardware/modules/iob_eth_logic/iob_eth_logic.py New module containing no-auto CSR interface logic previously in main module's comb block
hardware/modules/iob_eth_cdc/iob_eth_cdc.py New module containing all clock domain crossing logic including reset and data synchronizers
hardware/src/iob_eth.sdc Updated CSR interface port names from iob_csrs_* to csrs_* to match instance name changes
hardware/simulation/iob_eth_sim/iob_eth_sim.py Updated CSR interface port names to match the renamed instance
document/figures/inst.odg Binary file update for instance diagram (new file)
document/figures/bd.odg Binary file update for block diagram (new file)
default.nix Updated py2hwsw commit and SHA256; added postFetch hook to generate shortHash.tex from commit
README.md Added new Linux driver section with links to kernel driver source, device-tree documentation, and configuration
Comments suppressed due to low confidence (1)

iob_eth.py:85

  • The script copying logic (lines 78-85) is indented inside the for loop on line 69, which causes the scripts directory to be copied multiple times (once for each path in the paths list). This should be dedented to the same level as the for loop so it only executes once after all SDC files are copied.
            # Copy all scripts
            dst = os.path.join(build_dir, "scripts")
            shutil.copytree(
                f"{os.path.dirname(__file__)}/scripts",
                dst,
                dirs_exist_ok=True,
            )
            # Hack for Nix: Files copied from Nix's py2hwsw package do not contain write permissions
            os.system("chmod -R ug+w " + dst)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@P-Miranda P-Miranda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct transmitter and receiver block descriptions,
otherwise ok

@jjts jjts merged commit d68e7ef into IObundle:master Jan 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

building leaves untracked files Unknown in title and page header user guide: orfaned sections Block diagram issues

3 participants