VIRTUTECH CONFIDENTIAL Previous - Up - Next
sample-device
- Provided by
-
sample-device
- Class Hierarchy
-
conf-object → log-object → sample-device
- Interfaces Implemented
-
log_object, io_memory
- Description
-
The sample-device device is a dummy device that compiles and that can be loaded into Simics. Using it as a starting point when writing own devices for Simics is encouraged. Several device specific functions are included. The source is included in simics/src/devices/sample-device.
Attributes
- Attributes inherited from class conf-object
-
attributes, classname, component, iface, name, object_id, queue
- Attributes inherited from class log-object
-
access_count, log_buffer, log_buffer_last, log_buffer_size, log_group_mask, log_groups, log_level, log_type_mask
- Attribute List
-
- add_log
- Pseudo attribute; write-only access; type: String.
Write-only. Strings written to this attribute will end up in the device's log file.
- range_sum
- Pseudo attribute; read-only access; type: Integer; list indexed; indexed type: Integer.
Read-only. When read from index [i0, i1], the sum of the integers between i0 and i1 will be returned.
- value
- Optional attribute; read/write access; type: Integer.
The value field.
Command List
- Commands defined by interface log_object
-
log, log-group, log-level, log-size, log-type
- Commands
-
add-log | add a text line to the device log |
info | print information about the device |
range-sum | calculate range sum |
status | print status of the device |
Command Descriptions
-
<sample-device>.add-log
- Synopsis
-
<sample-device>.add-log ["log-string"]
- Description
-
Add a line of text to the device log. Use the 'io' command to view the log.
-
<sample-device>.info
- Synopsis
-
<sample-device>.info
- Description
-
Print detailed information about the configuration of the device.
-
<sample-device>.range-sum
- Synopsis
-
<sample-device>.range-sum start end
- Description
-
Calculate the sum of all integers from 'start' to 'end'.
-
<sample-device>.status
- Synopsis
-
<sample-device>.status
- Description
-
Print detailed information about the current status of the device.
VIRTUTECH CONFIDENTIAL Previous - Up - Next