-
Notifications
You must be signed in to change notification settings - Fork 2
AWB tutorial on creating a model
Kermin E Fleming edited this page Feb 15, 2015
·
2 revisions
The best way to write a new model is probably by starting with an existing design and modifying it. Note, one doesn’t usually start from scratch on a design since you’ll want to use the existing infrastructure for the devices and host-to-fpga communication.
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 the location of relevance for new models is:
- config/pm/private
- this is where the new model (.apm file) goes
Now we can create a new design from an existing model:
- Use awb to open (in apm-edit) an existing model that most resembles your design, e.g.,
- For a design without soft connections, open bluespec/demos/hello/hello_hybrid_exe.apm
- For a design with soft connections, open hasim/demos/traffic_light/traffic_light_exe_nosynth.apm
- Edit the model information
- Click the ‘Change’ button and change the name of the model
- Delete the module that you are going to replace (right click → Delete)
- For a design without soft connections that is the module of type hybrid_application
- For a design with soft connections that is the module of type ….
- Save the model
- Now use the File→SaveAs menu operation to Save the model in config/pm/private
If the module you want to use exists follow the next steps. Otherwise, create the module (such as with this tutorial) and return here…
- Now you can replace the module you deleted with a replacement module.
- Click on the module you deleted (or want to replace)
- If the module was just created click ‘Refresh’
- In the ‘Alternative Modules’ pane find and double click on the module you want to use
- Save the model again with the File→Save menu.
- Test the new model with a Configure/Build/Setup/Run sequence in awb.