diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-05-28 15:25:31 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-05-28 15:32:04 +0200 |
commit | 4c2c0ea503bd38cc637e0c3279cb0d508d831594 (patch) | |
tree | aa249472211edd34202cac2a4f5034b466d5adce /src/ee/souffle | |
parent | 79ee5e3c64c0140a61324914d24049478a9cf7f5 (diff) | |
download | ee-python-4c2c0ea503bd38cc637e0c3279cb0d508d831594.tar.gz ee-python-4c2c0ea503bd38cc637e0c3279cb0d508d831594.tar.bz2 ee-python-4c2c0ea503bd38cc637e0c3279cb0d508d831594.tar.xz ee-python-4c2c0ea503bd38cc637e0c3279cb0d508d831594.zip |
part-validate-parts: Better output, yielding a message even if
everything is ok.
ninja: Include the digikey.dl as a dependency even if custom is used.
digikey.dl: More rules.
Diffstat (limited to 'src/ee/souffle')
-rw-r--r-- | src/ee/souffle/digikey.dl | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/ee/souffle/digikey.dl b/src/ee/souffle/digikey.dl index 06123ea..940e31d 100644 --- a/src/ee/souffle/digikey.dl +++ b/src/ee/souffle/digikey.dl @@ -2,5 +2,30 @@ .output fact -fact(part, "http://purl.org/ee/fact-type/footprint", "1005") :- - fact(part, "http://purl.org/ee/digikey-fact-key#16", "0402 (1005 Metric)"). +#define RESISTANCE "http://purl.org/ee/digikey-fact-key#2085" +#define CAPACITANCE "http://purl.org/ee/digikey-fact-key#2049" +#define SURFACE_MOUNT_LAND_SIZE "http://purl.org/ee/digikey-fact-key#884" +#define PACKAGE "http://purl.org/ee/digikey-fact-key#16" +#define MOUNTING_TYPE "http://purl.org/ee/digikey-fact-key#69" + +/* +I though this rule would be good enough, but I keep on getting errors like this: + +warning: wrong index position provided by substr("DO-21",6,5) functor. + +fact(part, "http://purl.org/ee/fact-type/footprint", res) :- + fact(part, PACKAGE, package), + match(".*\([0-9][0-9][0-9][0-9] Metric\)", package), + res_ = substr(package, 0, strlen(package)-8), + res = substr(res_, 6, strlen(res_)) + . +*/ + +.decl dk_to_ipc(dk:symbol, ipc:symbol) + +dk_to_ipc("0402 (1005 Metric)", "1005"). +dk_to_ipc("0805 (2012 Metric)", "2012"). + +fact(part, "http://purl.org/ee/fact-type/footprint", ipc) :- + fact(part, "http://purl.org/ee/digikey-fact-key#16", dk), + dk_to_ipc(dk, ipc). |