A simple HDL written in Python.
from pyhdl import Wire, NandGate
a, b, out = Wire(), Wire(), Wire()
gate = NandGate(a=a, b=b, out=out)
a.val, b.val = '1', '1'
gate.eval()
print out.val # 0
You can read the docs at http://pyhdl.sdnssr.me.
A simple HDL written in Python.
from pyhdl import Wire, NandGate
a, b, out = Wire(), Wire(), Wire()
gate = NandGate(a=a, b=b, out=out)
a.val, b.val = '1', '1'
gate.eval()
print out.val # 0
You can read the docs at http://pyhdl.sdnssr.me.