Commit 827f9062e6518efa395d9c6352a582a372e06fa9

Authored by Brice Colombier
1 parent e53c44a2e1
Exists in master

AW decoder working, ref wrapper added

Showing 13 changed files with 1167 additions and 10 deletions

... ... @@ -9,4 +9,8 @@
9 9 *.xml
10 10 *.gz
11 11 user_space/
  12 +wrapper/ref_working/OSVVM-master/
  13 +wrapper/ref_working/work/
  14 +*.wlf
  15 +*.ini
... ... @@ -292,18 +292,21 @@
292 292 self.masking_inputs = []
293 293  
294 294 if self.locking.get():
295   - self.graph_modified, self.unlocking_word, self.locking_inputs = locking(self.g,
296   - self.prim_in,
297   - self.prim_out,
298   - self.nodes,
299   - self.locking_overhead.get())
  295 + self.graph_modified, self.unlocking_word, self.locking_inputs, list_nodes_to_lock = locking(self.g,
  296 + self.prim_in,
  297 + self.prim_out,
  298 + self.nodes,
  299 + self.locking_overhead.get())
300 300 if self.masking.get():
301 301 self.graph_modified, self.unmasking_word, self.masking_inputs = masking(self.graph_modified,
302 302 self.prim_in,
303 303 self.prim_out,
304 304 self.nodes,
305 305 self.locking_overhead.get(),
306   - self.masking_heuristic.get())
  306 + self.masking_heuristic.get(),
  307 + list_nodes_to_lock)
  308 + if [i for i in self.locking_inputs if i in self.masking_inputs]:
  309 + raise ValueError("Some nodes will be masked and locked")
307 310 elif self.masking.get():
308 311 self.graph_modified, self.unmasking_word, self.masking_inputs = masking(self.g,
309 312 self.prim_in,
locking/locking.py View file @ 827f906
... ... @@ -52,7 +52,7 @@
52 52  
53 53 if len(locking_key) != len(list_nodes_to_lock):
54 54 raise Exception("Undefined V_locks, cannot generate the modified netlist.")
55   - return h, locking_key, locking_inputs
  55 + return h, locking_key, locking_inputs, list_nodes_to_lock
56 56  
57 57 if __name__ == "__main__":
58 58 for name in ["c432"]:
masking/masking.py View file @ 827f906
... ... @@ -40,7 +40,7 @@
40 40  
41 41 import numpy as np
42 42  
43   -def masking(g, prim_in, prim_out, nodes, overhead, heuristic):
  43 +def masking(g, prim_in, prim_out, nodes, overhead, heuristic, list_nodes_to_lock = []):
44 44  
45 45 h = g.copy() #Perform deep copy
46 46 key_size = int(len(nodes)*overhead/100)
... ... @@ -63,6 +63,8 @@
63 63 else:
64 64 raise ValueError("Unknown heuristic")
65 65  
  66 + # Exclude nodes which were previously locked already
  67 + list_nodes_to_mask = [i.encode('ascii','ignore') for i in list_nodes_to_mask if i not in [j[0] for j in list_nodes_to_lock]]
66 68 masking_key = []
67 69 for i in list_nodes_to_mask:
68 70 masking_key.append(random.randint(0, 1))
masking/modify_nodes_mask.py View file @ 827f906
... ... @@ -19,7 +19,7 @@
19 19 if len(list_nodes_to_mask) != len(masking_key):
20 20 raise ValueError("The key length does not match the number of nodes to mask !")
21 21  
22   - mask = {0:"xor", 1:"xnor"}
  22 + mask = {0:"xnor", 1:"xor"}
23 23 masking_inputs = []
24 24 #Handle vertices
25 25 for i in list_nodes_to_mask:
wrapper/ref_working/AW_decoder.vhd View file @ 827f906
  1 +LIBRARY ieee;
  2 +USE ieee.std_logic_1164.ALL;
  3 +
  4 +ENTITY AW_decoder IS
  5 +
  6 + PORT (
  7 + formatted_AW : IN STD_LOGIC_VECTOR(0 TO 127);
  8 + AW : OUT STD_LOGIC_VECTOR(0 TO 12));
  9 +
  10 +END ENTITY AW_decoder;
  11 +
  12 +ARCHITECTURE rtl OF AW_decoder IS
  13 +
  14 + SIGNAL locking_0 : STD_LOGIC;
  15 + SIGNAL locking_1 : STD_LOGIC;
  16 +
  17 +BEGIN
  18 +
  19 + -- Formatted AW: 00110000010100011100000000111100010110101100101011100110011001101100010010110000110110110100110011100000001011011110110110100011
  20 + -- AW: 1011111011001
  21 +
  22 + -- Mask ORs
  23 + AW(10) <= formatted_AW(104) OR formatted_AW(100) OR formatted_AW(94) OR formatted_AW(68) OR formatted_AW(110) OR formatted_AW(121) OR formatted_AW(78) OR formatted_AW(125) OR formatted_AW(102) OR formatted_AW(70) OR formatted_AW(124);
  24 + AW(11) <= formatted_AW(66) OR formatted_AW(99) OR formatted_AW(101) OR formatted_AW(71) OR formatted_AW(105) OR formatted_AW(95) OR formatted_AW(107) OR formatted_AW(67) OR formatted_AW(103) OR formatted_AW(82);
  25 + AW(7) <= formatted_AW(91) OR formatted_AW(88) OR formatted_AW(90) OR formatted_AW(85) OR formatted_AW(76) OR formatted_AW(123) OR formatted_AW(73) OR formatted_AW(118) OR formatted_AW(115) OR formatted_AW(77) OR formatted_AW(79);
  26 +
  27 + -- Mask ANDs
  28 + AW(8) <= formatted_AW(114) AND formatted_AW(126) AND formatted_AW(86) AND formatted_AW(116) AND formatted_AW(75) AND formatted_AW(87);
  29 + AW(9) <= formatted_AW(111) AND formatted_AW(84) AND formatted_AW(108) AND formatted_AW(122) AND formatted_AW(127) AND formatted_AW(81);
  30 + AW(12) <= formatted_AW(92) AND formatted_AW(113) AND formatted_AW(72) AND formatted_AW(97) AND formatted_AW(69) AND formatted_AW(89);
  31 + AW(5) <= formatted_AW(112) AND formatted_AW(93) AND formatted_AW(109) AND formatted_AW(80) AND formatted_AW(106) AND formatted_AW(98) AND formatted_AW(119);
  32 + AW(6) <= formatted_AW(64) AND formatted_AW(83) AND formatted_AW(120) AND formatted_AW(117) AND formatted_AW(96) AND formatted_AW(65) AND formatted_AW(74);
  33 +
  34 + -- Lock AND
  35 + locking_1 <= formatted_AW(2) AND formatted_AW(3) AND formatted_AW(9) AND formatted_AW(11) AND formatted_AW(15) AND formatted_AW(16) AND formatted_AW(17) AND formatted_AW(26) AND formatted_AW(27) AND formatted_AW(28) AND formatted_AW(29) AND formatted_AW(33) AND formatted_AW(35) AND formatted_AW(36) AND formatted_AW(38) AND formatted_AW(40) AND formatted_AW(41) AND formatted_AW(44) AND formatted_AW(46) AND formatted_AW(48) AND formatted_AW(49) AND formatted_AW(50) AND formatted_AW(53) AND formatted_AW(54) AND formatted_AW(57) AND formatted_AW(58) AND formatted_AW(61) AND formatted_AW(62);
  36 + AW(0) <= locking_1;
  37 + AW(2) <= locking_1;
  38 + AW(3) <= locking_1;
  39 + AW(4) <= locking_1;
  40 +
  41 + -- Lock OR
  42 + locking_0 <= formatted_AW(0) OR formatted_AW(1) OR formatted_AW(4) OR formatted_AW(5) OR formatted_AW(6) OR formatted_AW(7) OR formatted_AW(8) OR formatted_AW(10) OR formatted_AW(12) OR formatted_AW(13) OR formatted_AW(14) OR formatted_AW(18) OR formatted_AW(19) OR formatted_AW(20) OR formatted_AW(21) OR formatted_AW(22) OR formatted_AW(23) OR formatted_AW(24) OR formatted_AW(25) OR formatted_AW(30) OR formatted_AW(31) OR formatted_AW(32) OR formatted_AW(34) OR formatted_AW(37) OR formatted_AW(39) OR formatted_AW(42) OR formatted_AW(43) OR formatted_AW(45) OR formatted_AW(47) OR formatted_AW(51) OR formatted_AW(52) OR formatted_AW(55) OR formatted_AW(56) OR formatted_AW(59) OR formatted_AW(60) OR formatted_AW(63);
  43 + AW(1) <= locking_0;
  44 +
  45 +END ARCHITECTURE rtl;
wrapper/ref_working/c432.vhd View file @ 827f906
  1 +LIBRARY IEEE;
  2 +USE IEEE.STD_LOGIC_1164.ALL;
  3 +
  4 +ENTITY c432 IS
  5 +
  6 + PORT (
  7 + G1gat : IN STD_LOGIC;
  8 + G4gat : IN STD_LOGIC;
  9 + G8gat : IN STD_LOGIC;
  10 + G11gat : IN STD_LOGIC;
  11 + G14gat : IN STD_LOGIC;
  12 + G17gat : IN STD_LOGIC;
  13 + G21gat : IN STD_LOGIC;
  14 + G24gat : IN STD_LOGIC;
  15 + G27gat : IN STD_LOGIC;
  16 + G30gat : IN STD_LOGIC;
  17 + G34gat : IN STD_LOGIC;
  18 + G37gat : IN STD_LOGIC;
  19 + G40gat : IN STD_LOGIC;
  20 + G43gat : IN STD_LOGIC;
  21 + G47gat : IN STD_LOGIC;
  22 + G50gat : IN STD_LOGIC;
  23 + G53gat : IN STD_LOGIC;
  24 + G56gat : IN STD_LOGIC;
  25 + G60gat : IN STD_LOGIC;
  26 + G63gat : IN STD_LOGIC;
  27 + G66gat : IN STD_LOGIC;
  28 + G69gat : IN STD_LOGIC;
  29 + G73gat : IN STD_LOGIC;
  30 + G76gat : IN STD_LOGIC;
  31 + G79gat : IN STD_LOGIC;
  32 + G82gat : IN STD_LOGIC;
  33 + G86gat : IN STD_LOGIC;
  34 + G89gat : IN STD_LOGIC;
  35 + G92gat : IN STD_LOGIC;
  36 + G95gat : IN STD_LOGIC;
  37 + G99gat : IN STD_LOGIC;
  38 + G102gat : IN STD_LOGIC;
  39 + G105gat : IN STD_LOGIC;
  40 + G108gat : IN STD_LOGIC;
  41 + G112gat : IN STD_LOGIC;
  42 + G115gat : IN STD_LOGIC;
  43 + G223gat : OUT STD_LOGIC;
  44 + G329gat : OUT STD_LOGIC;
  45 + G370gat : OUT STD_LOGIC;
  46 + G421gat : OUT STD_LOGIC;
  47 + G430gat : OUT STD_LOGIC;
  48 + G431gat : OUT STD_LOGIC;
  49 + G432gat : OUT STD_LOGIC
  50 + );
  51 +
  52 +END ENTITY c432;
  53 +
  54 +ARCHITECTURE rtl OF c432 IS
  55 +
  56 + SIGNAL G118gat : STD_LOGIC;
  57 + SIGNAL G119gat : STD_LOGIC;
  58 + SIGNAL G122gat : STD_LOGIC;
  59 + SIGNAL G123gat : STD_LOGIC;
  60 + SIGNAL G126gat : STD_LOGIC;
  61 + SIGNAL G127gat : STD_LOGIC;
  62 + SIGNAL G130gat : STD_LOGIC;
  63 + SIGNAL G131gat : STD_LOGIC;
  64 + SIGNAL G134gat : STD_LOGIC;
  65 + SIGNAL G135gat : STD_LOGIC;
  66 + SIGNAL G138gat : STD_LOGIC;
  67 + SIGNAL G139gat : STD_LOGIC;
  68 + SIGNAL G142gat : STD_LOGIC;
  69 + SIGNAL G143gat : STD_LOGIC;
  70 + SIGNAL G146gat : STD_LOGIC;
  71 + SIGNAL G147gat : STD_LOGIC;
  72 + SIGNAL G150gat : STD_LOGIC;
  73 + SIGNAL G151gat : STD_LOGIC;
  74 + SIGNAL G154gat : STD_LOGIC;
  75 + SIGNAL G157gat : STD_LOGIC;
  76 + SIGNAL G158gat : STD_LOGIC;
  77 + SIGNAL G159gat : STD_LOGIC;
  78 + SIGNAL G162gat : STD_LOGIC;
  79 + SIGNAL G165gat : STD_LOGIC;
  80 + SIGNAL G168gat : STD_LOGIC;
  81 + SIGNAL G171gat : STD_LOGIC;
  82 + SIGNAL G174gat : STD_LOGIC;
  83 + SIGNAL G177gat : STD_LOGIC;
  84 + SIGNAL G180gat : STD_LOGIC;
  85 + SIGNAL G183gat : STD_LOGIC;
  86 + SIGNAL G184gat : STD_LOGIC;
  87 + SIGNAL G185gat : STD_LOGIC;
  88 + SIGNAL G186gat : STD_LOGIC;
  89 + SIGNAL G187gat : STD_LOGIC;
  90 + SIGNAL G188gat : STD_LOGIC;
  91 + SIGNAL G189gat : STD_LOGIC;
  92 + SIGNAL G190gat : STD_LOGIC;
  93 + SIGNAL G191gat : STD_LOGIC;
  94 + SIGNAL G192gat : STD_LOGIC;
  95 + SIGNAL G193gat : STD_LOGIC;
  96 + SIGNAL G194gat : STD_LOGIC;
  97 + SIGNAL G195gat : STD_LOGIC;
  98 + SIGNAL G196gat : STD_LOGIC;
  99 + SIGNAL G197gat : STD_LOGIC;
  100 + SIGNAL G198gat : STD_LOGIC;
  101 + SIGNAL G199gat : STD_LOGIC;
  102 + SIGNAL G203gat : STD_LOGIC;
  103 + SIGNAL G213gat : STD_LOGIC;
  104 + SIGNAL G224gat : STD_LOGIC;
  105 + SIGNAL G227gat : STD_LOGIC;
  106 + SIGNAL G230gat : STD_LOGIC;
  107 + SIGNAL G233gat : STD_LOGIC;
  108 + SIGNAL G236gat : STD_LOGIC;
  109 + SIGNAL G239gat : STD_LOGIC;
  110 + SIGNAL G242gat : STD_LOGIC;
  111 + SIGNAL G243gat : STD_LOGIC;
  112 + SIGNAL G246gat : STD_LOGIC;
  113 + SIGNAL G247gat : STD_LOGIC;
  114 + SIGNAL G250gat : STD_LOGIC;
  115 + SIGNAL G251gat : STD_LOGIC;
  116 + SIGNAL G254gat : STD_LOGIC;
  117 + SIGNAL G255gat : STD_LOGIC;
  118 + SIGNAL G256gat : STD_LOGIC;
  119 + SIGNAL G257gat : STD_LOGIC;
  120 + SIGNAL G258gat : STD_LOGIC;
  121 + SIGNAL G259gat : STD_LOGIC;
  122 + SIGNAL G260gat : STD_LOGIC;
  123 + SIGNAL G263gat : STD_LOGIC;
  124 + SIGNAL G264gat : STD_LOGIC;
  125 + SIGNAL G267gat : STD_LOGIC;
  126 + SIGNAL G270gat : STD_LOGIC;
  127 + SIGNAL G273gat : STD_LOGIC;
  128 + SIGNAL G276gat : STD_LOGIC;
  129 + SIGNAL G279gat : STD_LOGIC;
  130 + SIGNAL G282gat : STD_LOGIC;
  131 + SIGNAL G285gat : STD_LOGIC;
  132 + SIGNAL G288gat : STD_LOGIC;
  133 + SIGNAL G289gat : STD_LOGIC;
  134 + SIGNAL G290gat : STD_LOGIC;
  135 + SIGNAL G291gat : STD_LOGIC;
  136 + SIGNAL G292gat : STD_LOGIC;
  137 + SIGNAL G293gat : STD_LOGIC;
  138 + SIGNAL G294gat : STD_LOGIC;
  139 + SIGNAL G295gat : STD_LOGIC;
  140 + SIGNAL G296gat : STD_LOGIC;
  141 + SIGNAL G300gat : STD_LOGIC;
  142 + SIGNAL G301gat : STD_LOGIC;
  143 + SIGNAL G302gat : STD_LOGIC;
  144 + SIGNAL G303gat : STD_LOGIC;
  145 + SIGNAL G304gat : STD_LOGIC;
  146 + SIGNAL G305gat : STD_LOGIC;
  147 + SIGNAL G306gat : STD_LOGIC;
  148 + SIGNAL G307gat : STD_LOGIC;
  149 + SIGNAL G308gat : STD_LOGIC;
  150 + SIGNAL G309gat : STD_LOGIC;
  151 + SIGNAL G319gat : STD_LOGIC;
  152 + SIGNAL G330gat : STD_LOGIC;
  153 + SIGNAL G331gat : STD_LOGIC;
  154 + SIGNAL G332gat : STD_LOGIC;
  155 + SIGNAL G333gat : STD_LOGIC;
  156 + SIGNAL G334gat : STD_LOGIC;
  157 + SIGNAL G335gat : STD_LOGIC;
  158 + SIGNAL G336gat : STD_LOGIC;
  159 + SIGNAL G337gat : STD_LOGIC;
  160 + SIGNAL G338gat : STD_LOGIC;
  161 + SIGNAL G339gat : STD_LOGIC;
  162 + SIGNAL G340gat : STD_LOGIC;
  163 + SIGNAL G341gat : STD_LOGIC;
  164 + SIGNAL G342gat : STD_LOGIC;
  165 + SIGNAL G343gat : STD_LOGIC;
  166 + SIGNAL G344gat : STD_LOGIC;
  167 + SIGNAL G345gat : STD_LOGIC;
  168 + SIGNAL G346gat : STD_LOGIC;
  169 + SIGNAL G347gat : STD_LOGIC;
  170 + SIGNAL G348gat : STD_LOGIC;
  171 + SIGNAL G349gat : STD_LOGIC;
  172 + SIGNAL G350gat : STD_LOGIC;
  173 + SIGNAL G351gat : STD_LOGIC;
  174 + SIGNAL G352gat : STD_LOGIC;
  175 + SIGNAL G353gat : STD_LOGIC;
  176 + SIGNAL G354gat : STD_LOGIC;
  177 + SIGNAL G355gat : STD_LOGIC;
  178 + SIGNAL G356gat : STD_LOGIC;
  179 + SIGNAL G357gat : STD_LOGIC;
  180 + SIGNAL G360gat : STD_LOGIC;
  181 + SIGNAL G371gat : STD_LOGIC;
  182 + SIGNAL G372gat : STD_LOGIC;
  183 + SIGNAL G373gat : STD_LOGIC;
  184 + SIGNAL G374gat : STD_LOGIC;
  185 + SIGNAL G375gat : STD_LOGIC;
  186 + SIGNAL G376gat : STD_LOGIC;
  187 + SIGNAL G377gat : STD_LOGIC;
  188 + SIGNAL G378gat : STD_LOGIC;
  189 + SIGNAL G379gat : STD_LOGIC;
  190 + SIGNAL G380gat : STD_LOGIC;
  191 + SIGNAL G381gat : STD_LOGIC;
  192 + SIGNAL G386gat : STD_LOGIC;
  193 + SIGNAL G393gat : STD_LOGIC;
  194 + SIGNAL G399gat : STD_LOGIC;
  195 + SIGNAL G404gat : STD_LOGIC;
  196 + SIGNAL G407gat : STD_LOGIC;
  197 + SIGNAL G411gat : STD_LOGIC;
  198 + SIGNAL G414gat : STD_LOGIC;
  199 + SIGNAL G415gat : STD_LOGIC;
  200 + SIGNAL G416gat : STD_LOGIC;
  201 + SIGNAL G417gat : STD_LOGIC;
  202 + SIGNAL G418gat : STD_LOGIC;
  203 + SIGNAL G419gat : STD_LOGIC;
  204 + SIGNAL G420gat : STD_LOGIC;
  205 + SIGNAL G422gat : STD_LOGIC;
  206 + SIGNAL G425gat : STD_LOGIC;
  207 + SIGNAL G428gat : STD_LOGIC;
  208 + SIGNAL G429gat : STD_LOGIC;
  209 +
  210 +BEGIN
  211 +
  212 + G223gat <= NOT(G199gat);
  213 + G329gat <= NOT(G296gat);
  214 + G370gat <= NOT(G357gat);
  215 + G421gat <= NOT(G415gat OR G416gat);
  216 + G430gat <= NOT(G381gat AND G386gat AND G399gat AND G422gat);
  217 + G431gat <= NOT(G381gat AND G386gat AND G425gat AND G428gat);
  218 + G432gat <= NOT(G381gat AND G422gat AND G425gat AND G429gat);
  219 + G118gat <= NOT(G1gat);
  220 + G119gat <= NOT(G4gat);
  221 + G122gat <= NOT(G11gat);
  222 + G123gat <= NOT(G17gat);
  223 + G126gat <= NOT(G24gat);
  224 + G127gat <= NOT(G30gat);
  225 + G130gat <= NOT(G37gat);
  226 + G131gat <= NOT(G43gat);
  227 + G134gat <= NOT(G50gat);
  228 + G135gat <= NOT(G56gat);
  229 + G138gat <= NOT(G63gat);
  230 + G139gat <= NOT(G69gat);
  231 + G142gat <= NOT(G76gat);
  232 + G143gat <= NOT(G82gat);
  233 + G146gat <= NOT(G89gat);
  234 + G147gat <= NOT(G95gat);
  235 + G150gat <= NOT(G102gat);
  236 + G151gat <= NOT(G108gat);
  237 + G154gat <= NOT(G4gat AND G118gat);
  238 + G157gat <= NOT(G8gat OR G119gat);
  239 + G158gat <= NOT(G14gat OR G119gat);
  240 + G159gat <= NOT(G17gat AND G122gat);
  241 + G162gat <= NOT(G30gat AND G126gat);
  242 + G165gat <= NOT(G43gat AND G130gat);
  243 + G168gat <= NOT(G56gat AND G134gat);
  244 + G171gat <= NOT(G69gat AND G138gat);
  245 + G174gat <= NOT(G82gat AND G142gat);
  246 + G177gat <= NOT(G95gat AND G146gat);
  247 + G180gat <= NOT(G108gat AND G150gat);
  248 + G183gat <= NOT(G21gat OR G123gat);
  249 + G184gat <= NOT(G27gat OR G123gat);
  250 + G185gat <= NOT(G34gat OR G127gat);
  251 + G186gat <= NOT(G40gat OR G127gat);
  252 + G187gat <= NOT(G47gat OR G131gat);
  253 + G188gat <= NOT(G53gat OR G131gat);
  254 + G189gat <= NOT(G60gat OR G135gat);
  255 + G190gat <= NOT(G66gat OR G135gat);
  256 + G191gat <= NOT(G73gat OR G139gat);
  257 + G192gat <= NOT(G79gat OR G139gat);
  258 + G193gat <= NOT(G86gat OR G143gat);
  259 + G194gat <= NOT(G92gat OR G143gat);
  260 + G195gat <= NOT(G99gat OR G147gat);
  261 + G196gat <= NOT(G105gat OR G147gat);
  262 + G197gat <= NOT(G112gat OR G151gat);
  263 + G198gat <= NOT(G115gat OR G151gat);
  264 + G199gat <= G154gat AND G159gat AND G162gat AND G165gat AND G168gat AND G171gat AND G174gat AND G177gat AND G180gat;
  265 + G203gat <= NOT(G199gat);
  266 + G213gat <= NOT(G199gat);
  267 + G224gat <= G154gat XOR G203gat;
  268 + G227gat <= G159gat XOR G203gat;
  269 + G230gat <= G162gat XOR G203gat;
  270 + G233gat <= G165gat XOR G203gat;
  271 + G236gat <= G168gat XOR G203gat;
  272 + G239gat <= G171gat XOR G203gat;
  273 + G242gat <= NOT(G1gat AND G213gat);
  274 + G243gat <= G174gat XOR G203gat;
  275 + G246gat <= NOT(G11gat AND G213gat);
  276 + G247gat <= G177gat XOR G203gat;
  277 + G250gat <= NOT(G24gat AND G213gat);
  278 + G251gat <= G180gat XOR G203gat;
  279 + G254gat <= NOT(G37gat AND G213gat);
  280 + G255gat <= NOT(G50gat AND G213gat);
  281 + G256gat <= NOT(G63gat AND G213gat);
  282 + G257gat <= NOT(G76gat AND G213gat);
  283 + G258gat <= NOT(G89gat AND G213gat);
  284 + G259gat <= NOT(G102gat AND G213gat);
  285 + G260gat <= NOT(G157gat AND G224gat);
  286 + G263gat <= NOT(G158gat AND G224gat);
  287 + G264gat <= NOT(G183gat AND G227gat);
  288 + G267gat <= NOT(G185gat AND G230gat);
  289 + G270gat <= NOT(G187gat AND G233gat);
  290 + G273gat <= NOT(G189gat AND G236gat);
  291 + G276gat <= NOT(G191gat AND G239gat);
  292 + G279gat <= NOT(G193gat AND G243gat);
  293 + G282gat <= NOT(G195gat AND G247gat);
  294 + G285gat <= NOT(G197gat AND G251gat);
  295 + G288gat <= NOT(G184gat AND G227gat);
  296 + G289gat <= NOT(G186gat AND G230gat);
  297 + G290gat <= NOT(G188gat AND G233gat);
  298 + G291gat <= NOT(G190gat AND G236gat);
  299 + G292gat <= NOT(G192gat AND G239gat);
  300 + G293gat <= NOT(G194gat AND G243gat);
  301 + G294gat <= NOT(G196gat AND G247gat);
  302 + G295gat <= NOT(G198gat AND G251gat);
  303 + G296gat <= G260gat AND G264gat AND G267gat AND G270gat AND G273gat AND G276gat AND G279gat AND G282gat AND G285gat;
  304 + G300gat <= NOT(G263gat);
  305 + G301gat <= NOT(G288gat);
  306 + G302gat <= NOT(G289gat);
  307 + G303gat <= NOT(G290gat);
  308 + G304gat <= NOT(G291gat);
  309 + G305gat <= NOT(G292gat);
  310 + G306gat <= NOT(G293gat);
  311 + G307gat <= NOT(G294gat);
  312 + G308gat <= NOT(G295gat);
  313 + G309gat <= NOT(G296gat);
  314 + G319gat <= NOT(G296gat);
  315 + G330gat <= G260gat XOR G309gat;
  316 + G331gat <= G264gat XOR G309gat;
  317 + G332gat <= G267gat XOR G309gat;
  318 + G333gat <= G270gat XOR G309gat;
  319 + G334gat <= NOT(G8gat AND G319gat);
  320 + G335gat <= G273gat XOR G309gat;
  321 + G336gat <= NOT(G21gat AND G319gat);
  322 + G337gat <= G276gat XOR G309gat;
  323 + G338gat <= NOT(G34gat AND G319gat);
  324 + G339gat <= G279gat XOR G309gat;
  325 + G340gat <= NOT(G47gat AND G319gat);
  326 + G341gat <= G282gat XOR G309gat;
  327 + G342gat <= NOT(G60gat AND G319gat);
  328 + G343gat <= G285gat XOR G309gat;
  329 + G344gat <= NOT(G73gat AND G319gat);
  330 + G345gat <= NOT(G86gat AND G319gat);
  331 + G346gat <= NOT(G99gat AND G319gat);
  332 + G347gat <= NOT(G112gat AND G319gat);
  333 + G348gat <= NOT(G300gat AND G330gat);
  334 + G349gat <= NOT(G301gat AND G331gat);
  335 + G350gat <= NOT(G302gat AND G332gat);
  336 + G351gat <= NOT(G303gat AND G333gat);
  337 + G352gat <= NOT(G304gat AND G335gat);
  338 + G353gat <= NOT(G305gat AND G337gat);
  339 + G354gat <= NOT(G306gat AND G339gat);
  340 + G355gat <= NOT(G307gat AND G341gat);
  341 + G356gat <= NOT(G308gat AND G343gat);
  342 + G357gat <= G348gat AND G349gat AND G350gat AND G351gat AND G352gat AND G353gat AND G354gat AND G355gat AND G356gat;
  343 + G360gat <= NOT(G357gat);
  344 + G371gat <= NOT(G14gat AND G360gat);
  345 + G372gat <= NOT(G27gat AND G360gat);
  346 + G373gat <= NOT(G40gat AND G360gat);
  347 + G374gat <= NOT(G53gat AND G360gat);
  348 + G375gat <= NOT(G66gat AND G360gat);
  349 + G376gat <= NOT(G79gat AND G360gat);
  350 + G377gat <= NOT(G92gat AND G360gat);
  351 + G378gat <= NOT(G105gat AND G360gat);
  352 + G379gat <= NOT(G115gat AND G360gat);
  353 + G380gat <= NOT(G4gat AND G242gat AND G334gat AND G371gat);
  354 + G381gat <= NOT(G17gat AND G246gat AND G336gat AND G372gat);
  355 + G386gat <= NOT(G30gat AND G250gat AND G338gat AND G373gat);
  356 + G393gat <= NOT(G43gat AND G254gat AND G340gat AND G374gat);
  357 + G399gat <= NOT(G56gat AND G255gat AND G342gat AND G375gat);
  358 + G404gat <= NOT(G69gat AND G256gat AND G344gat AND G376gat);
  359 + G407gat <= NOT(G82gat AND G257gat AND G345gat AND G377gat);
  360 + G411gat <= NOT(G95gat AND G258gat AND G346gat AND G378gat);
  361 + G414gat <= NOT(G108gat AND G259gat AND G347gat AND G379gat);
  362 + G415gat <= NOT(G380gat);
  363 + G416gat <= G381gat AND G386gat AND G393gat AND G399gat AND G404gat AND G407gat AND G411gat AND G414gat;
  364 + G417gat <= NOT(G393gat);
  365 + G418gat <= NOT(G404gat);
  366 + G419gat <= NOT(G407gat);
  367 + G420gat <= NOT(G411gat);
  368 + G422gat <= NOT(G386gat AND G417gat);
  369 + G425gat <= NOT(G386gat AND G393gat AND G399gat AND G418gat);
  370 + G428gat <= NOT(G393gat AND G399gat AND G419gat);
  371 + G429gat <= NOT(G386gat AND G393gat AND G407gat AND G420gat);
  372 +
  373 +END ARCHITECTURE rtl;
wrapper/ref_working/c432_mod.vhd View file @ 827f906
  1 +LIBRARY IEEE;
  2 +USE IEEE.STD_LOGIC_1164.ALL;
  3 +
  4 +ENTITY c432_mod IS
  5 +
  6 + PORT (
  7 + G1gat : IN STD_LOGIC;
  8 + G4gat : IN STD_LOGIC;
  9 + G8gat : IN STD_LOGIC;
  10 + G11gat : IN STD_LOGIC;
  11 + G14gat : IN STD_LOGIC;
  12 + G17gat : IN STD_LOGIC;
  13 + G21gat : IN STD_LOGIC;
  14 + G24gat : IN STD_LOGIC;
  15 + G27gat : IN STD_LOGIC;
  16 + G30gat : IN STD_LOGIC;
  17 + G34gat : IN STD_LOGIC;
  18 + G37gat : IN STD_LOGIC;
  19 + G40gat : IN STD_LOGIC;
  20 + G43gat : IN STD_LOGIC;
  21 + G47gat : IN STD_LOGIC;
  22 + G50gat : IN STD_LOGIC;
  23 + G53gat : IN STD_LOGIC;
  24 + G56gat : IN STD_LOGIC;
  25 + G60gat : IN STD_LOGIC;
  26 + G63gat : IN STD_LOGIC;
  27 + G66gat : IN STD_LOGIC;
  28 + G69gat : IN STD_LOGIC;
  29 + G73gat : IN STD_LOGIC;
  30 + G76gat : IN STD_LOGIC;
  31 + G79gat : IN STD_LOGIC;
  32 + G82gat : IN STD_LOGIC;
  33 + G86gat : IN STD_LOGIC;
  34 + G89gat : IN STD_LOGIC;
  35 + G92gat : IN STD_LOGIC;
  36 + G95gat : IN STD_LOGIC;
  37 + G99gat : IN STD_LOGIC;
  38 + G102gat : IN STD_LOGIC;
  39 + G105gat : IN STD_LOGIC;
  40 + G108gat : IN STD_LOGIC;
  41 + G112gat : IN STD_LOGIC;
  42 + G115gat : IN STD_LOGIC;
  43 + KG180gat : IN STD_LOGIC;
  44 + KG285gat : IN STD_LOGIC;
  45 + KG356gat : IN STD_LOGIC;
  46 + KG416gat : IN STD_LOGIC;
  47 + KG381gat : IN STD_LOGIC;
  48 + KG309gat : IN STD_LOGIC;
  49 + KG203gat : IN STD_LOGIC;
  50 + KG319gat : IN STD_LOGIC;
  51 + KG213gat : IN STD_LOGIC;
  52 + KG296gat : IN STD_LOGIC;
  53 + KG357gat : IN STD_LOGIC;
  54 + KG360gat : IN STD_LOGIC;
  55 + KG199gat : IN STD_LOGIC;
  56 + G223gat : OUT STD_LOGIC;
  57 + G329gat : OUT STD_LOGIC;
  58 + G370gat : OUT STD_LOGIC;
  59 + G421gat : OUT STD_LOGIC;
  60 + G430gat : OUT STD_LOGIC;
  61 + G431gat : OUT STD_LOGIC;
  62 + G432gat : OUT STD_LOGIC
  63 + );
  64 +
  65 +END ENTITY c432_mod;
  66 +
  67 +ARCHITECTURE rtl OF c432_mod IS
  68 +
  69 + SIGNAL G118gat : STD_LOGIC;
  70 + SIGNAL G119gat : STD_LOGIC;
  71 + SIGNAL G122gat : STD_LOGIC;
  72 + SIGNAL G123gat : STD_LOGIC;
  73 + SIGNAL G126gat : STD_LOGIC;
  74 + SIGNAL G127gat : STD_LOGIC;
  75 + SIGNAL G130gat : STD_LOGIC;
  76 + SIGNAL G131gat : STD_LOGIC;
  77 + SIGNAL G134gat : STD_LOGIC;
  78 + SIGNAL G135gat : STD_LOGIC;
  79 + SIGNAL G138gat : STD_LOGIC;
  80 + SIGNAL G139gat : STD_LOGIC;
  81 + SIGNAL G142gat : STD_LOGIC;
  82 + SIGNAL G143gat : STD_LOGIC;
  83 + SIGNAL G146gat : STD_LOGIC;
  84 + SIGNAL G147gat : STD_LOGIC;
  85 + SIGNAL G150gat : STD_LOGIC;
  86 + SIGNAL G151gat : STD_LOGIC;
  87 + SIGNAL G154gat : STD_LOGIC;
  88 + SIGNAL G157gat : STD_LOGIC;
  89 + SIGNAL G158gat : STD_LOGIC;
  90 + SIGNAL G159gat : STD_LOGIC;
  91 + SIGNAL G162gat : STD_LOGIC;
  92 + SIGNAL G165gat : STD_LOGIC;
  93 + SIGNAL G168gat : STD_LOGIC;
  94 + SIGNAL G171gat : STD_LOGIC;
  95 + SIGNAL G174gat : STD_LOGIC;
  96 + SIGNAL G177gat : STD_LOGIC;
  97 + SIGNAL G180gat : STD_LOGIC;
  98 + SIGNAL G183gat : STD_LOGIC;
  99 + SIGNAL G184gat : STD_LOGIC;
  100 + SIGNAL G185gat : STD_LOGIC;
  101 + SIGNAL G186gat : STD_LOGIC;
  102 + SIGNAL G187gat : STD_LOGIC;
  103 + SIGNAL G188gat : STD_LOGIC;
  104 + SIGNAL G189gat : STD_LOGIC;
  105 + SIGNAL G190gat : STD_LOGIC;
  106 + SIGNAL G191gat : STD_LOGIC;
  107 + SIGNAL G192gat : STD_LOGIC;
  108 + SIGNAL G193gat : STD_LOGIC;
  109 + SIGNAL G194gat : STD_LOGIC;
  110 + SIGNAL G195gat : STD_LOGIC;
  111 + SIGNAL G196gat : STD_LOGIC;
  112 + SIGNAL G197gat : STD_LOGIC;
  113 + SIGNAL G198gat : STD_LOGIC;
  114 + SIGNAL G199gat : STD_LOGIC;
  115 + SIGNAL G203gat : STD_LOGIC;
  116 + SIGNAL G213gat : STD_LOGIC;
  117 + SIGNAL G224gat : STD_LOGIC;
  118 + SIGNAL G227gat : STD_LOGIC;
  119 + SIGNAL G230gat : STD_LOGIC;
  120 + SIGNAL G233gat : STD_LOGIC;
  121 + SIGNAL G236gat : STD_LOGIC;
  122 + SIGNAL G239gat : STD_LOGIC;
  123 + SIGNAL G242gat : STD_LOGIC;
  124 + SIGNAL G243gat : STD_LOGIC;
  125 + SIGNAL G246gat : STD_LOGIC;
  126 + SIGNAL G247gat : STD_LOGIC;
  127 + SIGNAL G250gat : STD_LOGIC;
  128 + SIGNAL G251gat : STD_LOGIC;
  129 + SIGNAL G254gat : STD_LOGIC;
  130 + SIGNAL G255gat : STD_LOGIC;
  131 + SIGNAL G256gat : STD_LOGIC;
  132 + SIGNAL G257gat : STD_LOGIC;
  133 + SIGNAL G258gat : STD_LOGIC;
  134 + SIGNAL G259gat : STD_LOGIC;
  135 + SIGNAL G260gat : STD_LOGIC;
  136 + SIGNAL G263gat : STD_LOGIC;
  137 + SIGNAL G264gat : STD_LOGIC;
  138 + SIGNAL G267gat : STD_LOGIC;
  139 + SIGNAL G270gat : STD_LOGIC;
  140 + SIGNAL G273gat : STD_LOGIC;
  141 + SIGNAL G276gat : STD_LOGIC;
  142 + SIGNAL G279gat : STD_LOGIC;
  143 + SIGNAL G282gat : STD_LOGIC;
  144 + SIGNAL G285gat : STD_LOGIC;
  145 + SIGNAL G288gat : STD_LOGIC;
  146 + SIGNAL G289gat : STD_LOGIC;
  147 + SIGNAL G290gat : STD_LOGIC;
  148 + SIGNAL G291gat : STD_LOGIC;
  149 + SIGNAL G292gat : STD_LOGIC;
  150 + SIGNAL G293gat : STD_LOGIC;
  151 + SIGNAL G294gat : STD_LOGIC;
  152 + SIGNAL G295gat : STD_LOGIC;
  153 + SIGNAL G296gat : STD_LOGIC;
  154 + SIGNAL G300gat : STD_LOGIC;
  155 + SIGNAL G301gat : STD_LOGIC;
  156 + SIGNAL G302gat : STD_LOGIC;
  157 + SIGNAL G303gat : STD_LOGIC;
  158 + SIGNAL G304gat : STD_LOGIC;
  159 + SIGNAL G305gat : STD_LOGIC;
  160 + SIGNAL G306gat : STD_LOGIC;
  161 + SIGNAL G307gat : STD_LOGIC;
  162 + SIGNAL G308gat : STD_LOGIC;
  163 + SIGNAL G309gat : STD_LOGIC;
  164 + SIGNAL G319gat : STD_LOGIC;
  165 + SIGNAL G330gat : STD_LOGIC;
  166 + SIGNAL G331gat : STD_LOGIC;
  167 + SIGNAL G332gat : STD_LOGIC;
  168 + SIGNAL G333gat : STD_LOGIC;
  169 + SIGNAL G334gat : STD_LOGIC;
  170 + SIGNAL G335gat : STD_LOGIC;
  171 + SIGNAL G336gat : STD_LOGIC;
  172 + SIGNAL G337gat : STD_LOGIC;
  173 + SIGNAL G338gat : STD_LOGIC;
  174 + SIGNAL G339gat : STD_LOGIC;
  175 + SIGNAL G340gat : STD_LOGIC;
  176 + SIGNAL G341gat : STD_LOGIC;
  177 + SIGNAL G342gat : STD_LOGIC;
  178 + SIGNAL G343gat : STD_LOGIC;
  179 + SIGNAL G344gat : STD_LOGIC;
  180 + SIGNAL G345gat : STD_LOGIC;
  181 + SIGNAL G346gat : STD_LOGIC;
  182 + SIGNAL G347gat : STD_LOGIC;
  183 + SIGNAL G348gat : STD_LOGIC;
  184 + SIGNAL G349gat : STD_LOGIC;
  185 + SIGNAL G350gat : STD_LOGIC;
  186 + SIGNAL G351gat : STD_LOGIC;
  187 + SIGNAL G352gat : STD_LOGIC;
  188 + SIGNAL G353gat : STD_LOGIC;
  189 + SIGNAL G354gat : STD_LOGIC;
  190 + SIGNAL G355gat : STD_LOGIC;
  191 + SIGNAL G356gat : STD_LOGIC;
  192 + SIGNAL G357gat : STD_LOGIC;
  193 + SIGNAL G360gat : STD_LOGIC;
  194 + SIGNAL G371gat : STD_LOGIC;
  195 + SIGNAL G372gat : STD_LOGIC;
  196 + SIGNAL G373gat : STD_LOGIC;
  197 + SIGNAL G374gat : STD_LOGIC;
  198 + SIGNAL G375gat : STD_LOGIC;
  199 + SIGNAL G376gat : STD_LOGIC;
  200 + SIGNAL G377gat : STD_LOGIC;
  201 + SIGNAL G378gat : STD_LOGIC;
  202 + SIGNAL G379gat : STD_LOGIC;
  203 + SIGNAL G380gat : STD_LOGIC;
  204 + SIGNAL G381gat : STD_LOGIC;
  205 + SIGNAL G386gat : STD_LOGIC;
  206 + SIGNAL G393gat : STD_LOGIC;
  207 + SIGNAL G399gat : STD_LOGIC;
  208 + SIGNAL G404gat : STD_LOGIC;
  209 + SIGNAL G407gat : STD_LOGIC;
  210 + SIGNAL G411gat : STD_LOGIC;
  211 + SIGNAL G414gat : STD_LOGIC;
  212 + SIGNAL G415gat : STD_LOGIC;
  213 + SIGNAL G416gat : STD_LOGIC;
  214 + SIGNAL G417gat : STD_LOGIC;
  215 + SIGNAL G418gat : STD_LOGIC;
  216 + SIGNAL G419gat : STD_LOGIC;
  217 + SIGNAL G420gat : STD_LOGIC;
  218 + SIGNAL G422gat : STD_LOGIC;
  219 + SIGNAL G425gat : STD_LOGIC;
  220 + SIGNAL G428gat : STD_LOGIC;
  221 + SIGNAL G429gat : STD_LOGIC;
  222 + SIGNAL G180gat_mod : STD_LOGIC;
  223 + SIGNAL G285gat_mod : STD_LOGIC;
  224 + SIGNAL G356gat_mod : STD_LOGIC;
  225 + SIGNAL G416gat_mod : STD_LOGIC;
  226 + SIGNAL G381gat_mod : STD_LOGIC;
  227 + SIGNAL G309gat_mod : STD_LOGIC;
  228 + SIGNAL G203gat_mod : STD_LOGIC;
  229 + SIGNAL G319gat_mod : STD_LOGIC;
  230 + SIGNAL G213gat_mod : STD_LOGIC;
  231 + SIGNAL G296gat_mod : STD_LOGIC;
  232 + SIGNAL G357gat_mod : STD_LOGIC;
  233 + SIGNAL G360gat_mod : STD_LOGIC;
  234 + SIGNAL G199gat_mod : STD_LOGIC;
  235 +
  236 +BEGIN
  237 +
  238 + G223gat <= NOT(G199gat_mod);
  239 + G329gat <= NOT(G296gat_mod);
  240 + G370gat <= NOT(G357gat_mod);
  241 + G421gat <= NOT(G415gat OR G416gat_mod);
  242 + G430gat <= NOT(G386gat AND G399gat AND G422gat AND G381gat_mod);
  243 + G431gat <= NOT(G386gat AND G425gat AND G428gat AND G381gat_mod);
  244 + G432gat <= NOT(G422gat AND G425gat AND G429gat AND G381gat_mod);
  245 + G118gat <= NOT(G1gat);
  246 + G119gat <= NOT(G4gat);
  247 + G122gat <= NOT(G11gat);
  248 + G123gat <= NOT(G17gat);
  249 + G126gat <= NOT(G24gat);
  250 + G127gat <= NOT(G30gat);
  251 + G130gat <= NOT(G37gat);
  252 + G131gat <= NOT(G43gat);
  253 + G134gat <= NOT(G50gat);
  254 + G135gat <= NOT(G56gat);
  255 + G138gat <= NOT(G63gat);
  256 + G139gat <= NOT(G69gat);
  257 + G142gat <= NOT(G76gat);
  258 + G143gat <= NOT(G82gat);
  259 + G146gat <= NOT(G89gat);
  260 + G147gat <= NOT(G95gat);
  261 + G150gat <= NOT(G102gat);
  262 + G151gat <= NOT(G108gat);
  263 + G154gat <= NOT(G4gat AND G118gat);
  264 + G157gat <= NOT(G8gat OR G119gat);
  265 + G158gat <= NOT(G14gat OR G119gat);
  266 + G159gat <= NOT(G17gat AND G122gat);
  267 + G162gat <= NOT(G30gat AND G126gat);
  268 + G165gat <= NOT(G43gat AND G130gat);
  269 + G168gat <= NOT(G56gat AND G134gat);
  270 + G171gat <= NOT(G69gat AND G138gat);
  271 + G174gat <= NOT(G82gat AND G142gat);
  272 + G177gat <= NOT(G95gat AND G146gat);
  273 + G180gat <= NOT(G108gat AND G150gat);
  274 + G183gat <= NOT(G21gat OR G123gat);
  275 + G184gat <= NOT(G27gat OR G123gat);
  276 + G185gat <= NOT(G34gat OR G127gat);
  277 + G186gat <= NOT(G40gat OR G127gat);
  278 + G187gat <= NOT(G47gat OR G131gat);
  279 + G188gat <= NOT(G53gat OR G131gat);
  280 + G189gat <= NOT(G60gat OR G135gat);
  281 + G190gat <= NOT(G66gat OR G135gat);
  282 + G191gat <= NOT(G73gat OR G139gat);
  283 + G192gat <= NOT(G79gat OR G139gat);
  284 + G193gat <= NOT(G86gat OR G143gat);
  285 + G194gat <= NOT(G92gat OR G143gat);
  286 + G195gat <= NOT(G99gat OR G147gat);
  287 + G196gat <= NOT(G105gat OR G147gat);
  288 + G197gat <= NOT(G112gat OR G151gat);
  289 + G198gat <= NOT(G115gat OR G151gat);
  290 + G199gat <= G154gat AND G159gat AND G162gat AND G165gat AND G168gat AND G171gat AND G174gat AND G177gat AND G180gat_mod;
  291 + G203gat <= NOT(G199gat_mod);
  292 + G213gat <= NOT(G199gat_mod);
  293 + G224gat <= G154gat XOR G203gat_mod;
  294 + G227gat <= G159gat XOR G203gat_mod;
  295 + G230gat <= G162gat XOR G203gat_mod;
  296 + G233gat <= G165gat XOR G203gat_mod;
  297 + G236gat <= G168gat XOR G203gat_mod;
  298 + G239gat <= G171gat XOR G203gat_mod;
  299 + G242gat <= NOT(G1gat AND G213gat_mod);
  300 + G243gat <= G174gat XOR G203gat_mod;
  301 + G246gat <= NOT(G11gat AND G213gat_mod);
  302 + G247gat <= G177gat XOR G203gat_mod;
  303 + G250gat <= NOT(G24gat AND G213gat_mod);
  304 + G251gat <= G180gat_mod XOR G203gat_mod;
  305 + G254gat <= NOT(G37gat AND G213gat_mod);
  306 + G255gat <= NOT(G50gat AND G213gat_mod);
  307 + G256gat <= NOT(G63gat AND G213gat_mod);
  308 + G257gat <= NOT(G76gat AND G213gat_mod);
  309 + G258gat <= NOT(G89gat AND G213gat_mod);
  310 + G259gat <= NOT(G102gat AND G213gat_mod);
  311 + G260gat <= NOT(G157gat AND G224gat);
  312 + G263gat <= NOT(G158gat AND G224gat);
  313 + G264gat <= NOT(G183gat AND G227gat);
  314 + G267gat <= NOT(G185gat AND G230gat);
  315 + G270gat <= NOT(G187gat AND G233gat);
  316 + G273gat <= NOT(G189gat AND G236gat);
  317 + G276gat <= NOT(G191gat AND G239gat);
  318 + G279gat <= NOT(G193gat AND G243gat);
  319 + G282gat <= NOT(G195gat AND G247gat);
  320 + G285gat <= NOT(G197gat AND G251gat);
  321 + G288gat <= NOT(G184gat AND G227gat);
  322 + G289gat <= NOT(G186gat AND G230gat);
  323 + G290gat <= NOT(G188gat AND G233gat);
  324 + G291gat <= NOT(G190gat AND G236gat);
  325 + G292gat <= NOT(G192gat AND G239gat);
  326 + G293gat <= NOT(G194gat AND G243gat);
  327 + G294gat <= NOT(G196gat AND G247gat);
  328 + G295gat <= NOT(G198gat AND G251gat);
  329 + G296gat <= G260gat AND G264gat AND G267gat AND G270gat AND G273gat AND G276gat AND G279gat AND G282gat AND G285gat_mod;
  330 + G300gat <= NOT(G263gat);
  331 + G301gat <= NOT(G288gat);
  332 + G302gat <= NOT(G289gat);
  333 + G303gat <= NOT(G290gat);
  334 + G304gat <= NOT(G291gat);
  335 + G305gat <= NOT(G292gat);
  336 + G306gat <= NOT(G293gat);
  337 + G307gat <= NOT(G294gat);
  338 + G308gat <= NOT(G295gat);
  339 + G309gat <= NOT(G296gat_mod);
  340 + G319gat <= NOT(G296gat_mod);
  341 + G330gat <= G260gat XOR G309gat_mod;
  342 + G331gat <= G264gat XOR G309gat_mod;
  343 + G332gat <= G267gat XOR G309gat_mod;
  344 + G333gat <= G270gat XOR G309gat_mod;
  345 + G334gat <= NOT(G8gat AND G319gat_mod);
  346 + G335gat <= G273gat XOR G309gat_mod;
  347 + G336gat <= NOT(G21gat AND G319gat_mod);
  348 + G337gat <= G276gat XOR G309gat_mod;
  349 + G338gat <= NOT(G34gat AND G319gat_mod);
  350 + G339gat <= G279gat XOR G309gat_mod;
  351 + G340gat <= NOT(G47gat AND G319gat_mod);
  352 + G341gat <= G282gat XOR G309gat_mod;
  353 + G342gat <= NOT(G60gat AND G319gat_mod);
  354 + G343gat <= G285gat_mod XOR G309gat_mod;
  355 + G344gat <= NOT(G73gat AND G319gat_mod);
  356 + G345gat <= NOT(G86gat AND G319gat_mod);
  357 + G346gat <= NOT(G99gat AND G319gat_mod);
  358 + G347gat <= NOT(G112gat AND G319gat_mod);
  359 + G348gat <= NOT(G300gat AND G330gat);
  360 + G349gat <= NOT(G301gat AND G331gat);
  361 + G350gat <= NOT(G302gat AND G332gat);
  362 + G351gat <= NOT(G303gat AND G333gat);
  363 + G352gat <= NOT(G304gat AND G335gat);
  364 + G353gat <= NOT(G305gat AND G337gat);
  365 + G354gat <= NOT(G306gat AND G339gat);
  366 + G355gat <= NOT(G307gat AND G341gat);
  367 + G356gat <= NOT(G308gat AND G343gat);
  368 + G357gat <= G348gat AND G349gat AND G350gat AND G351gat AND G352gat AND G353gat AND G354gat AND G355gat AND G356gat_mod;
  369 + G360gat <= NOT(G357gat_mod);
  370 + G371gat <= NOT(G14gat AND G360gat_mod);
  371 + G372gat <= NOT(G27gat AND G360gat_mod);
  372 + G373gat <= NOT(G40gat AND G360gat_mod);
  373 + G374gat <= NOT(G53gat AND G360gat_mod);
  374 + G375gat <= NOT(G66gat AND G360gat_mod);
  375 + G376gat <= NOT(G79gat AND G360gat_mod);
  376 + G377gat <= NOT(G92gat AND G360gat_mod);
  377 + G378gat <= NOT(G105gat AND G360gat_mod);
  378 + G379gat <= NOT(G115gat AND G360gat_mod);
  379 + G380gat <= NOT(G4gat AND G242gat AND G334gat AND G371gat);
  380 + G381gat <= NOT(G17gat AND G246gat AND G336gat AND G372gat);
  381 + G386gat <= NOT(G30gat AND G250gat AND G338gat AND G373gat);
  382 + G393gat <= NOT(G43gat AND G254gat AND G340gat AND G374gat);
  383 + G399gat <= NOT(G56gat AND G255gat AND G342gat AND G375gat);
  384 + G404gat <= NOT(G69gat AND G256gat AND G344gat AND G376gat);
  385 + G407gat <= NOT(G82gat AND G257gat AND G345gat AND G377gat);
  386 + G411gat <= NOT(G95gat AND G258gat AND G346gat AND G378gat);
  387 + G414gat <= NOT(G108gat AND G259gat AND G347gat AND G379gat);
  388 + G415gat <= NOT(G380gat);
  389 + G416gat <= G386gat AND G393gat AND G399gat AND G404gat AND G407gat AND G411gat AND G414gat AND G381gat_mod;
  390 + G417gat <= NOT(G393gat);
  391 + G418gat <= NOT(G404gat);
  392 + G419gat <= NOT(G407gat);
  393 + G420gat <= NOT(G411gat);
  394 + G422gat <= NOT(G386gat AND G417gat);
  395 + G425gat <= NOT(G386gat AND G393gat AND G399gat AND G418gat);
  396 + G428gat <= NOT(G393gat AND G399gat AND G419gat);
  397 + G429gat <= NOT(G386gat AND G393gat AND G407gat AND G420gat);
  398 + G180gat_mod <= G180gat AND KG180gat;
  399 + G285gat_mod <= G285gat AND KG285gat;
  400 + G356gat_mod <= G356gat AND KG356gat;
  401 + G416gat_mod <= G416gat OR KG416gat;
  402 + G381gat_mod <= G381gat AND KG381gat;
  403 + G309gat_mod <= G309gat XNOR KG309gat;
  404 + G203gat_mod <= G203gat XNOR KG203gat;
  405 + G319gat_mod <= G319gat XOR KG319gat;
  406 + G213gat_mod <= G213gat XNOR KG213gat;
  407 + G296gat_mod <= G296gat XNOR KG296gat;
  408 + G357gat_mod <= G357gat XOR KG357gat;
  409 + G360gat_mod <= G360gat XOR KG360gat;
  410 + G199gat_mod <= G199gat XNOR KG199gat;
  411 +
  412 +END ARCHITECTURE rtl;
wrapper/ref_working/c432_mod_associated_AW.txt View file @ 827f906
  1 +Unlocking word concatenated with unmasking word
  2 +01000 00100110
wrapper/ref_working/c432_mod_formatted_AW.txt View file @ 827f906
  1 +Formatted Activation Word
  2 +00110000010100011100000000111100010110101100101011100110011001101100010010110000110110110100110011100000001011011110110110100011
wrapper/ref_working/tb_c432.do View file @ 827f906
  1 +vlib work
  2 +vmap work work
  3 +
  4 +vcom -2008 -work work OSVVM-master/NamePkg.vhd
  5 +vcom -2008 -work work OSVVM-master/OsvvmGlobalPkg.vhd
  6 +vcom -2008 -work work OSVVM-master/TranscriptPkg.vhd
  7 +vcom -2008 -work work OSVVM-master/TextUtilPkg.vhd
  8 +vcom -2008 -work work OSVVM-master/AlertLogPkg.vhd
  9 +vcom -2008 -work work OSVVM-master/RandomBasePkg.vhd
  10 +vcom -2008 -work work OSVVM-master/SortListPkg_int.vhd
  11 +vcom -2008 -work work OSVVM-master/RandomPkg.vhd
  12 +
  13 +vcom -2008 -novopt -work work ./c432_mod.vhd
  14 +vcom -2008 -novopt -work work ./c432.vhd
  15 +vcom -2008 -novopt -work work ./AW_decoder.vhd
  16 +vcom -2008 -novopt -work work ./top.vhd
  17 +vcom -2008 -novopt -work work ./top_tb.vhd
  18 +
  19 +vsim -novopt work.top_tb
  20 +
  21 +add wave sim:/top_tb/inputs
  22 +add wave sim:/top_tb/key
  23 +add wave sim:/top_tb/DUT/AW_decoder_1/AW
  24 +add wave sim:/top_tb/DUT/AW_locking
  25 +add wave sim:/top_tb/DUT/AW_masking
  26 +add wave sim:/top_tb/outputs
  27 +add wave sim:/top_tb/outputs_mod
  28 +
  29 +virtual signal {top_tb/outputs == top_tb/outputs_mod} out_identical
  30 +add wave -position end sim:/top_tb/out_identical
  31 +
  32 +virtual signal {top_tb/key == "00110000010100011100000000111100010110101100101011100110011001101100010010110000110110110100110011100000001011011110110110100011"} key_valid
  33 +add wave -position end sim:/top_tb/key_valid
  34 +
  35 +virtual signal {(top_tb/key_valid && out_identical) == key_valid} OK
  36 +add wave -position end sim:/top_tb/OK
  37 +
  38 +run 100000 ns
  39 +
  40 +wave zoom full
wrapper/ref_working/top.vhd View file @ 827f906
  1 +LIBRARY ieee;
  2 +USE ieee.std_logic_1164.ALL;
  3 +
  4 +ENTITY top IS
  5 +
  6 + PORT (
  7 + G1gat : IN STD_LOGIC;
  8 + G4gat : IN STD_LOGIC;
  9 + G8gat : IN STD_LOGIC;
  10 + G11gat : IN STD_LOGIC;
  11 + G14gat : IN STD_LOGIC;
  12 + G17gat : IN STD_LOGIC;
  13 + G21gat : IN STD_LOGIC;
  14 + G24gat : IN STD_LOGIC;
  15 + G27gat : IN STD_LOGIC;
  16 + G30gat : IN STD_LOGIC;
  17 + G34gat : IN STD_LOGIC;
  18 + G37gat : IN STD_LOGIC;
  19 + G40gat : IN STD_LOGIC;
  20 + G43gat : IN STD_LOGIC;
  21 + G47gat : IN STD_LOGIC;
  22 + G50gat : IN STD_LOGIC;
  23 + G53gat : IN STD_LOGIC;
  24 + G56gat : IN STD_LOGIC;
  25 + G60gat : IN STD_LOGIC;
  26 + G63gat : IN STD_LOGIC;
  27 + G66gat : IN STD_LOGIC;
  28 + G69gat : IN STD_LOGIC;
  29 + G73gat : IN STD_LOGIC;
  30 + G76gat : IN STD_LOGIC;
  31 + G79gat : IN STD_LOGIC;
  32 + G82gat : IN STD_LOGIC;
  33 + G86gat : IN STD_LOGIC;
  34 + G89gat : IN STD_LOGIC;
  35 + G92gat : IN STD_LOGIC;
  36 + G95gat : IN STD_LOGIC;
  37 + G99gat : IN STD_LOGIC;
  38 + G102gat : IN STD_LOGIC;
  39 + G105gat : IN STD_LOGIC;
  40 + G108gat : IN STD_LOGIC;
  41 + G112gat : IN STD_LOGIC;
  42 + G115gat : IN STD_LOGIC;
  43 + key : IN STD_LOGIC_VECTOR(127 DOWNTO 0);
  44 + G223gat : OUT STD_LOGIC;
  45 + G329gat : OUT STD_LOGIC;
  46 + G370gat : OUT STD_LOGIC;
  47 + G421gat : OUT STD_LOGIC;
  48 + G430gat : OUT STD_LOGIC;
  49 + G431gat : OUT STD_LOGIC;
  50 + G432gat : OUT STD_LOGIC
  51 + );
  52 +
  53 +END ENTITY top;
  54 +
  55 +ARCHITECTURE rtl OF top IS
  56 +
  57 + SIGNAL AW_locking : STD_LOGIC_VECTOR(4 DOWNTO 0);
  58 + SIGNAL AW_masking : STD_LOGIC_VECTOR(0 TO 7);
  59 + SIGNAL AW : STD_LOGIC_VECTOR(0 TO 12);
  60 +
  61 +BEGIN -- ARCHITECTURE rtl
  62 +
  63 + AW_decoder_1: ENTITY work.AW_decoder
  64 + PORT MAP (
  65 + formatted_AW => key,
  66 + AW => AW);
  67 +
  68 + AW_locking <= AW(0 TO 4);
  69 + AW_masking <= AW(5 TO 12);
  70 +
  71 + c432_mod_1: ENTITY work.c432_mod
  72 + PORT MAP (
  73 + G1gat => G1gat,
  74 + G4gat => G4gat,
  75 + G8gat => G8gat,
  76 + G11gat => G11gat,
  77 + G14gat => G14gat,
  78 + G17gat => G17gat,
  79 + G21gat => G21gat,
  80 + G24gat => G24gat,
  81 + G27gat => G27gat,
  82 + G30gat => G30gat,
  83 + G34gat => G34gat,
  84 + G37gat => G37gat,
  85 + G40gat => G40gat,
  86 + G43gat => G43gat,
  87 + G47gat => G47gat,
  88 + G50gat => G50gat,
  89 + G53gat => G53gat,
  90 + G56gat => G56gat,
  91 + G60gat => G60gat,
  92 + G63gat => G63gat,
  93 + G66gat => G66gat,
  94 + G69gat => G69gat,
  95 + G73gat => G73gat,
  96 + G76gat => G76gat,
  97 + G79gat => G79gat,
  98 + G82gat => G82gat,
  99 + G86gat => G86gat,
  100 + G89gat => G89gat,
  101 + G92gat => G92gat,
  102 + G95gat => G95gat,
  103 + G99gat => G99gat,
  104 + G102gat => G102gat,
  105 + G105gat => G105gat,
  106 + G108gat => G108gat,
  107 + G112gat => G112gat,
  108 + G115gat => G115gat,
  109 + KG180gat => AW_locking(0),
  110 + KG285gat => AW_locking(1),
  111 + KG356gat => AW_locking(2),
  112 + KG416gat => AW_locking(3),
  113 + KG381gat => AW_locking(4),
  114 + KG309gat => AW_masking(0),
  115 + KG203gat => AW_masking(1),
  116 + KG319gat => AW_masking(2),
  117 + KG213gat => AW_masking(3),
  118 + KG296gat => AW_masking(4),
  119 + KG357gat => AW_masking(5),