summaryrefslogtreecommitdiffstats
path: root/src/base/io/ioWriteBlif.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-07-21 00:15:24 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-07-21 00:15:24 -0700
commitab84c73eb022b145faa040575d0e507e410035de (patch)
tree885985eba7b7fa679fc3fe1806807381a18946aa /src/base/io/ioWriteBlif.c
parentf917de3498159ecb5816eca0c7950e4ce8d22a3f (diff)
downloadabc-ab84c73eb022b145faa040575d0e507e410035de.tar.gz
abc-ab84c73eb022b145faa040575d0e507e410035de.tar.bz2
abc-ab84c73eb022b145faa040575d0e507e410035de.zip
Adding support for input slew (.input_drive) and output capacitance (.output_load) in BLIF reader/writer.
Diffstat (limited to 'src/base/io/ioWriteBlif.c')
-rw-r--r--src/base/io/ioWriteBlif.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/base/io/ioWriteBlif.c b/src/base/io/ioWriteBlif.c
index 692ec3bb..9ed2becb 100644
--- a/src/base/io/ioWriteBlif.c
+++ b/src/base/io/ioWriteBlif.c
@@ -714,6 +714,30 @@ void Io_WriteTimingInfo( FILE * pFile, Abc_Ntk_t * pNtk )
}
fprintf( pFile, "\n" );
+
+ pTimeDef = Abc_NtkReadDefaultInputDrive( pNtk );
+ if ( pTimeDef->Rise != 0.0 || pTimeDef->Fall != 0.0 )
+ fprintf( pFile, ".default_input_drive %g %g\n", pTimeDef->Rise, pTimeDef->Fall );
+ Abc_NtkForEachPi( pNtk, pNode, i )
+ {
+ pTime = Abc_NodeReadInputDrive( pNtk, i );
+ if ( pTime->Rise == pTimeDef->Rise && pTime->Fall == pTimeDef->Fall )
+ continue;
+ fprintf( pFile, ".input_drive %s %g %g\n", Abc_ObjName(Abc_ObjFanout0(pNode)), pTime->Rise, pTime->Fall );
+ }
+
+ pTimeDef = Abc_NtkReadDefaultOutputLoad( pNtk );
+ if ( pTimeDef->Rise != 0.0 || pTimeDef->Fall != 0.0 )
+ fprintf( pFile, ".default_output_load %g %g\n", pTimeDef->Rise, pTimeDef->Fall );
+ Abc_NtkForEachPo( pNtk, pNode, i )
+ {
+ pTime = Abc_NodeReadOutputLoad( pNtk, i );
+ if ( pTime->Rise == pTimeDef->Rise && pTime->Fall == pTimeDef->Fall )
+ continue;
+ fprintf( pFile, ".output_load %s %g %g\n", Abc_ObjName(Abc_ObjFanin0(pNode)), pTime->Rise, pTime->Fall );
+ }
+
+ fprintf( pFile, "\n" );
}