mirror of https://github.com/YosysHQ/icestorm.git
Merge a29b7404d4 into f31c39cc2e
This commit is contained in:
commit
a1430337ea
|
|
@ -429,14 +429,15 @@ synthesis and place&route.
|
|||
ChipDB
|
||||
~~~~~~
|
||||
|
||||
The IceStorm Makefile builds and installs two files: chipdb-1k.txt and
|
||||
chipdb-8k.txt. This files contain all the relevant information for
|
||||
arachne-pnr to place&route a design and create an IceStorm ASCII file
|
||||
The IceStorm Makefile builds and installs several files: chipdb-1k.txt.gz,
|
||||
chipdb-384.txt.gz, chipdb-5k.txt.gz, chipdb-8k.txt.gz, chipdb-lm4k.txt.gz,
|
||||
and chipdb-u4k.txt.gz. This files contain all the relevant information for
|
||||
nextpnr-pnr to place&route a design and create an IceStorm ASCII file
|
||||
for the placed and routed design.
|
||||
|
||||
*IcePack/IceUnpack, IceBox, IceProg, IceTime, and IcePLL are written by
|
||||
Claire Wolf. IcePack/IceUnpack is based on a reference implementation
|
||||
provided by Mathias Lasser. IceMulti is written by Marcus Comstedt.*
|
||||
*IcePack/IceUnpack, IceBox, IceProg, IceTime, and IcePLL were originally
|
||||
written by Claire Wolf. IcePack/IceUnpack is based on a reference implementation
|
||||
provided by Mathias Lasser. IceMulti was created by Marcus Comstedt.*
|
||||
|
||||
Where do I get support or meet other IceStorm users?
|
||||
----------------------------------------------------
|
||||
|
|
@ -449,13 +450,13 @@ stackoverflow <http://stackoverflow.com/questions/tagged/verilog>`__
|
|||
instead.
|
||||
|
||||
For general discussions go to the `Yosys
|
||||
Subreddit <https://www.reddit.com/r/yosys/>`__ or `#yosys on freenode
|
||||
IRC <http://webchat.freenode.net/?channels=yosys>`__.
|
||||
Subreddit <https://www.reddit.com/r/yosys/>`__ or `#yosys on the Libera.Chat
|
||||
IRC <https://web.libera.chat/?channels=#yosys>`__.
|
||||
|
||||
If you have a bug report please file an issue on github. (`IceStorm
|
||||
Issue Tracker <https://github.com/YosysHQ/icestorm/issues>`__, `Yosys
|
||||
Issue Tracker <https://github.com/YosysHQ/yosys/issues>`__, `Arachne-PNR
|
||||
Issue Tracker <https://github.com/YosysHQ/arachne-pnr/issues>`__)
|
||||
Issue Tracker <https://github.com/YosysHQ/yosys/issues>`__, `nextpnr
|
||||
Issue Tracker <https://github.com/YosysHQ/nextpnr/issues>`__)
|
||||
|
||||
.. _docs:
|
||||
|
||||
|
|
|
|||
|
|
@ -6,31 +6,37 @@ else
|
|||
SED_I = sed -i ''
|
||||
endif
|
||||
|
||||
all: chipdb-384.txt chipdb-1k.txt chipdb-8k.txt chipdb-5k.txt chipdb-lm4k.txt chipdb-u4k.txt
|
||||
all: chipdb-384.txt.gz chipdb-1k.txt.gz chipdb-8k.txt.gz chipdb-5k.txt.gz chipdb-lm4k.txt.gz chipdb-u4k.txt.gz
|
||||
|
||||
chipdb-384.txt: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
chipdb-384.txt.gz: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
$(PYTHON3) icebox_chipdb.py -3 > chipdb-384.new
|
||||
mv chipdb-384.new chipdb-384.txt
|
||||
gzip -9 chipdb-384.txt
|
||||
|
||||
chipdb-1k.txt: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
chipdb-1k.txt.gz: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
$(PYTHON3) icebox_chipdb.py > chipdb-1k.new
|
||||
mv chipdb-1k.new chipdb-1k.txt
|
||||
gzip -9 chipdb-1k.txt
|
||||
|
||||
chipdb-5k.txt: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
chipdb-5k.txt.gz: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
$(PYTHON3) icebox_chipdb.py -5 > chipdb-5k.new
|
||||
mv chipdb-5k.new chipdb-5k.txt
|
||||
gzip -9 chipdb-5k.txt
|
||||
|
||||
chipdb-u4k.txt: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
chipdb-u4k.txt.gz: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
$(PYTHON3) icebox_chipdb.py -u > chipdb-u4k.new
|
||||
mv chipdb-u4k.new chipdb-u4k.txt
|
||||
gzip -9 chipdb-u4k.txt
|
||||
|
||||
chipdb-lm4k.txt: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
chipdb-lm4k.txt.gz: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
$(PYTHON3) icebox_chipdb.py -4 > chipdb-lm4k.new
|
||||
mv chipdb-lm4k.new chipdb-lm4k.txt
|
||||
gzip -9 chipdb-lm4k.txt
|
||||
|
||||
chipdb-8k.txt: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
chipdb-8k.txt.gz: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
$(PYTHON3) icebox_chipdb.py -8 > chipdb-8k.new
|
||||
mv chipdb-8k.new chipdb-8k.txt
|
||||
gzip -9 chipdb-8k.txt
|
||||
|
||||
check: all
|
||||
$(PYTHON3) tc_xlat_netnames.py
|
||||
|
|
@ -38,18 +44,18 @@ check: all
|
|||
$(PYTHON3) tc_logic_xpr.py
|
||||
|
||||
clean:
|
||||
rm -f chipdb-1k.txt chipdb-8k.txt chipdb-384.txt chipdb-5k.txt chipdb-lm4k.txt chipdb-u4k.txt
|
||||
rm -f chipdb-1k.txt.gz chipdb-8k.txt.gz chipdb-384.txt.gz chipdb-5k.txt.gz chipdb-lm4k.txt.gz chipdb-u4k.txt.gz
|
||||
rm -f icebox.pyc iceboxdb.pyc
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
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 chipdb-384.txt.gz $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-1k.txt.gz $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-8k.txt.gz $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-5k.txt.gz $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-u4k.txt.gz $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
cp chipdb-lm4k.txt.gz $(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)
|
||||
|
|
@ -97,11 +103,11 @@ uninstall:
|
|||
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
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-384.txt.gz
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-1k.txt.gz
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-8k.txt.gz
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-lm4k.txt.gz
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/chipdb-u4k.txt.gz
|
||||
-rmdir $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox
|
||||
|
||||
.PHONY: all check clean install uninstall
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
import icebox
|
||||
from icebox import re_match_cached, re_sub_cached, re_search_cached
|
||||
import getopt, sys, re, os
|
||||
import zlib
|
||||
|
||||
strip_comments = False
|
||||
strip_interconn = False
|
||||
|
|
@ -386,10 +387,11 @@ def seg_to_net(seg, default=None):
|
|||
|
||||
if lookup_symbols:
|
||||
text_func.append("// Debug Symbols")
|
||||
with open("/usr/local/share/icebox/chipdb-%s.txt" % ic.device, "r") as f:
|
||||
with open("/usr/local/share/icebox/chipdb-%s.txt.gz" % ic.device, "rb") as f:
|
||||
lines = zlib.decompress(f.read()).decode('utf-8').splitlines()
|
||||
current_net = -1
|
||||
exported_names = dict()
|
||||
for line in f:
|
||||
for line in lines:
|
||||
line = line.split()
|
||||
if len(line) == 0:
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -11,18 +11,18 @@ all: $(PROGRAM_PREFIX)icetime$(EXE)
|
|||
CHIPS=lp384 lp1k lp8k hx1k hx8k up5k u4k
|
||||
|
||||
ifeq ($(EXE),.js)
|
||||
$(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
|
||||
$(PROGRAM_PREFIX)icetime$(EXE): | share/$(CHIPDB_SUBDIR)/chipdb-384.txt.gz share/$(CHIPDB_SUBDIR)/chipdb-1k.txt.gz share/$(CHIPDB_SUBDIR)/chipdb-8k.txt.gz share/$(CHIPDB_SUBDIR)/chipdb-5k.txt.gz
|
||||
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-384.txt: ../icebox/chipdb-384.txt
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-384.txt.gz: ../icebox/chipdb-384.txt.gz
|
||||
mkdir -p share/$(CHIPDB_SUBDIR)
|
||||
cp $< $@
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-1k.txt: ../icebox/chipdb-1k.txt
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-1k.txt.gz: ../icebox/chipdb-1k.txt.gz
|
||||
mkdir -p share/$(CHIPDB_SUBDIR)
|
||||
cp $< $@
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-8k.txt: ../icebox/chipdb-8k.txt
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-8k.txt.gz: ../icebox/chipdb-8k.txt.gz
|
||||
mkdir -p share/$(CHIPDB_SUBDIR)
|
||||
cp $< $@
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-5k.txt: ../icebox/chipdb-5k.txt
|
||||
share/$(CHIPDB_SUBDIR)/chipdb-5k.txt.gz: ../icebox/chipdb-5k.txt.gz
|
||||
mkdir -p share/$(CHIPDB_SUBDIR)
|
||||
cp $< $@
|
||||
override LDFLAGS += --embed-file share
|
||||
|
|
@ -31,7 +31,7 @@ endif
|
|||
$(PROGRAM_PREFIX)icetime$(EXE): icetime.o iceutil.o $(addsuffix .o, $(addprefix timings-, $(CHIPS)))
|
||||
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
||||
|
||||
timings-%.cc: timings.py ../icefuzz/timings_%.txt
|
||||
timings-%.cc: timings.py ../icefuzz/timings_%.txt.gz
|
||||
$(PYTHON3) timings.py $* > $@
|
||||
|
||||
.PRECIOUS: timings-%.cc
|
||||
|
|
@ -40,7 +40,7 @@ install: all
|
|||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
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/
|
||||
cp ../icefuzz/timings_*.txt.gz $(DESTDIR)$(PREFIX)/share/$(PROGRAM_PREFIX)icebox/
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM_PREFIX)icetime$(EXE)
|
||||
|
|
|
|||
|
|
@ -159,20 +159,20 @@ std::string find_chipdb(std::string config_device)
|
|||
#else
|
||||
homepath += getenv("HOME");
|
||||
#endif
|
||||
homepath += std::string(&PREFIX[1]) + "/" CHIPDB_SUBDIR "/chipdb-" + config_device + ".txt";
|
||||
homepath += std::string(&PREFIX[1]) + "/" CHIPDB_SUBDIR "/chipdb-" + config_device + ".txt.gz";
|
||||
if (verbose)
|
||||
fprintf(stderr, "Looking for chipdb '%s' at %s\n", config_device.c_str(), homepath.c_str());
|
||||
if (file_test_open(homepath))
|
||||
return homepath;
|
||||
}
|
||||
|
||||
std::string prefixpath = PREFIX "/share/" CHIPDB_SUBDIR "/chipdb-" + config_device + ".txt";
|
||||
std::string prefixpath = PREFIX "/share/" CHIPDB_SUBDIR "/chipdb-" + config_device + ".txt.gz";
|
||||
if (verbose)
|
||||
fprintf(stderr, "Looking for chipdb '%s' at %s\n", config_device.c_str(), prefixpath.c_str());
|
||||
if (file_test_open(prefixpath))
|
||||
return prefixpath;
|
||||
|
||||
std::string relbinarypath = proc_self_dirname() + "../share/" CHIPDB_SUBDIR "/chipdb-" + config_device + ".txt";
|
||||
std::string relbinarypath = proc_self_dirname() + "../share/" CHIPDB_SUBDIR "/chipdb-" + config_device + ".txt.gz";
|
||||
if (verbose)
|
||||
fprintf(stderr, "Looking for chipdb '%s' at %s\n", config_device.c_str(), relbinarypath.c_str());
|
||||
if (file_test_open(relbinarypath))
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import re
|
||||
import sys
|
||||
import zlib
|
||||
|
||||
print("// auto-generated by timings.py from ../icefuzz/timings_*.txt")
|
||||
print("#include <string>")
|
||||
|
|
@ -57,5 +58,6 @@ else:
|
|||
chips = "lp384 lp1k lp8k hx1k hx8k up5k".split()
|
||||
|
||||
for db in chips:
|
||||
with open("../icefuzz/timings_%s.txt" % db, "r") as f:
|
||||
timings_to_c(db, f);
|
||||
with open("../icefuzz/timings_%s.txt.gz" % db, "rb") as f:
|
||||
decompressed = zlib.decompress(f.read())
|
||||
timings_to_c(db, decompressed.decode('utf-8').splitlines());
|
||||
|
|
|
|||
Loading…
Reference in New Issue