I'm trying to read the `caravel/runs/caravel/resul...
# shuttle
m
I'm trying to read the
caravel/runs/caravel/results/magic/caravel.gds.gz
file into magic to do device level extraction. However, I get the following error.
Copy code
Error while reading cell "(UNNAMED)" (byte position 4): Unexpected record type in input: 
  Expected HEADER record but got BOUNDARY.
@User Is this a side effect of removing "(UNNAMED)" cell deletion, ro should I be doing something different? https://github.com/RTimothyEdwards/open_pdks/commit/faac36af2ec937dcea545fa91dd06acfc51869c0
Please ignore. I'll try not to embarrass myself anymore.
t
I'm assuming that the issue was the fact that the GDS was compressed? The compression is necessary because the files are getting large and that is triggering github to start billing efabless for the extra data storage. So I expect the right solution is to let magic detect gzip files and uncompress them itself when it reads; also perhaps a global setting to make magic write compressed files, too. This is becoming necessary both for the GDS and the .mag files, and occasionally others.
Didn't see your last message outside of the thread, but regardless, I thought it was worth mentioning my thoughts about handling compressed files.
m
@Tim Edwards I had intended to uncompress the file to a new file but used
gzip -c
instead of
gunzip -c
. Incidentally, when CVC opens a file, it checks the suffix and if it finds gz, then it opens it with
popen
. It's C++, but there may be something you might use in magic so you don't have to uncompress the whole file somewhere. Here's the code.
Copy code
FILE * myCdlFile;	
if ( filename.substr(filename.length()-3, 3) == ".gz"
     && (myTestFile.open(filename), myTestFile.good()) ) {
    myTestFile.close();
	string myZcat = "zcat " + filename;
	myCdlFile = popen(myZcat.c_str(), "r");	
} else {
	myCdlFile = fopen(const_cast<const text_t>(filename.c_str()), "r");	
}
t
Thanks, that's very helpful.