nmigen-learning/fpga/__init__.py

22 lines
478 B
Python
Raw Normal View History

2020-08-06 20:52:49 +02:00
2020-08-06 20:53:02 +02:00
__version__ = '0.1.0'
2020-08-06 20:52:49 +02:00
2020-08-06 20:53:02 +02:00
# YOWASP:
2020-08-06 20:52:49 +02:00
2020-08-06 20:53:02 +02:00
def populate_environ():
import os, shutil
2020-08-06 20:52:49 +02:00
2020-08-06 20:53:02 +02:00
for env_name, program in [
("YOSYS", "yowasp-yosys"),
("NEXTPNR_ICE40", "yowasp-nextpnr-ice40"),
("NEXTPNR_ECP5", "yowasp-nextpnr-ecp5"),
]:
if shutil.which(program):
os.environ[env_name] = program
2020-08-06 20:52:49 +02:00
2020-08-06 20:53:02 +02:00
populate_environ()
del populate_environ
2020-08-06 20:52:49 +02:00
2020-08-06 20:53:02 +02:00
# dogelang: Slow. Stupid. Absolutely adorable.
import dg # install import hook