Paying it Forward: Documenting Your Hardware Project

Approaches to documenting a hardware description language using lxsocdoc

Sean Cross - https://xobs.io/ - @xobs

SPI Bitbang Module

self.bitbang = CSRStorage(4)
If(self.bitbang.storage[3],
	dq.oe.eq(0)
).Else(
	dq.oe.eq(1)
),
If(self.bitbang.storage[1], # CPOL=0/CPHA=0 or CPOL=1/CPHA=1 only.
	self.miso.status.eq(dq.i[1])
),
dq.o.eq(Cat(self.bitbang.storage[0], Replicate(1, spi_width-1)))
---ModuleDoc---
lxsocdoc intro to litex/migen concept of mixins concept of documentation sections what the output can look like what's coming in the future documenting interrupts introspecting classes other approaches how you can help why this helps you Benefits: * Generating reference manuals * SVD * SVD2Rust