All Projects → ZipCPU → wbi2c

ZipCPU / wbi2c

Licence: other
Wishbone controlled I2C controllers

Programming Languages

Verilog
626 projects
C++
36643 projects - #6 most used programming language
Lex
420 projects
Makefile
30231 projects
c
50402 projects - #5 most used programming language
shell
77523 projects
assembly
5116 projects

Projects that are alternatives of or similar to wbi2c

dpll
A collection of phase locked loop (PLL) related projects
Stars: ✭ 55 (+120%)
Mutual labels:  fpga, gplv3, verilog, verilator
dblclockfft
A configurable C++ generator of pipelined Verilog FFT cores
Stars: ✭ 147 (+488%)
Mutual labels:  fpga, gplv3, verilog, verilator
Vgasim
A Video display simulator
Stars: ✭ 94 (+276%)
Mutual labels:  fpga, gplv3, verilog
s6soc
CMod-S6 SoC
Stars: ✭ 30 (+20%)
Mutual labels:  fpga, verilator, wishbone-bus
openarty
An Open Source configuration of the Arty platform
Stars: ✭ 93 (+272%)
Mutual labels:  fpga, verilator, wishbone-bus
Wb2axip
Bus bridges and other odds and ends
Stars: ✭ 177 (+608%)
Mutual labels:  fpga, gplv3, verilog
dbgbus
A collection of debugging busses developed and presented at zipcpu.com
Stars: ✭ 24 (-4%)
Mutual labels:  verilog, verilator, wishbone-bus
virtio
Virtio implementation in SystemVerilog
Stars: ✭ 38 (+52%)
Mutual labels:  fpga, verilog, verilator
fpga-nn
NN on FPGA
Stars: ✭ 16 (-36%)
Mutual labels:  fpga, verilog
verifla
Fork of OpenVeriFla - FPGA debugging logic analyzer to use with your designs - examples (so far) for ice40/IceStorm
Stars: ✭ 21 (-16%)
Mutual labels:  fpga, verilog
FPGA RealTime and Static Sobel Edge Detection
Pipelined implementation of Sobel Edge Detection on OV7670 camera and on still images
Stars: ✭ 14 (-44%)
Mutual labels:  fpga, verilog
vdcd
vdcd - virtual device controller daemon/framework for digitalSTROM
Stars: ✭ 19 (-24%)
Mutual labels:  i2c, gplv3
pdp6
PDP-6 Emulator
Stars: ✭ 47 (+88%)
Mutual labels:  fpga, verilog
yarvi
Yet Another RISC-V Implementation
Stars: ✭ 59 (+136%)
Mutual labels:  fpga, verilog
Hard-JPEG-LS
FPGA-based JPEG-LS image compressor.
Stars: ✭ 52 (+108%)
Mutual labels:  fpga, verilog
ZYNQ-NVDLA
NVDLA (An Opensource DL Accelerator Framework) implementation on FPGA.
Stars: ✭ 144 (+476%)
Mutual labels:  fpga, verilog
rules verilator
Bazel build rules for Verilator
Stars: ✭ 14 (-44%)
Mutual labels:  verilog, verilator
vboard
Virtual development board for HDL design
Stars: ✭ 32 (+28%)
Mutual labels:  verilog, verilator
EDSAC
FPGA Verilog implementation of 1949 EDSAC Computer with animated tape reader, panel, teleprinter and CRT scope
Stars: ✭ 28 (+12%)
Mutual labels:  fpga, verilog
karuta
Karuta HLS Compiler: High level synthesis from prototype based object oriented script language to RTL (Verilog) aiming to be useful for FPGA development.
Stars: ✭ 89 (+256%)
Mutual labels:  fpga, verilog

I2C Core(s)

This repository contains contains a couple of I2C cores. There's a basic, Wishbone accessible I2C master, as well as a basic Wishbone accessible I2C slave controller. Both work using a small piece of shared memory, which may be read or written to via the wishbone bus. Changes made to the slave's memory can be read/written by the I2C master when it chooses to make a transaction happen. With respect to the I2C master controller, changes made to the shared memory will require an explicit command in order to push those changes from the master to the slave, or for example to read them back from the slave.

Since writing those original basic controllers, I've now added an I2C CPU. This is really more of a scripted FSM than a full purpose CPU, however it does fit in nicely with some of the telemetry projects I'm dealing with. There are now two versions of this I2C CPU contained within this repository: a Wishbone version and an AXI-Lite version. Other than the bus implementation (and possibly any bus induced endianness issues), the two should be compatible.

The Slave Core

The basic I2C slave core acts as a simple two port memory interface to 128 octets of memory. The first port may be accessed via a 32-bit Wishbone bus. The second port may be accessed via an I2C bus, where this core sits as a slave. Both ports may read or written at the same time, and the core properly sets the wishbone stall line on any collision, so as to arbitrate who gets to write.

The Master Core

The wishbone master core has been used successfully to query monitors for their EDID information. This also acts as a memory. Given a command, the memory will be written to or read from the slave.

Sadly, this core is tied to an I2C device requiring a specific command format: I2C ADDR, SLV ADDR, SEND data, or I2C ADDR, READ data. Devices that have either no address, or a two byte address, will not work with this particular master--although they can still be queried by the CPU following.

The I2C CPU

This core follows an externally provided script describing its interaction. This script can either be provided via a bus slave port, or it can be read from external memory, using either Wishbone or AXI-lite bus protocols. The script contains commands that will then be fed to the I2C controller within. Specific commands include sending a START condition, STOP condition, particular bytes or data, or reading bytes of data. Other commands, such as repeating a sequence or halting, are also available to control the instruction handler.

A small assembler exists in the SW/ directory which can either assemble a given script or disassemble such a script. Run "make test" in the sw/ directory to build this assembler, assemble a test "program", and then to disassemble it back to its component instructions for verification purposes.

The output of this CPU is an AXI stream containing all of the bytes that have been read from the interface while following the script.

Status

Both the slave and master controllers have been tested as part of the EDID support to a video application. Both files have had minor edits since this last success. The I2C CPU has only passed a minimal formal test. It has not yet passed simulation or hardware verification, but will likely be verified in hardware as part of a telemetry package sometime in 2022.

License

Gisselquist Technology is pleased to offer this core to all who are interested, subject to the GPLv3 license.

Commercial Opportunities

If the GPLv3 license is insufficient for your needs, other licenses may be purchased from Gisselquist Technology, LLC.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].