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

Apm file

AWB models are represented in a conventional inifile-style file. Although these files can be editted by hand, this is discouraged. Instead use the graphical apm-edit program. In any case, they have the following format.

First some boilerplate global definitions:

[Global]
Name=Hello World
Description=Hello World Demo using hybrid streams
Type=HAsim
File=hello_hybrid_exe

SaveParameters=0

Class=Asim::Model
Version=2.1

The root of the tree is contained in a section called [Model]. The important line here is the ‘model=’ option, which is the name of the module that implements the root of the tree. This is the name of a module as specified in the %name line of a .awb file. Typically the awb-type (as specified in the %provides line of the .awb file) will be model, but may be anything thus allowing the .apm file to represent a submodel. A section with the %name specified in the ‘model=’ line will be included elsewhere in the .apm file.

[Model]
DefaultAttributes=hybrid simulation bluespec
model=Pure Bluespec Hybrid Model Foundation

There is a section for each node of the tree with a section name specified as the %name of the module (or submodel) that has been selected at that point of the tree. The important line in that section is the ‘File=’ option, which specifies a .awb file that specifies the module that implements that node or a .apm file that specifies a submodel at that node.

[Pure Bluespec Hybrid Model Foundation]
File=modules/model/pure_bluespec_hybrid_model.awb
Packagehint=hasim

If a module node %requires submodules, then a section with the module’s %name and ‘/Requires’ will exist. This section contains a line with the awb-type of each %required submodule and a value with the name of the module (or submodel) that implements that awb-type.

[Pure Bluespec Hybrid Model Foundation/Requires]
hasim_controller=Hybrid Basic Controller
bluespec_system=Bluespec Hello World Example
bluespec_common=Bluespec Null Library
fpgaenv=FPGA Environment

If a module node has parameters with values that differ from the default value specified in the .awb file, then a section with the module’s %name followed by ‘/Params’ will exist and contain a line for each parameter and its value.

[Pure Bluespec Hybrid Model Foundation/Params]
SMART_SYNTH_BOUNDARY=1

Clone this wiki locally