Wishbone Communications - 32-bit Processor to Slave Peripheral
Communications between a 32-bit host processor and a slave IO peripheral component are carried out over a standard Wishbone bus interface. The following sections detail the communication cycles involved between Host and Controller for writing to/reading from internal registers of the slave peripheral, which are accessible by the processor.
Writing to an Internal Register
Data is written from the host processor to an internal register in the slave peripheral, in accordance with the standard Wishbone data transfer handshaking protocol. The write operation occurs on the rising edge of the CLK_I
signal and can be summarized as follows:
- The host presents the required 24-bit address based on the register to be written on its
IO_ADR_O
output and valid data on itsIO_DAT_O
output. It then asserts itsIO_WE_O
signal, to specify a write cycle
- The slave peripheral receives the n-bit address (where n is the width of its address bus) on its
ADR_I
input and, identifying the addressed register, prepares to receive data into that register
- The host asserts its
IO_STB_O
andIO_CYC_O
outputs, indicating that the transfer is to begin. The slave peripheral, which monitors itsSTB_I
andCYC_I
inputs on each rising edge of theCLK_I
signal, reacts to this assertion by latching the data appearing at itsDAT_I
input into the target register and asserting itsACK_O
signal – to indicate to the host that the data has been received
- The host, which monitors its
IO_ACK_I
input on each rising edge of theCLK_I
signal, responds by negating theIO_STB_O
andIO_CYC_O
signals. At the same time, the slave peripheral negates theACK_O
signal and the data transfer cycle is naturally terminated.
Reading from an Internal Register
Data is read from an internal register in accordance with the standard Wishbone data transfer handshaking protocol. The read operation, which occurs on the rising edge of the CLK_I
signal, can be summarized as follows:
- The host presents the required 24-bit address based on the register to be read on its
IO_ADR_O
output. It then negates itsIO_WE_O
signal, to specify a read cycle
- The slave peripheral receives the n-bit address (where n is the width of its address bus) on its
ADR_I
input and, identifying the addressed register, prepares to transmit data from the selected register
- The host asserts its
IO_STB_O
andIO_CYC_O
outputs, indicating that the transfer is to begin. The slave peripheral, which monitors itsSTB_I
andCYC_I
inputs on each rising edge of theCLK_I
signal, reacts to this assertion by presenting the valid data on itsDAT_O
output and asserting itsACK_O
signal – to indicate to the host that valid data is present
- The host, which monitors its
IO_ACK_I
input on each rising edge of theCLK_I
signal, responds by latching the data appearing at itsIO_DAT_I
input and negating theIO_STB_O
andIO_CYC_O
signals. At the same time, the slave peripheral negates theACK_O
signal and the data transfer cycle is naturally terminated.