An HDL interpreter implemented in python.
- Make A folder called
hdls
in your working directory - Write your CHIP
(.hdl)
file inside of it - Load your CHIP by its filename (and NOT THE RELATIVE PATH).
from PyHDL import Gate
gate = Gate.fp('Xor.hdl')
print(gate.run({'a': True, 'b': False}))
Output:
Loading: Xor.hdl
Loading: Not.hdl
Loading: And.hdl
Loading: Or.hdl
{'out': True}
Made by Kaushik.