v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing v0.34:Memory (computing)

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "v0.34"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 40: Line 40:
  
 
==Fluid Logic==
 
==Fluid Logic==
Simple fluid logic latches rely on an infinite source and infinite drain, storing information in the form of the presence or absence of water in a particular location.
+
The simplest fluid logic latch relies on an infinite source and infinite drain, storing information in the form of the presence or absence of water in a particular location.
  
 
{{diagram|spaces=yes|  
 
{{diagram|spaces=yes|  
 
═════
 
═════
[#0F0]~[#0F0]X[#F0F]^[#F00]X[#0FF]~
+
[#0F0]~[#FF0]X[#F0F]^[#FF0][#0FF]~
 
═════}}
 
═════}}
  
In this design, water flows from an infinite source {{Raw Tile|~|#0F0|#000}} over an output [[pressure plate]] {{Raw Tile|^|#F0F|#000}} toward an infinite drain {{Raw Tile|~|#0FF|#000}}.  Its flow is controlled by two [[floodgate]]s, {{Raw Tile|X|#0F0|#000}}, and {{Raw Tile|X|#F00|#000}}, linked to two separate inputs.  When {{Raw Tile|X|#0F0|#000}} is open and {{Raw Tile|X|#F00|#000}} closed , water will cover {{Raw Tile|^|#F0F|#000}} and remains so, regardless of the state of {{Raw Tile|X|#0F0|#000}}.  
+
In this design, water flows from an infinite source {{Raw Tile|~|#0F0|#000}} over an output [[pressure plate]] {{Raw Tile|^|#F0F|#000}} toward an infinite drain {{Raw Tile|~|#0FF|#000}}.  Its flow is controlled by a [[floodgate]], {{Raw Tile|X|#FF0|#000}}, and a raising [[bridge]], {{Raw Tile||#FF0|#000}}, both linked to the same input.  When {{Raw Tile|X|#FF0|#000}} and {{Raw Tile||#FF0|#000}} are open, water will cover {{Raw Tile|^|#F0F|#000}}; when they are closed, there will be no water.  Thus, the input source toggles the state of the memory cell, and the state of the memory cell is reflected in the output of {{Raw Tile|^|#F0F|#000}}.
  
If {{Raw Tile|X|#F00|#000}} is opened while {{Raw Tile|X|#0F0|#000}} is closed, water will leave {{Raw Tile|^|#F0F|#000}} and the tile will remain empty of water until {{Raw Tile|X|#0F0|#000}} opens again.
+
This is an example of flip-flop memory.  The state of the memory can be toggled, but it's not possible to write one particular state (that is, for instance, true) to the memory without first examining the memory.  This can be altered by replacing the bridge and floodgate with independently triggered doors. This design has relatively high latency, because of the flow rate of water, and a refractory period of 100 ticks, representing the delay associated with bridges and floodgates. Given careful enough design and sufficient water pressure, the latency of a write to true can approach 100, with the latency of a write to false around 120.
 
 
This design has relatively high latency, because of the 100 tick delay associated with floodgates. Replacing the floodgates with doors, which have no reaction delay, greatly accelerates the response of the latch, but the overall performance is still limited by the reset period of pressure plates. Given careful enough design and sufficient water pressure, the latency of a write to true can approach 10, with the latency of a write to false around 110.
 
  
 
==Creature Logic==
 
==Creature Logic==
Line 89: Line 87:
  
 
===Memory versus Power-to-signal===
 
===Memory versus Power-to-signal===
It can be tricky to differentiate memory from [[Mechanical_logic#Power_to_signal_converter|power to signal]] conversion.  Through feedback, power-to-signal devices can often be changed into memory cells, and powered memory devices can be adapted into power-to-signal.  Previous to the introduction of minecarts, the most common power-to-signal device bore strong resemblance to the memory cell described above.  There is, however, a large difference between memory and power-to-signal.  While memory designs receive on-off signal cycles and output discrete '''on''' or '''off''' signals in return, power-to-signal converters translate one type of binary information (power on/off) into another (signal on/off).  That is, a signalling device that receives then loses power should return a full on-off signal cycle.
+
It can be tricky to differentiate memory from [[Mechanical_logic#Power_to_signal_converter|power to signal]] conversion.  Through feedback, power-to-signal devices can often be changed into memory cells, and powered memory devices can be adapted into power-to-signal.  Previous to the introduction of minecarts, the most common power-to-signal device bore strong resemblance to the memory cell described above.  There is, however, a large difference between memory and power-to-signal.  While memory designs receive on-off signal cycles and output discrete '''on''' or '''off''' signals in return, power-to-signal converters return exactly what they're given.  That is, a signalling device that receives then loses power should return a full on-off signal cycle.
  
 
==Minecart Logic==
 
==Minecart Logic==

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: