Ucache.h (10152:52c552138ba1) Ucache.h (10234:5cb711fa6176)
1/*****************************************************************************
2 * McPAT/CACTI
3 * SOFTWARE LICENSE AGREEMENT
4 * Copyright 2012 Hewlett-Packard Development Company, L.P.
1/*****************************************************************************
2 * McPAT/CACTI
3 * SOFTWARE LICENSE AGREEMENT
4 * Copyright 2012 Hewlett-Packard Development Company, L.P.
5 * Copyright (c) 2010-2013 Advanced Micro Devices, Inc.
5 * All Rights Reserved
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
9 * met: redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer;
11 * redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the

--- 7 unchanged lines hidden (view full) ---

20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
6 * All Rights Reserved
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met: redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer;
12 * redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the

--- 7 unchanged lines hidden (view full) ---

21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 ***************************************************************************/
31
32
33#ifndef __UCACHE_H__
34#define __UCACHE_H__
35
36#include <list>
37
38#include "area.h"
39#include "nuca.h"
40#include "router.h"
41
30 *
31 ***************************************************************************/
32
33
34#ifndef __UCACHE_H__
35#define __UCACHE_H__
36
37#include <list>
38
39#include "area.h"
40#include "nuca.h"
41#include "router.h"
42
42class min_values_t
43{
44 public:
43class min_values_t {
44public:
45 double min_delay;
46 double min_dyn;
47 double min_leakage;
48 double min_area;
49 double min_cyc;
50
51 min_values_t() : min_delay(BIGNUM), min_dyn(BIGNUM), min_leakage(BIGNUM), min_area(BIGNUM), min_cyc(BIGNUM) { }
52
53 void update_min_values(const min_values_t * val);
54 void update_min_values(const uca_org_t & res);
55 void update_min_values(const nuca_org_t * res);
56 void update_min_values(const mem_array * res);
57};
58
59
60
45 double min_delay;
46 double min_dyn;
47 double min_leakage;
48 double min_area;
49 double min_cyc;
50
51 min_values_t() : min_delay(BIGNUM), min_dyn(BIGNUM), min_leakage(BIGNUM), min_area(BIGNUM), min_cyc(BIGNUM) { }
52
53 void update_min_values(const min_values_t * val);
54 void update_min_values(const uca_org_t & res);
55 void update_min_values(const nuca_org_t * res);
56 void update_min_values(const mem_array * res);
57};
58
59
60
61struct solution
62{
63 int tag_array_index;
64 int data_array_index;
65 list<mem_array *>::iterator tag_array_iter;
66 list<mem_array *>::iterator data_array_iter;
67 double access_time;
68 double cycle_time;
69 double area;
70 double efficiency;
71 powerDef total_power;
61struct solution {
62 int tag_array_index;
63 int data_array_index;
64 list<mem_array *>::iterator tag_array_iter;
65 list<mem_array *>::iterator data_array_iter;
66 double access_time;
67 double cycle_time;
68 double area;
69 double efficiency;
70 powerDef total_power;
72};
73
74
75
76bool calculate_time(
77 bool is_tag,
78 int pure_ram,
79 bool pure_cam,

--- 9 unchanged lines hidden (view full) ---

89 uca_org_t *ptr_fin_res,
90 bool is_main_mem);
91void update(uca_org_t *fin_res);
92
93void solve(uca_org_t *fin_res);
94void init_tech_params(double tech, bool is_tag);
95
96
71};
72
73
74
75bool calculate_time(
76 bool is_tag,
77 int pure_ram,
78 bool pure_cam,

--- 9 unchanged lines hidden (view full) ---

88 uca_org_t *ptr_fin_res,
89 bool is_main_mem);
90void update(uca_org_t *fin_res);
91
92void solve(uca_org_t *fin_res);
93void init_tech_params(double tech, bool is_tag);
94
95
97struct calc_time_mt_wrapper_struct
98{
99 uint32_t tid;
100 bool is_tag;
101 bool pure_ram;
102 bool pure_cam;
103 bool is_main_mem;
104 double Nspd_min;
96struct calc_time_mt_wrapper_struct {
97 uint32_t tid;
98 bool is_tag;
99 bool pure_ram;
100 bool pure_cam;
101 bool is_main_mem;
102 double Nspd_min;
105
103
106 min_values_t * data_res;
107 min_values_t * tag_res;
104 min_values_t * data_res;
105 min_values_t * tag_res;
108
106
109 list data_arr;
110 list tag_arr;
107 list<mem_array *> data_arr;
108 list<mem_array *> tag_arr;
111};
112
113void *calc_time_mt_wrapper(void * void_obj);
114
115#endif
109};
110
111void *calc_time_mt_wrapper(void * void_obj);
112
113#endif