ConnectionPattern

class util.ConnectionPattern.ConnectionPattern(sizex, sizey)[source]

This creates a connection patterns (ConnectPointList) based on pre-defined rule

Methods:

__init__

Initialise FPGA parameters

get_htree

Returns H-Tree of specific size

auto_select

Auto implements the global tree with crop and scale operations

add_htree

Returns HTree pattern fo the given grid size

reset

Removes all the ConnectionPoints from the pattern

get_fishbone

Returns fishbone pattern for the given grid size

render_pattern

Renders the connection points

Attributes:

svg_main

Returns the svgwrite drawing object, call after running render_pattern

connections

Returns the ConnectPointList in current pattern

__init__(sizex, sizey)[source]

Initialise FPGA parameters

Parameters
  • sizex (int) – Width of FPGA grid

  • sizey (int) – Size of FPGA grid

property svg_main

Returns the svgwrite drawing object, call after running render_pattern

property connections

Returns the ConnectPointList in current pattern

static get_htree(size, root=0, side=0, repeat=1)[source]

Returns H-Tree of specific size

Parameters
  • root (int) – Extension in the root connection (Default=0)

  • side (int) – Extension in the side connection (Default=0)

  • repeat (int) – NUmber of sides on each direction (Default=1)

^    ^         ^     ^
|    |         |     |
|    | root    |     |
+---------+----------+
|    |    |    |     | ^
|    |    |    |     | |  SIDE
v    v    |    v     v v
          |
^    ^    |
+-+--+    |
  +       |
REPEAT    +
auto_select()[source]

Auto implements the global tree with crop and scale operations

TODO: NotImplemented

add_htree(n=3)[source]

Returns HTree pattern fo the given grid size

This method auto creates multiple levels of HTree from the given grid size. Minimum size H-Tree is 5x5

Parameters

n (int) – 2^n, Number representng size of the grid

reset()[source]

Removes all the ConnectionPoints from the pattern

get_fishbone(width=None, height=None, steps=1, x_margin=(0, 0), y_margin=(0, 0))[source]

Returns fishbone pattern for the given grid size

Spine is created at the center of the grid, to change bias when grid is symetric change xbias and ybias parameter

x_margin(tuple(int, int)): Skips the repective grid connectivity y_margin(tuple(int, int)): Skips the repective grid connectivity

render_pattern(scale=20, title=None, add_module_labels=False)[source]

Renders the connection points