Table of Contents

Internal Tutorial for Vertical Group

The DySER opensource project has gone through a radical change. This includes change in file structure scripts, new compiler DyCC, and some new tools.

Building the Framework

The opensplyser evaluation framework contains two pieces:

The following instructions describe how to build the toolchain.

Structure

In DySER opensource project, the benchmarks are maintained in HW toolchain. The main working directories are:

We provide GEM5 simulation script and embedded it into the makefiles under diag directory, such that we can compile and run gem5-simulation in place. On the other hand, the VCS framework searches the diag directory, compile the benchmarks and verilog RTL, and invoke VCS for RTL-level simulation.

Simulation

The DySER evaluation framework can evaluate the design on 3 different platforms:

GEM5 Simulation

The GEM5+DySER simulator is part of the SW toolchain. After installed the SW toolchain, a wrapper script run-gem5 is created. This wrapper script is then used in config.mk under opensparc/verif/diag/c/<benchmark_sets>. Here is an example to simulate fft in hardDYSER:

Navigate to:

opensparc/verif/diag/c/hardDYSER/fft/splyser

Compile and run simulation:

make run_perf GEM5=1 1W=1

A GEM5 simulation should be executed, and the output will be in m5out directory. the m5out/stats.txt is the simulation report, where the system.switch_cpus.numCycles is the number of total cycles in the interested region.

In hardDySER benchmark set, Makefile commandline options are GEM5, FPGA, 1W and 8W. The GEM5 adds -DFF flag which translates the inserted marker (which marks the interested region) in the benchmark for GEM5 simulation. The FPGA flag translates the marker for FPGA simulation. The 1W and 8W flags compiles for 1W and 8W (vectorized) version of the DySERized code.

In micro13 benchmark set, Makefile commandline options are GEM5, FPGA, AUTO_DYSER and AUTO_VEC. The GEM5 and FPGA flags are the same as above. The AUTO_DYSER flag tells compiler to DySERize the annotated region, and the AUTO_VEC flag tells the compiler to DySERize and vectorize the annotated region.

VCS Simulation

The VCS simulation framework is based on OpenSPARC sims script. Read OpenSPARC manual in opensparc/doc/OpenSPARCT1_DVGuide.pdf for more information of sims script. In brief, the sims script compiles verilog files, compile and link benchmark code, create image and run VCS simulation.

First, navigate to:

/p/vertical/dyser-huge/dyser-micro13/opensparc/regr_runs/hardDYSER/fft.splyser.8w

You will see two files in this directory:

Now, execute:

bash run.sh

Several files will be created after simulation:

FPGA

FPGA is same as last revision.
[TODO: new FPGA tutorial]

Creating a New benchmark

Currently, there are two ways of creating a new benchmark for simulation:

Hand DySERized Benchmark

The first step is to read the code, find out the computation in the program and then create a DySER schedule. Execute the software tool dytools/dysched you will see:
250

[TODO: detailed tutorial of dysched] Right click on FU to assign functions to the functional unit:

After you assign the function, FU will be colored and an edge will be created.

Double click on the FU, you will find the cursor becomes a triangle which has the same color as the FU. Now you can click on the edges to create datapath. Next, you can create primary input (PI) and primary output (PO) on the switches.

The input and output can be at any switch, and each switch can have two inputs and two outputs. (This logical view of DySER is different from the hardware implementation.) You can click on Show Port Numbers to find out what is the port number of the PIs/POs in the configuration. The port number is important and we will use it later

Use file→save config to save the config file to disk. We will use this file to generate a DySER core verilog RTL. Several limitations are:

The saved configuration file has the dimension and a number of switch and FU declaration. With the port number in mind, we can modify the c code with the macros in opensparc/verif/diag/c/include/dyser-dlp-sparc.h:

Before modifying the code, use genCore.py to generate the RTL verilog. Because the logical view is different than the actual RTL, we need to have a port mapping to map the logical ports to the actual physical ports in RTL.

Use hardDySER/tools/genCore.py to read the created config file.

python genCore.py -f <config_file>

A <config_file>.hardDYSER.conf will be created at the same directory. In this file, you can find the splyser port mapping. Follow this port mapping to add DySER sends and receives to the code. Now you can compile and simulate in GEM5 and VCS. You can refer to the benchmarks in hardDYSER/ to see the config files (*.hardDySER) and to see how to use the macros in c.

[TODO: tutorial of genRom and broadcast load]