diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2014-10-11 15:02:23 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2014-10-11 15:02:23 -0500 |
commit | e8ed7b1d1b5bef31e9874f679a5797c2e00d06f1 (patch) | |
tree | 421c9c50377aa664958685914f5504c4c019e21f /ext/dsent/model/std_cells/CellMacros.h | |
parent | a098fad174d8559037602b248b8e6f7f46bfebbb (diff) | |
download | gem5-e8ed7b1d1b5bef31e9874f679a5797c2e00d06f1.tar.xz |
ext: add the source code for DSENT
This patch adds a tool called DSENT to the ext/ directory. DSENT
is a tool that models power and area for on-chip networks. The next
patch adds a script for using the tool.
Diffstat (limited to 'ext/dsent/model/std_cells/CellMacros.h')
-rw-r--r-- | ext/dsent/model/std_cells/CellMacros.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/ext/dsent/model/std_cells/CellMacros.h b/ext/dsent/model/std_cells/CellMacros.h new file mode 100644 index 000000000..ce4b54473 --- /dev/null +++ b/ext/dsent/model/std_cells/CellMacros.h @@ -0,0 +1,57 @@ +#ifndef __DSENT_MODEL_STD_CELLS_CELLMACROS_H__ +#define __DSENT_MODEL_STD_CELLS_CELLMACROS_H__ + +#include "util/CommonType.h" +#include "model/std_cells/StdCell.h" + +namespace DSENT +{ + class StdCell; + + // Contains cell macros that can be created within standard cells + class CellMacros + { + private : + CellMacros(); + ~CellMacros(); + + public: + //NOR2 Macro + //Adds a NOR2 to the standard cell, normalized to some size + static void addNor2(StdCell* cell_, const String& name_, bool sizable_, bool a1_to_zn_path_, bool a2_to_zn_path_, + const String& a1_net_, const String& a2_net_, const String& zn_net_); + //Updates a NOR2 to to the standard cell, normalized to some size + static void updateNor2(StdCell* cell_, const String& name_, double normalized_size_); + + //NAND2 Macro + //Adds a NAND2 to the standard cell, normalized to some size + static void addNand2(StdCell* cell_, const String& name_, bool sizable_, bool a1_to_zn_path_, bool a2_to_zn_path_, + const String& a1_net_, const String& a2_net_, const String& zn_net_); + //Updates a NAND2 to to the standard cell, normalized to some size + static void updateNand2(StdCell* cell_, const String& name_, double normalized_size_); + + //INVERTER Macro + //Adds a inverter to the standard cell, normalized to some size + static void addInverter(StdCell* cell_, const String& name_, bool sizable_, bool a_to_zn_path_, + const String& a_net_, const String& zn_net_); + //Updates an inverter to to the standard cell, normalized to some size + static void updateInverter(StdCell* cell_, const String& name_, double normalized_size_); + + //INVZ Macro + //Adds a tristated inverter to the standard cell, normalized to some size + 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_, + const String& a_net_, const String& oe_net_, const String& oen_net_, const String& zn_net_); + //Updates an tristated inverter to to the standard cell, normalized to some size + static void updateTristate(StdCell* cell_, const String& name_, double normalized_size_); + + //Helper functions + //Returns the width of NMOS transistors, given the NMOS and PMOS stacking + static double calculateNmosWidth(const StdCell* cell_, unsigned int max_stacked_nmos_, unsigned int max_stacked_pmos_, unsigned int current_stack_nmos_); + //Returns the width of PMOS transistors, given the NMOS and PMOS stacking + static double calculatePmosWidth(const StdCell* cell_, unsigned int max_stacked_nmos_, unsigned int max_stacked_pmos_, unsigned int current_stack_pmos_); + + }; // class CellMacros +} // namespace DSENT + +#endif // __DSENT_MODEL_STD_CELLS_CELLMACROS_H__ + |