[OrCAD] External Block Mappings

Prev Next

Mapping External OrCad Libraries with .allspice/config.toml

OrCad uses absolute paths for the location of external schematics. For example:

C:\orcad-work-projects\amp_project\subcircuit\power.DSN

When an OrCad project is uploaded to AllSpice, we do not have the information of where your project lives locally. AllSpice needs a way to translate absolute paths on your computer to paths in your AllSpice repository.

AllSpice Config File

The config file .allspice/config.toml defines this translation between your local paths and their location in your AllSpice repository.

Example

Consider the following local project structure:

C:\orcad-work-projects\amp_project
├── main.DSN
├── subcircuit\
│   └── power.DSN
Z:\shared_libs\
    └── common.DSN
C:\CADENCE\LIBRARY\MODULES\
└── supply.DSN

Three external locations are being used: the project directory, a shared network drive for external libraries, and a shared Cadence installation directory.

When you upload this project to AllSpice, you could include these external schematics using the following structure:

├── main.DSN
├── subcircuit\
│   └── power.DSN
├── shared_libs\
│   └── common.DSN
└── cadence_modules\
    └── supply.DSN

Given this setup, your .allspice/config.toml should contain the following path translations:

# .allspice/config.toml
[orcad_external_libraries]
'C:\orcad-work-projects\amp_project' = '.' # Project root mapping
'Z:\shared_libs\' = 'repo_shared_libs\'
'C:\CADENCE\LIBRARY\MODULES\' = 'cadence_modules\'
  • 'C:\orcad-work-projects\amp_project' = '.'
    allows AllSpice to find subcircuit\power.DSN under the project root.

  • 'Z:\shared_libs\' = 'repo_shared_libs\' allows AllSpice to find common.DSN

  • 'C:\CADENCE\LIBRARY\MODULES\' = 'cadence_modules\' allows AllSpice to find supply.DSN

Note: Trailing slashes \ are optional and do not make a difference.

Note: The repo directories can have different names from your local directory names.

Translation Example

AllSpice uses this entry:

'Z:\shared_libs\' = 'repo_shared_libs\'

To convert the absolute path into a repo-relative path:

Z:\shared_libs\common.DSN  →  repo_shared_libs\common.DSN

Syntax

'<absolute path>' = '<repository-relative path>'
  • Left side: absolute path to an external library directory. One entry per distinct external location.

  • Right side: corresponding directory in the repository, relative to repository root. Use '.' for repository root.

Config File Setup Summary

  1. List all external library directories referenced by the project (project directory, shared drives, tool/library installation paths).

  2. Determine the corresponding directory for each within the uploaded repository.

  3. Create .allspice/config.toml at the project root with one entry per location under [orcad_external_libraries].

  4. Verify each absolute path corresponds to a directory, not a file, and matches the path recorded by OrCad exactly.

Once configured, external schematic references are resolved automatically against the repository.