.. 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. The first input operand (A) comes from i_rs1 and the second operand (B) comes from i_rs2 or i_imm depending on the type of operation. The data passes through one or more of the add/sub, shift control or bool logic unit and finally ends up in o_rd to be written to the destination register. The output o_cmp is used for conditional branches to decide whether or not to take the branch. The add/sub unit can do additions A+B or subtractions A-B by converting it to A+BĚ…+1. Subtraction mode (i_sub = 1) is also used for the comparisions in the slt* and conditional branch instructions. Finally, it is also used to negate the B operand for left shifts by clearing the A operand (i_shift_op =1). The +1 used in subtraction mode is done by preloading the carry input with 1. Less-than comparisons are handled by converting the expression A