From 04e450b03a1d6bf42ef803d0338caf5a7f1acce1 Mon Sep 17 00:00:00 2001
From: Letitia Li <leli@enst.fr>
Date: Wed, 9 Mar 2016 15:36:26 +0000
Subject: [PATCH] CPU encryption

---
 src/ui/tmldd/TMLArchiCPUNode.java | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/ui/tmldd/TMLArchiCPUNode.java b/src/ui/tmldd/TMLArchiCPUNode.java
index df1c1e6139..1f7ce0b2c4 100755
--- a/src/ui/tmldd/TMLArchiCPUNode.java
+++ b/src/ui/tmldd/TMLArchiCPUNode.java
@@ -397,7 +397,7 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent,
                 errors += "Clock ratio  ";
             }
         }
-	//encryption = dialog.getEncryption();
+	encryption = dialog.getEncryption();
         if (error) {
             JOptionPane.showMessageDialog(frame,
                                           "Invalid value for the following attributes: " + errors,
@@ -477,7 +477,8 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent,
         sb.append(" execiTime=\"" + execiTime + "\"");
         sb.append(" execcTime=\"" + execcTime + "\"");
         sb.append(" clockRatio=\"" + clockRatio + "\"");
-				sb.append(" MECType=\"" + MECType.getIndex() + "\"");
+	sb.append(" MECType=\"" + MECType.getIndex() + "\"");
+	sb.append(" encryption=\"" + encryption + "\"");
         sb.append("/>\n");
         sb.append("</extraparam>\n");
         return new String(sb);
@@ -552,6 +553,9 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent,
                                 if ((elt.getAttribute("sliceTime") != null) &&  (elt.getAttribute("sliceTime").length() > 0)){
                                     sliceTime = Integer.decode(elt.getAttribute("sliceTime")).intValue();
                                 }
+				if ((elt.getAttribute("encryption") != null) &&  (elt.getAttribute("encryption").length() > 0)){
+                                    encryption = Integer.decode(elt.getAttribute("encryption")).intValue();
+                                }
                             }
                         }
                     }
@@ -634,7 +638,8 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent,
         attr += "Branch. pred. misrate (in %) = " + branchingPredictionPenalty + "\n";
         attr += "Cache miss (in %) = " + cacheMiss + "\n";
         attr += "Clock ratio = " + clockRatio + "\n";
-				attr += "MECType = " + MECType.getIndex() + "\n";
+	attr += "MECType = " + MECType.getIndex() + "\n";
+	attr += "encryption = " + encryption+ "\n";
         return attr;
 
     }
-- 
GitLab