Skip to content

AWB example build command line

Kermin E Fleming edited this page Feb 15, 2015 · 2 revisions

AWB example command line

In this example, we will use the hardware setup command line shell to build and run a single model in Bluesim simulation mode. After you are successful at running in simulation, you can do the appropriate FPGA_hardware setup and redo these instructions for a model that runs directly on an FPGA.

Getting ready to build and run a model

To build a model you should be in an AWB workspace, e.g., in the directory with an command line file. The appropriate packages must be available in the workspace, such as was demonstrated in the AWB example setup command line and GUI-based examples. In our example you cd to the workspace as follows:

% cd ~/workspaces/demo

Building and running a model with individual commands

There are 4 steps to building and running a model

% awb-shell -- configure model config/pm/leap/demos/hello/hello_hybrid_exe.apm
  • Building the model
    • argument is an .apm file of an already configured design
    • action is actually just invoking make on the build tree
% awb-shell -- build model config/pm/leap/demos/hello/hello_hybrid_exe.apm 
  • Setup of the benchmark
    • Arguments are a benchmark configuration file and an .apm file
    • Action is to collect the executable and files need for the run into a benchmark directory
% awb-shell -- setup benchmark config/bm/leap/demos.cfx/benchmarks/null.cfg --model config/pm/leap/demos/hello/hello_hybrid_exe.apm
  • Running the benchmark
    • Arguments are a benchmark configuration file and an .apm file
    • Action is just invoking ./run in the benchmark directory
% awb-shell -- run benchmark config/bm/leap/demos.cfx/benchmarks/null.cfg --model config/pm/leap/demos/hello/hello_hybrid_exe.apm

Building and running a model interactively

Awb-shell also has an interactive mode, which allows you to perform the same 4 steps needed to build and run a model. Running in such an interactive session can be convenient since some default values like the name of the .apm file and benchmark configuration file are remembered across steps. Interactive mode also support TAB completion on command names and many file names (TAB completion will not currently work inside .cfx trees).

% awb-shell
awb> configure model config/pm/leap/demos/hello/hello_hybrid_exe.apm 
....
awb> build model
.....
awb> setup benchmark config/bm/leap/demos.cfx/benchmarks/null.cfg
.....
awb> run benchmark
.....
awb> quit

See more tips and trips for using awb-shell here.

Or check out how to build and run the example using the GUI.

Or you might want to browse the source code for the example from the command line or GUI.