|
entity VMEReadWriteRegisterA register with a simple Bus-Interface for reading and writing. |
The register has an address which is defined in a generic. It can be written an read by presenting the address and asserting either write or read strobes. The data port is bidirectional (for writing and reading) whereas at the q output the contents of the register is permanently available.
Generics:
| DATA_WIDTH | is the width of the register. |
| ADDRESS_WIDTH | is the width of the address bus. |
| DECODE_ADDRESS | is the fixed address of the register which has to be used to access the register with read or write operations. |
Ports:
| address | has to hold the DECODE_ADDRESS for an access to the register. |
| writeRegister | has to be '1' in order to write data into the register. Data is written to the register on the second rising edge of clock after write='1' and the valid address have been presented. |
| readRegister | has to be '1' and the valid address has to be presented at the address input in order to read back data via the data in/out bus. The read data will be valid after the next rising edge after the address and the readRegister have been provided. |
| readData | can be used as an enable signal in case that one wants to read out with the same vme-access other data which is not contained in the ReadWriteRegister. |