rom.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <html>
  2. <head>
  3. <title>ROM</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1><img align="center" src="../../../../en/icons/rom.gif" width="32" height="32">
  7. <em>ROM</em></h1>
  8. <p><table>
  9. <tr><td><strong>Library:</strong></td>
  10. <td><a href="index.html">Memory</a></td></tr>
  11. <tr><td><strong>Introduced:</strong></td>
  12. <td>2.1.0</td></tr>
  13. <tr><td valign="top"><strong>Appearance:</strong></td>
  14. <td valign="top"><img src="../../../../en/img-libs/rom.png" width="145" height="84"></td></tr>
  15. </table></p>
  16. <h2>Behavior</h2>
  17. <p>The ROM component stores up to 16,777,216 values (specified in the Address
  18. Bit Width attribute), each of which can include up to to 32 bits
  19. (specified in the Data Bit Width attribute). A circuit can access
  20. the current values in ROM, but it cannot change them. The user can modify individual values
  21. interactively via the Poke Tool, or the user can modify the entire
  22. contents via the Menu Tool.</p>
  23. <p>Unlike the RAM component, the ROM component's current contents are
  24. stored as an attribute of the component. Thus, if a circuit containing
  25. a ROM component is used twice, then both ROM components will hold the
  26. same values. Also because of this behavior, the current ROM contents are
  27. stored in files created by Logisim.</p>
  28. <p>Current values are displayed in the component. Addresses displayed
  29. are listed in gray to the left of the display area. Inside, each value
  30. is listed using hexadecimal. The value at the currently selected address
  31. will be displayed in inverse text (white on black).</p>
  32. <h2>Pins</h2>
  33. <dl>
  34. <dt><var>A</var> on west edge (input, bit width matches Address Bit Width attribute)</dt>
  35. <dd>Selects which of the values are currently being accessed by the
  36. circuit.</dd>
  37. <dt><var>D</var> on east edge (input/output, bit width matches Data Bit Width attribute)</dt>
  38. <dd>Outputs the value at the currently selected address at the
  39. <var>D</var> pin if <var>sel</var> is 1 or floating. If <var>sel</var>
  40. is 0, then <var>D</var> will be floating.</dd>
  41. <dt><var>sel</var> on south edge (input, bit width 1)</dt>
  42. <dd>If you have just one ROM module, ignore this input.
  43. If you have multiple ROM modules in parallel, you can use this input
  44. to enable or disable the entire ROM module, based on whether the value is
  45. 1 or 0. In other words, when this is 0, no value is emitted on
  46. the <var>D</var> output.</dd>
  47. </dl>
  48. <h2>Attributes</h2>
  49. <p>When the component is selected or being added,
  50. the digits '0' through '9' alter its <q>Address Bit Width</q> attribute
  51. and Alt-0 through Alt-9 alter its <q>Data Bit Width</q> attribute.</p>
  52. <dl>
  53. <dt>Address Bit Width</dt>
  54. <dd>The bit width of the address bits. The number of values stored in
  55. ROM is 2<sup><var>addrBitWidth</var></sup>.</dd>
  56. <dt>Data Bit Width</dt>
  57. <dd>The bit width of each individual value in memory.</dd>
  58. <dt>Contents</dt>
  59. <dd>Stores the contents of memory.</dd>
  60. </dl>
  61. <h2>Poke Tool Behavior</h2>
  62. <p>See <a href="../../guide/mem/poke.html">poking memory</a>
  63. in the <em>User's Guide</em>.</p>
  64. <h2>Text Tool Behavior</h2>
  65. <p>None.</p>
  66. <h2>Menu Tool Behavior</h2>
  67. <p>See <a href="../../guide/mem/menu.html">pop-up menus and files</a>
  68. in the <em>User's Guide</em>.</p>
  69. <p><a href="../index.html">Back to <em>Library Reference</em></a></p>
  70. </body>
  71. </html>