public abstract class LibraryFiles extends Input
Input.InputPreferences
Modifier and Type | Field and Description |
---|---|
protected double[] |
cellLambda
lambda value for each cell of the library
|
protected static int |
cellsConstructed
number of cells constructed so far.
|
protected boolean |
convertMosisCmosTechnologies
true if old MOSIS CMOS technologies appear in the library
|
protected int |
errorCount
Number of errors in this LibraryFile
|
static Variable.Key |
IO_DUMMY_OBJECT
key of Variable to denote a dummy cell or library
|
static Variable.Key |
IO_TRUE_LIBRARY
key of Variable holding true library of fake cell.
|
protected Library |
lib
The Library being input.
|
protected static java.lang.String |
mainLibDirectory
the path to the library being read.
|
protected int |
nodeProtoCount
The number of Cells in the file.
|
protected Cell[] |
nodeProtoList
A list of cells being read.
|
protected boolean |
rotationMirrorBits
true if rotation mirror bits are used
|
protected java.util.List<Cell> |
scaledCells
a List of scaled Cells that got created
|
protected boolean |
scaleLambdaBy20
true to scale lambda by 20
|
protected java.util.HashMap<Technology,Technology.SizeCorrector> |
sizeCorrectors
SizeCorrectors for used technologies
|
protected static double |
TINYDISTANCE |
protected boolean |
topLevelLibrary
true if the library is the main one being read.
|
protected static int |
totalCells
total number of cells in all read libraries
|
protected static boolean |
VERBOSE |
protected Version |
version
the Electric version in the library file.
|
byteCount, dataInputStream, ep, errorLogger, fileLength, filePath, inputStream, lineReader, pushbackInputStream, READ_BUFFER_SIZE
Modifier and Type | Method and Description |
---|---|
protected boolean |
canScale() |
static void |
cleanupLibraryInput() |
protected double |
computeLambda(Cell cell,
int cellIndex) |
protected void |
computeTech(Cell cell,
java.util.Set uncomputedCells) |
protected static java.lang.String |
convertGeomName(java.lang.Object value,
boolean isDisplay)
Method to convert name of Geometric object.
|
protected View |
findOldViewName(java.lang.String viewName)
Method to find the View to use for an old View name.
|
protected Technology |
findTechnologyName(java.lang.String name) |
static java.net.URL |
fixMissingExtension(java.net.URL fileURL,
FileType type)
Method to see if adding a proper extension fixes a missing file.
|
protected LibraryFiles |
getReaderForLib(Library lib) |
static void |
initializeLibraryInput()
Reload Cells from disk.
|
protected static Library |
readALibrary(EditingPreferences ep,
java.net.URL fileURL,
Library lib,
java.lang.String libName,
FileType type,
java.util.Map<Setting,java.lang.Object> projectSettings)
Method to read a single library file.
|
protected Library |
readExternalLibraryFromFilename(java.lang.String theFileName,
FileType defaultType,
EditingPreferences ep)
Method to read an external library file, given its name as stored on disk.
|
boolean |
readInputLibrary(EditingPreferences ep) |
static Library |
readLibrary(EditingPreferences ep,
java.net.URL fileURL,
java.lang.String libName,
FileType type,
boolean quick)
Method to read a Library from disk.
|
static Library |
readLibrary(EditingPreferences ep,
java.net.URL fileURL,
java.lang.String libName,
FileType type,
boolean quick,
java.util.Map<Setting,java.lang.Object> projectSettings)
Method to read a Library from disk.
|
protected boolean |
readProjectSettings(EditingPreferences ep)
Method to read project preferences from a Library.
|
static java.util.Map<java.lang.String,java.lang.Object> |
readProjectsSettingsFromLibrary(java.net.URL fileURL,
FileType type,
EditingPreferences ep)
Method to read a Library from disk.
|
static IdMapper |
reloadLibrary(EditingPreferences ep,
Library lib)
Reload a library from disk.
|
protected void |
scanNodesForRecursion(Cell cell,
java.util.HashSet<Cell> markCellForNodes,
java.util.HashSet<Cell> patchedCells,
NodeProto[] nil,
int start,
int end) |
static java.net.URL |
searchExternalLibraryFromFilename(java.lang.String mainLibDirectory,
java.lang.String theFileName,
FileType defaultType)
Method to search an external library file, given its name as stored on disk.
|
protected boolean |
spreadLambda(Cell cell,
int cellIndex) |
changesQuiet, closeInput, eofDuring, getAKeyword, getInputPreferences, getLine, getLineAndUpdateProgress, getLineAndUpdateProgressBinary, getLineFromBinary, getProgressNote, getRestOfComment, getRestOfLine, importALibrary, importLibrary, initKeywordParsing, isBreakCharacter, isChangeQuiet, isNewLibraryCreated, openBinaryInput, openStringsInput, openTextInput, preprocessLine, processInput, readWholeLine, setProgressNote, setProgressValue, startProgressDialog, stopProgressDialog, updateProgressDialog
public static final Variable.Key IO_TRUE_LIBRARY
public static final Variable.Key IO_DUMMY_OBJECT
protected Library lib
protected boolean topLevelLibrary
protected int nodeProtoCount
protected Cell[] nodeProtoList
protected double[] cellLambda
protected static int totalCells
protected static int cellsConstructed
protected java.util.List<Cell> scaledCells
protected int errorCount
protected Version version
protected boolean convertMosisCmosTechnologies
protected boolean scaleLambdaBy20
protected boolean rotationMirrorBits
protected java.util.HashMap<Technology,Technology.SizeCorrector> sizeCorrectors
protected static java.lang.String mainLibDirectory
protected static final boolean VERBOSE
protected static final double TINYDISTANCE
public static Library readLibrary(EditingPreferences ep, java.net.URL fileURL, java.lang.String libName, FileType type, boolean quick)
ep
- EditingPreferencesfileURL
- the URL to the disk file.libName
- the name to give the library (null to derive it from the file path)type
- the type of library file (ELIB, JELIB, etc.)quick
- true to read the library without verbosity (used when reading a library internally).public static java.net.URL fixMissingExtension(java.net.URL fileURL, FileType type)
fileURL
- URL to the file, which may not exist.type
- the expected file type.public static Library readLibrary(EditingPreferences ep, java.net.URL fileURL, java.lang.String libName, FileType type, boolean quick, java.util.Map<Setting,java.lang.Object> projectSettings)
fileURL
- the URL to the disk file.libName
- the name to give the library (null to derive it from the file path)type
- the type of library file (ELIB, JELIB, etc.)quick
- true to read the library without verbosity (used when reading a library internally).projectSettings
- an output map which is filled by project preferences of top librarypublic static java.util.Map<java.lang.String,java.lang.Object> readProjectsSettingsFromLibrary(java.net.URL fileURL, FileType type, EditingPreferences ep)
fileURL
- the URL to the disk file.type
- the type of library file (ELIB, JELIB, etc.)protected static Library readALibrary(EditingPreferences ep, java.net.URL fileURL, Library lib, java.lang.String libName, FileType type, java.util.Map<Setting,java.lang.Object> projectSettings)
ep
- EditingPreferencesfileURL
- the URL to the file.lib
- the Library to read.
If the Library is null, this is an entry-level library read, and one is created.
If the Library is not null, this is a recursive read caused by a cross-library
reference from inside another library.type
- the type of library file (ELIB, CIF, GDS, etc.)public static IdMapper reloadLibrary(EditingPreferences ep, Library lib)
ep
- EditingPreferenceslib
- the Library to reload.public static void initializeLibraryInput()
public boolean readInputLibrary(EditingPreferences ep)
protected void scanNodesForRecursion(Cell cell, java.util.HashSet<Cell> markCellForNodes, java.util.HashSet<Cell> patchedCells, NodeProto[] nil, int start, int end)
protected boolean readProjectSettings(EditingPreferences ep)
protected View findOldViewName(java.lang.String viewName)
viewName
- the old View name.protected Technology findTechnologyName(java.lang.String name)
protected Library readExternalLibraryFromFilename(java.lang.String theFileName, FileType defaultType, EditingPreferences ep)
theFileName
- the full path to the file, as written to disk.public static java.net.URL searchExternalLibraryFromFilename(java.lang.String mainLibDirectory, java.lang.String theFileName, FileType defaultType)
theFileName
- the full path to the file, as written to disk.defaultType
- default file typepublic static void cleanupLibraryInput()
protected LibraryFiles getReaderForLib(Library lib)
protected static java.lang.String convertGeomName(java.lang.Object value, boolean isDisplay)
value
- name of objectisDisplay
- true if this is displayable variable.protected void computeTech(Cell cell, java.util.Set uncomputedCells)
protected double computeLambda(Cell cell, int cellIndex)
protected boolean spreadLambda(Cell cell, int cellIndex)
protected boolean canScale()