Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

5.5.4.  Checking Read Access

The values are then read back. No results are expected (the logger does not set any values), but this should check the process behaves as expected.

  byteRes = dev->byte;
  simputs( "Read 0x" );
  simputh(  byteRes );
  simputs( " from address 0x" );
  simputh( (unsigned long int)(&(dev->byte)) );
  simputs( "\n" );

  halfwordRes = dev->halfword;
  simputs( "Read 0x" );
  simputh( halfwordRes );
  simputs( " from address 0x" );
  simputh( (unsigned long int)(&(dev->halfword)) );
  simputs( "\n" );

  fullwordRes = dev->fullword;
  simputs( "Read 0x" );
  simputh( fullwordRes );
  simputs( " from address 0x" );
  simputh( (unsigned long int)(&(dev->fullword)) );
  simputs( "\n" );
	  

At the end of the program, the utility simexit is used. This not only terminates the program, but will also exit the simulation.

Embecosm divider strip