Code Monkey home page Code Monkey logo

bsg_replicant's Introduction

BSG Replicant: Execution/Emulation Infrastructure for HammerBlade

Quickstart

The simplest way to use this project is to clone its meta-project: BSG Bladerunner.

BSG Bladerunner tracks this repository, BSG Manycore, and BaseJump STL repositories as submodules and maintains a monotonic versionining scheme.

Once the setup instructions in BSG Bladrunner have been completed, run:

make regression

This will run all of the example programs in examples. See the README.md file in that directory for more information. We make every attempt to ensure the examples there are working.

Contents

This repository contains the following folders:

  • hardware: HDL sources, package files, and ROM scripts.
  • libraries: C/C++ driver and runtime library sources.
  • examples: Example C/C++ applications and regression tests.
  • machines: Customized Makefile.machine.include file for different HammerBlade designs and configurations.
  • build: Vivado scripts for building FPGA Design Checkpoint Files to upload to AWS-F1. Currently stale/not actively supported.

This repository contains the following files:

  • README.md: This file.
  • Makefile: Targets for Regression, and (stale) bitstream generation commands.
  • platform.mk: Defines the path to the current exeuction Platform (BSG_PLATFORM_PATH).
  • machine.mk: Defines the path to the current Machine Configuration (BSG_MACHINE_PATH).
  • environment.mk: A makefile fragment for deducing the build environment.
  • cadenv.mk: A makefile fragment for deducing the CAD tool environment (e.g. VCS_HOME).
  • hdk.mk: A makefile fragment for deducing the AWS-FPGA HDK build environment (stale).

Platforms

HammerBlade applications can be run on multiple platforms. These platforms could simulate the architecture (VCS, Verilator), emulate it, or run natively.

We currently support two platforms:

  • bigblade-vcs: Native (x86) host execution, simulated HammerBlade (with VCS, using Verilog DPI for IO)
  • bigblade-verilator: Native (x86) host execution, simulated HammerBlade (with Verilator, using Verilog DPI for IO)

Each platform has different advantages and drawbacks. Simulated platforms support an in-depth profiling infrastructure and emulated memory systems via non-synthesizable constructs. VCS is a 4-state simulator, but requires Synopsys and VCS licenses. Verilator does not require licenses, but it cannot simulated an FPGA system with encrypted HDL.

To select the execution platform, set the BSG_PLATFORM variable in platform.mk. Most users will use bigblade-vcs.

Machines

Each HammerBlade configuration is called a Machine and defines a size, memory type, memory hierarchy, cache type, and many other parameters. Each machine is defined by Makefile.machine.include file in machines.

To switch machines set BSG_MACHINE_PATH, defined in machine.mk. To switch machines, modify the value of BSG_MACHINE_PATH to point to any subdirectory of the machines directory.

See machines/README.md for more documentation.

Dependencies

To use VCS Platforms, users will need:

  1. Synopsys VCS (We use O-2018.09-SP2, but others would work)

To use Verilator platforms, users will need:

  1. A recent version of Verilator

Users should use the Verilator installation provided by bsg_bladerunner.

bsg_replicant's People

Contributors

ashwin-hari avatar bornaehsani avatar dpetrisko avatar drichmond avatar leonardxiang avatar marcusnchow avatar mrutt92 avatar save-buffer avatar sripathi-muralitharan avatar taylor-bsg avatar tommydcjung avatar vb000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bsg_replicant's Issues

Add AXI-Accessible Configuration ROM

Let's define a ROM space on the FPGA that we can read configuration data out of. Let's make it big enough that we can add parameters as generations progress, maybe 4KB (fits in a BRAM) and describe a substantial amount of data in.

Off the top of my head:

  • A Manycore version ID
  • Compilation date?
  • Network bit-width
  • X/Y Dimensions
  • Host Interface Locations
  • A pointer to a "description" of the manycore with format TBD.
  • BSG IP Cores, BSG Manycore, BSG F1 Commit IDs?

I will gladly entertain other suggestions

Host Program issues

The latest Bitstreams have tile groups; the host programs need to be changed to accommodate this.
The Makefile for the host programs defines the Library path - this is not necessary and should be removed.

Implement `hb_mc_device_init`

The hb_mc_device_init function will:

  • Take an eva_id and .elf file as a parameter
  • Load the binary
  • Initialize a malloc manager object
  • Unfreeze the tiles in a tile group.
  • Initialize the tiles in a tile group with the specified EVA (future feature)

Create (and use) hb_mc_packet_t union in manycore driver API

Refactor BSG F1 tests into discrete regression tests

In an effort to make our testing infrastructure more robust and extensible some adjustments need to be made to the tests in cl_manycore. The high-level objective is to remove source code from .h files, make the tests independently runnable, and merge the cosimulation and runtime (f1) tests.

Items:

  • Merge tests in cl_manycore/examples into cl_manycore/software and make both runnable in Cosimulation and F1.
  • Create .c/.h files for each test with a % target in the cl_manycore/software makefile
  • Create a regression target in the cl_manycore/software directory that all the tests in cl_manycore/software and passes/fails depending on their results
  • The cosim target in cl_manycore should run all available tests.
  • Address #51
  • Remove MAIN_LOOPBACK environment variable dependency, instead make a dependency in cosimulation/regression build makefiles
  • Parse (or ???) NUM_X and NUM_Y variables during program compilation

Move host interface to (0,0)

In an effort to make MC programs (more?) cross-configuration compatible, we will be moving the host interface to 0,0

Implement hb_mc_device_memcopy / to_eva_copy

The function hb_mc_device_memcopy should:

  • Transfer a host-allocated buffer to a device-allocated buffer in EVA-space.
  • Take an EVA as an argument (void*?)
  • call low-level function to_eva_copy

Implement hb_mc_device_malloc

The function hb_mc_device_malloc should:

  • Take an EVA ID
  • Check for initialization
  • Call the malloc manager object
  • Take size parameters similar to CudaMalloc
  • Return an EVA (a void*?)

Implement hb_mc_device_finish

The hb_mc_device_finish function should:

  • Take an EVA ID
  • Deallocate the memory manager for that EVA
  • Freeze the tiles (associated with that EVA?)

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.