mirror of https://github.com/VLSIDA/OpenRAM.git
Pad strings in GDS to even number of bytes per bug report.
This commit is contained in:
parent
29c5ab48f0
commit
70ab672c5c
|
|
@ -123,7 +123,10 @@ class Gds2writer:
|
||||||
## LibraryName
|
## LibraryName
|
||||||
if("libraryName" in self.layoutObject.info):
|
if("libraryName" in self.layoutObject.info):
|
||||||
idBits='\x02\x06'
|
idBits='\x02\x06'
|
||||||
libraryName = self.layoutObject.info["libraryName"]
|
if (len(self.layoutObject.info["libraryName"]) % 2 != 0):
|
||||||
|
libraryName = self.layoutObject.info["libraryName"] + "\0"
|
||||||
|
else:
|
||||||
|
libraryName = self.layoutObject.info["libraryName"] + "\0"
|
||||||
self.writeRecord(idBits+libraryName)
|
self.writeRecord(idBits+libraryName)
|
||||||
## reference libraries
|
## reference libraries
|
||||||
if("referenceLibraries" in self.layoutObject.info):
|
if("referenceLibraries" in self.layoutObject.info):
|
||||||
|
|
@ -269,7 +272,10 @@ class Gds2writer:
|
||||||
self.writeRecord(idBits+plex)
|
self.writeRecord(idBits+plex)
|
||||||
if(thisSref.sName!=""):
|
if(thisSref.sName!=""):
|
||||||
idBits='\x12\x06'
|
idBits='\x12\x06'
|
||||||
sName = thisSref.sName
|
if (len(thisSref.sName) % 2 != 0):
|
||||||
|
sName = thisSref.sName+"\0"
|
||||||
|
else:
|
||||||
|
sName = thisSref.sName
|
||||||
self.writeRecord(idBits+sName)
|
self.writeRecord(idBits+sName)
|
||||||
if(thisSref.transFlags!=""):
|
if(thisSref.transFlags!=""):
|
||||||
idBits='\x1A\x01'
|
idBits='\x1A\x01'
|
||||||
|
|
@ -313,7 +319,10 @@ class Gds2writer:
|
||||||
self.writeRecord(idBits+plex)
|
self.writeRecord(idBits+plex)
|
||||||
if(thisAref.aName):
|
if(thisAref.aName):
|
||||||
idBits='\x12\x06'
|
idBits='\x12\x06'
|
||||||
aName = thisAref.aName
|
if (len(thisAref.aName) % 2 != 0):
|
||||||
|
aName = thisAref.aName+"\0"
|
||||||
|
else:
|
||||||
|
aName = thisAref.aName
|
||||||
self.writeRecord(idBits+aName)
|
self.writeRecord(idBits+aName)
|
||||||
if(thisAref.transFlags):
|
if(thisAref.transFlags):
|
||||||
idBits='\x1A\x01'
|
idBits='\x1A\x01'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue