This page serves as a working document for the design of a parts manager for gEDA. Please submit feedback to the geda-dev or geda-user mailing lists.
For implementation details, see gparts_id.
Or, return to the part manager top level page.
The part manager uses a relational database to store parts used in the development of electronic assemblies. The part manager also stores attributes for these parts and can place these attributes into a component or symbol for placement into schematics.
The part manager provides a GUI that allows the user to browse and edit the data in the part database. The user can select parts in the GUI, then cut and paste them into their schematic.
The following figure shows the relationship between the parts manager and other applications in the gEDA suite.
The part database can be configured as either local or remote. In the remote configuration, many users can access the part database concurrently.
The following figure shows the entity relationships for a part in the resistor category. The category does not reference any tables in the resistor category, but only contains the view name and stored procedures to manipulate a part within the resistor category. This mechanism allows the tables and relationships to vary by category.
The database always contains tables to store the following entities. The database contains additional tables to store specific categories of parts (e.g. a capacitor table, a diode table, a resistor table, etc…). This list excludes junction tables and metadata tables.
A class of parts (e.g. capacitors, diodes, resistors, transistors, etc…). A category can contain sub-categories (e.g. small-signal diodes, TVS diodes, zener diodes, etc…) Sub-categories can include additional sub-categories. All parts within a category or sub-category share the same set of attributes (e.g. forward voltage, maximum current, power dissipation, etc…). Sub-categories do not need to inherit the attributes of their parent.
The category stores metadata for mapping the part’s database columns to the component attributes. For numeric attributes, the category stores the column’s unit of measure (e.g. amps, farads, ohms, volts, etc…).
The category also stores the names of database views and stored procedures to access and manipulate the tables of parts within the category.
Field | Type | Description |
---|---|---|
CategoryID | Surrogate key | |
CategoryName | String | The unique name of the category |
ParentID | Foreign key to Category |
Currently, a company represents a part’s manufacturer.
Field | Type | Description |
---|---|---|
CompanyID | Surrogate key | |
CompanyName | String | The unique name of the company |
A type of part. The device name only provides a mechanism to map parts to symbols. A part in the library of device resistor can use all the symbols in the library where device is resistor. Similarly, a symbol where device is resistor can represent any part of device resistor. When importing a symbol, the database uses the value of the symbol attribute DEVICE as the initial value for the device field. The user can change the device field after import using the part manager GUI.
Field | Type | Description |
---|---|---|
DeviceID | Surrogate key | |
DeviceName | String | The unique name of the device |
Any file associated with a part. Documents can include datasheets, erata, user manuals, etc… This entity stores a path to the actual document file. The path could either be local or network. The path stored in the database is relative to the base path stored in the configuration file.
Field | Type | Description |
---|---|---|
DocumentID | Surrogate key | |
Category | String | The document's category (e.g. “Datasheet”, “Erata”, “User Manual”) |
Title | String | The document's title |
SourceURL | String | The URL where the document can be obtained on the Internet |
FileLocation | String | The location of the locally stored document |
The PCB artwork associated with a package. This entity stores a path to the actual PCB footprint file. The path could either be local or network. The path stored in the database is relative to the base path stored in the configuration file.
Field | Type | Description |
---|---|---|
FootprintID | Surrogate key | |
FootprintName | String | The unique name of the footprint |
Field | Type | Description |
---|---|---|
ModelID | Surrogate key | |
ModelName | String | The name of the MODEL within the model file. |
ModelPath | String | Absolute path to the model file. |
ModelType | String | The model type: IBIS, PSPICE, etc… |
When instantiating a component or creating a heavy symbol that uses a Spice model, the following database columns map to the following attributes.
Column | Attribute | Notes |
---|---|---|
Model.ModelName | MODEL-NAME | |
Model.ModelPath | FILE | Should use absolute path. |
A part represents a class of components. The database uses this version of the part table when configured to use a flat part table. The flat and hierarchical parts tables are mutually exclusive. The database uses one or the other.
Field | Type | Description |
---|---|---|
PartID | Surrogate key | |
CompanyID | Foreign key to company specifies manufacturer | |
PartNumber | String | The manufacturers's part number |
DeviceID | Foreign key to Device |
Other columns TBD.
A part represents a class of components. The database uses this version of the part table when configured to use hierarchical part tables. The flat and hierarchical parts tables are mutually exclusive. The database uses one or the other.
Field | Type | Description |
---|---|---|
PartID | Surrogate key | |
CompanyID | Foreign key to company specifies manufacturer | |
PartNumber | String | The manufacturers's part number |
DeviceID | Foreign key to Device |
The physical structure, or form-factor, of a part (i.e. 0603, SOT-23, PDIP16). Each package can associate with zero or more footprints. Also, each footprint could represent zero or more packages.
Field | Type | Description |
---|---|---|
PackageID | Surrogate key | |
PackageName | String | The unique name of the package |
Technology | String | The type of package. Either “SMT” or “TH” |
The graphical representation of a part. This entity uses the symbol base filename as the unique name of the symbol. This base filename is relative to one of the component libraries found in the configuration files. The component library paths can either be local or network.
Field | Type | Description |
---|---|---|
SymbolID | Surrogate key | |
SymbolName | String | The unique name of the symbol. This field contains the base filename of the symbol. |
DeviceID | Foreign key to Device |
Part categories break down classes of parts hierarchically. The category hierarchy exists separately than the part hierarchy. The category hierarchy only provides the user with a system to locate parts quickly. A child in the category hierarchy does not need to inherit the attributes of a parent.
The parts manager uses categories to keep the lists of parts manageable. If the list of parts in a particular category grows large, the category can be subdivided into sub-categories.
It may be difficult to change the categories, using a GUI, because of the part table abstraction through database views and stored procedures. It may be better to distribute the parts manager with a default configuration that works for most.
The default hierarchy of parts follow:
The part hierarchy allows the database to attach additional attributes to a class of parts. These attributes provide a faster means to locate and select parts, especially commodity parts. The database only provides these additional attributes when configured to use hierarchical part tables.
These additional attributes, stored in numeric format, allow SQL to select parts. For example, to locate diodes with reverse voltage greater than 60 volts, use the following SQL statement.
SELECT * FROM DiodeV WHERE VR > 60;
The intent of the part hierarchy does not include exhaustively classifying all electronic parts or fully parameterizing any class of electronic part. The part hierarchy simply intends to allow the user to quickly locate a part, such as a 4.75 kΩ 1% 0603.
TODO: Develop guidelines for subclassing part.
Proposed guidelines for including attributes:
These attributes may not work for everyone, so the database allows the user to customize these part tables.
Bipolar Junction Transistors (BJTs) extend part with one additional table of attributes.
Table name: BJT
View name: BJTV
Field | Type | Units | Description |
---|---|---|---|
PartID | Foreign key to Part | ||
PackageID | Foreign key to Package | ||
Polarity | Either NPN or PNP | ||
MaxCollectorCurrent | Physical | AMPS | Maximum collector current (Absolute maximum rating) |
MaxCollectorEmitterVoltage | Physical | VOLTS | Maximum collector-emitter voltage (Absolute maximum rating) |
TransitionFrequency | Physical | HERTZ | |
PowerDissipation | Physical | WATTS | Power dissipation (Pd) not including any derating |
The same table contains small-signal and power BJTs. These transistors can be placed into separate views using the following criteria.
Category | Criteria | View Name |
---|---|---|
Small-signal BJT | PowerDissipation < 1.0 | TBD |
Power BJT | PowerDissipation >= 1.0 | TBD |
Capacitors extend part with one additional table of attributes.
Field | Type | Units | Description |
---|---|---|---|
PartID | Foreign key to Part | ||
PackageID | Foreign key to Package | ||
Capacitance | Physical | FARADS | Capacitance |
When instantiating a component or creating a heavy symbol, the following database columns map to the following attributes.
Column | Attribute | Notes |
---|---|---|
Device.DeviceName | DEVICE | |
Capacitor.Capacitance | VALUE |
Inductors extend part with one additional table of attributes.
Field | Type | Units | Description |
---|---|---|---|
PartID | Foreign key to Part | ||
PackageID | Foreign key to Package | ||
Inductance | Physical | HENRYS | Inductance |
When instantiating a component or creating a heavy symbol, the following database columns map to the following attributes.
Column | Attribute | Notes |
---|---|---|
Device.DeviceName | DEVICE | |
Inductor.Inductance | VALUE |
MOSFETs extend part with one additional table of attributes.
Field | Type | Units | Description |
---|---|---|---|
PartID | Foreign key to Part | ||
PackageID | Foreign key to Package | ||
Polarity | Either N or P | ||
MaxDrainSourceVoltage | Physical | VOLTS | Maximum drain-source voltage (Absolute maximum rating) |
MaxDrainCurrent | Physical | AMPS | Maximum continuous drain current (Absolute maximum rating) |
TypGateThresholdVoltage | Physical | VOLTS | Typical gate threshold voltage |
PowerDissipation | Physical | WATTS | Power dissipation (Pd) not including any derating |
Rectifier, small-signal and switching diodes extend part with one additional table of attributes. Most diodes can be placed into this table.
Table name: Diode
View name: DiodeV
Field | Type | Units | Description |
---|---|---|---|
PartID | Foreign key to Part | ||
PackageID | Foreign key to Package | ||
MaxReverseVoltage | Physical | VOLTS | Maximum reverse voltage (Absolute maximum rating) |
MaxForwardCurrent | Physical | AMPS | Maximum forward current (Absolute maximum rating) |
TypForwardVoltage | Physical | VOLTS | Typical forward voltage |
AveForwardCurrent | Physical | AMPS | Average forward current |
The same table contains rectifier, small-signal and switching diodes. These diodes can be placed into separate views using the following criteria.
Category | Criteria | View Name |
---|---|---|
Small-signal and switching diodes | AveForwardCurrent < 0.5 | TBD |
Rectifier diodes | AveForwardCurrent >= 0.5 | TBD |
Resistors extend part with one additional table of attributes.
Field | Type | Units | Description |
---|---|---|---|
PartID | Foreign key to Part | ||
PackageID | Foreign key to Package | ||
Resistance | Physical | OHMS | Resistance |
Tolerance | Physical | PERCENT | Tolerance |
When instantiating a component or creating a heavy symbol, the following database columns map to the following attributes.
Column | Attribute | Notes |
---|---|---|
Device.DeviceName | DEVICE | |
Resistor.Resistance | VALUE |
TVS diodes extend part with one additional table of attributes.
Field | Type | Units | Description |
---|---|---|---|
PartID | Foreign key to Part | ||
PackageID | Foreign key to Package | ||
WorkingVoltage | Physical | VOLTS | Working voltage |
BreakdownVoltage | Physical | VOLTS | Breakdown voltage |
Zener diodes extend part with one additional table of attributes.
Table name: ZenerDiode
View name: ZenerDiodeV
Field | Type | Units | Description |
---|---|---|---|
PartID | Foreign key to Part | ||
PackageID | Foreign key to Package | ||
TypZenerVoltage | Physical | VOLTS | Zener voltage |
PowerDissipation | Physical | WATTS | Power dissipation (Pd) not including any derating |
The part manager GUI is the main component of the part management system. The part manager GUI allows the user to browse and manipulate the part database and to cut and paste symbols into the schematic editor.
Copy a part to the clipboard as a component (light symbol).
Export a part to a file as a heavy symbol.
Create a new part database.
Destroy an existing database.
Add a new document to the database.
Associate a document(s) with a part(s).
Delete a document(s) from the database. Remove all references.
Disassociate a document(s) from a part(s). All parts and documents remain in the database. Only the relationship is removed.
Edit the metadata associated with a document.
View a document.
Delete a footprint(s) from the database. Remove all references.
Edit the metadata associated with a footprint.
Import a single footprint file into the database.
Import all footprint files from the library into the database.
Add a new model to the database.
Associate a model(s) with a part(s).
Delete a model(s) from the database. Remove all references.
Disassociate a model(s) from a part(s). All parts and models remain in the database. Only the relationship is removed.
Import all Spice files from the library into the database.
TBD
Add a new package to the database.
Delete a package(s) from the database. Remove all references.
Edit the package data.
Add a new part to the database.
Delete a part(s) from the database. Remove all references.
Edit the part data.
Search for a part in the database using the manufacturer part number.
Delete a symbol(s) from the database. Remove all references.
Edit the metadata associated with a symbol.
Import a single symbol file into the database.
Import the contents of the component library into the database.
The part view shows parts stored in the database. The user selects the category from the left pane. The parts within the given category show in the middle pane. After selecting a part from the middle pane, the symbols available for that part show in the lower right pane. The upper right pane shows the symbol preview.
The edit→copy command places the component on the clipboard. The component can then be pasted into gschem.
The symbol view shows all the symbols stored in the database. The upper right pane shows the symbol preview.
The parts manager reads gaf's Scheme configuration files using Guile-1.8. The parts manager reads the following configuration files in order. The parts manager attempts reading the file in each of the given paths in order.
The parts manager supports the following configuration items from gaf.
Item | Parser | Description |
---|---|---|
always-promote-attributes | libgeda | |
attribute-promotion | libgeda | |
bitmap-directory | libgeda | Specifies the directory for bitmap images |
bus-style | gschem | Specifies the line thickness for busses |
component-library | libgeda | Adds a directory to the component library |
display-color-map | gschem | Specifies schematic colors for display |
display-outline-color-map | gschem | |
eval-protected | libgeda | For the parts manager, simply 'eval' |
keep-invisible | libgeda | |
net-style | gschem | Specifies the line thickness for nets |
postscript-prolog | libgeda | Ignored by the parts manager |
print-color-map | libgeda | Specifies schematic colors for printing |
promote-invisible | libgeda | |
scheme-directory | libgeda | Specifies the directory for additional scheme files |
The parts manager supports the following private configuration items.
Item | Parser | Description |
---|---|---|
database-interface | gparts | Adds a database interface module |
document-library | gparts | Adds a directory to the document library |
footprint-library | gparts | Adds a directory to the footprint library |
spice-library | gparts | Adds a directory to the spice library |
The parts manager uses dynamically loadable modules to support the various database engines. The parts manager uses a separate module to support each database engine.
Adds a directory to the list of directories where documentation is stored.
Adds a directory to the list of directories where footprints are stored. The parts manager can import newlib footprints from these directories.
Adds a directory to the list of directories where SPICE models are stored. The parts manager can import these models from these directories.