Switched to Python 3

This commit is contained in:
Clifford Wolf 2015-08-22 09:59:25 +02:00
parent f40d1b78b6
commit c475deec6c
14 changed files with 14 additions and 35 deletions

2
README
View File

@ -56,7 +56,7 @@ For example on Ubuntu Linux 14.04 LTS the following commands will install all
prerequisites for building yosys: prerequisites for building yosys:
$ yosys_deps="build-essential clang bison flex libreadline-dev gawk $ 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 $ sudo apt-get install $yosys_deps
There are also pre-compiled Yosys binary packages for Ubuntu and Win32 as well There are also pre-compiled Yosys binary packages for Ubuntu and Win32 as well

View File

@ -12,7 +12,7 @@ EXTRA_OBJS += techlibs/ice40/brams_init.mk
techlibs/ice40/brams_init.mk: techlibs/ice40/brams_init.py techlibs/ice40/brams_init.mk: techlibs/ice40/brams_init.py
$(Q) mkdir -p techlibs/ice40 $(Q) mkdir -p techlibs/ice40
$(P) python $< $(P) python3 $<
$(Q) touch techlibs/ice40/brams_init.mk $(Q) touch techlibs/ice40/brams_init.mk
techlibs/ice40/brams_init1.vh: techlibs/ice40/brams_init.mk techlibs/ice40/brams_init1.vh: techlibs/ice40/brams_init.mk

View File

@ -1,7 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python3
from __future__ import division
from __future__ import print_function
def write_init_vh(filename, initbits): def write_init_vh(filename, initbits):
with open(filename, "w") as f: with open(filename, "w") as f:

View File

@ -11,7 +11,7 @@ EXTRA_OBJS += techlibs/xilinx/brams_init.mk
techlibs/xilinx/brams_init.mk: techlibs/xilinx/brams_init.py techlibs/xilinx/brams_init.mk: techlibs/xilinx/brams_init.py
$(Q) mkdir -p techlibs/xilinx $(Q) mkdir -p techlibs/xilinx
$(P) python $< $(P) python3 $<
$(Q) touch $@ $(Q) touch $@
techlibs/xilinx/brams_init_36.vh: techlibs/xilinx/brams_init.mk techlibs/xilinx/brams_init_36.vh: techlibs/xilinx/brams_init.mk

View File

@ -1,7 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python3
from __future__ import division
from __future__ import print_function
with open("techlibs/xilinx/brams_init_18.vh", "w") as f: with open("techlibs/xilinx/brams_init_18.vh", "w") as f:
for i in range(8): for i in range(8):

View File

@ -1,7 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python3
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys

View File

@ -8,7 +8,7 @@ rm -rf temp
mkdir -p temp mkdir -p temp
echo "generating tests.." echo "generating tests.."
python generate.py python3 generate.py
{ {
echo -n "all:" echo -n "all:"

View File

@ -1,7 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python3
from __future__ import division
from __future__ import print_function
import sys import sys
import random import random

View File

@ -8,7 +8,7 @@ set -e
rm -rf temp rm -rf temp
mkdir -p temp mkdir -p temp
echo "generating tests.." echo "generating tests.."
python generate.py python3 generate.py
{ {
all_targets="all_targets:" all_targets="all_targets:"

View File

@ -1,7 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python3
from __future__ import division
from __future__ import print_function
import sys import sys
import random import random

View File

@ -4,7 +4,7 @@ set -e
rm -rf temp rm -rf temp
mkdir -p temp mkdir -p temp
echo "generating tests.." echo "generating tests.."
python generate.py python3 generate.py
cd temp cd temp
echo "running tests.." echo "running tests.."

View File

@ -1,7 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python3
from __future__ import division
from __future__ import print_function
import sys import sys
import random import random

View File

@ -8,7 +8,7 @@ set -e
rm -rf temp rm -rf temp
mkdir -p temp mkdir -p temp
echo "generating tests.." echo "generating tests.."
python generate.py python3 generate.py
echo "running tests.." echo "running tests.."
for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do

View File

@ -1,7 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python3
from __future__ import division
from __future__ import print_function
import argparse import argparse
import fileinput import fileinput