CellMacros.h revision 10447:a465576671d4
18968Snilay@cs.wisc.edu#ifndef __DSENT_MODEL_STD_CELLS_CELLMACROS_H__ 28968Snilay@cs.wisc.edu#define __DSENT_MODEL_STD_CELLS_CELLMACROS_H__ 38968Snilay@cs.wisc.edu 48968Snilay@cs.wisc.edu#include "util/CommonType.h" 58968Snilay@cs.wisc.edu#include "model/std_cells/StdCell.h" 68968Snilay@cs.wisc.edu 78968Snilay@cs.wisc.edunamespace DSENT 88968Snilay@cs.wisc.edu{ 98968Snilay@cs.wisc.edu class StdCell; 108968Snilay@cs.wisc.edu 118968Snilay@cs.wisc.edu // Contains cell macros that can be created within standard cells 128968Snilay@cs.wisc.edu class CellMacros 138968Snilay@cs.wisc.edu { 148968Snilay@cs.wisc.edu private : 158968Snilay@cs.wisc.edu CellMacros(); 168968Snilay@cs.wisc.edu ~CellMacros(); 178968Snilay@cs.wisc.edu 188968Snilay@cs.wisc.edu public: 198968Snilay@cs.wisc.edu //NOR2 Macro 208968Snilay@cs.wisc.edu //Adds a NOR2 to the standard cell, normalized to some size 218968Snilay@cs.wisc.edu static void addNor2(StdCell* cell_, const String& name_, bool sizable_, bool a1_to_zn_path_, bool a2_to_zn_path_, 228968Snilay@cs.wisc.edu const String& a1_net_, const String& a2_net_, const String& zn_net_); 238968Snilay@cs.wisc.edu //Updates a NOR2 to to the standard cell, normalized to some size 248968Snilay@cs.wisc.edu static void updateNor2(StdCell* cell_, const String& name_, double normalized_size_); 258968Snilay@cs.wisc.edu 268968Snilay@cs.wisc.edu //NAND2 Macro 278968Snilay@cs.wisc.edu //Adds a NAND2 to the standard cell, normalized to some size 288968Snilay@cs.wisc.edu static void addNand2(StdCell* cell_, const String& name_, bool sizable_, bool a1_to_zn_path_, bool a2_to_zn_path_, 298968Snilay@cs.wisc.edu const String& a1_net_, const String& a2_net_, const String& zn_net_); 308968Snilay@cs.wisc.edu //Updates a NAND2 to to the standard cell, normalized to some size 318968Snilay@cs.wisc.edu static void updateNand2(StdCell* cell_, const String& name_, double normalized_size_); 328968Snilay@cs.wisc.edu 338968Snilay@cs.wisc.edu //INVERTER Macro 348968Snilay@cs.wisc.edu //Adds a inverter to the standard cell, normalized to some size 358968Snilay@cs.wisc.edu static void addInverter(StdCell* cell_, const String& name_, bool sizable_, bool a_to_zn_path_, 369123Sandreas.hansson@arm.com const String& a_net_, const String& zn_net_); 378968Snilay@cs.wisc.edu //Updates an inverter to to the standard cell, normalized to some size 388968Snilay@cs.wisc.edu static void updateInverter(StdCell* cell_, const String& name_, double normalized_size_); 398968Snilay@cs.wisc.edu 408968Snilay@cs.wisc.edu //INVZ Macro 418968Snilay@cs.wisc.edu //Adds a tristated inverter to the standard cell, normalized to some size 428968Snilay@cs.wisc.edu static void addTristate(StdCell* cell_, const String& name_, bool sizable_, bool a_to_zn_path_, bool oe_to_zn_path_, bool oen_to_zn_path_, 438968Snilay@cs.wisc.edu const String& a_net_, const String& oe_net_, const String& oen_net_, const String& zn_net_); 448968Snilay@cs.wisc.edu //Updates an tristated inverter to to the standard cell, normalized to some size 458968Snilay@cs.wisc.edu static void updateTristate(StdCell* cell_, const String& name_, double normalized_size_); 468968Snilay@cs.wisc.edu 478968Snilay@cs.wisc.edu //Helper functions 488968Snilay@cs.wisc.edu //Returns the width of NMOS transistors, given the NMOS and PMOS stacking 498968Snilay@cs.wisc.edu static double calculateNmosWidth(const StdCell* cell_, unsigned int max_stacked_nmos_, unsigned int max_stacked_pmos_, unsigned int current_stack_nmos_); 508968Snilay@cs.wisc.edu //Returns the width of PMOS transistors, given the NMOS and PMOS stacking 518968Snilay@cs.wisc.edu static double calculatePmosWidth(const StdCell* cell_, unsigned int max_stacked_nmos_, unsigned int max_stacked_pmos_, unsigned int current_stack_pmos_); 528968Snilay@cs.wisc.edu 538968Snilay@cs.wisc.edu }; // class CellMacros 548968Snilay@cs.wisc.edu} // namespace DSENT 558968Snilay@cs.wisc.edu 568968Snilay@cs.wisc.edu#endif // __DSENT_MODEL_STD_CELLS_CELLMACROS_H__ 578968Snilay@cs.wisc.edu 589826Sandreas.hansson@arm.com