|
| 1 | +System Interface |
| 2 | +---------------- |
| 3 | + |
| 4 | +The DEM-UART module provides a generic bus interface, which can be used by wrapper modules to support actual bus interfaces. |
| 5 | +We specify a Wishbone wrapper interface below. |
| 6 | + |
| 7 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 8 | +| Signal | Width (bit) | Direction | Description | |
| 9 | ++=================+=============+===============+=================================================+ |
| 10 | +| ``bus_req`` | 1 | CPU->DEM | ``1`` indicates an active request from the CPU | |
| 11 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 12 | +| ``bus_addr`` | 3 | CPU->DEM | Address to be used with write/read operation | |
| 13 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 14 | +| ``bus_write`` | 1 | CPU->DEM | ``1`` indicates a register write request | |
| 15 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 16 | +| ``bus_wdata`` | 8 | CPU->DEM | Data to be written into the register | |
| 17 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 18 | +| ``bus_ack`` | 1 | DEM->CPU | Acknowledge last request | |
| 19 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 20 | +| ``bus_rdata`` | 8 | DEM->CPU | Data that was read from the register | |
| 21 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 22 | + |
| 23 | +.. figure:: img/bus_write_diagram.* |
| 24 | + :alt: A typical write cycle |
| 25 | + |
| 26 | +.. figure:: img/bus_read_diagram.* |
| 27 | + :alt: A typical read cycle |
| 28 | + |
| 29 | +A new request is made by asserting ``bus_req``, unless ``bus_req`` is asserted, no other signal is valid. |
| 30 | +``bus_write`` indicates whether it is a read (0) or a write (1) request. |
| 31 | +``bus_addr`` may be any of the values documented under :ref:`uart-registers`. |
| 32 | +Finally ``bus_ack`` is asserted to confirm the request and end the cycle. |
| 33 | + |
| 34 | +``bus_req``, ``bus_addr`` and ``bus_write`` are asserted in the same cycle, if it is a write cycle |
| 35 | +``bus_wdata`` is also set in the same cycle. |
| 36 | +``bus_ack may`` be asserted any number of cycles after ``bus_req`` has been asserted. |
| 37 | +``bus_rdata`` is only valid when ``bus_ack`` is asserted and ``bus_write`` is negated. |
| 38 | + |
| 39 | + |
| 40 | +Wishbone Bus |
| 41 | +------------ |
| 42 | +If a wishbone interface is present, it should wrap around the generic bus described above and take |
| 43 | +care of translating all the signals. |
| 44 | +The following signals MUST be present on a compatible WISHBONE bus. |
| 45 | + |
| 46 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 47 | +| Signal | Width (bit) | Direction | Description | |
| 48 | ++=================+=============+===============+=================================================+ |
| 49 | +| ``wb_adr_i`` | 3 | CPU->DEM | Address to be used with write/read operation | |
| 50 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 51 | +| ``wb_cyc_i`` | 1 | CPU->DEM | ``1`` indicates valid bus cycle is in progress | |
| 52 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 53 | +| ``wb_dat_i`` | 32 | CPU->DEM | Data to be written into the register | |
| 54 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 55 | +| ``wb_sel_i`` | 4 | CPU->DEM | Bitfield indicating validity of data on dat_i | |
| 56 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 57 | +| ``wb_stb_i`` | 1 | CPU->DEM | ``1`` indicates that DEM is selected | |
| 58 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 59 | +| ``wb_we_i`` | 8 | CPU->DEM | ``1`` indicates a write request by the WB-Master| |
| 60 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 61 | +| ``wb_ack_o`` | 1 | DEM->CPU | ``1`` indicates termination of normal bus cycle | |
| 62 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 63 | +| ``wb_dat_o`` | 32 | DEM->CPU | Data that was read from the register | |
| 64 | ++-----------------+-------------+---------------+-------------------------------------------------+ |
| 65 | + |
| 66 | +For more information see the `WISHBONE specification <https://cdn.opencores.org/downloads/wbspec_b3.pdf>`_ |
0 commit comments