parsevect fixes

This commit is contained in:
ha7ilm 2014-11-30 10:37:16 +01:00
parent 4887b3ff91
commit cf98fce94b
3 changed files with 22 additions and 13 deletions

View file

@ -44,7 +44,7 @@ all: clean-vect
@echo Auto-detected optimization parameters: $(PARAMS_SIMD) @echo Auto-detected optimization parameters: $(PARAMS_SIMD)
@echo @echo
c99 $(PARAMS_LOOPVECT) $(PARAMS_SIMD) $(LIBSOURCES) $(PARAMS_LIBS) $(PARAMS_MISC) -fpic -shared -o libcsdr.so c99 $(PARAMS_LOOPVECT) $(PARAMS_SIMD) $(LIBSOURCES) $(PARAMS_LIBS) $(PARAMS_MISC) -fpic -shared -o libcsdr.so
-./parsevect dumpvect*.vect libcsdr.c -./parsevect dumpvect*.vect
c99 $(PARAMS_LOOPVECT) $(PARAMS_SIMD) csdr.c $(PARAMS_LIBS) -L. -lcsdr $(PARAMS_MISC) -o csdr c99 $(PARAMS_LOOPVECT) $(PARAMS_SIMD) csdr.c $(PARAMS_LIBS) -L. -lcsdr $(PARAMS_MISC) -o csdr
arm-cross: clean-vect arm-cross: clean-vect
#note: this doesn't work since having added FFTW #note: this doesn't work since having added FFTW
@ -52,7 +52,7 @@ arm-cross: clean-vect
clean-vect: clean-vect:
rm -f dumpvect*.vect rm -f dumpvect*.vect
clean: clean-vect clean: clean-vect
rm libcsdr.so csdr rm -f libcsdr.so csdr
install: install:
install -m 0755 libcsdr.so /usr/lib install -m 0755 libcsdr.so /usr/lib
install -m 0755 csdr /usr/bin install -m 0755 csdr /usr/bin

View file

@ -324,7 +324,7 @@ E.g. you can send `-0.05 0.02\n`
#### Testbench #### Testbench
`csdr` was tested with GNU Radio Companion flowgraphs. These flowgraphs are available under the directory `grc_tests`, and they require the `gr-ha5kfu` set of blocks for GNU Radio. `csdr` was tested with GNU Radio Companion flowgraphs. These flowgraphs are available under the directory `grc_tests`, and they require the <a href="https://github.com/simonyiszk/gr-ha5kfu">gr-ha5kfu</a> set of blocks for GNU Radio.
## [Licensing] (#licensing) ## [Licensing] (#licensing)

View file

@ -1,4 +1,5 @@
#!/usr/bin/python #!/usr/bin/python2
print "" # python2.7 is required to run parsevect instead of python3
""" """
This software is part of libcsdr, a set of simple DSP routines for This software is part of libcsdr, a set of simple DSP routines for
Software Defined Radio. Software Defined Radio.
@ -30,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
""" """
import sys import sys
import os
try: try:
vectfile=open(sys.argv[1],"r").readlines() vectfile=open(sys.argv[1],"r").readlines()
@ -58,10 +60,17 @@ Colors:
\033[1;0m""" \033[1;0m"""
checkline = lambda k: cfile[linenum-k] if "//@" in cfile[linenum-k] else corresponds checkline = lambda k: cfile[linenum-k] if "//@" in cfile[linenum-k] else corresponds
fallback=False
for row in vectfile: for row in vectfile:
if "LOOP VECTORIZED" in row or "not vectorized" in row: if "LOOP VECTORIZED" in row or "not vectorized" in row:
filename=row.split(":")[0] filename=row.split(":")[0]
if not fallback and not os.path.isfile(filename):
print "parsevect: Log format mismatch (perhaps gcc version is older than 4.8.2). Comments and colors will not be matched to rows."
fallback = True
if fallback:
print row[:-1]
else:
loadcfile(filename) loadcfile(filename)
linenum=int(row.split(":")[1]) linenum=int(row.split(":")[1])
corresponds="//@" corresponds="//@"