prerequisites for building yosys:
$ yosys_deps="build-essential clang bison flex libreadline-dev gawk
- tcl-dev libffi-dev git mercurial graphviz xdot pkg-config python"
+ tcl-dev libffi-dev git mercurial graphviz xdot pkg-config python3"
$ sudo apt-get install $yosys_deps
There are also pre-compiled Yosys binary packages for Ubuntu and Win32 as well
techlibs/ice40/brams_init.mk: techlibs/ice40/brams_init.py
$(Q) mkdir -p techlibs/ice40
- $(P) python $<
+ $(P) python3 $<
$(Q) touch techlibs/ice40/brams_init.mk
techlibs/ice40/brams_init1.vh: techlibs/ice40/brams_init.mk
-#!/usr/bin/python
-
-from __future__ import division
-from __future__ import print_function
+#!/usr/bin/env python3
def write_init_vh(filename, initbits):
with open(filename, "w") as f:
techlibs/xilinx/brams_init.mk: techlibs/xilinx/brams_init.py
$(Q) mkdir -p techlibs/xilinx
- $(P) python $<
+ $(P) python3 $<
$(Q) touch $@
techlibs/xilinx/brams_init_36.vh: techlibs/xilinx/brams_init.mk
-#!/usr/bin/python
-
-from __future__ import division
-from __future__ import print_function
+#!/usr/bin/env python3
with open("techlibs/xilinx/brams_init_18.vh", "w") as f:
for i in range(8):
-#!/usr/bin/python
-
-from __future__ import division
-from __future__ import print_function
+#!/usr/bin/env python3
import os
import sys
mkdir -p temp
echo "generating tests.."
-python generate.py
+python3 generate.py
{
echo -n "all:"
-#!/usr/bin/python
-
-from __future__ import division
-from __future__ import print_function
+#!/usr/bin/env python3
import sys
import random
rm -rf temp
mkdir -p temp
echo "generating tests.."
-python generate.py
+python3 generate.py
{
all_targets="all_targets:"
-#!/usr/bin/python
-
-from __future__ import division
-from __future__ import print_function
+#!/usr/bin/env python3
import sys
import random
rm -rf temp
mkdir -p temp
echo "generating tests.."
-python generate.py
+python3 generate.py
cd temp
echo "running tests.."
-#!/usr/bin/python
-
-from __future__ import division
-from __future__ import print_function
+#!/usr/bin/env python3
import sys
import random
rm -rf temp
mkdir -p temp
echo "generating tests.."
-python generate.py
+python3 generate.py
echo "running tests.."
for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
-#!/usr/bin/python
-
-from __future__ import division
-from __future__ import print_function
+#!/usr/bin/env python3
import argparse
import fileinput