Compare commits

..

No commits in common. "090edaa2d142bb65afa3edde5965e8f0483097b2" and "bb82c00fece8964bf6a6b91f69c32704f1849a24" have entirely different histories.

12 changed files with 8 additions and 583 deletions

7
.gitignore vendored
View file

@ -10,10 +10,3 @@ __pycache__/
fpga/quartus
fpga/db/
fpga/incremental_db/
thhor_crs.xy
*.gbr
*.cnc
*.zip
gerber/*.pdf
gerber/*.odt
gerber/thhor_crs-*.png

View file

@ -1,3 +0,0 @@
PROJ = thhor_crs
VERSION = v01
include gerber.makefile

View file

@ -1,28 +0,0 @@
# Project thhor_crs version v01
Six layer rigid PCB, 6mil/8mil rules, 0.3mm vias, 8mil annular
- Size: 60x80 mm²
- Thickness: 1.6 mm.
- With soldermask, no silk.
- Surface finish HAL.
## Copper layer order:
- thhor_crs.top.gbr top side copper
- thhor_crs.signal.gbr inner routing
- thhor_crs.grounds.gbr power return planes
- thhor_crs.power.gbr power planes
- thhor_crs.ground.gbr chassis/analog ground
- thhor_crs.bottom.gbr back side copper
## Mechanical layers
- thhor_crs.plated-drill.cnc drill file
- thhor_crs.outline.gbr board outline
- thhor_crs.topmask.gbr soldermask top
- thhor_crs.bottommask.gbr soldermask bottom
## Pretty picture
![gerbv export](thhor_crs.png)

View file

@ -1,85 +0,0 @@
#! /usr/bin/python3
from fileinput import input
from sys import stdout, argv
from getopt import getopt
oo,ff = getopt(argv[1:], "hH:")
hierarchy = '/'
for o,v in oo:
if o=="-h":
hierarchy = None
if o=="-H":
hierarchy = v
headers=[]
items=[]
for l in input(ff):
# header lines start with a hash
if l[0]=='#':
headers.append(l)
continue
# everything else is a parts, four komma separated fields
item = l.split(',')
count = int(item[0])
footprint = item[1].strip('"')
value = item[2].strip('"')
# the last field is a space separated list of refdes
parts = item[3].split()
parts = [i for i in parts if i != "(unknown)"]
parts.sort()
prefix = ""
ppp = []
for p in parts:
# hierachical refdes Xn/Rm
if hierarchy:
pp = p.split(hierarchy,1)
else:
pp = ["",p]
# toplevel parts have an empty prefix
if len(pp)==1:
pp = ["",p]
# collect all parts with the same prefix
if pp[0]==prefix:
ppp.append(p)
continue
# new prefix: emit old refdes list
if ppp:
items.append([footprint,value,prefix,count,ppp])
ppp=[p]
prefix=pp[0]
# emit last refdes list
if ppp:
items.append([footprint,value,prefix,count,ppp])
# sort by footprint/value/prefix
items.sort()
# print headers
for h in headers:
stdout.write(h)
# ten refdes per line
nni = 10
for f,v,x,c,i in items:
# first nni refdes with part attributes
l = len(i[0])
i1 = 0
i2 = 1
while i2<len(i) and l+len(i[i2]) < 40:
l += len(i[i2])+1
i2 += 1
stdout.write("%-7.7s %-16.16s %3u/%-3u %s\n"
% (f,v,len(i),c," ".join(i[i1:i2])))
# remaining refdes on continuation lines
while i2<len(i):
i1=i2
i2 += 1
l = len(i[i1])
while i2<len(i) and l+len(i[i2]) < 40:
l += len(i[i2])+1
i2 += 1
stdout.write("%33s%s\n" % (""," ".join(i[i1:i2])))

View file

@ -1,38 +0,0 @@
# PROJ = …
# VERSION = v01
GERBERS = $(PROJ).plated-drill.cnc
GVP2MAKE = ./gvp2make.py
GV_OPT = -D600
default: zip bom png
png: $(patsubst %.gvp, %.png, $(wildcard $(PROJ)*.gvp))
%.png: %.gvp $(GERBERS)
$(GVP2MAKE) -o $@ $< -w -B0 -w --background=#ffffff -A group=1.0 -X $(GV_OPT)
zip: $(PROJ)_$(VERSION).zip
GERBER_AWK = '/- +[-a-z_]+\.[-a-z]+\.[-a-z]+ +[a-z]/{print $$2}'
%_$(VERSION).zip: README.md %.plated-drill.cnc
rm -fv $@
zip $@ $< $$(awk $(GERBER_AWK) $<)
%.plated-drill.cnc: ../%.pcb
pcb -x gerber --gerberfile $* --name-style single $<
bom: $(PROJ)_bom.pdf
%.bom: ../%.pcb
pcb -x bom --bomfile $@ $<
%_bom.txt: %.bom
bom.py -h $< > $@
%_bom.pdf: %.bom bom.py
bom.py -h $< | utf82pdf > $@
.PRECIOUS: %.plated-drill.cnc %.png

View file

@ -1,159 +0,0 @@
#!/usr/bin/python3
# $Id: gvp2make.py 8411 2022-02-28 11:50:10Z stephan $
# This script is free software (c) 2010 Stephan I. Böttcher
# Distributed under GNU GPL Version 2 or later.
"""
Julian <thepurlieu@gmail.com> writes:
> Stephan,
> Yes, you can do it, however you can't use the project file for the
> process. Here's how:
>
> gerbv --export=png --dpi=600 --foreground=#ff0000ff
> --foreground=#00ff0088 file1.gbx file2.gbx .......and so on
>
> Hope this helps. Cheers--
"""
usage="""
Prints a gerbv commandline to export a project to png,
with adjusted layer opacities.
Options:
-h print this help
-g gerbv path of the gerbv executable
-x png export format
-o layout.png~ output file
-D 600 dpi resolution
-w <option> gerbv option
-A layer=alpha alpha between 0 and 1.0
-X execute the command
-M print Makefile to stdout
"""
options=[
"gerbv",
"--export=png",
"--output=layout.png~",
"--dpi=600",
]
"""
The layer names are the second dot-separated part of the filename.
Digits are stripped from the layer name and tried again.
"""
opacities = {
"DEFAULT": 0.7,
"frontsilk": 1.0,
"topsilk": 1.0,
"bottomsilk": 1.0,
"backsilk": 1.0,
"outline": 1.0,
"plated-drill": 1.0,
"frontpaste": 0.5,
"backpaste": 0.5,
"front": 0.3,
"component": 0.3,
"back": 0.3,
"backside": 0.3,
"group": 0.2,
"signal": 0.2,
"ground": 0.1,
"grounds": 0.1,
"power": 0.1,
"nocoating": 0.5,
}
execcmd=False
makefile=False
import sys, os
from getopt import gnu_getopt as getopt
oo,ifile = getopt(sys.argv[1:], "hg:x:o:w:D:XMA:")
for o,v in oo:
if o=="-h":
print("Synopsis:", sys.argv[0], "<options> gerbv-project-file", usage)
sys.exit()
if o=="-g":
options[0]=v
if o=="-x":
options[1]="--export=%s" % v
if o=="-o":
options[2]="--output=%s" % v
if o=="-D":
options[3]="--dpi=%s" % v
if o=="-w":
options.append(v)
if o=="-X":
execcmd=True
if o=="-M":
makefile=True
if o=="-A":
vv=v.split("=")
opacities[vv[0]]=float(vv[1])
def parselayer(l):
r = {}
for ll in l.strip().split("(cons"):
lll = ll.strip().split(" ",1)
r[lll[0].strip("'#()")] = lll[1].strip("#()")
return r
layers = {}
from fileinput import input
LL=""
for l in input(ifile):
LL+=l.strip()
nopen=0
nclose=0
for L in LL:
if L=='(':
nopen += 1
if L==')':
nclose += 1
if nopen==nclose:
ll = parselayer(LL)
if "define-layer!" in ll and "visible" in ll and ll["visible"]=="t":
layers[int(ll["define-layer!"])] = ll
LL=""
files=[]
lnumbers = list(layers.keys())
lnumbers.sort()
for n in lnumbers:
ll = layers[n]
fn = ll["filename"].strip('"')
files.append(fn)
try:
ltype = fn.split(".")[1]
try:
opacity = opacities[ltype]
except KeyError:
opacity = opacities[ltype.strip("0123456789")]
except:
opacity = opacities["DEFAULT"]
color = [int(c)/65536. for c in ll["color"].split()]
if "alpha" in ll:
opacity = int(ll["alpha"])/65536
if len(color)<4:
color.append(opacity)
options.append("--foreground=#%02x%02x%02x%02x" % tuple(
[int(c*255) for c in color]))
if makefile:
target = options[2].split("=")[1]
print ("GERBV="+options[0])
print ("FORMAT="+options[1].split("=")[1])
print ("DPI="+options[3].split("=")[1])
print (target+": \\\n\t "+" \\\n\t ".join(files))
print ("\t$(GERBV) --output=$@ --export=$(FORMAT) --dpi=$(DPI) \\")
print ("\t "+" \\\n\t ".join(options[4:])+" \\\n\t $<")
else:
cmd = " ".join(options+files)
print (cmd)
if execcmd:
os.system(cmd)

View file

@ -1,83 +0,0 @@
(gerbv-file-version! "2.0A")
(define-layer! 14 (cons 'filename "thhor_crs.ground.gbr")
(cons 'visible #f)
(cons 'color #(27113 27113 27113))
(cons 'alpha #(12079))
)
(define-layer! 13 (cons 'filename "thhor_crs.grounds.gbr")
(cons 'visible #f)
(cons 'color #(65535 50491 34053))
(cons 'alpha #(27242))
)
(define-layer! 12 (cons 'filename "thhor_crs.power.gbr")
(cons 'visible #f)
(cons 'color #(65535 34990 63468))
(cons 'alpha #(23130))
)
(define-layer! 11 (cons 'filename "thhor_crs.signal.gbr")
(cons 'visible #f)
(cons 'color #(0 24400 24400))
(cons 'alpha #(38293))
)
(define-layer! 10 (cons 'filename "thhor_crs.bottom.gbr")
(cons 'visible #t)
(cons 'color #(60294 24022 3320))
(cons 'alpha #(30326))
)
(define-layer! 9 (cons 'filename "thhor_crs.bottompaste.gbr")
(cons 'visible #t)
(cons 'color #(65535 19099 1954))
)
(define-layer! 8 (cons 'filename "thhor_crs.bottommask.gbr")
(cons 'visible #f)
(cons 'color #(29344 65535 28765))
)
(define-layer! 7 (cons 'filename "thhor_crs.top.gbr")
(cons 'visible #f)
(cons 'color #(63383 4945 17070))
(cons 'alpha #(27242))
)
(define-layer! 6 (cons 'filename "thhor_crs.toppaste.gbr")
(cons 'visible #f)
(cons 'color #(65535 2469 0))
(cons 'alpha #(23644))
)
(define-layer! 5 (cons 'filename "thhor_crs.topmask.gbr")
(cons 'inverted #t)
(cons 'visible #f)
(cons 'color #(25200 65535 30627))
)
(define-layer! 4 (cons 'filename "thhor_crs.plated-drill.cnc")
(cons 'visible #t)
(cons 'color #(61307 61307 61307))
(cons 'alpha #(65535))
(cons 'attribs (list
(list 'autodetect 'Boolean 1)
(list 'zero_suppression 'Enum 0)
(list 'units 'Enum 0)
(list 'digits 'Integer 4)
))
)
(define-layer! 3 (cons 'filename "thhor_crs.bottomsilk.gbr")
(cons 'visible #t)
(cons 'color #(0 0 0))
(cons 'alpha #(65535))
)
(define-layer! 2 (cons 'filename "thhor_crs.topsilk.gbr")
(cons 'visible #f)
(cons 'color #(0 0 0))
(cons 'alpha #(65535))
)
(define-layer! 1 (cons 'filename "thhor_crs.outline.gbr")
(cons 'visible #t)
(cons 'color #(65535 47429 0))
(cons 'alpha #(65535))
)
(define-layer! 0 (cons 'filename "thhor_crs.fab.gbr")
(cons 'visible #f)
(cons 'color #(0 0 0))
)
(define-layer! -1 (cons 'filename ".")
(cons 'color #(65535 65535 65535))
)
(set-render-type! 3)

View file

@ -1,82 +0,0 @@
(gerbv-file-version! "2.0A")
(define-layer! 14 (cons 'filename "thhor_crs.ground.gbr")
(cons 'visible #f)
(cons 'color #(27113 27113 27113))
(cons 'alpha #(12079))
)
(define-layer! 13 (cons 'filename "thhor_crs.grounds.gbr")
(cons 'visible #f)
(cons 'color #(65535 50491 34053))
(cons 'alpha #(27242))
)
(define-layer! 12 (cons 'filename "thhor_crs.power.gbr")
(cons 'visible #f)
(cons 'color #(65535 34990 63468))
(cons 'alpha #(23130))
)
(define-layer! 11 (cons 'filename "thhor_crs.signal.gbr")
(cons 'visible #f)
(cons 'color #(0 24400 24400))
(cons 'alpha #(38293))
)
(define-layer! 10 (cons 'filename "thhor_crs.bottom.gbr")
(cons 'visible #f)
(cons 'color #(60294 24022 3320))
)
(define-layer! 9 (cons 'filename "thhor_crs.bottompaste.gbr")
(cons 'visible #f)
(cons 'color #(63479 30069 17733))
)
(define-layer! 8 (cons 'filename "thhor_crs.bottommask.gbr")
(cons 'visible #f)
(cons 'color #(29344 65535 28765))
)
(define-layer! 7 (cons 'filename "thhor_crs.top.gbr")
(cons 'visible #t)
(cons 'color #(63383 4945 17070))
(cons 'alpha #(27242))
)
(define-layer! 6 (cons 'filename "thhor_crs.toppaste.gbr")
(cons 'visible #t)
(cons 'color #(65535 2469 0))
(cons 'alpha #(23644))
)
(define-layer! 5 (cons 'filename "thhor_crs.topmask.gbr")
(cons 'inverted #t)
(cons 'visible #f)
(cons 'color #(25200 65535 30627))
)
(define-layer! 4 (cons 'filename "thhor_crs.plated-drill.cnc")
(cons 'visible #t)
(cons 'color #(61307 61307 61307))
(cons 'alpha #(65535))
(cons 'attribs (list
(list 'autodetect 'Boolean 1)
(list 'zero_suppression 'Enum 0)
(list 'units 'Enum 0)
(list 'digits 'Integer 4)
))
)
(define-layer! 3 (cons 'filename "thhor_crs.bottomsilk.gbr")
(cons 'visible #f)
(cons 'color #(0 0 0))
(cons 'alpha #(65535))
)
(define-layer! 2 (cons 'filename "thhor_crs.topsilk.gbr")
(cons 'visible #t)
(cons 'color #(0 0 0))
(cons 'alpha #(65535))
)
(define-layer! 1 (cons 'filename "thhor_crs.outline.gbr")
(cons 'visible #t)
(cons 'color #(65535 47429 0))
(cons 'alpha #(65535))
)
(define-layer! 0 (cons 'filename "thhor_crs.fab.gbr")
(cons 'visible #f)
(cons 'color #(0 0 0))
)
(define-layer! -1 (cons 'filename ".")
(cons 'color #(65535 65535 65535))
)
(set-render-type! 3)

View file

@ -1,82 +0,0 @@
(gerbv-file-version! "2.0A")
(define-layer! 14 (cons 'filename "thhor_crs.ground.gbr")
(cons 'visible #f)
(cons 'color #(27113 27113 27113))
(cons 'alpha #(12079))
)
(define-layer! 13 (cons 'filename "thhor_crs.grounds.gbr")
(cons 'visible #f)
(cons 'color #(65535 50491 34053))
(cons 'alpha #(27242))
)
(define-layer! 12 (cons 'filename "thhor_crs.power.gbr")
(cons 'visible #t)
(cons 'color #(65535 34990 63468))
(cons 'alpha #(23130))
)
(define-layer! 11 (cons 'filename "thhor_crs.signal.gbr")
(cons 'visible #t)
(cons 'color #(0 24400 24400))
(cons 'alpha #(38293))
)
(define-layer! 10 (cons 'filename "thhor_crs.bottom.gbr")
(cons 'visible #f)
(cons 'color #(60294 24022 3320))
)
(define-layer! 9 (cons 'filename "thhor_crs.bottompaste.gbr")
(cons 'visible #f)
(cons 'color #(63479 30069 17733))
)
(define-layer! 8 (cons 'filename "thhor_crs.bottommask.gbr")
(cons 'visible #f)
(cons 'color #(29344 65535 28765))
)
(define-layer! 7 (cons 'filename "thhor_crs.top.gbr")
(cons 'visible #t)
(cons 'color #(63383 4945 17070))
(cons 'alpha #(27242))
)
(define-layer! 6 (cons 'filename "thhor_crs.toppaste.gbr")
(cons 'visible #t)
(cons 'color #(65535 2469 0))
(cons 'alpha #(23644))
)
(define-layer! 5 (cons 'filename "thhor_crs.topmask.gbr")
(cons 'inverted #t)
(cons 'visible #f)
(cons 'color #(25200 65535 30627))
)
(define-layer! 4 (cons 'filename "thhor_crs.plated-drill.cnc")
(cons 'visible #t)
(cons 'color #(61307 61307 61307))
(cons 'alpha #(65535))
(cons 'attribs (list
(list 'autodetect 'Boolean 1)
(list 'zero_suppression 'Enum 0)
(list 'units 'Enum 0)
(list 'digits 'Integer 4)
))
)
(define-layer! 3 (cons 'filename "thhor_crs.bottomsilk.gbr")
(cons 'visible #f)
(cons 'color #(0 0 0))
(cons 'alpha #(65535))
)
(define-layer! 2 (cons 'filename "thhor_crs.topsilk.gbr")
(cons 'visible #f)
(cons 'color #(0 0 0))
(cons 'alpha #(65535))
)
(define-layer! 1 (cons 'filename "thhor_crs.outline.gbr")
(cons 'visible #t)
(cons 'color #(65535 47429 0))
(cons 'alpha #(65535))
)
(define-layer! 0 (cons 'filename "thhor_crs.fab.gbr")
(cons 'visible #f)
(cons 'color #(0 0 0))
)
(define-layer! -1 (cons 'filename ".")
(cons 'color #(65535 65535 65535))
)
(set-render-type! 3)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

View file

@ -10,7 +10,7 @@ PolyArea[200000000.000000]
Thermal[0.500000]
DRC[0.1999mm 0.0100mm 0.1500mm 0.10mil 0.3000mm 0.2000mm]
Flags("rubberband,nameonpcb,alldirection,clearnew,locknames,autoburiedvias")
Groups("1,c:5:4:3:2:6,s:7:8")
Groups("1,c:5:3:4:2:6,s:7:8")
Styles["Signal,0.2000mm,0.7000mm,0.3000mm,0.2000mm,0.5000mm:Power,0.6000mm,1.0000mm,0.5000mm,0.2000mm,0.8000mm:Fat,3.0000mm,4.0000mm,2.2000mm,0.2000mm,4.1000mm:Skinny,6.00mil,24.02mil,11.81mil,6.00mil"]
Symbol[' ' 18.00mil]
(
@ -2461,7 +2461,7 @@ Element["" "TSSOP_4_14" "U2" "ATtiny824-XF" 23.0000mm 67.6000mm -0.4000mm -0.400
)
Element["" "HE_100mil_8_2" "J1" "HE100mil" 13.7000mm 75.0000mm -0.5000mm 0.3000mm 1 55 ""]
Element["" "HE_100mil_8_2" "J1" "unknown" 13.7000mm 75.0000mm -0.5000mm 0.3000mm 1 55 ""]
(
Pin[50.00mil 150.00mil 58.00mil 20.00mil 64.00mil 38.00mil "1" "1" ""]
Pin[-50.00mil 150.00mil 58.00mil 20.00mil 64.00mil 38.00mil "2" "2" "thermal(2X)"]
@ -2480,7 +2480,7 @@ Element["" "HE_100mil_8_2" "J1" "HE100mil" 13.7000mm 75.0000mm -0.5000mm 0.3000m
)
Element["" "EQFP144" "U1" "10CL025E144" 23.3500mm 52.5500mm 0.0000 0.0000 1 55 ""]
Element["" "EQFP144" "U1" "unknown" 23.3500mm 52.5500mm 0.0000 0.0000 1 55 ""]
(
Pin[0.0000 0.0000 157.48mil 20.00mil 163.48mil 118.11mil "GND" "0" "square,thermal(3X)"]
Pad[-442.92mil 344.50mil -393.71mil 344.50mil 9.84mil 20.00mil 15.84mil "IO" "144" "square"]
@ -4316,7 +4316,7 @@ Element["" "TSSOP_4_16" "C/U1" "ADC128S102" 41.9000mm 50.4000mm -0.6000mm 0.8000
)
Element["onsolder" "OmneVSM37" "CONN1" "A29200-037" 56.5000mm 20.2000mm 0.9620mm 70.00mil 3 100 "onsolder"]
Element["onsolder" "OmneVSM37" "CONN1" "unknown" 56.5000mm 20.2000mm 0.9620mm 70.00mil 3 100 "onsolder"]
(
Pin[0.0000 -310.00mil 65.00mil 20.00mil 70.00mil 43.00mil "" "0" "thermal(1S)"]
Pin[0.0000 310.00mil 65.00mil 20.00mil 70.00mil 43.00mil "" "0" "thermal(1S)"]
@ -7267,7 +7267,7 @@ Element["hidename" "C0603" "C51" "100nF" 32.0000mm 29.9000mm -0.3000mm -1.1000mm
)
Element["lock" "qsat60x80" "BOARD" "thhor_crs_v01" 5.0000mm 5.0000mm 0.0000 0.0000 0 55 "selected"]
Element["lock" "qsat60x80" "BOARD" "unknown" 5.0000mm 5.0000mm 0.0000 0.0000 0 55 "selected"]
(
Pin[2.5000mm 2.5000mm 3.0000mm 0.4000mm 3.1000mm 2.2000mm "pin" "1" "lock,thermal(1S)"]
Pin[58.5000mm 2.5000mm 3.0000mm 0.4000mm 3.1000mm 2.2000mm "pin" "1" "lock,thermal(1S)"]

View file

@ -9,8 +9,6 @@ T 31740 45540 5 10 1 1 0 4 1
footprint=EQFP144
T 31840 43640 5 15 1 1 0 4 1
refdes=U1
T 27600 40300 5 10 0 1 0 0 1
value=10CL025E144
}
C 22700 43900 1 0 0 ATtiny404.sym
{
@ -3186,8 +3184,6 @@ T 18550 43250 5 10 1 1 0 4 1
refdes=J1
T 17900 41800 5 10 1 1 0 0 1
footprint=HE_100mil_8_2
T 18300 42600 5 10 0 1 0 0 1
value=HE100mil
}
C 18300 42800 1 90 0 generic-power.sym
{
@ -4526,14 +4522,12 @@ C 47200 37400 1 0 1 DB37-1.sym
{
T 45800 37250 5 10 0 0 180 6 1
device=DB37
T 46500 49000 5 10 1 1 0 3 1
T 46700 48900 5 10 1 1 0 3 1
refdes=CONN1
T 47300 47200 5 10 1 1 90 3 1
T 46700 49100 5 10 1 1 0 3 1
footprint=OmneVSM37
T 46700 37300 5 10 1 1 0 0 1
T 46300 49300 5 10 1 1 0 0 1
net=GND:0
T 47300 47900 5 10 1 1 90 0 1
value=A29200-037
}
C 45900 41400 1 180 0 io-1.sym
{
@ -4796,8 +4790,6 @@ T 44700 35500 5 8 1 1 0 4 1
refdes=BOARD
T 44700 35550 5 5 1 1 180 5 1
footprint=qsat60x80
T 44800 35000 5 10 1 1 0 0 1
value=thhor_crs_v01
}
C 44600 34800 1 0 0 gnd-1.sym
C 42600 52500 1 270 0 capacitor-4.sym