VhdI2CSlave
I2C Slave Interface (Vhdl)
Install / Use
/learn @tirfil/VhdI2CSlaveREADME
I2C Slave interface.
Written in VHDL.
based on https://embeddedmicro.weebly.com/raspberry-pi-i2c-timing.html
Purpose is an micro interface to access registers inside a FPGA.
Interface needs only two pins SDA and SCL except power pins.
Raspberry-Pi could be used to access FPGA board using i2c pins.
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c
Using Python:
http://www.instructables.com/id/Raspberry-Pi-I2C-Python/
Contains:
i2cslave.vhd : code
tb_i2cslave_write.vhd, tb_i2cslave_read.vhd : testbenches
compile.bat, elaborate.bat, run.bat : windows scripts for ghdl simulator
write.gtkw, read.gtkw, demo.gtkw : signals display for Gtkwave software
i2cdemo.vhd: example (i2cdemo project)
i2cdemo project: i2cslave + RAM 256x8
Altera Cyclone II (EP2C5T144C8) : ~140 Logic Elements used.
i2cdemo project tested with raspberry pi and cyclone II developpement board (see raspi directory)
Notes:
Need to add open drain pads for SDA SCL (use positive logic)
For raspberry pi with python:
sudo apt-get install i2c-tools
sudo apt-get install python-smbus
i2cslave - Finite State Machine:

Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
