goopendb

package
v0.0.0-...-8f3f873 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EdgeTypeSEGMENT = iota
	EdgeTypeTECHVIA
	EdgeTypeVIA
	EdgeTypeSHORT
	EdgeTypeVWIRE
)

EdgeType enums

View Source
const (
	MasterTypeBLOCK = iota
	MasterTypeCORE
	MasterTypePAD
	MasterTypeENDCAP
)

MasterType enums

View Source
const (
	SignalTypeSIGNAL = iota
	SignalTypePOWER
	SignalTypeGROUND
	SignalTypeCLOCK
	SignalTypeANALOG
	SignalTypeRESET
	SignalTypeSCAN
	SignalTypeTIEOFF
)

SignalType enums

View Source
const (
	WireTypeNONE = iota
	WireTypeCOVER
	WireTypeFIXED
	WireTypeROUTED
	WireTypeSHIELD
	WireTypeNOSHIELD
)

WireType enums

View Source
const (
	WireShapeTypeNONE = iota
	WireShapeTypeRING
	WireShapeTypePADRING
	WireShapeTypeBLOCKRING
	WireShapeTypeSTRIPE
	WireShapeTypeFOLLOWPIN
	WireShapeTypeIOWIRE
	WireShapeTypeCOREWIRE
	WireShapeTypeBLOCKWIRE
	WireShapeTypeBLOCKAGEWIRE
	WireShapeTypeFILLWIRE
	WireShapeTypeDRCFILL
)

WireShapeType enums

Variables

This section is empty.

Functions

func ParseDesignToJSON

func ParseDesignToJSON(files *DesignFiles, compress bool) (designBytes []byte, err error)

ParseDesign parses user uploaded files into JSON

Types

type Design

type Design struct {
	Name           string
	Instances      []*Instance
	Nets           []*Net
	InstancePins   []*Pin
	BlockPins      []*Pin
	RoutingVias    []*Via
	ViaDefinitions []*Via
	Layers         []*Layer
	CoreArea       float64
	DieArea        float64
	DesignArea     float64
	Utilization    float64
	BoundingBox    *Rect
	Core           *Rect
	Die            *Rect
	Rows           []*Row
	Tracks         []*Grid
	Sites          []*Site
	GCell          *Grid
	Geometries     []*Geometry
}

Design is a wrapper for parsed DEF/LEF

func ParseDesign

func ParseDesign(files *DesignFiles) (design *Design, err error)

ParseDesign parses user uploaded files

func (*Design) CompactDesign

func (design *Design) CompactDesign() (compactDesign *Design)

CompactDesign returns a smaller representation without circular dependencies for JSON encoding

type DesignFile

type DesignFile struct {
	ID        int
	Type      string
	FileName  string
	FilePath  string
	IsTech    bool // For LEF files
	IsLibrary bool // For LEF files
}

DesignFile represents a wrapper for a submitted design file

type DesignFiles

type DesignFiles struct {
	DEF *DesignFile
	LEF []*DesignFile
}

DesignFiles represents a wrapper for design files

type Direction

type Direction int

Direction is tech layer direction

const (
	DirectionNONE Direction = iota
	DirectionHORIZONTAL
	DirectionVERTICAL
)

Layer Direction enums

func (Direction) String

func (dir Direction) String() string

type Edge

type Edge struct {
	Type  EdgeType
	Rect  *Rect
	Via   *Via
	Layer *Layer
}

Edge is a net routing edge

type EdgeType

type EdgeType int

EdgeType is connection segment type

func (EdgeType) String

func (typ EdgeType) String() string

type Geometry

type Geometry struct {
	ID         int
	Boxes      []*Rect
	InComplete bool
}

Geometry is a collecitons of shapes (rect)

func (*Geometry) Copy

func (r *Geometry) Copy() Geometry

Copy Geometry pointer to a new Geometry

type Grid

type Grid struct {
	ID                     int
	Layer                  *Layer `json:",omitempty"`
	GridX                  []int
	GridY                  []int
	GridXPatternOrigins    []int
	GridXPatternLineCounts []int
	GridXPatternSteps      []int
	GridYPatternOrigins    []int
	GridYPatternLineCounts []int
	GridYPatternSteps      []int
	InComplete             bool // The struct contains ID only
}

Grid is wrapper for track or gcell grids

func (*Grid) Copy

func (r *Grid) Copy() Grid

Copy Grid pointer to a new Grid

type Instance

type Instance struct {
	ID           int
	Name         string `json:",omitempty"`
	Location     *Point `json:",omitempty"`
	Origin       *Point `json:",omitempty"`
	Orientation  Orientation
	Master       string `json:",omitempty"`
	Pins         []*Pin `json:",omitempty"`
	IsPlaced     bool
	BoundingBox  *Rect `json:",omitempty"`
	Halo         *Rect `json:",omitempty"`
	IsFiller     bool
	MasterType   MasterType
	Obstructions *Geometry `json:",omitempty"`
	InComplete   bool      // The struct contains ID only
}

Instance is a wrapper for a single instance

type IoType

type IoType int

IoType is pin IO type

const (
	IOTypeINPUT IoType = iota
	IOTypeOUTPUT
	IOTypeINOUT
	IOTypeFEEDTHRU
)

Pin IO type enums

func (IoType) String

func (typ IoType) String() string

type Layer

type Layer struct {
	ID         int
	Name       string `json:",omitempty"`
	Alias      string `json:",omitempty"`
	Width      int
	Spacing    int
	Area       float64
	Type       LayerType
	Direction  Direction
	UpperLayer *Layer `json:",omitempty"`
	LowerLayer *Layer `json:",omitempty"`
	InComplete bool   // The struct contains ID only
}

Layer is a wrapper for a LEF layer

type LayerType

type LayerType int

LayerType is tech layer type

const (
	LayerTypeROUTING LayerType = iota
	LayerTypeCUT
	LayerTypeMASTERSLICE
	LayerTypeOVERLAP
	LayerTypeIMPLANT
	LayerTypeNONE
)

Layer type enums

func (LayerType) String

func (typ LayerType) String() string

type MasterType

type MasterType int

MasterType is connection segment type

func (MasterType) String

func (typ MasterType) String() string

type Net

type Net struct {
	ID           int
	Name         string `json:",omitempty"`
	IsSpecial    bool
	IsRouted     bool
	Pins         []*Pin  `json:",omitempty"`
	Edges        []*Edge `json:",omitempty"`
	SpecialBoxes []*Geometry
	InComplete   bool // The struct contains ID only
}

Net is a wrapper for a single net

type OpenDB

type OpenDB struct {
	// contains filtered or unexported fields
}

OpenDB is a wrapper for OpenDB database object

func NewDatabase

func NewDatabase() (ret OpenDB, err error)

NewDatabase creates a new OpenDB database

func (OpenDB) FreeDatabase

func (ref OpenDB) FreeDatabase() (err error)

FreeDatabase releases OpenDB database

func (OpenDB) GetDesign

func (ref OpenDB) GetDesign() (design *Design, err error)

GetDesign converts the parsed design to native go structs

func (OpenDB) ParseDEF

func (ref OpenDB) ParseDEF(filepath string) (err error)

ParseDEF reads a design DEF file

func (OpenDB) ParseLEF

func (ref OpenDB) ParseLEF(filepath string) (err error)

ParseLEF reads the library and technology section of a LEF technology file

func (OpenDB) ParseLEFLibrary

func (ref OpenDB) ParseLEFLibrary(filepath string) (err error)

ParseLEFLibrary reads the library section of a LEF technology file

func (OpenDB) ParseLEFTechnology

func (ref OpenDB) ParseLEFTechnology(filepath string) (err error)

ParseLEFTechnology reads the technology section of a LEF technology file

type Orientation

type Orientation int

Orientation is instance placement orientation

const (
	OrientationR0    Orientation = iota /** rotate object 0 degrees */
	OrientationR90                      /** rotate object 90 degrees */
	OrientationR180                     /** rotate object 180 degrees */
	OrientationR270                     /** rotate object 270 degrees */
	OrientationMY                       /** mirror about the "Y" axis */
	OrientationMYR90                    /** mirror about the "Y" axis and rotate 90 degrees */
	OrientationMX                       /** mirror about the "X" axis */
	OrientationMXR90                    /** mirror about the "X" axis and rotate 90 degrees */
)

Instance orientation enums

func (Orientation) String

func (o Orientation) String() string

type Pin

type Pin struct {
	ID         int
	Name       string    `json:",omitempty"`
	Instance   *Instance `json:",omitempty"`
	Net        *Net      `json:",omitempty"`
	Direction  Direction
	Location   *Point      `json:",omitempty"`
	Geometries []*Geometry `json:",omitempty"`
	SignalType SignalType
	IsBlock    bool
	IsSpecial  bool
	InComplete bool // The struct contains ID only
}

Pin is a wrapper for a single pin

type Point

type Point struct {
	X int
	Y int
}

Point is an X, Y coordinate

func (*Point) Copy

func (p *Point) Copy() Point

Copy Point pointer to a new Point

type Rect

type Rect struct {
	ID         int
	XMin       int
	YMin       int
	XMax       int
	YMax       int
	ShapeType  int
	Layer      *Layer
	Via        *Via
	InComplete bool
}

Rect is a rectangle shape holder

func (*Rect) Copy

func (r *Rect) Copy() Rect

Copy Rect pointer to a new Rect

type Row

type Row struct {
	ID          int
	Name        string `json:",omitempty"`
	Site        *Site  `json:",omitempty"`
	Direction   Direction
	Orientation Orientation
	OriginX     int
	OriginY     int
	Spacing     int
	BoundingBox *Rect
	InComplete  bool // The struct contains ID only
}

Row is wrapper for placement row

type SignalType

type SignalType int

SignalType is connection segment type

func (SignalType) String

func (typ SignalType) String() string

type Site

type Site struct {
	ID         int
	Name       string `json:",omitempty"`
	InComplete bool   // The struct contains ID only
}

Site is a wrapper for a technology sit

type Via

type Via struct {
	ID          int
	Name        string `json:",omitempty"`
	Rect        *Rect  `json:",omitempty"`
	TopLayer    *Layer `json:",omitempty"`
	CutLayer    *Layer `json:",omitempty"`
	BottomLayer *Layer `json:",omitempty"`
	IsBlock     bool
	IsTech      bool
	InComplete  bool // The struct contains ID only
}

Via is a wrapper for design via

type WireShapeType

type WireShapeType int

WireShapeType is connection segment type

func (WireShapeType) String

func (typ WireShapeType) String() string

type WireType

type WireType int

WireType is connection segment type

func (WireType) String

func (typ WireType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL