Git Product home page Git Product logo

gsoc-sim-mem's Introduction

gsoc-sim-mem

A simulated memory controller for use in FPGA designs that want to model real system performance.

This project has been developed in the Google Summer of Code 2020 for LowRisc CIC, supervised by Greg Chadwick, Pirmin Vogel and Alex Bradbury.

Overview

How to contribute

Have a look at CONTRIBUTING for guidelines on how to contribute code to this repository.

Licensing

Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).

How to use

The simulated memory controller has two AXI ports (one slave and one master) dedicated to its integration between the requester (typically the CPU core) and the real memory controller.

Two testbenches are integrated in the repository:

  • A testbench for the whole simulated memory controller, which is discussed here.
  • A testbench for the response banks, as it is a relatively complex design block.

See the documentation for more information about the testbenches.

The required tools are Verilator and FuseSoC. Additionally, GTKWave is used for analyzing waveforms.

Initial setup

To run the complete testbench,

Step 1: Clone the repository and move to the repository root:

git clone https://github.com/lowRISC/gsoc-sim-mem.git simmem
cd simmem

Step 2: Initialize FuseSoC and add the simmem core:

fusesoc init
fusesoc library add simmem .

Testbench execution

The main testbench checks the functionality and performance of the simulated memory controller by:

  • Checking the write response ordering according to the corresponding requests.
  • Displaying the actual delays.

Step 1: To compile the design and testbench, execute:

fusesoc run --target=sim_simmem_top simmem

Step 2: To generate the waveforms, execute:

./build/simmem_0.1/sim_simmem_top-verilator/Vsimmem_top --trace

This runs the testbench again, but this time it generates the top.fst wave file. The testbench standard output is described in the documentation.

Step 3: To view the waveforms, execute:

gtkwave top.fst

This opens the waveform GUI for a deeper analysis.

gsoc-sim-mem's People

Contributors

flaviens avatar gregac avatar

Stargazers

 avatar PrettySoul avatar  avatar yuanhong avatar

Watchers

Alex Bradbury avatar yuanhong avatar  avatar James Cloos avatar Robert Mullins avatar  avatar

gsoc-sim-mem's Issues

Response ready signals not detected in Xilinx Vivado

When using Xilinx Vivado as described in vivado_integration.md, the output ready (s_rready and s_bready) signals are not detected.

I replayed the same transactions in a cycle accurate manual simmem_top_tb.cc testbench and could not reproduce the issue in this controlled environment.
Therefore, I suspect either the Verilog wrapper or to the integration process that I described in vivado_integration.md to be the cause.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.