• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/core/techModels/libMcPAT/area.h

00001 /*****************************************************************************
00002  *                                McPAT
00003  *                      SOFTWARE LICENSE AGREEMENT
00004  *            Copyright 2009 Hewlett-Packard Development Company, L.P.
00005  *                          All Rights Reserved
00006  *
00007  * Permission to use, copy, and modify this software and its documentation is
00008  * hereby granted only under the following terms and conditions.  Both the
00009  * above copyright notice and this permission notice must appear in all copies
00010  * of the software, derivative works or modified versions, and any portions
00011  * thereof, and both notices must appear in supporting documentation.
00012  *
00013  * Any User of the software ("User"), by accessing and using it, agrees to the
00014  * terms and conditions set forth herein, and hereby grants back to Hewlett-
00015  * Packard Development Company, L.P. and its affiliated companies ("HP") a
00016  * non-exclusive, unrestricted, royalty-free right and license to copy,
00017  * modify, distribute copies, create derivate works and publicly display and
00018  * use, any changes, modifications, enhancements or extensions made to the
00019  * software by User, including but not limited to those affording
00020  * compatibility with other hardware or software, but excluding pre-existing
00021  * software applications that may incorporate the software.  User further
00022  * agrees to use its best efforts to inform HP of any such changes,
00023  * modifications, enhancements or extensions.
00024  *
00025  * Correspondence should be provided to HP at:
00026  *
00027  * Director of Intellectual Property Licensing
00028  * Office of Strategy and Technology
00029  * Hewlett-Packard Company
00030  * 1501 Page Mill Road
00031  * Palo Alto, California  94304
00032  *
00033  * The software may be further distributed by User (but not offered for
00034  * sale or transferred for compensation) to third parties, under the
00035  * condition that such third parties agree to abide by the terms and
00036  * conditions of this license.
00037  *
00038  * THE SOFTWARE IS PROVIDED "AS IS" WITH ANY AND ALL ERRORS AND DEFECTS
00039  * AND USER ACKNOWLEDGES THAT THE SOFTWARE MAY CONTAIN ERRORS AND DEFECTS.
00040  * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THE SOFTWARE, INCLUDING ALL
00041  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL
00042  * HP BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
00043  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00044  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ACTION, ARISING
00045  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE SOFTWARE.
00046  *
00047  ***************************************************************************/
00048 #ifndef __AREA_H__
00049 #define __AREA_H__
00050 
00051 #include "cacti_interface.h"
00052 #include "basic_circuit.h"
00053 #include "parameter.h"
00054 #include <list>
00055 
00056 using namespace std;
00057 
00058 class Dout_htree_node;
00059 class Decoder;
00060 class PredecoderBlock;
00061 class PredecoderBlockDriver;
00062 class Driver;
00063 class AddrDatainHtreeNode;
00064 class DataoutHtreeNode;
00065 class AddrDatainHtreeAtMatInterval;
00066 class BankHtreeSizing;
00067 class ArrayEdgeToBankEdgeHtreeSizing;
00068 
00069 
00070 class Area
00071 {
00072  public:
00073   double w;
00074   double h;
00075 
00076   Area():w(0), h(0), area(0) { }
00077   double get_w() const    { return w; }
00078   double get_h() const    { return h; }
00079   double get_area() const
00080   {
00081     if (w == 0 && h == 0)
00082     {
00083       return area;
00084     }
00085     else
00086     {
00087       return w*h;
00088     }
00089   }
00090   void set_w(double w_) { w = w_; }
00091   void set_h(double h_) { h = h_; }
00092   void set_area(double a_) { area = a_; }
00093 
00094   Area set_area_fa_subarray(int tag_bits, int num_r_subarray);
00095   void set_subarraymem_area(int num_r_subarray, int num_c_subarray, const Area & cell, uint32_t ram_cell_tech_type);
00096 
00097   static Area gatearea(int gatetype, int numberofinputs, double widthpmos, double widthnmos, double height_gate);
00098   static Area bit_mux_sense_amp_precharge_sa_mux_write_driver_write_mux_area(
00099     int number_cols_subarray,
00100     int deg_bitline_muxing,
00101     int Ndsam_lev_1,
00102     int Ndsam_lev_2,
00103     double subarray_mem_cell_area_width,
00104     int RWP,
00105     int ERP,
00106     int EWP,
00107     const Area & cell,
00108     bool is_dram_);
00109   static Area subarray_output_driver_area(
00110     int number_cols_subarray,
00111     int deg_bitline_muxing,
00112     int Ndsam_lev_1,
00113     int Ndsam_lev_2,
00114     double subarray_mem_cell_area_width,
00115     const Dout_htree_node & dout_htree_node);
00116 
00117   static Area area_mat(
00118     bool is_fa,
00119     bool is_tag,
00120     int tagbits,
00121     int num_rows_subarray,
00122     int num_cols_subarray,
00123     int num_subarrays,
00124     int deg_bitline_muxing,
00125     int deg_senseamp_muxing_non_associativity,
00126     int Ndsam_lev_1,
00127     int Ndsam_lev_2,
00128     int number_addr_bits_mat,
00129     int number_datain_bits_mat,
00130     int number_dataout_bits_mat,
00131     int number_way_select_signals_mat,
00132     PredecoderBlock & row_predec_blk_1,
00133     PredecoderBlock & row_predec_blk_2,
00134     PredecoderBlock & bit_mux_predec_blk_1,
00135     PredecoderBlock & bit_mux_predec_blk_2,
00136     PredecoderBlock & senseamp_mux_lev_1_predec_blk_1,
00137     PredecoderBlock & senseamp_mux_lev_1_predec_blk_2,
00138     PredecoderBlock & senseamp_mux_lev_2_predec_blk_1,
00139     PredecoderBlock & senseamp_mux_lev_2_predec_blk_2,
00140     PredecoderBlock & dummy_way_select_predec_blk_1,
00141     Decoder & row_dec,
00142     Decoder & bit_mux_dec,
00143     Decoder & senseamp_mux_lev_1_dec,
00144     Decoder & senseamp_mux_lev_2_dec,
00145     PredecoderBlockDriver & row_predec_blk_driver_1,
00146     PredecoderBlockDriver & row_predec_blk_driver_2,
00147     PredecoderBlockDriver & bit_mux_predec_blk_driver_1,
00148     PredecoderBlockDriver & bit_mux_predec_blk_driver_2,
00149     PredecoderBlockDriver & senseamp_mux_lev_1_predec_blk_driver_1,
00150     PredecoderBlockDriver & senseamp_mux_lev_1_predec_blk_driver_2,
00151     PredecoderBlockDriver & senseamp_mux_lev_2_predec_blk_driver_1,
00152     PredecoderBlockDriver & senseamp_mux_lev_2_predec_blk_driver_2,
00153     PredecoderBlockDriver & way_select_driver_1,
00154     const Dout_htree_node & subarray_output_htree_node,
00155     const Area & cell,
00156     bool is_dram,
00157     uint32_t ram_cell_tech_type);
00158 
00159   static Area area_single_bank(
00160     int number_rows_subarray,
00161     bool is_tag,
00162     int number_horizontal_htree_nodes,
00163     int number_vertical_htree_nodes,
00164     int number_tristate_horizontal_htree_nodes,
00165     int number_mats_horizontal_direction,
00166     int number_mats_vertical_direction,
00167     int number_activated_mats_horizontal_direction,
00168     int number_addr_bits_mat,
00169     int number_way_select_signals_mat,
00170     int tagbits,
00171     int number_datain_bits_mat,
00172     int number_dataout_bits_mat,
00173     int number_datain_bits_subbank,
00174     int number_dataout_bits_subbank,
00175     const AddrDatainHtreeNode & hor_addr_di_htree_node,
00176     const AddrDatainHtreeNode & ver_addr_di_htree_node,
00177     const DataoutHtreeNode    & do_htree_node,
00178     const AddrDatainHtreeAtMatInterval & hor_addr_di_htree_at_mat_interval,
00179     const AddrDatainHtreeAtMatInterval & ver_addr_di_htree_at_mat_interval,
00180     const BankHtreeSizing & bank_htree_sizing,
00181     const PredecoderBlock& row_predec_blk_1,
00182     const PredecoderBlock& row_predec_blk_2,
00183     const PredecoderBlock& bit_mux_predec_blk_1,
00184     const PredecoderBlock& bit_mux_predec_blk_2,
00185     const PredecoderBlock& senseamp_mux_lev_1_predec_blk_1,
00186     const PredecoderBlock& senseamp_mux_lev_1_predec_blk_2,
00187     const PredecoderBlock& senseamp_mux_lev_2_predec_blk_1,
00188     const PredecoderBlock& senseamp_mux_lev_2_predec_blk_2,
00189     const Decoder &row_dec,
00190     const Decoder &bit_mux_dec,
00191     const Decoder &senseamp_mux_lev_1_dec,
00192     const Decoder &senseamp_mux_lev_2_dec,
00193     const PredecoderBlockDriver& row_predec_blk_driver_1,
00194     const PredecoderBlockDriver& row_predec_blk_driver_2,
00195     const PredecoderBlockDriver& bit_mux_predec_blk_driver_1,
00196     const PredecoderBlockDriver& bit_mux_predec_blk_driver_2,
00197     const PredecoderBlockDriver& senseamp_mux_lev_1_predec_blk_driver_1,
00198     const PredecoderBlockDriver& senseamp_mux_lev_1_predec_blk_driver_2,
00199     const PredecoderBlockDriver& senseamp_mux_lev_2_predec_blk_driver_1,
00200     const PredecoderBlockDriver& senseamp_mux_lev_2_predec_blk_driver_2,
00201     powerDef *tot_power,
00202     powerDef * tot_power_row_predecode_block_drivers,
00203     powerDef *tot_power_bit_mux_predecode_block_drivers,
00204     powerDef *tot_power_senseamp_mux_lev_1_predecode_block_drivers,
00205     powerDef *tot_power_senseamp_mux_lev_2_predecode_block_drivers,
00206     powerDef *tot_power_row_predecode_blocks,
00207     powerDef *tot_power_bit_mux_predecode_blocks,
00208     powerDef *tot_power_senseamp_mux_lev_1_predecode_blocks,
00209     powerDef *tot_power_senseamp_mux_lev_2_predecode_blocks,
00210     powerDef *tot_power_row_decoders,
00211     powerDef *tot_power_bit_mux_decoders,
00212     powerDef *tot_power_senseamp_mux_lev_1_decoders,
00213     powerDef *tot_power_senseamp_mux_lev_2_decoders,
00214     const Area & area_mat);
00215 
00216   static Area area_all_banks(
00217     int     number_banks,
00218     double  bank_height,
00219     double  bank_width,
00220     int     number_bits_routed_to_bank,
00221     double *length_htree_route_to_bank,
00222     int     number_mats_vertical_direction,
00223     int     is_main_mem);
00224 
00225 
00226  private:
00227   double area;
00228 
00229   static double width_diffusion(int stackedinputs, int number_folded_transistors);
00230   static double width_transistor_after_folding(double input_width, double threshold_folding_width);
00231   static Area area_sense_amplifier(
00232     double width_latch_pmos,
00233     double width_latch_nmos,
00234     double width_enable,
00235     double width_iso,
00236     double pitch_sense_amp);
00237   static double area_write_driver_or_write_mux(bool is_dram_);
00238   static Area area_comparators(int tagbits, int number_ways_in_mat, double subarray_mem_cell_area_width);
00239 };
00240 
00241 #endif

Generated on Fri Oct 22 2010 11:02:14 for SST by  doxygen 1.7.1