From 9cf0a7e40c2439c3d3c0eb3cbc6e1cf8275be819 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Fri, 7 Sep 2012 21:03:20 +0800 Subject: [PATCH 1/6] ignore error on rmdir --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f176368..d165344 100644 --- a/Makefile +++ b/Makefile @@ -163,7 +163,7 @@ compare.%: xc6slx9_empty.% clean: rm -f $(foreach test,$(TESTS),"autotest.out/autotest_$(test).diff_to_gold") rm -f $(foreach test,$(TESTS),"autotest.out/autotest_$(test).log") - rmdir --ignore-fail-on-non-empty autotest.out + rmdir --ignore-fail-on-non-empty autotest.out || exit 0 rm -f draw_svg_tiles draw_svg_tiles.o \ new_fp new_fp.o \ helper.o $(MODEL_OBJ) hstrrep hstrrep.o \ From 2f25faf04bb5d538f118412f193f0a72b5c78885 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Fri, 7 Sep 2012 21:07:54 +0800 Subject: [PATCH 2/6] only install fp2bit and bit2fp on fpgatools --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d165344..a6c599c 100644 --- a/Makefile +++ b/Makefile @@ -188,7 +188,7 @@ clean: install: all mkdir -p $(DESTDIR)/$(PREFIX)/bin/ - install -m 755 new_fp $(DESTDIR)/$(PREFIX)/bin/ + install -m 755 fp2bit $(DESTDIR)/$(PREFIX)/bin/ install -m 755 bit2fp $(DESTDIR)/$(PREFIX)/bin/ uninstall: - rm -f $(DESTDIR)/$(PREFIX)/bin/{new_fp,bit2fp} + rm -f $(DESTDIR)/$(PREFIX)/bin/{fp2bit,bit2fp} From 9938920fe31906ddb47ea3446eb26c4c6a54d67a Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Fri, 7 Sep 2012 21:45:02 +0800 Subject: [PATCH 3/6] debian: report a ITP bug for fpgatools package --- debian/changelog | 6 +++--- debian/rules | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index fa0cc3f..e212174 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -fpgatools (0.0+201208) unstable; urgency=low +fpgatools (0.0+201209) unstable; urgency=low - * New snapshot, taken from commit 6986d24 - * Initial release. (Closes: #XXXXXX) + * New snapshot, taken from commit 6de2097 + * Initial release. (Closes: #686949) -- Xiangfu Liu Tue, 14 Aug 2012 10:03:41 +0800 diff --git a/debian/rules b/debian/rules index e76776d..2c8a06b 100755 --- a/debian/rules +++ b/debian/rules @@ -19,6 +19,10 @@ override_dh_installchangelogs: awk -f debian/changelog.upstream.awk dh_installchangelogs debian/changelog.upstream +# Remove auto test for fast develop +# will include auto_test in the end +override_dh_auto_test: + opt_optimize = CFLAGS="-g -O2" opt_no_act = opt_quiet = From f4bb5dad5e3939363033ee150832a74ffe2fd7a0 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Sat, 8 Sep 2012 11:47:34 +0800 Subject: [PATCH 4/6] create static lib files: libfpga-bit.a libfpga-control.a libfpga-cores.a libfpga-floorplan.a libfpga-model.a --- Makefile | 64 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index a6c599c..e7e0c93 100644 --- a/Makefile +++ b/Makefile @@ -13,13 +13,17 @@ PREFIX ?= /usr/local CPP := $(CPP) # make sure changing CC won't affect CPP CC_normal := $(CC) +AR_normal := $(AR) rsc CC_quiet = @echo " CC " $@ && $(CC_normal) +AR_quiet = @echo " AR " $@ && $(AR_normal) ifeq ($(V),1) CC = $(CC_normal) + AR = $(AR_normal) else CC = $(CC_quiet) + AR = $(AR_quiet) endif # ----- Rules ----------------------------------------------------------------- @@ -37,7 +41,15 @@ CFLAGS += -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations \ CFLAGS += `pkg-config libxml-2.0 --cflags` LDLIBS += `pkg-config libxml-2.0 --libs` -MODEL_OBJ = model_main.o model_tiles.o model_devices.o model_ports.o model_conns.o model_switches.o model_helper.o +LIBFPGA_BIT_OBJS = bit_frames.o bit_regs.o +LIBFPGA_MODEL_OBJS = model_main.o model_tiles.o model_devices.o \ + model_ports.o model_conns.o model_switches.o model_helper.o +LIBFPGA_FLOORPLAN_OBJS = floorplan.o +LIBFPGA_CONTROL_OBJS = control.o +LIBFPGA_CORES_OBJS = parts.o helper.o + +#- libfpga-test autotest suite +#- libfpga-design larger design elements on top of libfpga-control all: new_fp fp2bit bit2fp draw_svg_tiles \ autotest hstrrep sort_seq merge_seq pair2net @@ -56,21 +68,23 @@ autotest_%.log: autotest fp2bit bit2fp @mkdir -p $(@D) ./autotest --test=$(*F) 2>&1 >$@ -autotest: autotest.o $(MODEL_OBJ) floorplan.o control.o helper.o model.h +autotest: autotest.o model.h libfpga-model.a libfpga-floorplan.a \ + libfpga-control.a libfpga-cores.a autotest.o: model.h floorplan.h control.h -new_fp: new_fp.o $(MODEL_OBJ) floorplan.o helper.o control.o +new_fp: new_fp.o libfpga-model.a libfpga-floorplan.a libfpga-cores.a \ + libfpga-control.a new_fp.o: new_fp.c floorplan.h model.h helper.h control.h -fp2bit: fp2bit.o $(MODEL_OBJ) floorplan.o control.o bit_regs.o bit_frames.o \ - helper.o parts.o +fp2bit: fp2bit.o libfpga-model.a libfpga-bit.a libfpga-floorplan.a \ + libfpga-control.a libfpga-cores.a fp2bit.o: fp2bit.c model.h floorplan.h bit.h helper.h -bit2fp: bit2fp.o $(MODEL_OBJ) floorplan.o control.o bit_regs.o \ - bit_frames.o helper.o parts.o +bit2fp: bit2fp.o libfpga-model.a libfpga-bit.a libfpga-floorplan.a \ + libfpga-control.a libfpga-cores.a bit2fp.o: bit2fp.c model.h floorplan.h bit.h helper.h @@ -84,23 +98,24 @@ parts.o: parts.c parts.h control.o: control.c control.h model.h -draw_svg_tiles: draw_svg_tiles.o $(MODEL_OBJ) helper.o control.o +draw_svg_tiles: draw_svg_tiles.o libfpga-model.a libfpga-cores.a \ + libfpga-control.a draw_svg_tiles.o: draw_svg_tiles.c model.h helper.h -pair2net: pair2net.o helper.o +pair2net: pair2net.o libfpga-cores.a pair2net.o: pair2net.c helper.h -sort_seq: sort_seq.o helper.o +sort_seq: sort_seq.o libfpga-cores.a sort_seq.o: sort_seq.c helper.h -merge_seq: merge_seq.o helper.o +merge_seq: merge_seq.o libfpga-cores.a merge_seq.o: merge_seq.c helper.h -hstrrep: hstrrep.o helper.o +hstrrep: hstrrep.o libfpga-cores.a helper.o: helper.c helper.h @@ -118,6 +133,21 @@ model_switches.o: model_switches.c model.h model_helper.o: model_helper.c model.h +libfpga-cores.a: $(LIBFPGA_CORES_OBJS) + $(AR) $@ $^ + +libfpga-bit.a: $(LIBFPGA_BIT_OBJS) + $(AR) $@ $^ + +libfpga-model.a: $(LIBFPGA_MODEL_OBJS) + $(AR) $@ $^ + +libfpga-floorplan.a: $(LIBFPGA_FLOORPLAN_OBJS) + $(AR) $@ $^ + +libfpga-control.a: $(LIBFPGA_CONTROL_OBJS) + $(AR) $@ $^ + xc6slx9_empty.fp: new_fp ./new_fp > $@ @@ -164,16 +194,18 @@ clean: rm -f $(foreach test,$(TESTS),"autotest.out/autotest_$(test).diff_to_gold") rm -f $(foreach test,$(TESTS),"autotest.out/autotest_$(test).log") rmdir --ignore-fail-on-non-empty autotest.out || exit 0 - rm -f draw_svg_tiles draw_svg_tiles.o \ + rm -f $(LIBFPGA_BIT_OBJS) $(LIBFPGA_MODEL_OBJS) $(LIBFPGA_FLOORPLAN_OBJS) \ + $(LIBFPGA_CONTROL_OBJS) $(LIBFPGA_CORES_OBJS) \ + draw_svg_tiles draw_svg_tiles.o \ new_fp new_fp.o \ - helper.o $(MODEL_OBJ) hstrrep hstrrep.o \ + hstrrep hstrrep.o \ sort_seq sort_seq.o \ merge_seq merge_seq.o \ - autotest autotest.o control.o floorplan.o \ + autotest autotest.o \ fp2bit fp2bit.o \ bit2fp bit2fp.o \ - bit_regs.o bit_frames.o parts.o \ pair2net pair2net.o \ + libfpga-bit.a libfpga-control.a libfpga-cores.a libfpga-floorplan.a libfpga-model.a \ xc6slx9_empty.fp xc6slx9.svg \ xc6slx9_empty.tiles xc6slx9_empty.devs xc6slx9_empty.conns \ xc6slx9_empty.ports xc6slx9_empty.sw xc6slx9_empty.cnets \ From 79e9453eebfd2280cca768cdce4f397dcc76001b Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Sat, 8 Sep 2012 12:23:25 +0800 Subject: [PATCH 5/6] add simple man page for bit2fp and fp2bit --- bit2fp.1 | 23 +++++++++++++++++++++++ fp2bit.1 | 19 +++++++++++++++++++ fpgatools.1 | 6 ------ 3 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 bit2fp.1 create mode 100644 fp2bit.1 delete mode 100644 fpgatools.1 diff --git a/bit2fp.1 b/bit2fp.1 new file mode 100644 index 0000000..bedd706 --- /dev/null +++ b/bit2fp.1 @@ -0,0 +1,23 @@ +.\" Process this file with +.\" groff -man -Tascii bit2fp.1 + +.TH FPGATOOLS: "1" "September 2012" + +.SH NAME +bit2fp \- bitstream to floorplan + +.SH SYNOPSIS +.B bit2fp +.RB [--bit-header] +.RB [--bit-regs] +.RB [--no-model] +.RB [--no-fp-header] +.RB [--dump-routing-mips] +.RB + +.SH AUTHORS +Wolfgang Spraul + +.PP +This is free and unencumbered software released into the public domain. +for details see the UNLICENSE file at the root of the source tree. diff --git a/fp2bit.1 b/fp2bit.1 new file mode 100644 index 0000000..ec0c6d8 --- /dev/null +++ b/fp2bit.1 @@ -0,0 +1,19 @@ +.\" Process this file with +.\" groff -man -Tascii bit2fp.1 + +.TH FPGATOOLS: "1" "September 2012" + +.SH NAME +fp2bit \- floorplan to bitstream + +.SH SYNOPSIS +.B fp2bit +.RB +.RB + +.SH AUTHORS +Wolfgang Spraul + +.PP +This is free and unencumbered software released into the public domain. +for details see the UNLICENSE file at the root of the source tree. diff --git a/fpgatools.1 b/fpgatools.1 deleted file mode 100644 index c8d6640..0000000 --- a/fpgatools.1 +++ /dev/null @@ -1,6 +0,0 @@ -.TH FPGATOOLS: "1" "August 2012" -.SH NAME -fpgatools -.PP -This manual page was written by Xiangfu Liu -It is licensed under the terms of the GNU GPL (version 2 or later). From 17ed8bb49cf273190254efe709e0ecc7366ca7b2 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Sat, 8 Sep 2012 12:28:54 +0800 Subject: [PATCH 6/6] debian: fix man page add libs package --- debian/changelog | 2 +- debian/control | 24 ++++++++++++++++++++++++ debian/fpgatools.install | 2 ++ debian/fpgatools.manpages | 3 ++- debian/libfpga-doc.dirs | 1 + debian/libfpga-doc.install | 1 + debian/libfpga.dirs | 1 + debian/libfpga.install | 2 ++ 8 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 debian/fpgatools.install create mode 100644 debian/libfpga-doc.dirs create mode 100644 debian/libfpga-doc.install create mode 100644 debian/libfpga.dirs create mode 100644 debian/libfpga.install diff --git a/debian/changelog b/debian/changelog index e212174..6c5b0ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -fpgatools (0.0+201209) unstable; urgency=low +fpgatools (0.0+201209-1) unstable; urgency=low * New snapshot, taken from commit 6de2097 * Initial release. (Closes: #686949) diff --git a/debian/control b/debian/control index 0941984..c57b53f 100644 --- a/debian/control +++ b/debian/control @@ -17,3 +17,27 @@ Description: tools for create fpga bitstream text-based file formats no documentation - read the sources automatic test suite + +Package: libfpga +Architecture: any +Section: libs +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: libs for fpgatools + small independent command line utilities, no GUI + plain C, no C++ + simple Makefiles + text-based file formats + no documentation - read the sources + automatic test suite + +Package: libfpga-doc +Architecture: any +Section: doc +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: documents and example for fpgatools + small independent command line utilities, no GUI + plain C, no C++ + simple Makefiles + text-based file formats + no documentation - read the sources + automatic test suite diff --git a/debian/fpgatools.install b/debian/fpgatools.install new file mode 100644 index 0000000..fbbb29f --- /dev/null +++ b/debian/fpgatools.install @@ -0,0 +1,2 @@ +usr/bin/bit2fp +usr/bin/fp2bit diff --git a/debian/fpgatools.manpages b/debian/fpgatools.manpages index 6ee83b0..6bdec63 100644 --- a/debian/fpgatools.manpages +++ b/debian/fpgatools.manpages @@ -1 +1,2 @@ -fpgatools.1 +bit2fp.1 +fp2bit.1 diff --git a/debian/libfpga-doc.dirs b/debian/libfpga-doc.dirs new file mode 100644 index 0000000..fefa396 --- /dev/null +++ b/debian/libfpga-doc.dirs @@ -0,0 +1 @@ +usr/share/fpgatools/ diff --git a/debian/libfpga-doc.install b/debian/libfpga-doc.install new file mode 100644 index 0000000..cf88433 --- /dev/null +++ b/debian/libfpga-doc.install @@ -0,0 +1 @@ +usr/share/fpgatools diff --git a/debian/libfpga.dirs b/debian/libfpga.dirs new file mode 100644 index 0000000..505b6cc --- /dev/null +++ b/debian/libfpga.dirs @@ -0,0 +1 @@ +usr/lib usr/include diff --git a/debian/libfpga.install b/debian/libfpga.install new file mode 100644 index 0000000..50ccbae --- /dev/null +++ b/debian/libfpga.install @@ -0,0 +1,2 @@ +usr/lib/libfpga-*.a +usr/include/