Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
melchisedech333 committed Oct 13, 2022
1 parent 7e30a9f commit 8fa299a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions gate-machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static void prepare_subgate_input (gate_t *gate)

static void prepare_subgate_vdd (gate_t *gate)
{
// O Vdd sempre se conecta com os Vdd dos sub-gates.
// The Vdd always connects with the Vdd of the sub-gates.

for (wire_t *w=gate->wires; w != NULL; w=w->next) {
if (w->input_id == GATE_PIN_VDD) {
Expand All @@ -182,7 +182,7 @@ static void process_gate_direct (gate_t *gate)
{
for (wire_t *w=gate->wires; w != NULL; w=w->next) {

// O Vdd apenas se conectará em alguma porta de source ou dreno.
// Vdd will only connect to some source or drain port.
if (w->input_id == GATE_PIN_VDD) {
if (gate->vdd == 1) {
for (transistor_t *t=gate->transistors; t != NULL; t=t->next) {
Expand All @@ -200,7 +200,7 @@ static void process_gate_direct (gate_t *gate)
}
}

// O input sempre se conectará em algum gate.
// The input will always connect to some gate.
else if (w->input_id == GATE_PIN_INPUT1) {
if (gate->input1 == 1)
process_gate_connection(gate, w);
Expand All @@ -209,8 +209,8 @@ static void process_gate_direct (gate_t *gate)
process_gate_connection(gate, w);
}

// Conexões que partem dos transistores só podem sair do drain ou do source.
// E conectarem-se no output, ground, ou um gate de algum outro transistor.
// Connections that come out of transistors, can only come out of drain or source.
// And connect to the output, ground, or a gate of some other transistor.
else {
for (transistor_t *t=gate->transistors; t != NULL; t=t->next) {
if (w->input_id == t->id)
Expand Down
2 changes: 1 addition & 1 deletion readme-pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Para maiores detalhes você pode analisar o algoritmo no arquivo [device-arithme
<br>
Aqui está a saída do programa ao ser executado:
Aqui está a saída do programa:
```
Operation: SUM (+)
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ For more details you can analyze the algorithm in the file [device-arithmetic.c]
<br>
Here is the output of the program as it runs:
Here is the output of the program:
```
Operation: SUM (+)
Expand Down

0 comments on commit 8fa299a

Please sign in to comment.