Skip to content

AWB example writing a module

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

AWB example writing a module

Initially we’ll assume you don’t care about the design being in a repository so we will put our files in the private package, which is automatically created when one creates a workspace. This package exists at:

<workspace>/src/private

Relative to that directory there are two places of relevance:

  • config/pm/private
    • this is where the new model (.apm file) goes
  • modules/private
    • This is where the new module (.awb file and other associated files) go
    • This directory should be created by default, but you’ll need to create it manually

For this example we’ll assume you don’t want to use soft connections. Thus, we are going to create a module with awb-type hybrid-application. There are two major steps to this process: writing the code for the module and plug-n-play style inserting that module into a design. So first we create a new module:

  • Create a new directory ‘myapp/’ in modules/private
  • Copy /src/hasim/modules/bluespec/system/demos/hello/. to ‘myapp/’
  • Edit the .awb file
    • Be sure to change the %name to something like myapp
    • Leave the %provides alone, since that’s the awb-type that we are replacing
    • This example is too complex so don’t touch the .dict files
  • Edit the .bsv file
    • Leave the interface alone
    • Do anything you want inside the module

Now create a new model using the module by following this tutorial