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_Ooutput and valid data on itsIO_DAT_Ooutput. It then asserts itsIO_WE_Osignal, 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_Iinput and, identifying the addressed register, prepares to receive data into that register
- The host asserts its
IO_STB_OandIO_CYC_Ooutputs, indicating that the transfer is to begin. The slave peripheral, which monitors itsSTB_IandCYC_Iinputs on each rising edge of theCLK_Isignal, reacts to this assertion by latching the data appearing at itsDAT_Iinput into the target register and asserting itsACK_Osignal – to indicate to the host that the data has been received
- The host, which monitors its
IO_ACK_Iinput on each rising edge of theCLK_Isignal, responds by negating theIO_STB_OandIO_CYC_Osignals. At the same time, the slave peripheral negates theACK_Osignal 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_Ooutput. It then negates itsIO_WE_Osignal, 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_Iinput and, identifying the addressed register, prepares to transmit data from the selected register
- The host asserts its
IO_STB_OandIO_CYC_Ooutputs, indicating that the transfer is to begin. The slave peripheral, which monitors itsSTB_IandCYC_Iinputs on each rising edge of theCLK_Isignal, reacts to this assertion by presenting the valid data on itsDAT_Ooutput and asserting itsACK_Osignal – to indicate to the host that valid data is present
- The host, which monitors its
IO_ACK_Iinput on each rising edge of theCLK_Isignal, responds by latching the data appearing at itsIO_DAT_Iinput and negating theIO_STB_OandIO_CYC_Osignals. At the same time, the slave peripheral negates theACK_Osignal and the data transfer cycle is naturally terminated.