1
0
mirror of https://github.com/olofk/serv.git synced 2026-01-26 19:51:52 +00:00
Files
olofk.serv/doc/index.rst
2020-08-13 23:44:05 +02:00

117 lines
3.9 KiB
ReStructuredText

.. SERV documentation master file, created by
sphinx-quickstart on Mon Feb 24 00:01:33 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
SERV user manual
================================
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Modules
-------
SERV is a bit-serial CPU which means that the internal datapath is one bit wide. :ref:`dataflow` show the internal dataflow. For each instructions, data is read from the register file or the immediate fields of the instruction word and the result of the operation is stored back into the register file. Reading and writing memory is handled through the memory interface module.
.. _dataflow:
.. figure:: serv_dataflow.png
SERV internal dataflow
serv_rf_top
^^^^^^^^^^^
.. image:: serv_rf_top.png
serv_rf_top is a top-level convenience wrapper that includes SERV and the default RF implementation and just exposes the timer IRQ and instruction/data wishbone buses.
serv_top
^^^^^^^^
serv_top is the top-level of the SERV core without an RF
serv_alu
^^^^^^^^
.. image:: serv_alu.png
serv_alu handles alu and shift operations. For shift ops, the data to be shifted resides in bufreg. It also contains the logic for comparisons used by the slt* and conditional branch instructions
.. image:: serv_alu_int.png
serv_bufreg
^^^^^^^^^^^
.. image:: serv_bufreg.png
For two-stage operations, serv_bufreg holds data between stages. This data can be the effective address for branches or load/stores or data to be shifted for shift ops. It has a serial output for streaming out results during stage two and a parallel output that forms the dbus address. serv_bufreg also keeps track of the two lsb when calculating adresses. This is used to check for alignment errors
serv_csr
^^^^^^^^
.. image:: serv_csr.png
serv_csr handles CSR accesses and all status related to (timer) interrupts. Out of the eight CSRs supported by SERV, only four resides in serv_csr (mstatus, mie, mcause and mip) and for those registers, SERV only implement the bits required for ecall, ebreak, misalignment and timer interrupts. The four remaining CSRs are commonly stored in the RF
serv_ctrl
^^^^^^^^^
.. image:: serv_ctrl.png
serv_ctrl keeps track of the current PC and contains the logic needed to calculate the next PC.
serv_decode
^^^^^^^^^^^
.. image:: serv_decode.png
serv_decode is responsible for decoding the operation word coming from ibus into a set of control signals that are used internally in SERV. It also assembles the 32-bit immediate used by some instructions. During the life cycle of an operation all control signals (except one) are static and the immediate is streamed out during the first run stage
serv_mem_if
^^^^^^^^^^^
.. image:: serv_mem_if.png
serv_mem_if prepares the data to be sent out on the dbus during store operations and serializes the incoming data during loads
serv_rf_if
^^^^^^^^^^
serv_rf_if is the gateway between the core and an RF implementation. It transforms all control signals that affect register reads or writes and exposes two read and write ports to the RF. This allows implementors to plug in an RF implementation that is best suited for the technology to be used.
serv_rf_ram
^^^^^^^^^^^
serv_rf_ram is the default RF implementation using an SRAM-like interface. Suitable for FPGA implementations
serv_rf_ram_if
^^^^^^^^^^^^^^
serv_rf_ram_if converts between the SERV RF IF and the serv_rf_ram interface
serv_state
^^^^^^^^^^
serv_state keeps track of the state for the core and contains all dynamic control signals during an operations life time. Also controls the accesses towards the RF and dbus
shift_reg
^^^^^^^^^
shift_reg is a shift register implementation used in various places in SERV
serv_shift
^^^^^^^^^^
serv_shift lives inside the ALU and contains the control logic for shift operations