hw: components have now part description

This commit is contained in:
Kevin Redon 2011-11-21 10:14:13 +01:00
parent b1c38515fc
commit 730ae7b46c
10 changed files with 1403 additions and 407 deletions

View File

@ -8,6 +8,7 @@ target = "simtrace"
version = IO.read("version").chomp
date = Time.now.strftime("%Y-%m-%d")
revision = `git log --pretty=oneline "#{target}.sch" | wc -l`.chomp.to_i
LIB = "lib/symbols/"
# schema
sch = "#{target}.sch"
@ -19,8 +20,14 @@ vsch = "#{target}_v#{version}.#{revision.to_s.rjust(3,'0')}.sch"
# helper functions
# ================
# read schema
# return a list of components
def read_sch(path)
# get all symbols
symbols = read_symbols(LIB)
# read schema
text = IO.read(path)
# parse all elements
elements = []
element = {}
block = false
@ -28,7 +35,7 @@ def read_sch(path)
l = line.chomp
if l=="{" then
block = true
element[:block] = {}
element[:block] = {} unless element[:block]
elsif l=="}" then
block = false
elsif block then
@ -42,6 +49,11 @@ def read_sch(path)
element = {}
element[:line] = l
element[:type] = l[0,1]
if element[:type]=="C" then
element[:symbol] = l.split(" ")[-1]
# get the default attributes (if any)
element[:bloc] = symbols[element[:symbol]]
end
else
raise "don't know how to handle line: #{l}"
end
@ -49,6 +61,43 @@ def read_sch(path)
return elements
end
# read the attributes from a symbol
# return { name => value }
# warning: it only get uniq attributes (not multiple slots, ...)
def read_symbol(file)
text = IO.read(file)
symbol = {}
block = false
text.each_line do |line|
l = line.chomp
if l=="{" then
block = true
elsif l=="}" then
block = false
elsif block then
next
elsif l.include?("=") then
name = l.split("=")[0]
value = l.split("=")[1..-1]*"="
symbol[name] = value
else
next
end
end
return symbol
end
# read all symbols
# return a list fo symbols { name => symbol } (see read_symbol)
def read_symbols(folder)
symbols = {}
Dir.entries(folder).each do |file|
next unless file =~ /\.sym$/
symbols[file.split("/")[-1]] = read_symbol(folder+"/"+file)
end
return symbols
end
# =========
# the tasks
# =========

View File

@ -1,184 +1,184 @@
v 20110115 2
P 0 2400 300 2400 1 0 0
P 0 2200 300 2200 1 0 0
{
T 0 2400 5 10 0 0 0 0 1
T 0 2200 5 10 0 0 0 0 1
pintype=in
T 355 2395 5 10 1 1 0 0 1
T 355 2195 5 10 1 1 0 0 1
pinlabel=1\_OE\_
T 205 2445 5 10 1 1 0 6 1
T 205 2245 5 10 1 1 0 6 1
pinnumber=1
T 0 2400 5 10 0 0 0 0 1
T 0 2200 5 10 0 0 0 0 1
pinseq=1
}
P 0 2100 300 2100 1 0 0
P 0 1900 300 1900 1 0 0
{
T 0 2100 5 10 0 0 0 0 1
T 0 1900 5 10 0 0 0 0 1
pintype=in
T 355 2095 5 10 1 1 0 0 1
T 355 1895 5 10 1 1 0 0 1
pinlabel=S1
T 205 2145 5 10 1 1 0 6 1
T 205 1945 5 10 1 1 0 6 1
pinnumber=2
T 0 2100 5 10 0 0 0 0 1
T 0 1900 5 10 0 0 0 0 1
pinseq=2
}
P 0 1800 300 1800 1 0 0
P 0 1600 300 1600 1 0 0
{
T 0 1800 5 10 0 0 0 0 1
T 0 1600 5 10 0 0 0 0 1
pintype=out
T 355 1795 5 10 1 1 0 0 1
T 355 1595 5 10 1 1 0 0 1
pinlabel=1B4
T 205 1845 5 10 1 1 0 6 1
T 205 1645 5 10 1 1 0 6 1
pinnumber=3
T 0 1800 5 10 0 0 0 0 1
T 0 1600 5 10 0 0 0 0 1
pinseq=3
}
P 0 1500 300 1500 1 0 0
P 0 1300 300 1300 1 0 0
{
T 0 1500 5 10 0 0 0 0 1
T 0 1300 5 10 0 0 0 0 1
pintype=out
T 355 1495 5 10 1 1 0 0 1
T 355 1295 5 10 1 1 0 0 1
pinlabel=1B3
T 205 1545 5 10 1 1 0 6 1
T 205 1345 5 10 1 1 0 6 1
pinnumber=4
T 0 1500 5 10 0 0 0 0 1
T 0 1300 5 10 0 0 0 0 1
pinseq=4
}
P 0 1200 300 1200 1 0 0
P 0 1000 300 1000 1 0 0
{
T 0 1200 5 10 0 0 0 0 1
T 0 1000 5 10 0 0 0 0 1
pintype=out
T 355 1195 5 10 1 1 0 0 1
T 355 995 5 10 1 1 0 0 1
pinlabel=1B2
T 205 1245 5 10 1 1 0 6 1
T 205 1045 5 10 1 1 0 6 1
pinnumber=5
T 0 1200 5 10 0 0 0 0 1
T 0 1000 5 10 0 0 0 0 1
pinseq=5
}
P 0 900 300 900 1 0 0
P 0 700 300 700 1 0 0
{
T 0 900 5 10 0 0 0 0 1
T 0 700 5 10 0 0 0 0 1
pintype=out
T 355 895 5 10 1 1 0 0 1
T 355 695 5 10 1 1 0 0 1
pinlabel=1B1
T 205 945 5 10 1 1 0 6 1
T 205 745 5 10 1 1 0 6 1
pinnumber=6
T 0 900 5 10 0 0 0 0 1
T 0 700 5 10 0 0 0 0 1
pinseq=6
}
P 0 600 300 600 1 0 0
P 0 400 300 400 1 0 0
{
T 0 600 5 10 0 0 0 0 1
T 0 400 5 10 0 0 0 0 1
pintype=in
T 355 595 5 10 1 1 0 0 1
T 355 395 5 10 1 1 0 0 1
pinlabel=1A
T 205 645 5 10 1 1 0 6 1
T 205 445 5 10 1 1 0 6 1
pinnumber=7
T 0 600 5 10 0 0 0 0 1
T 0 400 5 10 0 0 0 0 1
pinseq=7
}
P 0 300 300 300 1 0 0
P 0 100 300 100 1 0 0
{
T 0 300 5 10 0 0 0 0 1
T 0 100 5 10 0 0 0 0 1
pintype=pwr
T 355 295 5 10 1 1 0 0 1
T 355 95 5 10 1 1 0 0 1
pinlabel=GND
T 205 345 5 10 1 1 0 6 1
T 205 145 5 10 1 1 0 6 1
pinnumber=8
T 0 300 5 10 0 0 0 0 1
T 0 100 5 10 0 0 0 0 1
pinseq=8
}
P 1700 300 1400 300 1 0 0
P 1700 100 1400 100 1 0 0
{
T 1700 300 5 10 0 0 0 0 1
T 1700 100 5 10 0 0 0 0 1
pintype=in
T 1345 295 5 10 1 1 0 6 1
T 1345 95 5 10 1 1 0 6 1
pinlabel=2A
T 1495 345 5 10 1 1 0 0 1
T 1495 145 5 10 1 1 0 0 1
pinnumber=9
T 1700 300 5 10 0 0 0 0 1
T 1700 100 5 10 0 0 0 0 1
pinseq=9
}
P 1700 600 1400 600 1 0 0
P 1700 400 1400 400 1 0 0
{
T 1700 600 5 10 0 0 0 0 1
T 1700 400 5 10 0 0 0 0 1
pintype=out
T 1345 595 5 10 1 1 0 6 1
T 1345 395 5 10 1 1 0 6 1
pinlabel=2B1
T 1495 645 5 10 1 1 0 0 1
T 1495 445 5 10 1 1 0 0 1
pinnumber=10
T 1700 600 5 10 0 0 0 0 1
T 1700 400 5 10 0 0 0 0 1
pinseq=10
}
P 1700 900 1400 900 1 0 0
P 1700 700 1400 700 1 0 0
{
T 1700 900 5 10 0 0 0 0 1
T 1700 700 5 10 0 0 0 0 1
pintype=out
T 1345 895 5 10 1 1 0 6 1
T 1345 695 5 10 1 1 0 6 1
pinlabel=2B2
T 1495 945 5 10 1 1 0 0 1
T 1495 745 5 10 1 1 0 0 1
pinnumber=11
T 1700 900 5 10 0 0 0 0 1
T 1700 700 5 10 0 0 0 0 1
pinseq=11
}
P 1700 1200 1400 1200 1 0 0
P 1700 1000 1400 1000 1 0 0
{
T 1700 1200 5 10 0 0 0 0 1
T 1700 1000 5 10 0 0 0 0 1
pintype=out
T 1345 1195 5 10 1 1 0 6 1
T 1345 995 5 10 1 1 0 6 1
pinlabel=2B3
T 1495 1245 5 10 1 1 0 0 1
T 1495 1045 5 10 1 1 0 0 1
pinnumber=12
T 1700 1200 5 10 0 0 0 0 1
T 1700 1000 5 10 0 0 0 0 1
pinseq=12
}
P 1700 1500 1400 1500 1 0 0
P 1700 1300 1400 1300 1 0 0
{
T 1700 1500 5 10 0 0 0 0 1
T 1700 1300 5 10 0 0 0 0 1
pintype=out
T 1345 1495 5 10 1 1 0 6 1
T 1345 1295 5 10 1 1 0 6 1
pinlabel=2B4
T 1495 1545 5 10 1 1 0 0 1
T 1495 1345 5 10 1 1 0 0 1
pinnumber=13
T 1700 1500 5 10 0 0 0 0 1
T 1700 1300 5 10 0 0 0 0 1
pinseq=13
}
P 1700 1800 1400 1800 1 0 0
P 1700 1600 1400 1600 1 0 0
{
T 1700 1800 5 10 0 0 0 0 1
T 1700 1600 5 10 0 0 0 0 1
pintype=in
T 1345 1795 5 10 1 1 0 6 1
T 1345 1595 5 10 1 1 0 6 1
pinlabel=S0
T 1495 1845 5 10 1 1 0 0 1
T 1495 1645 5 10 1 1 0 0 1
pinnumber=14
T 1700 1800 5 10 0 0 0 0 1
T 1700 1600 5 10 0 0 0 0 1
pinseq=14
}
P 1700 2100 1400 2100 1 0 0
P 1700 1900 1400 1900 1 0 0
{
T 1700 2100 5 10 0 0 0 0 1
T 1700 1900 5 10 0 0 0 0 1
pintype=in
T 1345 2095 5 10 1 1 0 6 1
T 1345 1895 5 10 1 1 0 6 1
pinlabel=2\_OE\_
T 1495 2145 5 10 1 1 0 0 1
T 1495 1945 5 10 1 1 0 0 1
pinnumber=15
T 1700 2100 5 10 0 0 0 0 1
T 1700 1900 5 10 0 0 0 0 1
pinseq=15
}
P 1700 2400 1400 2400 1 0 0
P 1700 2200 1400 2200 1 0 0
{
T 1700 2400 5 10 0 0 0 0 1
T 1700 2200 5 10 0 0 0 0 1
pintype=pwr
T 1345 2395 5 10 1 1 0 6 1
T 1345 2195 5 10 1 1 0 6 1
pinlabel=Vcc
T 1495 2445 5 10 1 1 0 0 1
T 1495 2245 5 10 1 1 0 0 1
pinnumber=16
T 1700 2400 5 10 0 0 0 0 1
T 1700 2200 5 10 0 0 0 0 1
pinseq=16
}
B 300 200 1100 2400 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
T 300 2700 8 10 1 1 0 0 1
B 300 0 1100 2400 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
T 300 2500 8 10 1 1 0 0 1
refdes=U?
T 300 0 8 10 1 1 0 0 1
T 300 2700 8 10 0 0 0 0 1
device=74CBTLV3253
T 300 2900 8 10 0 0 0 0 1
description=Dual 1-of-4 multiplexer/demultiplexer

View File

@ -706,13 +706,15 @@ pinseq=30
B 300 0 4100 8000 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
T 300 8100 8 10 1 1 0 0 1
refdes=IC?
T 3100 8100 9 10 1 0 0 0 1
AT91SAM3SXB
T 300 8900 8 10 0 0 0 0 1
T 300 8500 8 10 0 0 0 0 1
device=AT91SAM3SXB
T 300 8700 8 10 0 0 0 0 1
description=Atmeal AT91SAM3S1/2/4B microprocessor
T 300 8500 8 10 0 0 0 0 1
description=Atmel AT91SAM3S1/2/4B microprocessor
T 300 9100 8 10 0 0 0 0 1
footprint=LQFP64
T 300 9300 8 10 0 0 0 0 1
alt-footprint=QFN64
T 300 8300 8 10 0 0 0 0 1
footprint=QFN64
documentation=http://www.atmel.com/dyn/resources/prod_documents/doc6500.pdf
T 300 8900 8 10 0 0 0 0 1
manufacturer=Atmel

View File

@ -1,78 +1,76 @@
v 20110115 2
L 600 1000 500 800 3 0 0 0 -1 -1
L 500 800 400 1000 3 0 0 0 -1 -1
L 400 1000 600 1000 3 0 0 0 -1 -1
L 600 550 400 550 3 0 0 0 -1 -1
L 600 500 400 500 3 0 0 0 -1 -1
V 500 750 50 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
L 500 700 500 550 3 0 0 0 -1 -1
L 550 400 550 500 3 0 0 0 -1 -1
L 450 500 450 400 3 0 0 0 -1 -1
L 700 400 550 400 3 0 0 0 -1 -1
L 450 400 300 400 3 0 0 0 -1 -1
L 500 1000 500 1200 3 0 0 0 -1 -1
P 1000 400 700 400 1 0 0
L 600 800 500 600 3 0 0 0 -1 -1
L 500 600 400 800 3 0 0 0 -1 -1
L 400 800 600 800 3 0 0 0 -1 -1
L 600 350 400 350 3 0 0 0 -1 -1
L 600 300 400 300 3 0 0 0 -1 -1
V 500 550 50 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
L 500 500 500 350 3 0 0 0 -1 -1
L 550 200 550 300 3 0 0 0 -1 -1
L 450 300 450 200 3 0 0 0 -1 -1
L 700 200 550 200 3 0 0 0 -1 -1
L 450 200 300 200 3 0 0 0 -1 -1
L 500 800 500 1000 3 0 0 0 -1 -1
P 1000 200 700 200 1 0 0
{
T 1000 400 5 10 0 0 180 0 1
T 1000 200 5 10 0 0 180 0 1
pintype=io
T 605 195 5 10 1 1 0 0 1
T 605 -5 5 10 1 1 0 0 1
pinlabel=B
T 800 200 5 10 0 1 0 0 1
T 800 0 5 10 0 1 0 0 1
pinseq=3
T 800 500 5 10 1 1 0 0 1
T 800 300 5 10 1 1 0 0 1
pinnumber=3
}
P 500 1500 500 1200 1 0 0
P 500 1300 500 1000 1 0 0
{
T 900 1200 5 10 0 0 180 0 1
T 900 1000 5 10 0 0 180 0 1
pintype=in
T 605 1302 5 10 1 1 0 0 1
T 605 1102 5 10 1 1 0 0 1
pinlabel=\_OE\_
T 1000 1300 5 10 0 1 0 0 1
T 1000 1100 5 10 0 1 0 0 1
pinseq=1
T 300 1300 5 10 1 1 0 0 1
T 300 1100 5 10 1 1 0 0 1
pinnumber=1
}
T 0 1500 8 10 1 1 0 0 1
T 0 1300 8 10 1 1 0 0 1
netname=IC?
T 100 1800 8 10 0 0 0 0 1
T 100 1600 8 10 0 0 0 0 1
device=CB3Q3244
T 100 2000 8 10 0 0 0 0 1
T 100 1800 8 10 0 0 0 0 1
description=2x4-bit FET bus switch
T 0 0 9 10 1 0 0 0 1
CB3Q3244
P 0 400 300 400 1 0 0
P 0 200 300 200 1 0 0
{
T 0 400 5 10 0 0 180 0 1
T 0 200 5 10 0 0 180 0 1
pintype=io
T 300 195 5 10 1 1 0 0 1
T 300 -5 5 10 1 1 0 0 1
pinlabel=A
T 100 200 5 10 0 1 0 0 1
T 100 0 5 10 0 1 0 0 1
pinseq=2
T 100 500 5 10 1 1 0 0 1
T 100 300 5 10 1 1 0 0 1
pinnumber=2
}
T 100 2200 8 10 0 0 0 0 1
T 100 2000 8 10 0 0 0 0 1
net=GND:10
T 100 2400 8 10 0 0 0 0 1
T 100 2200 8 10 0 0 0 0 1
net=VCC:20
T 100 2600 8 10 0 0 0 0 1
T 100 2400 8 10 0 0 0 0 1
slotdef=1:1,2,18
T 100 2800 8 10 0 0 0 0 1
T 100 2600 8 10 0 0 0 0 1
slotdef=2:1,4,16
T 100 3000 8 10 0 0 0 0 1
T 100 2800 8 10 0 0 0 0 1
slotdef=3:1,6,14
T 100 3200 8 10 0 0 0 0 1
T 100 3000 8 10 0 0 0 0 1
slotdef=4:1,8,12
T 100 3400 8 10 0 0 0 0 1
T 100 3200 8 10 0 0 0 0 1
slotdef=5:19,11,9
T 100 3600 8 10 0 0 0 0 1
T 100 3400 8 10 0 0 0 0 1
slotdef=6:19,13,7
T 100 3800 8 10 0 0 0 0 1
T 100 3600 8 10 0 0 0 0 1
slotdef=7:19,15,5
T 100 4000 8 10 0 0 0 0 1
T 100 3800 8 10 0 0 0 0 1
slotdef=8:19,17,3
T 100 4200 8 10 0 0 0 0 1
T 100 4000 8 10 0 0 0 0 1
numslots=8
T 700 700 8 10 1 0 0 0 1
T 700 500 8 10 1 0 0 0 1
slot=1

View File

@ -97,4 +97,4 @@ description=Dual-Output Current Limit Switch
T 300 2000 8 10 0 0 0 0 1
footprint=SO8
T 300 2200 8 10 0 0 0 0 1
footprint=MLP8
alt-footprint=MLP8

View File

@ -96,3 +96,5 @@ T 300 1500 8 10 0 0 0 0 1
description=Dual 150mA Ultra Low-Dropout Regulator
T 300 1700 8 10 0 0 0 0 1
footprint=MSOP8
T 300 1900 8 10 0 0 0 0 1
manufacturer=National Semiconductor

View File

@ -120,5 +120,3 @@ T 300 2600 8 10 0 0 0 0 1
device=microSD
T 300 2400 8 10 0 0 0 0 1
description=microSD slot with normally open presence switch
T 900 2200 9 10 1 0 0 0 1
uSD

View File

@ -0,0 +1,49 @@
v 20110115 2
P 600 1000 600 800 1 0 0
{
T 500 850 5 6 1 1 0 0 1
pinnumber=3
T 500 850 5 6 0 0 0 0 1
pinseq=3
T 600 850 5 6 1 1 0 0 1
pinlabel=C
T 500 850 5 6 0 1 0 0 1
pintype=pas
}
P 600 200 600 0 1 0 1
{
T 500 50 5 6 1 1 0 0 1
pinnumber=2
T 500 50 5 6 0 0 0 0 1
pinseq=2
T 600 50 5 6 1 1 0 0 1
pinlabel=E
T 500 50 5 6 0 1 0 0 1
pintype=pas
}
V 500 501 316 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
T 900 500 5 10 0 0 0 0 1
device=NPN_TRANSISTOR
L 600 200 400 400 3 0 0 0 -1 -1
L 600 800 400 600 3 0 0 0 -1 -1
L 400 700 400 300 3 0 0 0 -1 -1
P 0 500 184 500 1 0 0
{
T 0 550 5 6 1 1 0 0 1
pinnumber=1
T 100 550 5 6 0 0 0 0 1
pinseq=1
T 100 550 5 6 1 1 0 0 1
pinlabel=B
T 100 550 5 6 0 1 0 0 1
pintype=pas
}
L 400 500 184 500 3 0 0 0 -1 -1
T 900 500 8 10 1 1 0 0 1
refdes=Q?
H 3 0 0 0 -1 -1 1 -1 -1 -1 -1 -1 5
M 510,240
L 601,200
L 555,295
L 535,265
z

View File

@ -112,9 +112,11 @@ pinseq=6
B 300 300 1300 1200 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
T 300 1900 8 10 1 1 0 0 1
refdes=U?
T 300 2100 8 10 1 1 0 0 1
T 300 2100 8 10 0 0 0 0 1
device=NVT2003
T 300 2300 8 10 0 0 0 0 1
description=Bidirectional voltage-level translator
T 300 2500 8 10 0 0 0 0 1
manufacturer=NXP
T 300 2700 8 10 0 0 0 0 1
footprint=TSSOP10

File diff suppressed because it is too large Load Diff