mirror of https://github.com/YosysHQ/icestorm.git
Merge pull request #248 from mmicko/program_prefix
Support custom PROGRAM_PREFIX
This commit is contained in:
commit
879d5b261c
|
|
@ -1,6 +1,7 @@
|
|||
PREFIX ?= /usr/local
|
||||
DEBUG ?= 0
|
||||
ICEPROG ?= 1
|
||||
PROGRAM_PREFIX ?=
|
||||
|
||||
CXX ?= clang++
|
||||
CC ?= clang
|
||||
|
|
@ -22,7 +23,7 @@ CFLAGS += -MD -O$(OPT_LEVEL) $(DBG_LEVEL) -W$(WARN_LEVEL) -std=$(C_STD) -I$(PREF
|
|||
CXXFLAGS += -MD -O$(OPT_LEVEL) $(DBG_LEVEL) -W$(WARN_LEVEL) -std=$(CXX_STD) -I$(PREFIX)/include
|
||||
|
||||
DESTDIR ?=
|
||||
CHIPDB_SUBDIR ?= icebox
|
||||
CHIPDB_SUBDIR ?= $(PROGRAM_PREFIX)icebox
|
||||
|
||||
ifeq ($(MXE),1)
|
||||
EXE = .exe
|
||||
|
|
|
|||
|
|
@ -36,45 +36,66 @@ clean:
|
|||
rm -f icebox.pyc iceboxdb.pyc
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/icebox
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp chipdb-384.txt $(DESTDIR)$(PREFIX)/share/icebox/
|
||||
cp chipdb-1k.txt $(DESTDIR)$(PREFIX)/share/icebox/
|
||||
cp chipdb-8k.txt $(DESTDIR)$(PREFIX)/share/icebox/
|
||||
cp chipdb-5k.txt $(DESTDIR)$(PREFIX)/share/icebox/
|
||||
cp chipdb-u4k.txt $(DESTDIR)$(PREFIX)/share/icebox/
|
||||
cp chipdb-lm4k.txt $(DESTDIR)$(PREFIX)/share/icebox/
|
||||
cp icebox.py $(DESTDIR)$(PREFIX)/bin/icebox.py
|
||||
cp iceboxdb.py $(DESTDIR)$(PREFIX)/bin/iceboxdb.py
|
||||
cp icebox_chipdb.py $(DESTDIR)$(PREFIX)/bin/icebox_chipdb$(PY_EXE)
|
||||
cp icebox_diff.py $(DESTDIR)$(PREFIX)/bin/icebox_diff$(PY_EXE)
|
||||
cp icebox_explain.py $(DESTDIR)$(PREFIX)/bin/icebox_explain$(PY_EXE)
|
||||
cp icebox_asc2hlc.py $(DESTDIR)$(PREFIX)/bin/icebox_asc2hlc$(PY_EXE)
|
||||
cp icebox_hlc2asc.py $(DESTDIR)$(PREFIX)/bin/icebox_hlc2asc$(PY_EXE)
|
||||
cp icebox_colbuf.py $(DESTDIR)$(PREFIX)/bin/icebox_colbuf$(PY_EXE)
|
||||
cp icebox_html.py $(DESTDIR)$(PREFIX)/bin/icebox_html$(PY_EXE)
|
||||
cp icebox_maps.py $(DESTDIR)$(PREFIX)/bin/icebox_maps$(PY_EXE)
|
||||
cp icebox_vlog.py $(DESTDIR)$(PREFIX)/bin/icebox_vlog$(PY_EXE)
|
||||
cp icebox_stat.py $(DESTDIR)$(PREFIX)/bin/icebox_stat$(PY_EXE)
|
||||
cp chipdb-384.txt $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-1k.txt $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-8k.txt $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-5k.txt $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-u4k.txt $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-lm4k.txt $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp icebox.py $(DESTDIR)$(PREFIX)/bin/$(subst -,_,$(PROGRAM_PREFIX))icebox.py
|
||||
cp iceboxdb.py $(DESTDIR)$(PREFIX)/bin/$(subst -,_,$(PROGRAM_PREFIX))iceboxdb.py
|
||||
cp icebox_chipdb.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_chipdb$(PY_EXE)
|
||||
cp icebox_diff.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_diff$(PY_EXE)
|
||||
cp icebox_explain.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_explain$(PY_EXE)
|
||||
cp icebox_asc2hlc.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_asc2hlc$(PY_EXE)
|
||||
cp icebox_hlc2asc.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_hlc2asc$(PY_EXE)
|
||||
cp icebox_colbuf.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_colbuf$(PY_EXE)
|
||||
cp icebox_html.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_html$(PY_EXE)
|
||||
cp icebox_maps.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_maps$(PY_EXE)
|
||||
cp icebox_vlog.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_vlog$(PY_EXE)
|
||||
cp icebox_stat.py $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_stat$(PY_EXE)
|
||||
sed -i 's+import iceboxdb+import $(subst -,_,$(PROGRAM_PREFIX))iceboxdb as iceboxdb+g' $(DESTDIR)$(PREFIX)/bin/$(subst -,_,$(PROGRAM_PREFIX))icebox.py
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_chipdb$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_diff$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_diff$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_explain$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_explain$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_asc2hlc$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_asc2hlc$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_hlc2asc$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_hlc2asc$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_colbuf$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_colbuf$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_html$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_html$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_maps$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_maps$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_vlog$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_vlog$(PY_EXE)
|
||||
sed -i 's+/usr/local/share/icebox+$(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_vlog$(PY_EXE)
|
||||
sed -i 's+import icebox+import $(subst -,_,$(PROGRAM_PREFIX))icebox as icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_stat$(PY_EXE)
|
||||
sed -i 's+from icebox+from $(subst -,_,$(PROGRAM_PREFIX))icebox+g' $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_stat$(PY_EXE)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox.py
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/iceboxdb.py
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_chipdb$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_diff$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_explain$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_asc2hlc$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_hlc2asc$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_colbuf$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_html$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_maps$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_vlog$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebox_stat$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/icebox/chipdb-384.txt
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/icebox/chipdb-1k.txt
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/icebox/chipdb-8k.txt
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/icebox/chipdb-lm4k.txt
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/icebox/chipdb-u4k.txt
|
||||
-rmdir $(DESTDIR)$(PREFIX)/share/icebox
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(subst -,_,$(PROGRAM_PREFIX))cebox.py
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(subst -,_,$(PROGRAM_PREFIX))iceboxdb.py
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_chipdb$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_diff$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_explain$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_asc2hlc$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_hlc2asc$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_colbuf$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_html$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_maps$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_vlog$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebox_stat$(PY_EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-384.txt
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-1k.txt
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-8k.txt
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-lm4k.txt
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-u4k.txt
|
||||
-rmdir $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox
|
||||
|
||||
.PHONY: all check clean install uninstall
|
||||
|
|
|
|||
|
|
@ -1068,7 +1068,7 @@ def main():
|
|||
except getopt.GetoptError as e:
|
||||
sys.stderr.write("%s: %s\n" % (program_short_name, e.msg))
|
||||
sys.stderr.write("Try `%s --help' for more information.\n"
|
||||
% sys.argv[0])
|
||||
% program_short_name)
|
||||
sys.exit(1)
|
||||
|
||||
for opt, arg in opts:
|
||||
|
|
@ -1085,7 +1085,7 @@ Usage: %s [OPTION]... FILE
|
|||
|
||||
If you have a bug report, please file an issue on github:
|
||||
https://github.com/rlutz/icestorm/issues
|
||||
""" % sys.argv[0])
|
||||
""" % program_short_name)
|
||||
sys.exit(0)
|
||||
|
||||
if opt == '--version':
|
||||
|
|
@ -1113,13 +1113,13 @@ GNU General Public License for more details.
|
|||
if not args:
|
||||
sys.stderr.write("%s: missing argument\n" % (program_short_name))
|
||||
sys.stderr.write("Try `%s --help' for more information.\n"
|
||||
% sys.argv[0])
|
||||
% program_short_name)
|
||||
sys.exit(1)
|
||||
|
||||
if len(args) != 1:
|
||||
sys.stderr.write("%s: too many arguments\n" % (program_short_name))
|
||||
sys.stderr.write("Try `%s --help' for more information.\n"
|
||||
% sys.argv[0])
|
||||
% program_short_name)
|
||||
sys.exit(1)
|
||||
|
||||
ic = icebox.iceconfig()
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#
|
||||
|
||||
import icebox
|
||||
import getopt, sys, re
|
||||
import getopt, sys, re, os
|
||||
|
||||
mode_384 = False
|
||||
mode_lm4k = False
|
||||
|
|
@ -26,7 +26,7 @@ mode_8k = False
|
|||
|
||||
def usage():
|
||||
print("""
|
||||
Usage: icebox_chipdb [options] [bitmap.asc]
|
||||
Usage: %s [options] [bitmap.asc]
|
||||
|
||||
-3
|
||||
create chipdb for 384 device
|
||||
|
|
@ -42,7 +42,7 @@ Usage: icebox_chipdb [options] [bitmap.asc]
|
|||
|
||||
-u
|
||||
create chipdb for u4k device
|
||||
""")
|
||||
""" % os.path.basename(sys.argv[0]))
|
||||
sys.exit(0)
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -17,21 +17,21 @@
|
|||
|
||||
import icebox
|
||||
from icebox import re_match_cached
|
||||
import getopt, sys, re
|
||||
import getopt, sys, re, os
|
||||
|
||||
check_mode = False
|
||||
fixup_mode = False
|
||||
|
||||
def usage():
|
||||
print("""
|
||||
Usage: icebox_colbuf [options] [input.asc [output.asc]]
|
||||
Usage: %s [options] [input.asc [output.asc]]
|
||||
|
||||
-c
|
||||
check colbuf bits
|
||||
|
||||
-f
|
||||
fix colbuf bits
|
||||
""")
|
||||
""" % os.path.basename(sys.argv[0]))
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@
|
|||
|
||||
import icebox
|
||||
from icebox import re_match_cached
|
||||
import sys
|
||||
import sys, os
|
||||
import re
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
print("""
|
||||
Usage: icebox_diff bitmap1.asc bitmap2.asc
|
||||
""")
|
||||
Usage: %s bitmap1.asc bitmap2.asc
|
||||
""" % os.path.basename(sys.argv[0]))
|
||||
sys.exit(0)
|
||||
|
||||
print("Reading file '%s'.." % sys.argv[1])
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
import icebox
|
||||
from icebox import re_match_cached, re_search_cached
|
||||
import getopt, sys, re
|
||||
import getopt, sys, re, os
|
||||
|
||||
print_bits = False
|
||||
print_map = False
|
||||
|
|
@ -26,7 +26,7 @@ print_all = False
|
|||
|
||||
def usage():
|
||||
print("""
|
||||
Usage: icebox_explain [options] [bitmap.asc]
|
||||
Usage: %s [options] [bitmap.asc]
|
||||
|
||||
-b
|
||||
print config bit names for each config statement
|
||||
|
|
@ -39,7 +39,7 @@ Usage: icebox_explain [options] [bitmap.asc]
|
|||
|
||||
-t '<x-coordinate> <y-coordinate>'
|
||||
print only the specified tile
|
||||
""")
|
||||
""" % os.path.basename(sys.argv[0]))
|
||||
sys.exit(0)
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1147,7 +1147,7 @@ def main():
|
|||
except getopt.GetoptError as e:
|
||||
sys.stderr.write("%s: %s\n" % (program_short_name, e.msg))
|
||||
sys.stderr.write("Try `%s --help' for more information.\n"
|
||||
% sys.argv[0])
|
||||
% program_short_name)
|
||||
sys.exit(1)
|
||||
|
||||
for opt, arg in opts:
|
||||
|
|
@ -1161,7 +1161,7 @@ Usage: %s [OPTION]... FILE
|
|||
|
||||
If you have a bug report, please file an issue on github:
|
||||
https://github.com/rlutz/icestorm/issues
|
||||
""" % sys.argv[0])
|
||||
""" % program_short_name)
|
||||
sys.exit(0)
|
||||
|
||||
if opt == '--version':
|
||||
|
|
@ -1184,13 +1184,13 @@ GNU General Public License for more details.
|
|||
if not args:
|
||||
sys.stderr.write("%s: missing argument\n" % (program_short_name))
|
||||
sys.stderr.write("Try `%s --help' for more information.\n"
|
||||
% sys.argv[0])
|
||||
% program_short_name)
|
||||
sys.exit(1)
|
||||
|
||||
if len(args) != 1:
|
||||
sys.stderr.write("%s: too many arguments\n" % (program_short_name))
|
||||
sys.stderr.write("Try `%s --help' for more information.\n"
|
||||
% sys.argv[0])
|
||||
% program_short_name)
|
||||
sys.exit(1)
|
||||
|
||||
if args[0] == '-':
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ mode384 = False
|
|||
tx, ty = 0, 0
|
||||
|
||||
def usage():
|
||||
print("Usage: %s [options]" % sys.argv[0])
|
||||
print("Usage: %s [options]" % os.path.basename(sys.argv[0]))
|
||||
print(" -x tile_x_coordinate")
|
||||
print(" -y tile_y_coordinate")
|
||||
print(" -d outdir")
|
||||
|
|
|
|||
|
|
@ -17,20 +17,21 @@
|
|||
|
||||
import icebox
|
||||
from icebox import re_match_cached
|
||||
import getopt, sys, re
|
||||
import getopt, sys, re, os
|
||||
|
||||
mode = None
|
||||
|
||||
def usage():
|
||||
program_short_name = os.path.basename(sys.argv[0])
|
||||
print("Usage:")
|
||||
print(" icebox_maps -m bitmaps")
|
||||
print(" icebox_maps -m io_tile_nets_l")
|
||||
print(" icebox_maps -m io_tile_nets_r")
|
||||
print(" icebox_maps -m io_tile_nets_t")
|
||||
print(" icebox_maps -m io_tile_nets_b")
|
||||
print(" icebox_maps -m logic_tile_nets")
|
||||
print(" icebox_maps -m ramb_tile_nets")
|
||||
print(" icebox_maps -m ramt_tile_nets")
|
||||
print(" %s -m bitmaps" % program_short_name)
|
||||
print(" %s -m io_tile_nets_l" % program_short_name)
|
||||
print(" %s -m io_tile_nets_r" % program_short_name)
|
||||
print(" %s -m io_tile_nets_t" % program_short_name)
|
||||
print(" %s -m io_tile_nets_b" % program_short_name)
|
||||
print(" %s -m logic_tile_nets" % program_short_name)
|
||||
print(" %s -m ramb_tile_nets" % program_short_name)
|
||||
print(" %s -m ramt_tile_nets" % program_short_name)
|
||||
sys.exit(0)
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -17,18 +17,18 @@
|
|||
|
||||
import icebox
|
||||
from icebox import re_match_cached
|
||||
import getopt, sys, re
|
||||
import getopt, sys, re, os
|
||||
|
||||
verbose = False
|
||||
|
||||
def usage():
|
||||
print("""
|
||||
Usage: icebox_stat [options] [bitmap.asc]
|
||||
Usage: %s [options] [bitmap.asc]
|
||||
|
||||
-v
|
||||
verbose output
|
||||
|
||||
""")
|
||||
""" % os.path.basename(sys.argv[0]))
|
||||
sys.exit(0)
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
import icebox
|
||||
from icebox import re_match_cached, re_sub_cached, re_search_cached
|
||||
import getopt, sys, re
|
||||
import getopt, sys, re, os
|
||||
|
||||
strip_comments = False
|
||||
strip_interconn = False
|
||||
|
|
@ -34,7 +34,7 @@ modname = "chip"
|
|||
|
||||
def usage():
|
||||
print("""
|
||||
Usage: icebox_vlog [options] [bitmap.asc]
|
||||
Usage: %s [options] [bitmap.asc]
|
||||
|
||||
-s
|
||||
strip comments from output
|
||||
|
|
@ -70,7 +70,7 @@ Usage: icebox_vlog [options] [bitmap.asc]
|
|||
|
||||
-D
|
||||
enable exactly-one-driver checks
|
||||
""")
|
||||
""" % os.path.basename(sys.argv[0]))
|
||||
sys.exit(0)
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -4,24 +4,24 @@ ifeq ($(STATIC),1)
|
|||
LDFLAGS += -static
|
||||
endif
|
||||
|
||||
all: icebram$(EXE)
|
||||
all: $(PROGRAM_PREFIX)icebram$(EXE)
|
||||
|
||||
icebram$(EXE): icebram.o
|
||||
$(PROGRAM_PREFIX)icebram$(EXE): icebram.o
|
||||
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
test: icebram
|
||||
test: $(PROGRAM_PREFIX)icebram
|
||||
bash rundemo.sh
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp icebram$(EXE) $(DESTDIR)$(PREFIX)/bin/icebram$(EXE)
|
||||
cp $(PROGRAM_PREFIX)icebram$(EXE) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebram$(EXE)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icebram$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icebram$(EXE)
|
||||
|
||||
clean:
|
||||
rm -f icebram$(EXE)
|
||||
rm -f icebram.exe
|
||||
rm -f $(PROGRAM_PREFIX)icebram$(EXE)
|
||||
rm -f $(PROGRAM_PREFIX)icebram.exe
|
||||
rm -f demo.* demo_*.*
|
||||
rm -f *.o *.d
|
||||
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@ ifeq ($(STATIC),1)
|
|||
LDFLAGS += -static
|
||||
endif
|
||||
|
||||
all: icemulti$(EXE)
|
||||
all: $(PROGRAM_PREFIX)icemulti$(EXE)
|
||||
|
||||
icemulti$(EXE): icemulti.o
|
||||
$(PROGRAM_PREFIX)icemulti$(EXE): icemulti.o
|
||||
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp icemulti$(EXE) $(DESTDIR)$(PREFIX)/bin/icemulti$(EXE)
|
||||
cp $(PROGRAM_PREFIX)icemulti$(EXE) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icemulti$(EXE)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icemulti$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icemulti$(EXE)
|
||||
|
||||
clean:
|
||||
rm -f icemulti$(EXE)
|
||||
rm -f icemulti.exe
|
||||
rm -f $(PROGRAM_PREFIX)icemulti$(EXE)
|
||||
rm -f $(PROGRAM_PREFIX)icemulti.exe
|
||||
rm -f *.o *.d
|
||||
|
||||
-include *.d
|
||||
|
|
|
|||
|
|
@ -157,10 +157,10 @@ static void write_header(std::ostream &ofs, uint32_t &file_offset,
|
|||
write_byte(ofs, file_offset, 0x00);
|
||||
}
|
||||
|
||||
void usage()
|
||||
void usage(const char *cmd)
|
||||
{
|
||||
log("\n");
|
||||
log("Usage: icemulti [options] input-files\n");
|
||||
log("Usage: %s [options] input-files\n", cmd);
|
||||
log("\n");
|
||||
log(" -c\n");
|
||||
log(" coldboot mode, power on reset image is selected by CBSEL0/CBSEL1\n");
|
||||
|
|
@ -252,12 +252,12 @@ int main(int argc, char **argv)
|
|||
print_offsets = true;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
usage(argv[0]);
|
||||
}
|
||||
|
||||
if (optind == argc) {
|
||||
fprintf(stderr, "%s: missing argument\n", program_short_name);
|
||||
usage();
|
||||
usage(argv[0]);
|
||||
}
|
||||
|
||||
while (optind != argc) {
|
||||
|
|
|
|||
|
|
@ -5,30 +5,30 @@ ifeq ($(STATIC),1)
|
|||
LDFLAGS += -static
|
||||
endif
|
||||
|
||||
all: icepack$(EXE) iceunpack$(EXE)
|
||||
all: $(PROGRAM_PREFIX)icepack$(EXE) $(PROGRAM_PREFIX)iceunpack$(EXE)
|
||||
|
||||
icepack$(EXE): icepack.o
|
||||
$(PROGRAM_PREFIX)icepack$(EXE): icepack.o
|
||||
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
iceunpack$(EXE): icepack$(EXE)
|
||||
ln -sf icepack$(EXE) iceunpack$(EXE)
|
||||
$(PROGRAM_PREFIX)iceunpack$(EXE): $(PROGRAM_PREFIX)icepack$(EXE)
|
||||
ln -sf $(PROGRAM_PREFIX)icepack$(EXE) $(PROGRAM_PREFIX)iceunpack$(EXE)
|
||||
|
||||
iceunpack.exe:
|
||||
$(PROGRAM_PREFIX)iceunpack.exe:
|
||||
# no iceunpack.exe, use icepack -u
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp icepack$(EXE) $(DESTDIR)$(PREFIX)/bin/icepack$(EXE)
|
||||
ln -sf icepack$(EXE) $(DESTDIR)$(PREFIX)/bin/iceunpack$(EXE)
|
||||
cp $(PROGRAM_PREFIX)icepack$(EXE) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icepack$(EXE)
|
||||
ln -sf $(PROGRAM_PREFIX)icepack$(EXE) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)iceunpack$(EXE)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icepack$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/iceunpack$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icepack$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)iceunpack$(EXE)
|
||||
|
||||
clean:
|
||||
rm -f icepack$(EXE)
|
||||
rm -f iceunpack$(EXE)
|
||||
rm -f icepack.exe
|
||||
rm -f $(PROGRAM_PREFIX)icepack$(EXE)
|
||||
rm -f $(PROGRAM_PREFIX)iceunpack$(EXE)
|
||||
rm -f $(PROGRAM_PREFIX)icepack.exe
|
||||
rm -f *.o *.d
|
||||
|
||||
-include *.d
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@ ifeq ($(STATIC),1)
|
|||
LDFLAGS += -static
|
||||
endif
|
||||
|
||||
all: icepll$(EXE)
|
||||
all: $(PROGRAM_PREFIX)icepll$(EXE)
|
||||
|
||||
icepll$(EXE): icepll.o
|
||||
$(PROGRAM_PREFIX)icepll$(EXE): icepll.o
|
||||
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp icepll$(EXE) $(DESTDIR)$(PREFIX)/bin/icepll$(EXE)
|
||||
cp $(PROGRAM_PREFIX)icepll$(EXE) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icepll$(EXE)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icepll$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icepll$(EXE)
|
||||
|
||||
clean:
|
||||
rm -f icepll$(EXE)
|
||||
rm -f icepll.exe
|
||||
rm -f $(PROGRAM_PREFIX)icepll$(EXE)
|
||||
rm -f $(PROGRAM_PREFIX)icepll.exe
|
||||
rm -f *.o *.d
|
||||
|
||||
-include *.d
|
||||
|
|
|
|||
|
|
@ -16,21 +16,21 @@ LDLIBS += $(shell for pkg in libftdi1 libftdi; do $(PKG_CONFIG) --silence-errors
|
|||
CFLAGS += $(shell for pkg in libftdi1 libftdi; do $(PKG_CONFIG) --silence-errors --cflags $$pkg && exit; done; )
|
||||
endif
|
||||
|
||||
all: iceprog$(EXE)
|
||||
all: $(PROGRAM_PREFIX)iceprog$(EXE)
|
||||
|
||||
iceprog$(EXE): iceprog.o mpsse.o
|
||||
$(PROGRAM_PREFIX)iceprog$(EXE): iceprog.o mpsse.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp iceprog$(EXE) $(DESTDIR)$(PREFIX)/bin/iceprog$(EXE)
|
||||
cp $(PROGRAM_PREFIX)iceprog$(EXE) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)iceprog$(EXE)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/iceprog$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)iceprog$(EXE)
|
||||
|
||||
clean:
|
||||
rm -f iceprog
|
||||
rm -f iceprog.exe
|
||||
rm -f $(PROGRAM_PREFIX)iceprog
|
||||
rm -f $(PROGRAM_PREFIX)iceprog.exe
|
||||
rm -f *.o *.d
|
||||
|
||||
-include *.d
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ ifeq ($(STATIC),1)
|
|||
LDFLAGS += -static
|
||||
endif
|
||||
|
||||
all: icetime$(EXE)
|
||||
all: $(PROGRAM_PREFIX)icetime$(EXE)
|
||||
|
||||
CHIPS=lp384 lp1k lp8k hx1k hx8k up5k
|
||||
|
||||
ifeq ($(EXE),.js)
|
||||
icetime$(EXE): | share/$(CHIPDB_SUBDIR)/chipdb-384.txt share/$(CHIPDB_SUBDIR)/chipdb-1k.txt share/$(CHIPDB_SUBDIR)/chipdb-8k.txt share/$(CHIPDB_SUBDIR)/chipdb-5k.txt
|
||||
$(PROGRAM_PREFIX)icetime$(EXE): | share/$(CHIPDB_SUBDIR)/chipdb-384.txt share/$(CHIPDB_SUBDIR)/chipdb-1k.txt share/$(CHIPDB_SUBDIR)/chipdb-8k.txt share/$(CHIPDB_SUBDIR)/chipdb-5k.txt
|
||||
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-384.txt: ../icebox/chipdb-384.txt
|
||||
mkdir -p share/$(CHIPDB_SUBDIR)
|
||||
|
|
@ -28,7 +28,7 @@ share/$(CHIPDB_SUBDIR)/chipdb-5k.txt: ../icebox/chipdb-5k.txt
|
|||
override LDFLAGS += --embed-file share
|
||||
endif
|
||||
|
||||
icetime$(EXE): icetime.o iceutil.o $(addsuffix .o, $(addprefix timings-, $(CHIPS)))
|
||||
$(PROGRAM_PREFIX)icetime$(EXE): icetime.o iceutil.o $(addsuffix .o, $(addprefix timings-, $(CHIPS)))
|
||||
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
timings-%.cc: timings.py ../icefuzz/timings_%.txt
|
||||
|
|
@ -36,12 +36,12 @@ timings-%.cc: timings.py ../icefuzz/timings_%.txt
|
|||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/icebox
|
||||
cp icetime$(EXE) $(DESTDIR)$(PREFIX)/bin/icetime$(EXE)
|
||||
cp ../icefuzz/timings_*.txt $(DESTDIR)$(PREFIX)/share/icebox/
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox
|
||||
cp $(PROGRAM_PREFIX)icetime$(EXE) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icetime$(EXE)
|
||||
cp ../icefuzz/timings_*.txt $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/icetime$(EXE)
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icetime$(EXE)
|
||||
|
||||
|
||||
# View timing netlist:
|
||||
|
|
@ -65,7 +65,7 @@ test: test0 test1 test2 test3 test4 test5 test6 test7 test8 test9
|
|||
show: show0 show1 show2 show3 show4 show5 show6 show7 show8 show9
|
||||
|
||||
clean:
|
||||
rm -f icetime$(EXE) icetime.exe *.o *.d timings-*.cc
|
||||
rm -f $(PROGRAM_PREFIX)icetime$(EXE) $(PROGRAM_PREFIX)icetime.exe *.o *.d timings-*.cc
|
||||
rm -rf test[0-9]*
|
||||
|
||||
-include *.d
|
||||
|
|
|
|||
Loading…
Reference in New Issue