From adb3044f39fdfa261d828b8f3600dfbc0def2e4a Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 17 Feb 2014 12:19:13 -0800 Subject: Adding Python API n_area() to report area after standard cell mapping. --- src/python/pyabc.i | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/python') diff --git a/src/python/pyabc.i b/src/python/pyabc.i index 51b36f20..1bbf624f 100644 --- a/src/python/pyabc.i +++ b/src/python/pyabc.i @@ -115,6 +115,19 @@ int n_levels() return -1; } +double n_area() +{ + Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame(); + Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc); + + if ( pNtk && Abc_NtkHasMapping(pNtk) ) + { + return Abc_NtkGetMappedArea(pNtk); + } + + return -1; +} + int has_comb_model() { Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame(); @@ -660,6 +673,7 @@ int n_pis(); int n_pos(); int n_latches(); int n_levels(); +double n_area(); int run_command(char* cmd); -- cgit v1.2.3