Ejemplo n.º 1
0
from Map import Component
from Map import Map
from Map import Pin
import Router
import time

cs = []
rn41 = Component((15, 30), (5, 60))
led = Component((10, 12), (37, 100))
msp430 = Component((35, 30), (55, 77))
usb = Component((10, 20), (70, 45))
bm240 = Component((20, 12), (95, 135))
charge = Component((25, 20), (140, 57))
kohm = Component((6, 3), (115, 75))
battery = Component((18, 30), (115, 3))
cs.append(rn41)
cs.append(led)
cs.append(msp430)
cs.append(usb)
cs.append(bm240)
cs.append(charge)
cs.append(kohm)
cs.append(battery)

nets = []
map1 = Map(170, 155, cs, nets)

Router.route(map1, "router_output.txt")
Ejemplo n.º 2
0
from Map import Component
from Map import Map
from Map import Pin
from Map import Net
import Router
import time
import sys

c3 = Component((9, 9), (60, 5))
c4 = Component((7, 11), (45, 10))
c5 = Component((14, 7), (35, 27))
c6 = Component((7, 10), (7, 18))
c7 = Component((18, 8), (47, 40))

cs = []
cs.append(c3)
cs.append(c4)
cs.append(c5)
cs.append(c6)
cs.append(c7)

start_pins = []
terminal_pins = []

ground_pin = Pin('GND', 'GND', 'GND', (0, 0))

net_1 = Net('N$1')
net_2 = Net('N$2')
net_3 = Net('N$3')
net_4 = Net('N$4')
net_5 = Net('N$5')
Ejemplo n.º 3
0
from Map import Component
from Map import Map
from Map import Pin
from Map import Net
import Router
import time
import MapPrinter

c1 = Component((7, 2), (0, 0))
c2 = Component((3, 2), (1, 3))
c3 = Component((3, 2), (5, 3))

cs = []
cs.append(c1)
cs.append(c2)
cs.append(c3)

net_1 = Net('N$1')
net_2 = Net('N$2')

net_1.addPin(Pin('A1', 'N$1', 'X', (3, 2)))
net_1.addPin(Pin('A2', 'N$1', 'X', (7, 0)))

net_2.addPin(Pin('B1', 'N$2', 'X', (7, 2)))
net_2.addPin(Pin('B2', 'N$2', 'X', (7, 5)))

nets = []
nets.append((net_1))
nets.append((net_2))

map1 = Map(9, 7, cs, nets)
Ejemplo n.º 4
0
from Map import Component
from Map import Map
from Map import Pin
from Map import Net
import Router
import time

cs = []
first = Component((12, 18), (10, 16))
second = Component((12, 18), (33, 16))
third = Component((12, 18), (56, 16))
cs.append(first)
cs.append(second)
cs.append(third)
nets = []

net_1 = Net('N$1')
net_2 = Net('N$2')
net_3 = Net('N$3')

net_1.addPin(Pin('A1', 'N$1', 'X', (15, 15)))
net_1.addPin(Pin('B1', 'N$1', 'X', (37, 15)))
net_1.addPin(Pin('C1', 'N$1', 'X', (62, 34)))

net_2.addPin(Pin('A2', 'N$2', 'Y', (15, 34)))
net_2.addPin(Pin('B2', 'N$2', 'Y', (37, 34)))
net_2.addPin(Pin('C2', 'N$2', 'Y', (62, 15)))

net_3.addPin(Pin('A3', 'N$3', 'Z', (5, 20)))
net_3.addPin(Pin('B3', 'N$3', 'Z', (50, 42)))
Ejemplo n.º 5
0
from Map import Component
from Map import Map
from Map import Pin
from Map import Net
import Router
import time
import MapPrinter
import SearchAlgorithms as SA

c1 = Component((10, 3), (12, 8))

cs = []
cs.append(c1)

net_1 = Net('N$1')

net_1.addPin(Pin('A1', 'N$1', 'X', (3, 3)))
net_1.addPin(Pin('T', 'N$1', 'X', (17, 17)))

nets = []
nets.append((net_1))

sample = Pin('A1', 'N$1', 'X', (20, 20))
sample2 = Pin('A1', 'N$1', 'X', (9, 9))
map2 = Map(100, 100, [], [])
end = (40, 40)
d = SA.A_Star(sample, map2.space, end)