Hardware Modeling Language (HWML) Guide¶
Introduction to HWML¶
The Hardware Modeling Language (HWML) is a framework designed to model the hardware components of a system. It allows users to define deployment nodes, microcontrollers, processors, memory, energy sources, and various sensors. This guide provides a detailed step-by-step process for modeling hardware using HWML.
Step 1: Creating a New HWML Model¶
- Open Eclipse and navigate to
Project Explorer. - Right-click on the
modelfolder. - Select
New→Other. - In the dialog box, search for CAPShwml Model.
- Click
Next, then provide a name for the model (ensure it ends with.capshwml). - Click
Nextagain and choose Node Specification. - Click
Finishto create the HWML model file.
Step 2: Initializing the HWML Diagram¶
- Locate the newly created
.capshwmlfile in theProject Explorer. - Right-click the file and select
Initialize Filesystem Diagram. - Enter a name for the diagram or keep the default name.
- Click
Finishto generate the diagram workspace.
Defining Hardware Components¶
Step 3: Creating a Deployment Node¶
- Open the
Paletteview on the right-hand side of Eclipse. - Select the Node element and place it onto the canvas.
- In the
Propertiesview, set the following attributes:- Mac Protocol: ZIGBEE (standard communication protocol)
- Name: Occupancy Sensor
- OS: TinyOS (embedded operating system for wireless devices)
- Routing Protocol: GEAR (Geographical Energy Aware Routing)
Step 4: Adding a Microcontroller¶
- From the
Palette, select Microcontroller. - Place it inside the previously created Node.
- This represents the microcontroller managing the sensor and data processing.
Step 5: Adding a Processor¶
- Select Processor from the
Palette. - Place it inside the Microcontroller.
- Set the following attributes in the
Propertiesview:- CPI (Clocks Per Instruction): 1.0
- Frequency: 120 MHz
- Name: Atmel Atmega328
Step 6: Adding Volatile Memory (RAM)¶
- Select Volatile Memory from the
Palette. - Place it inside the Microcontroller.
- Set the following properties:
- Name: RAM
- Size: 2 KB
Step 7: Adding an Energy Source¶
- Select Continuous Energy Source from the
Palette. - Place it inside the Node.
- Set the Name to
Electricity(indicating a continuous power source).
Step 8: Adding a Sensor¶
- Select Occupancy Sensor from the
Palette. - Place it inside the Node to model the actual occupancy-sensing component.
Final Diagram:

