|
@block |
|
def deMux8way(a, q0, q1, q2, q3, q4, q5, q6, q7, sel): |
|
""" |
|
deMux de 8 saídas e uma entrada. |
|
|
|
- Lembre que a saída que não está ativada é 0 |
|
""" |
|
|
|
foo = Signal(intbv(0)) |
|
|
|
@always_comb |
|
def comb(): |
|
if sel == 0: |
|
q0.next = a |
|
q1.next = 0 |
|
q2.next = 0 |
|
q3.next = 0 |
|
q4.next = 0 |
|
q5.next = 0 |
|
q6.next = 0 |
|
q7.next = 0 |
|
|
|
elif sel == 1: |
poderia ser descrito como no demux de 4 saídas
|
@always_comb |
|
def comb(): |
|
lista = 4 * [0] |
|
lista[sel] = a |
|
q0.next = lista[0] |
|
q1.next = lista[1] |
|
q2.next = lista[2] |
|
q3.next = lista[3] |
bits-e-proc-Apple/hw/components.py
Lines 199 to 221 in 004fcb6
poderia ser descrito como no demux de 4 saídas
bits-e-proc-Apple/hw/components.py
Lines 187 to 194 in 004fcb6