CellMacros.h revision 10447
110447Snilay@cs.wisc.edu#ifndef __DSENT_MODEL_STD_CELLS_CELLMACROS_H__
210447Snilay@cs.wisc.edu#define __DSENT_MODEL_STD_CELLS_CELLMACROS_H__
310447Snilay@cs.wisc.edu
410447Snilay@cs.wisc.edu#include "util/CommonType.h"
510447Snilay@cs.wisc.edu#include "model/std_cells/StdCell.h"
610447Snilay@cs.wisc.edu
710447Snilay@cs.wisc.edunamespace DSENT
810447Snilay@cs.wisc.edu{
910447Snilay@cs.wisc.edu    class StdCell;
1010447Snilay@cs.wisc.edu
1110447Snilay@cs.wisc.edu    // Contains cell macros that can be created within standard cells
1210447Snilay@cs.wisc.edu    class CellMacros
1310447Snilay@cs.wisc.edu    {
1410447Snilay@cs.wisc.edu        private :
1510447Snilay@cs.wisc.edu            CellMacros();
1610447Snilay@cs.wisc.edu            ~CellMacros();
1710447Snilay@cs.wisc.edu
1810447Snilay@cs.wisc.edu        public:
1910447Snilay@cs.wisc.edu            //NOR2 Macro
2010447Snilay@cs.wisc.edu            //Adds a NOR2 to the standard cell, normalized to some size
2110447Snilay@cs.wisc.edu            static void addNor2(StdCell* cell_, const String& name_, bool sizable_, bool a1_to_zn_path_, bool a2_to_zn_path_,
2210447Snilay@cs.wisc.edu                                const String& a1_net_, const String& a2_net_, const String& zn_net_);
2310447Snilay@cs.wisc.edu            //Updates a NOR2 to to the standard cell, normalized to some size
2410447Snilay@cs.wisc.edu            static void updateNor2(StdCell* cell_, const String& name_, double normalized_size_);
2510447Snilay@cs.wisc.edu
2610447Snilay@cs.wisc.edu            //NAND2 Macro
2710447Snilay@cs.wisc.edu            //Adds a NAND2 to the standard cell, normalized to some size
2810447Snilay@cs.wisc.edu            static void addNand2(StdCell* cell_, const String& name_, bool sizable_, bool a1_to_zn_path_, bool a2_to_zn_path_,
2910447Snilay@cs.wisc.edu                                const String& a1_net_, const String& a2_net_, const String& zn_net_);
3010447Snilay@cs.wisc.edu            //Updates a NAND2 to to the standard cell, normalized to some size
3110447Snilay@cs.wisc.edu            static void updateNand2(StdCell* cell_, const String& name_, double normalized_size_);
3210447Snilay@cs.wisc.edu
3310447Snilay@cs.wisc.edu            //INVERTER Macro
3410447Snilay@cs.wisc.edu            //Adds a inverter to the standard cell, normalized to some size
3510447Snilay@cs.wisc.edu            static void addInverter(StdCell* cell_, const String& name_, bool sizable_, bool a_to_zn_path_,
3610447Snilay@cs.wisc.edu                                    const String& a_net_, const String& zn_net_);
3710447Snilay@cs.wisc.edu            //Updates an inverter to to the standard cell, normalized to some size
3810447Snilay@cs.wisc.edu            static void updateInverter(StdCell* cell_, const String& name_, double normalized_size_);
3910447Snilay@cs.wisc.edu
4010447Snilay@cs.wisc.edu            //INVZ Macro
4110447Snilay@cs.wisc.edu            //Adds a tristated inverter to the standard cell, normalized to some size
4210447Snilay@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_,
4310447Snilay@cs.wisc.edu                                    const String& a_net_, const String& oe_net_, const String& oen_net_, const String& zn_net_);
4410447Snilay@cs.wisc.edu            //Updates an tristated inverter to to the standard cell, normalized to some size
4510447Snilay@cs.wisc.edu            static void updateTristate(StdCell* cell_, const String& name_, double normalized_size_);
4610447Snilay@cs.wisc.edu
4710447Snilay@cs.wisc.edu            //Helper functions
4810447Snilay@cs.wisc.edu            //Returns the width of NMOS transistors, given the NMOS and PMOS stacking
4910447Snilay@cs.wisc.edu            static double calculateNmosWidth(const StdCell* cell_, unsigned int max_stacked_nmos_, unsigned int max_stacked_pmos_, unsigned int current_stack_nmos_);
5010447Snilay@cs.wisc.edu            //Returns the width of PMOS transistors, given the NMOS and PMOS stacking
5110447Snilay@cs.wisc.edu            static double calculatePmosWidth(const StdCell* cell_, unsigned int max_stacked_nmos_, unsigned int max_stacked_pmos_, unsigned int current_stack_pmos_);
5210447Snilay@cs.wisc.edu
5310447Snilay@cs.wisc.edu    }; // class CellMacros
5410447Snilay@cs.wisc.edu} // namespace DSENT
5510447Snilay@cs.wisc.edu
5610447Snilay@cs.wisc.edu#endif // __DSENT_MODEL_STD_CELLS_CELLMACROS_H__
5710447Snilay@cs.wisc.edu
58