Skip to content

Add a 24 series I2C EEPROM emulator #741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

hcsch
Copy link

@hcsch hcsch commented Feb 14, 2025

I've started writing a 24-series I2C EEPROM emulator applet for the glasgow. Currently this still has some issues with addressing and the way addresses for reads/writes are sent to the host is not yet ready for multi-byte addresses and the most significant bits of the address contained in the least significant I2C address bits.

Since I've asked around on the IRC in relation to this applet a bunch of times now I thought it was time to at least open a draft PR.
This is not yet ready for review and I will be working on improving it some more (perhaps figuring out how to test it against the 24x applet too).

This also adds GlasgowAnaylzer / --trace events for I2CBus, I2CTarget, and I2CInitiator. I'll probably extract this into another branch and PR once I'm done with this emulator.

REMOVE THIS COMMIT BEFORE MERGING
Order of the dev shell packages matters, yosys's propagatedBuildInput
python interpreter was taking precedence over ours.

REMOVE THIS COMMIT BEFORE MERGING
REMOVE THIS COMMIT BEFORE MERGING
REMOVE THIS COMMIT BEFORE MERGING
The tests are rather slow so they hinder iteration time while just
trying out stuff quickly.

REMOVE THIS COMMIT BEFORE MERGING
Implement masking for the I2CTarget address matching. This way devices
that use address bits as variable inputs can be emulated.
Also add `address_i` signal to I2CTarget which an acknowledged address
is written to simultaneously to the start strobe of the target (not the
bus). Emulated devices using address bits as inputs can read them from
this signal.
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.

1 participant