commit | 6c40bc55f256cb1777a5a6491430473e4b3a242a | [log] [tgz] |
---|---|---|
author | Muhammad Tahir <mtahir@uet.edu.pk> | Mon Apr 25 22:09:32 2022 +0500 |
committer | Muhammad Tahir <mtahir@uet.edu.pk> | Mon Apr 25 22:09:32 2022 +0500 |
tree | 7165d36681041d16d368cb27f9d4d262dc034fc2 | |
parent | 73f5c98b2fb6b2acac6470f4606c404d63d57c1a [diff] |
Updated
UETRV-ECore is a RISC-V based SoC integrating 3-stage pipelined core with multiple peripherals for embedded applications. Currently, the core implements RV32I ISA based on User-level ISA Version 2.0 and Privileged Architecture Version 1.11 supporting machine mode only. The core does not have any structural hazards, while data hazards are resolved using forwarding and stalling. Following is the status of current implementation:
The memory map of SOC is shown in the following table | Base Address | Description | Attributes | |:-------------------:|:-------------------------:|:---------------:| | 0x0000_0000 | Instruction Memory | R-X-W | | 0x0000_1000 | Data Memory | R-W | | 0x0000_2000 | UART | R-W | | 0x0000_3000 | SPI | R-W | | 0x0000_4000 | Motor Control 1 | R-W | | 0x0000_5000 | Motor Control 2 | R-W | | 0x0000_6000 | Motor Control 3 | R-W | | 0x0000_7000 | Boot Memory | R-X |
R: Read access
W: Write access
X: Execute access
The pictorial representation of memory map is in the following picture.
The linker.ld
file has the memory defination as follows.
MEMORY { FLASH_INST (rx) : ORIGIN = 0x00000000, LENGTH = 2K FLASH_BOOT (rx) : ORIGIN = 0x00007000, LENGTH = 1K RAM (rwx) : ORIGIN = 0x00001000, LENGTH = 2K }
Different building blocks for the SoC are integrated using the top module './src/main/scala/soc_tile.scala'
. To generate the Verilog, Scala Build Tool (sbt) and its dependencies needs to be installed. The verilog code can be generated by executing the following command:
> sbt run
The output verilog file './soc_tile.v'
has been generated using sbt 1.3.13.
Out of reset, the Boot Memory is invoked by the core and the processor starts executing the instructions that are hard coded into the Boot memory. As a result of this execution, the Application program is loaded from the external SPI FLASH Memory into the Instruction Memory. This phenomenon is demonstrated using the following diagram.
The project demo includes an FPGA based implementation to control a DC motor with encoder feedback. The demo project illustrating the motor control configuration is available in separate repo alongwith the Chisel source code for the SoC implementation.
The bootloader and external SPI falsh memory programming (using TI's Tiva embedded board) are available in a separate repo.