summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2004-09-23 07:34:47 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2004-09-23 07:34:47 (GMT)
commitaf151f1d8b34c8e80c2426942e2f26fd804ea6b1 (patch)
tree4df005118f0d538b3e47fade2195c6b968aab257
parentaeeef55ad117b062156fcac5b197c3f440eb0e1c (diff)
downloadpinlist-af151f1d8b34c8e80c2426942e2f26fd804ea6b1.zip
pinlist-af151f1d8b34c8e80c2426942e2f26fd804ea6b1.tar.gz
pinlist-af151f1d8b34c8e80c2426942e2f26fd804ea6b1.tar.bz2
pinlist-af151f1d8b34c8e80c2426942e2f26fd804ea6b1.tar.xz
Add support for outputting .qsf (Quartus II 4.x) as well as .csfpinlist-3
(Quartus II 2.x/3.x)
-rw-r--r--Makefile8
-rwxr-xr-xpin2qsf.pl12
2 files changed, 18 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 3e00c5c..52ff829 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,13 @@
-FILES := $(patsubst %.pins,%.csf,$(wildcard *.pins))
+FILES := $(patsubst %.pins,%.csf,$(wildcard *.pins)) \
+ $(patsubst %.pins,%.qsf,$(wildcard *.pins))
all : $(FILES)
%.csf: %.pins pin2csf.pl
perl pin2csf.pl < $< > $@ || rm -f $@
+%.qsf: %.pins pin2qsf.pl
+ perl pin2qsf.pl < $< > $@ || rm -f $@
+
clean:
- rm -f *.csf
+ rm -f *.csf *.qsf
diff --git a/pin2qsf.pl b/pin2qsf.pl
new file mode 100755
index 0000000..7ffbc4c
--- /dev/null
+++ b/pin2qsf.pl
@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+
+while ( defined($line = <STDIN>) ) {
+ chomp $line;
+ $line =~ s/^\#.*$//; # Remove comments
+
+ if ( $line =~ /^\s*(\S+)\s+(\S+)/ ) {
+ $pin = $1;
+ $signal = $2;
+ print "set_location_assignment PIN_\U${pin}\E -to \Q${signal}\E\n";
+ }
+}