<!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>Register editor</title>
  </head>
  <body>
    <h2>Register editor</h2>
    <p>
      Register editor is used to edit the details of a single <i>register</i> and the possible 
	  bit <i>fields</i> within the <i>register</i>. A bit field may contain just one bit, 
	  the whole register or something in between.      
    </p>
	
	<p>
	    <b>Name</b> is a mandatory identifier for the <i>register</i>. The name must be unique within 
		all the <i>registers</i> of the containing <i>address block</i>.
     </p>
     <p>
        <b>Display name</b> is an optional field and used for a more user-friendly identifier.
     </p>
     <p>
        <b>Description</b> is an optional field for textual description of the <i>register</i>.		
    </p>

    <p>
      <b>Offset</b> is a mandatory value to specify the location of the <i>register</i> from the start of the
      containing <i>address block</i> expressed as address units.</p><p>

      <b>Size</b> is mandatory and defines the number of data bits the <i>register</i> contains. 
      Size must be less or equal to the width of the containing <i>address block</i>.
    </p>
    <p>
      <b>Dimension</b> is optional and assigns an array dimension to the <i>register</i>. 
      The <i>register</i> will be repeated in the
      <i>address block</i> as many times as indicated by the dimension value. An empty dimension (default)
      or a dimension with value 1 means that the register is not an array and will appear exactly once.
  </p>
    <p>
	    <b>Is present</b> is optional and allows the enabling/disabling of a <i>register</i> presence 
		in an <i>address block</i>. Value 1 indicates that the <i>register</i> is present in the 
		<i>address block</i> whereas value 0 marks the <i>register</i> 
        to be treated as if it does not exist. Is present can be given as a SystemVerilog expression, but 
        it must evaluate to 1 or 0.
    </p>
    <p>
      <b>Volatile</b> is optional and indicates whether the <i>register</i> value may change without 
	  a write operation to it.
   </p>
   <p>
      <b>Access</b> is optional and specifies the accessability of the register.
	  The possible values are:
    </p>
    <ul>
        <li><b>read-write</b>. Both read and write transactions may have an effect on this <i>register</i>.</li>
        <li><b>read-only</b>. Only read transactions are allowed in this <i>register</i>.</li>
        <li><b>write-only</b>. Only write transactions are allowed in this <i>register</i>.</li>
        <li><b>read-writeOnce</b>. Both read and write transactions may have an effect on this <i>register</i>. Only the
            first write transaction, after an event that caused the reset value of the <i>register</i> to be loaded, may
            affet the contents of the <i>register</i>, and read transactions return a value related to the values in the
            <i>register</i>.</li>
        <li><b>writeOnce</b>. Only the first write transaction affects the contents of the <i>register</i>.</li>
    </ul>
	
    <h3>Fields table</h3>
    <p>
      The fields table enables the user to define the <i>register</i> bit <i>fields</i>.
	  A <i>register</i> must contain at least one field.
    </p>
    <p>
	  <b>Name</b> is a mandatory identifier for the <i>field</i>.
    </p>
    <p>
      <b>Offset</b> is a mandatory value to specify the starting bit of the <i>field</i> 
	  within the <i>register</i>.
   </p>
   <p>
      <b>Width</b> is a mandatory value to specify how many bits are included in the <i>field</i>.
   </p>
   <p>
		<b>Resets</b> defines the reset values of the field. The reset values must be edited in the field editor.
		If a field only has one reset value, it is displayed here. If a field contains multiple reset values, they
		are displayed with a [multiple] tag. A tooltip provides basic information on the resets, displaying the reset type and value.
   </p>
   <p>
      <b>Access</b> is optional and specifies the accessibility of the <i>field</i>. 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>Modified write value</b> is optional anddescribes 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 possbile. 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)</i>. Indicates that the value written to a <i>field</i> is the value stored in the
        <i>field</i>. This is the default.</li>
    </ul>
    <p>
      <b>Read action</b> specifies if some action happens to the
      <i>field</i> after a read operation. By default the register 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 in the <i>field</i> are modified in some way after a read operation.</li>
      <li><b>'&nbsp; ' (empty setting)</b>. Indicates that <i>field</i> is not modified after a read operation. This is
        the default.</li>
    </ul>
    <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 constraints for the automated tests for the <i>field</i>. 
      The possible constraint values are:
    </p>
    <ul>
        <li><b>unConstrained</b>. There are no constrains 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 the 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>Is present</b> is optional and enables/disables a <i>field</i>'s presence in a register. Value 1 indicates that the field 
        is present in the register whereas value 0 marks the field to be treated as if it did not exist. Is 
        present can be given as a SystemVerilog expression, but it must evaluate to 1 or 0.
    </p>
    <p>    
		<b>Description</b> is an optional field for textual description of the <i>field</i>.
  </body>
</html>
