Skip to content
Snippets Groups Projects
Select Git revision
  • 510d240b3520cbe3d9cb6b64b635a30a3104f449
  • main default protected
  • QSPI-map
  • feat_dmax4
  • nanosoc_accel-2023
5 results

README.md

Blame
  • user avatar
    dam1n19 authored
    510d240b
    History

    AES-128 Example Accelerator System Project

    This repo is the top-level repository which contains an example accelerator based on the secworks AES engine integrated in SoC Labs provided nanosoc chip design IP in forms of git subrepositories.

    Cloning this repository


    This Repository contains multiple sub-repositories. In order to clone them with this repository, please use the following command:

    git clone --recurse https://git.soton.ac.uk/soclabs/aes-128-project.git

    Setting up the Project Environment


    In order to checkout all the sub-repositories in your project to their branches and set up your local environment variables, from the top-level of this project run:

    source set_env.sh

    Setting up the Project Environment


    Every time you wish to run commands in this project, you will need to make sure the set environment script has been run for your current terminal session. This is done by moving to the top-level of the project and running:

    source set_env.sh

    This sets the environment variables related to this project and creates visability to the scripts in the flow directory.

    Updating Subrepositories


    Once you have run a source set_env.sh in your current terminal, you are then able to update all your repositories to their latest version by running:

    socpull

    This runs a git pull on all repositories in your project.

    Project Structure


    The core of the SoC is NanoSoC. This is an example, configurable system that is the main framework. It has many different memory-mapped regions, one of which is designed for the connection of accelerator subsystems called the expansion region.

    The expansion region is able to instantiate an accelerator_subsystem by default. This means that anyone using NanoSoC as a platform for accelerator experimentation will need to build an accelerator_subsystem rtl module.

    Accelerator Subsystem


    accelerator_subsystem can either directly contain an accelerator (or multiple) or can instantiate accelerator wrappers which in turn instantiate accelerators.

    This module is expected to be found in system/src/accelerator_subsystem.v.

    Accelerator Wrapper


    Accelerator wrappers are located in wrapper/src. These should instantiate accelerators and can use wrapper components within the accelerator_wrapper_tech repository to allow a conversion of valid//ready interfaces to a memory-mapped AHB interface.

    Running the simulation


    This design instantiates a custom (AMBA-AHB) wrapper around the AES core to implement a memory-mapped 128-bit AES encrypt/decrypt accelerator that can be used as a software-driven peripheral or a semi-autonomous DMA subystem when 128-bit keys and variable length data payloads can be set up as scatter/gather descriptor chains for background processing.

    To run the simulation the 'socsim' command executes the makefile in the 'nanosoc_tech' microcontroller framework. (Edit the simulator target in nanosoc_tech/system/makefile for the simulator EDA tool used). Then use the:

    socsim system_aes128 TESTNAME=aes128_tests

    This runs the integration test program on the Arm Cortex-M0 processor using the 'system_aes128.sh' script provided in the simulate/socsim directory and the logs are produced in the simulate/sim/system_aes128/logs directory.