... | ... | @@ -29,7 +29,7 @@ See [the related doc](Functions#input) for details on the technical implementati |
|
|
|
|
|
At the beginning of each cycle, the simulator asks for input, which is at the core of the human-machine interface. In the long run, this could be used, for instance, as the result of mouse movement, controller input, keyboard presses, sensors, microphone, whatever you want that can be transmitted as a digital signal basically.
|
|
|
|
|
|
Currently, however, such, let's admit it, cool features, are out of question since the input's main function is to deprive the user of sleep by giving a new prompt for each bit. Of course, the user can still copy-paste its way through it.
|
|
|
Currently, however, such, let's admit it, cool features, are out of question since the input's main function is to deprive the user of sleep by giving a new prompt for each bit on `stdin`. Of course, the user can still copy-paste its way through it, or make a script which pipes the input in, but that's not very user-friendly.
|
|
|
|
|
|
## TODO :
|
|
|
- Change this damned input method to take bit-words as input for buses.
|
... | ... | @@ -42,4 +42,20 @@ See the (functions doc)[Functions] for details on every function. |
|
|
The basic idea for the computation is just to follow what each gate instructs us to do. `c = AND a b` ? Then in OCaml, this is translated as `c=a && b`. Then the result of this calculation is put in memory in the environment.
|
|
|
Whenever a gate made sense, I implemented it : for buses, wires, wires and buses, buses composed of one wire...
|
|
|
|
|
|
# Output |
|
|
\ No newline at end of file |
|
|
# Output
|
|
|
|
|
|
Details on [Functions](Functions).
|
|
|
|
|
|
The output format is the following :
|
|
|
```
|
|
|
foo=0
|
|
|
bar=42
|
|
|
...
|
|
|
̀```
|
|
|
with `foo` a wire and `bar` a bus, for instance.
|
|
|
|
|
|
The output is currently on `stdout`, mixed with the input prompts.
|
|
|
|
|
|
## TODO:
|
|
|
- Output on an arbitrary format
|
|
|
- Output on an arbitrary channel |
|
|
\ No newline at end of file |