Highlights from
Embedded Coder Support Package for Green Hills MULTI IDE (R2012b)

image thumbnail

Embedded Coder Support Package for Green Hills MULTI IDE (R2012b)

by

 

Embedded Coder integration for creating models that run directly in Green Hills MULTI IDE

regwrite(id,regname,value,represent,timeout)
function regwrite(id,regname,value,represent,timeout)
%REGWRITE Write a data value into a processor register.
%  REGWRITE(ID, REGNAME, VALUE, REPRESENT, TIMEOUT) writes the data from the
%  VALUE parameter into the specified register of the processor.  The 
%  REGNAME parameter defines the destination register.  This operation is 
%  directed to the processor  referenced by the ID object.  
%
%  The REPRESENT parameter specifies the interpretation of the register's 
%  data format.  The following REPRESENT type options are supported by this 
%  parameter: 
%   '2scomp'  - (default) 2's complement signed integer.
%   'binary'  - Unsigned binary integer. 
%   'ieee'    - IEEE floating point (32- and 64-bit registers, only).
%
%  VALUE can be any scalar numeric value.   Note, the data type of this
%  parameter does not effect the representation of the destination register.
%  VALUE is automatically converted to the destination type, which in some 
%  cases may produce data loss.
%
%  The TIMEOUT parameter defines how long to wait (in seconds) for  
%  completion of register write.  If this period is exceeded, the routine 
%  returns immediately with a timeout error.  In general the action 
%  (register write) still occurs, but the timeout value  gave insufficient
%  time to verify the completion of the action.
%
%  REGWRITE(ID,REGNAME,VALUE,REPRESENT)  Same as above, except the timeout
%  value defaults to the value specified by the id object. Use 
%  GET(id,'timeout') to examine the default supplied by the object.
%
%  REGWRITE(ID,REGNAME,VALUE) Same as above, except the data type defaults 
%  to 'integer' and this routine writes VALUE as a signed 2's complement 
%  data value
%
%  The supported values for REGNAME will depend on the processor.  For 
%  example, the following lists some of the registers available in the 
%  MPC5554 processor:
%   'acc' - Accumulator A registers.
%   'sprg0' .. 'sprg7' - SPR registers.
%
%  See also GHSMULTI/REGREAD, GHSMULTI/WRITE, HEX2DEC.

%   Copyright 2012 The MathWorks, Inc.

Contact us