1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2025-04-21 12:27:27 +03:00

Avoid leading zeroes in resistance and capacitance values (except 0R)

- boom/lib/e12.inc: several rules produces mal-formed results with leading
  zeroes
- boom/manu/Makefile.common (spotless): added new target to remove
  $(NAME).chr
- boom/manu/Makefile.common (MALFORMED): test for leading zeroes, allowing
  only 0R as an exception
- boom/manu/stackpole/stackpole.gen: catch values < 1 R and convert them
  to mR
This commit is contained in:
Werner Almesberger
2010-10-18 17:23:19 -03:00
parent 9e9eb89f3b
commit 2744057e98
3 changed files with 12 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ UC_NAME = $(shell echo $(NAME) | tr [a-z] [A-Z])
EQU = $(shell ../../boom-config equ)
.PHONY: all test sane
.PHONY: all test spotless sane
all: $(NAME).chr
@@ -17,12 +17,15 @@ test:
LIMIT = sed '1{x;s/.*/--- $(1) ---/p;x;};6{s/.*/.../;q;}'
MALFORMED = @grep '\<T=$(2)\>' $(NAME).chr | \
grep -v '\<$(3)=[0-9][0-9.]*[fnpumkMG]\?$(4)\>' | \
grep -v '\<$(3)=\(0R\|[1-9][0-9.]*[fnpumkMG]\?$(4)\)\>' | \
$(call LIMIT,$(1))
ABSENT = @grep '\<T=$(2)\>' $(NAME).chr | grep -v '\<$(3)=' | \
$(call LIMIT,$(1))
spotless:
rm -f $(NAME).chr
sane:
@# general

View File

@@ -39,6 +39,7 @@ RNCP* -> T=R {
# Adjust multipliers
_R=R(???) -> _R=${_R:1}m
_R=(*)R(*) -> _R=0$_R:1.$_R:2
_R=(*)K(*) -> _R=$_R:1.${_R:2}k
_R=(*)M(*) -> _R=$_R:1.${_R:2}M