Explaining each line of the Verilog code would be tedious, but the flowcharts
in Figures 8-11 illustrate the operation of the interface. The flowcharts can be
matched to the Verilog to see the details of how each state is coded.
The resulting code for the interface is the Verilog module i2c_interface.v
(available at the article link).
In Part 2, I’ll show how this module can be implemented with clocking, and
a top level module to do some hardware testing of the interface and the PMOD
Figure 11. Flowchart RACK, READ, WACK,
DATA in, and DACK states.
Figure 10. Flowchart
NAK, RESTART, and
SERVO 08.2017 45
1. Silicon Labs, Sensor — PMD(PMOD), p. 1
2. Xilinx, Cost-Optimized Portfolio Product Tables and Product Selection
Guide, p. 4
3. Silicon Labs, Si7020-A010 I2C Humidity and Temperature Sensor, p. 5
4. Ibid., p. 20.