Documentation
¶
Index ¶
- Constants
- func ParseDesignToJSON(files *DesignFiles, compress bool) (designBytes []byte, err error)
- type Design
- type DesignFile
- type DesignFiles
- type Direction
- type Edge
- type EdgeType
- type Geometry
- type Grid
- type Instance
- type IoType
- type Layer
- type LayerType
- type MasterType
- type Net
- type OpenDB
- func (ref OpenDB) FreeDatabase() (err error)
- func (ref OpenDB) GetDesign() (design *Design, err error)
- func (ref OpenDB) ParseDEF(filepath string) (err error)
- func (ref OpenDB) ParseLEF(filepath string) (err error)
- func (ref OpenDB) ParseLEFLibrary(filepath string) (err error)
- func (ref OpenDB) ParseLEFTechnology(filepath string) (err error)
- type Orientation
- type Pin
- type Point
- type Rect
- type Row
- type SignalType
- type Site
- type Via
- type WireShapeType
- type WireType
Constants ¶
const ( EdgeTypeSEGMENT = iota EdgeTypeTECHVIA EdgeTypeVIA EdgeTypeSHORT EdgeTypeVWIRE )
EdgeType enums
const ( MasterTypeBLOCK = iota MasterTypeCORE MasterTypePAD MasterTypeENDCAP )
MasterType enums
const ( SignalTypeSIGNAL = iota SignalTypePOWER SignalTypeGROUND SignalTypeCLOCK SignalTypeANALOG SignalTypeRESET SignalTypeSCAN SignalTypeTIEOFF )
SignalType enums
const ( WireTypeNONE = iota WireTypeCOVER WireTypeFIXED WireTypeROUTED WireTypeSHIELD WireTypeNOSHIELD )
WireType enums
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 ¶
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 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
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 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
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 ¶
NewDatabase creates a new OpenDB database
func (OpenDB) FreeDatabase ¶
FreeDatabase releases OpenDB database
func (OpenDB) ParseLEFLibrary ¶
ParseLEFLibrary reads the library section of a LEF technology file
func (OpenDB) ParseLEFTechnology ¶
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 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
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