DASM
DExecHWAdapter Class Reference

Hardware execution adapter. More...

List of all members.

Public Member Functions

Public Functions
retval new (scalar proto, scalar object)
 Construct a new hardware adapter object.
retval describe (scalar self)
 Describe this object.
retval symbol (scalar self)
 Retrieve a symbol name for this object.
retval read (scalar self)
 'Read' function; intended to be used to read data from a hardware register, supplying an offset.
retval write (scalar self)
 'Write' function; intended to be used to write data to a hardware register, supplying an offset.

Detailed Description

Hardware execution adapter.

This class provides a simple interface to hardware implementations. Instances of the class can be created which associate a hardware offset with the object instance. The instance will dispatch 'read' and 'write' functions with the offset.

Example use:

  my $exec; # Execution object
  my @core;
  for my $offset (0..15)
  {
      $core[$offset] = new DExecHW($hw, $offset);
  }
  $core[4]->write($number, $exec);    # will call $hw->write(4, $number, $exec);
  my $value = $core[4]->read($exec);  # will call $hw->read(4, $exec);

Definition at line 51 of file DExecHWAdapter.pm.


Member Function Documentation

retval DExecHWAdapter::describe ( scalar  self)

Describe this object.

Parameters:
[in]$selfThis Adapter object
Returns:
string describing this object
retval DExecHWAdapter::new ( scalar  proto,
scalar  object 
)

Construct a new hardware adapter object.

Parameters:
[in]$protoThis class object, or prototype to add to
[in]$objectThe object to proxy for
[in]$offsetThe offset this object is created for
Returns:
Assembler object
retval DExecHWAdapter::read ( scalar  self)

'Read' function; intended to be used to read data from a hardware register, supplying an offset.

Parameters:
[in]$selfDExecHW object
[in]@argsArguments to pass to the object's read function, usually the execution environment object.
Returns:
read value
retval DExecHWAdapter::symbol ( scalar  self)

Retrieve a symbol name for this object.

Parameters:
[in]$selfThis Adapter object
Returns:
a symbol name for this register
Return values:
undefif no symbol name should be assigned
retval DExecHWAdapter::write ( scalar  self)

'Write' function; intended to be used to write data to a hardware register, supplying an offset.

Parameters:
[in]$selfDExecHW object
[in]@argsArguments to pass to the object's write function, usually the value to write and the execution environment object
Returns:
return value

The documentation for this class was generated from the following file: