-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode_design.txt
More file actions
89 lines (66 loc) · 2.17 KB
/
Copy pathcode_design.txt
File metadata and controls
89 lines (66 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
LLC_Indexing_Hardware_for_BCE
/*
****************************************************************
Load-Balancing-Hash
****************************************************************
*/
/*
{
"input" : {
"line_address": "32bit virtual address generated from processor",
"number_of_clusters_table": "hash_map generated by OS contains info as ‘domainID’: ‘ numOfClusters’ "
},
"output": "LCID"
}
*/
// Load-Balancing Hash function returns LCID as bit string
String LBH(input) {
num_of_clusters = get_total_numbers_of_clusters(number_of_clusters_table)
n = 9 // here n means log of numOfClusters
x = Line_addr[29:5] // default B_bit = 24
LCID = null
if( int(x[n-1:0] < numOfClusters) {
LCID = x[n-1:0]
}
else {
// parallelly process x in the 5 randomized hash function with different RandomBinaryMatrix generated from the same uniform distribution
if(h(x)<numOfClusters) LCID = h(x);
// IF ALL hash function generate values greater than numOfClusters then go to invertedMapping
flag = true;
}
if(flag) {
x[n-1:0] = invert(x[n-1:0])
LCID = x[n-1:0]
}
return LCID;
}
string h(x) {
rbm = generate_random_binary_matrix(); // 24*9 dimensional matrix with random binary values
hash_values = []
hash_value = ""
for(int i=0; i<9; i++) {
hash_values[i] = rbm[i] AND x;
hash_value += perform_xor(hash_values) // perform xor operation over all the hash values, will return 1 bit output
}
return hash_value; // 9 bit LCID
}
/*
****************************************************************
Cluster-Indirection-Module
****************************************************************
*/
/*
{
"input" : {
"domain_id": "9 bit id depends on max no of clusters possible",
"LCID": "output of LBH"
},
"output": "PCID"
}
*/
String CIM(input) {
base_addr = domain_base_table(domain_id); // gives a 9-bit base address of a domain i.e. LCID-0
PCID = cluster_location_table(base_addr, LCID); // add the LCID with the base address/pointer to locate the physical address of the cluster in the LLC
return PCID;
}
// cluster location table contains the LCID to PCID mappings where the PCIDs of all clusters of domain are stored contiguosly