<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../style.css" rel="Stylesheet" type="text/css" />
    <title>Field editor</title>
</head>
<body>
    <h2>Field editor</h2>

    <p>
        The field editor is used to edit the details of a <i>field<i>. For example user may 
        define <i>enumerated values</i> that define the legal bit patterns of the <i>field<i>.
    </p>

    <p>
        <b>Name</b> is a mandatory identifier for the <i>field</i>. The name must be unique
        within all the <i>fields</i> of the containing <i>register</i>.
    </p>
    <p>
        <b>Display name</b> is an optional and used for a more user-friendly identifier.
    </p>
    <p>
        <b>Short description</b> is an optional field for compact description of the <i>field</i>.
    </p>
    <p>
        <b>Description</b> is an optional field for textual description of the <i>field</i>.
    </p>

    <h3>Field definition</h3>
    <p>
        <b>Offset</b> is mandatory and describes the starting bit of the <i>field</i> within
        the containing <i>register</i>.
    </p>
    <p>
        <b>Width</b> is mandatory and speficies how many bits are included in the <i>field</i>.
    </p>
    <p>
        <b>Volatile</b> is optional and indicates that the <i>field</i> may change its value
        without write operations.
    </p>

    
	<h3>Resets</h3>
	<p>
        <i>Resets</i> describe the reset values of the <i>field</i>. Each reset has the following subelements:
		<ul>
            <li><b>Reset type reference</b>. Identifies the defined reset. This should correspond to a
				user-defined reset type element. Default value is HARD, and only one reset can be defined as that.</li>
                <li><b>Reset value</b> is mandatory and defines the actual reset value on reset. Reset value uses
				SystemVerilog syntax for binary values. The number of bits must be equal to the <i>field</i> size.</li>
                <li><b>Reset mask</b> is optional and defines the bits that have a known reset value. Bit
				value of 1 means that the corresponding bit has a known reset value whereas 0 means that
				the value is unknown. Reset mask uses SystemVerilog syntax for binary values e.g. 'b1011,
				4'b1011, and 4'b10_11 are all valid values. The number of bits must be equal to the <i>field</i> size.</li>
            </ul>
	</p>
	
    <h3>Enumerations table</h3>
    <p>
        The enumerated values table enables the defining of bit patterns that can be identified
        by a name. This can be used to define the legal bit patterns for a field or to define
        some default settings to help configuration of the field.
    </p>
    
    <p>
        Each enumeration contains a unique <b>name</b> of the enumeration (mandatory), an
        optional <b>display name</b> and <b>description</b>.
    </p>
    <p>
        <b>Value</b> defines the value to assign to the specified name (mandatory).
    </p>
    <p>
        <b>Usage</b> defines the software access condition under which this name value pair
        is valid. Possible values are: <i>read</i>, <i>write</i> and <i>read-write</i>.
    </p>

    <h3>Field access policies table</h3>

    <p>Field access policies define field access properties for different operating modes.</p>

    <p>
        <b>Mode(s)</b> contains references to component modes. It is optional, and defines for which 
        component modes the field access policy is active. If a field access policy contains no mode references, 
        it is active for all component modes not already referenced by other field access policies 
        (i.e. only one field access policy without mode references may exist).

        A field access policy is active, if it references an active mode and has the highest <i>priority</i>
        (i.e. the lowest priority value) among the field access policies of the field.
    </p>
    <p>
        <b>Access</b> is optional and specifies the accessability of the <i>field</i> when that field 
        access policy is active. The possible values are:
    </p>
    <ul>
        <li><b>read-write</b>. Both read and write transactions may have an effect on this <i>
            field</i>. Write transactions may affect the contents of the <i>field</i>, and read
            transactions return a value related to the <i>field</i>.</li>
        <li><b>read-only</b>. A read transaction to this <i>field</i> returns a value related
            to the value in the <i>field</i>. A write transaction to this <i>field</i> has undefined
            results.</li>
        <li><b>write-only</b>. A write transaction to this address affects the contents of the
            <i>field</i>. A read transaction to this <i>field</i> has undefined results.</li>
        <li><b>read-writeOnce</b>. Both read and write transactions may have an effect on this
            <i>field</i>. Only the first write transaction may affect the contents of the <i>field</i>,
            and read transactions return a value related to the values in the <i>field</i>.</li>
        <li><b>writeOnce</b>. Only the first write transaction affects the contents of this
            <i>field</i>.</li>
    </ul>
    <p>
        <b>Read action</b> is optional and specifies if some action happens to the <i>field</i>
        after a read operation. By default the <i>field</i> is unmodified. The possible
        values are:
    </p>
    <ul>
        <li><b>clear</b>. All bits in the <i>field</i> are cleared to '0' after a read operation.</li>
        <li><b>set</b>. All bits in the <i>field</i> are set to '1' after a read operation.</li>
        <li><b>modify</b>. Indicates that the bits of the <i>field</i> are modified in some
            way after a read operation.</li>
        <li><b>'&nbsp; ' (empty setting)</b>. Indicates that the <i>field</i> is not modified
            after a read operation. This is the default.</li>
    </ul>
    <p>
        <b>Read response</b> is optional and describes the expected read value of the field in a 
        certain mode. If not present, then the reset value is expected to be read.
    </p>
    <p>
        <b>Testable</b> is optional and specifies if the <i>field</i> is testable by an
        automated register test.
    </p>
    <p>
        <b>Test constraint</b> is optional and specifies the constaints for the automated
        tests for the <i>field</i>. Can be set only when testable is set to true. The possible values are:
    </p>
    <ul>
        <li><b>unConstrained</b>. There are no constraints for the written or read data. This
            is the default setting.</li>
        <li><b>Restore</b>. The <i>field</i> value must be restored to its original value before
            accessing another register. </li>
        <li><b>WriteAsRead</b>. The data written to a <i>field</i> must be same that was read
            previously from the <i>field</i></li>
        <li><b>ReadOnly</b>. Indicates that the <i>field</i> can only be read.</li>
    </ul>

    <p>
        <b>Reserved</b> is optional and indicates if the field is reserved for other use.
    </p>

    <p>
        <b>Modified write value</b> is optional and describes how the data in the <i>field</i>
        is manipulated on a write operation. The basic operation without any setting is
        to store the written value 'as is'. Moreover, both bitwise and field-wise set/clear/toggle
        is also possible. The possible values are:
    </p>
    <ul>
        <li><b>oneToClear</b>. Each written '1' bit will assign the corresponding bit to '0'.</li>
        <li><b>oneToSet</b>. Each written '1' bit will assign the corresponding bit to '1'.</li>
        <li><b>oneToToggle</b>. Each written '1' bit will toggle the corresponding bit.</li>
        <li><b>zeroToClear, zeroToSet, zeroToToggle</b>. Similar to previous ones, except that
            written '0' bit triggers the action.</li>
        <li><b>clear</b>. Each write operation will clear all bits in the <i>field</i> to '0'.</li>
        <li><b>set</b>. Each write operation will set all bits in the <i>field</i> to '1'.</li>
        <li><b>modify</b>. Indicates that after a write operation, all bits in the <i>field</i>
            can be modified.</li>
        <li><b>'&nbsp; ' (empty setting)</b>. Indicates that the value written to a <i>field</i>
            is the value stored in the <i>field</i>. This is the default value.</li>
    </ul>
    <p>
        The <b>write value constraint</b>s are used to define what are the legal values
        user may write to a <i>field</i>. The possible values are:
        <ul>
            <li><b>No constraints</b>. Indicates that there are no constraints to values to be written.</li>
            <li><b>Write as read</b>. Inidcates that only legal values to be written are the same
                that were previously read from the field.</li>
            <li><b>Use enumerated values</b>. Indicates that the defined enumerated values are the
                only legal values that can be written.</li>
            <li><b>Set minimum and maximum limits</b>. Indicates that the minimum and maximum limits
                can be set for the value written to the <i>field</i>.</li>
        </ul>
    </p>
</body>
</html>
