diff --git a/NEWS b/NEWS index f4ece82..2e09b3b 100644 --- a/NEWS +++ b/NEWS @@ -10,7 +10,7 @@ 1.2.0 2022-07-25 Olof Kindgren ====================================================== -* New Servant ports: EBAZ4205, Chameleion96, Nexys2, Alinx AX309 +* New Servant ports: EBAZ4205, Chameleon96, Nexys2, Alinx AX309 * Support for M ISA extension * Support for C ISA extension * Fix occasionally wrong sign on immediates diff --git a/README.md b/README.md index a639929..1d8a6da 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ SERV can be easily integrated into any design, but if you are looking at just qu [CoreScore](https://corescore.store/) is an award-giving benchmark for FPGAs and their synthesis/P&R tools. It tests how many SERV cores that can be put into a particular FPGA. -[Observer](https://github.com/olofk/observer) is a configurable and software-programmable sensor aggregation platform for heterogenous sensors. +[Observer](https://github.com/olofk/observer) is a configurable and software-programmable sensor aggregation platform for heterogeneous sensors. [Subservient](https://github.com/olofk/subservient/) is a small technology-independent SERV-based SoC intended for ASIC implementations together with a single-port SRAM. @@ -65,7 +65,7 @@ All the following commands will be run from this directory unless otherwise stat $ fusesoc library add serv https://github.com/olofk/serv >:warning: The SERV repo will now be available in `$WORKSPACE/fusesoc_libraries/serv`. We will refer to that directory as `$SERV`. - Install latest version of [Verilator](https://www.veripool.org/wiki/verilator) -- (Optional) To support RISC-V M-extension extension, Multiplication and Division unit (MDU) can be added included into the SERV as a seprate library. +- (Optional) To support RISC-V M-extension extension, Multiplication and Division unit (MDU) can be added included into the SERV as a separate library. $ fusesoc library add mdu https://github.com/zeeshanrafique23/mdu MDU will be available in `$WORKSPACE/fusesoc_libraries/mdu` @@ -128,7 +128,7 @@ For a more advanced example, we can also run the Dining philosophers demo -If the [toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain) is installed, other applications can be tested by compiling the assembly prgram and converting to bin and then hex with makehex.py found in [`$SERV/sw`](/sw/). +If the [toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain) is installed, other applications can be tested by compiling the assembly program and converting to bin and then hex with makehex.py found in [`$SERV/sw`](/sw/). :bulb:RISC-V Compressed Extension can be enabled by passing `--compressed=1` parameter. diff --git a/doc/interface.rst b/doc/interface.rst index f3f91c4..8edbedb 100644 --- a/doc/interface.rst +++ b/doc/interface.rst @@ -5,7 +5,7 @@ Users of SERV can choose to use either serv_top or serv_rf_top depending on what .. image:: serv_top.png -serv_rf_top is a convenience wrapper that combines serv_top with a memory-based RF (serf_rf_ram) and an adapter between them (serv_rf_ram_if). This allows users to choose between a drop-in implemenentation when the memory-based RF is good enough or supply an alternative RF implementation, such as a shift-register based one or a combined SRAM for instruction/data memory and RF. +serv_rf_top is a convenience wrapper that combines serv_top with a memory-based RF (serf_rf_ram) and an adapter between them (serv_rf_ram_if). This allows users to choose between a drop-in implementation when the memory-based RF is good enough or supply an alternative RF implementation, such as a shift-register based one or a combined SRAM for instruction/data memory and RF. .. image:: serv_rf_top.png diff --git a/doc/modules.rst b/doc/modules.rst index a646267..ef19849 100644 --- a/doc/modules.rst +++ b/doc/modules.rst @@ -1,7 +1,7 @@ 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 instruction, 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. +SERV is a bit-serial CPU which means that the internal datapath is one bit wide. :ref:`dataflow` shows the internal dataflow. For each instruction, 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: @@ -28,7 +28,7 @@ serv_alu serv_alu handles alu 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 the add/sub 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. 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` as a placeholder for the name of the FPGA board. diff --git a/rtl/serv_csr.v b/rtl/serv_csr.v index 09dfe2d..1a2cdfc 100644 --- a/rtl/serv_csr.v +++ b/rtl/serv_csr.v @@ -94,7 +94,7 @@ module serv_csr During a mstatus CSR access instruction it's assigned when bit 3 gets updated - These conditions are all mutually exclusibe + These conditions are all mutually exclusive */ if ((i_trap & i_cnt_done) | i_mstatus_en & i_cnt3 & i_en | i_mret) mstatus_mie <= !i_trap & (i_mret ? mstatus_mpie : csr_in[B]); diff --git a/rtl/serv_state.v b/rtl/serv_state.v index 02cd02b..348d319 100644 --- a/rtl/serv_state.v +++ b/rtl/serv_state.v @@ -105,10 +105,10 @@ module serv_state assign o_rf_rd_en = i_rd_op & !o_init; /* - bufreg is used during mem. branch and shift operations + bufreg is used during mem, branch, and shift operations mem : bufreg is used for dbus address. Shift in data during phase 1. - Shift out during phase 2 if there was an misalignment exception. + Shift out during phase 2 if there was a misalignment exception. branch : Shift in during phase 1. Shift out during phase 2 @@ -127,7 +127,7 @@ module serv_state //ibus_cyc changes on three conditions. //1. i_rst is asserted. Together with the async gating above, o_ibus_cyc // will be asserted as soon as the reset is released. This is how the - // first instruction is fetced + // first instruction is fetched //2. o_cnt_done and o_ctrl_pc_en are asserted. This means that SERV just // finished updating the PC, is done with the current instruction and // o_ibus_cyc gets asserted to fetch a new instruction diff --git a/servant/servant_orangecrab.v b/servant/servant_orangecrab.v index a82c9bf..dc895a9 100644 --- a/servant/servant_orangecrab.v +++ b/servant/servant_orangecrab.v @@ -71,7 +71,7 @@ module servant_orangecrab .CLKOS2(), // secondary output .CLKOS3(), // secondary output .LOCK(pll_locked), // lock indicator - .INTLOCK(), // internal lock indictor + .INTLOCK(), // internal lock indicator .REFCLK(), // output of ref select mux .CLKINTFB() // internal fb ); diff --git a/verif/Readme.md b/verif/Readme.md index 57bbb2d..c7513b3 100644 --- a/verif/Readme.md +++ b/verif/Readme.md @@ -12,9 +12,9 @@ In our case, DUT is SERV core and reference is the [sail-riscv](https://github.c sudo apt-get install -y gcc-riscv64-unknown-elf > :bulb: By default, RISCOF plugins uses [RV32](https://github.com/riscv-collab/riscv-gnu-toolchain#:~:text=To%20build%20the%2032%2Dbit%20RV32GC%20toolchain%2C%20use%3A) toolchain for compiling native `rv32` code. For SERV, this dependency has been removed from the plugin as RV64 is sufficient for 32-bit systems as well. -- [SAIL-RISCV](https://github.com/riscv/sail-riscv) - The reference model can be build by following [these](https://riscof.readthedocs.io/en/stable/installation.html#install-plugin-models) instructions. The pre-built binaries of sail-riscv is available in [`bin`](/verif/bin/) directory. Extract the tarball somewhere and add the directory containing `riscv_sim_RV32` to your PATH +- [SAIL-RISCV](https://github.com/riscv/sail-riscv) - The reference model can be built by following [these](https://riscof.readthedocs.io/en/stable/installation.html#install-plugin-models) instructions. The pre-built binaries of sail-riscv is available in [`bin`](/verif/bin/) directory. Extract the tarball somewhere and add the directory containing `riscv_sim_RV32` to your PATH -- [RISCOF](https://riscof.readthedocs.io/en/stable/installation.html#install-python) - If you have installed [Python](https://riscof.readthedocs.io/en/stable/installation.html#install-python), run the folllowing command to [install RISCOF](https://riscof.readthedocs.io/en/stable/installation.html#). +- [RISCOF](https://riscof.readthedocs.io/en/stable/installation.html#install-python) - If you have installed [Python](https://riscof.readthedocs.io/en/stable/installation.html#install-python), run the following command to [install RISCOF](https://riscof.readthedocs.io/en/stable/installation.html#). pip3 install riscof @@ -55,7 +55,7 @@ if the tests are already installed and just needs to be updated. └── ... ## Running Compliance tests -After completing all the steps in [Getting started](/README.md) followed by the [Prerequisites](##Prerequisites), we are all set to run the complaince tests. +After completing all the steps in [Getting started](/README.md) followed by the [Prerequisites](#prerequisites), we are all set to run the compliance tests. :o: All the RISCOF commands will be run from the workspace @@ -64,9 +64,9 @@ After completing all the steps in [Getting started](/README.md) followed by the --env=riscv-arch-test/riscv-test-suite/env - `--config` - Configuration file is passed using this flag which contains the paths and the names of DUT and Reference plugins. -- `--suite` - The arch-tests are passed to RISCOF using this flag. In the above command, it points `I` test directory. We can change path to `M`, `C`, `privilege` or `Zifencei` directories to run the respective tests.. +- `--suite` - The arch-tests are passed to RISCOF using this flag. In the above command, it points `I` test directory. We can change path to `M`, `C`, `privilege` or `Zifencei` directories to run the respective tests. - `--env` - The header files of test framework are passed using this flag. > :bulb: Other optional arguments of RISCOF command can be found [here](https://riscof.readthedocs.io/en/stable/commands.html#run) -When RISCOF run command successfully executed: an `html` report is generated which depicts the results of the tests. And a directory named `riscof_work` is created in the workspace which contains all the log files, signatures, executeables for Reference model and/or DUT. \ No newline at end of file +When RISCOF run command successfully executed: an `html` report is generated which depicts the results of the tests. And a directory named `riscof_work` is created in the workspace which contains all the log files, signatures, executables for Reference model and/or DUT. \ No newline at end of file diff --git a/verif/plugin-serv/env/model_test.h b/verif/plugin-serv/env/model_test.h index 2b74203..e247bf8 100644 --- a/verif/plugin-serv/env/model_test.h +++ b/verif/plugin-serv/env/model_test.h @@ -5,10 +5,10 @@ la a0, begin_signature; \ la a1, end_signature; \ li a2, 0x80000000; \ - complience_halt_loop: \ - beq a0, a1, complience_halt_break; \ + compliance_halt_loop: \ + beq a0, a1, compliance_halt_break; \ addi a3, a0, 4; \ - complience_halt_loop2: \ + compliance_halt_loop2: \ addi a3, a3, -1; \ \ lb a4, 0 (a3); \ @@ -29,14 +29,14 @@ notLetter2: \ addi a5, a5, 0x30; \ sw a5, 0 (a2); \ - bne a0, a3,complience_halt_loop2; \ + bne a0, a3,compliance_halt_loop2; \ addi a0, a0, 4; \ \ li a4, '\n'; \ sw a4, 0 (a2); \ - j complience_halt_loop; \ - j complience_halt_break; \ - complience_halt_break:; \ + j compliance_halt_loop; \ + j compliance_halt_break; \ + compliance_halt_break:; \ lui a0,0x90000000>>12; \ sw a3,0(a0);