renamed vars in atree
This commit is contained in:
parent
e52ec9ed61
commit
c5e582ff3e
|
@ -87,14 +87,14 @@ defproc ortree (bool? in[N]; bool! out; power supply)
|
||||||
]
|
]
|
||||||
|
|
||||||
[lenTree3Count > 0 ->
|
[lenTree3Count > 0 ->
|
||||||
OR3_X1 C3Els[lenTree3Count];
|
OR3_X1 and3s[lenTree3Count];
|
||||||
]
|
]
|
||||||
|
|
||||||
(h:lenTree2Count:C2Els[h].vdd = supply.vdd;)
|
(h:lenTree2Count:C2Els[h].vdd = supply.vdd;)
|
||||||
(h:lenTree3Count:C3Els[h].vdd = supply.vdd;)
|
(h:lenTree3Count:and3s[h].vdd = supply.vdd;)
|
||||||
|
|
||||||
(h:lenTree2Count:C2Els[h].vss = supply.vss;)
|
(h:lenTree2Count:C2Els[h].vss = supply.vss;)
|
||||||
(h:lenTree3Count:C3Els[h].vss = supply.vss;)
|
(h:lenTree3Count:and3s[h].vss = supply.vss;)
|
||||||
|
|
||||||
/* Reset the variables we just stole lol */
|
/* Reset the variables we just stole lol */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -124,10 +124,10 @@ defproc ortree (bool? in[N]; bool! out; power supply)
|
||||||
i = end;
|
i = end;
|
||||||
[] i+2 >= end ->
|
[] i+2 >= end ->
|
||||||
/*-- last piece: use either a 3 input C-element --*/
|
/*-- last piece: use either a 3 input C-element --*/
|
||||||
C3Els[tree3Index].a = tmp[i];
|
and3s[tree3Index].a = tmp[i];
|
||||||
C3Els[tree3Index].b = tmp[i+1];
|
and3s[tree3Index].b = tmp[i+1];
|
||||||
C3Els[tree3Index].c = tmp[i+2];
|
and3s[tree3Index].c = tmp[i+2];
|
||||||
C3Els[tree3Index].y = tmp[end+j];
|
and3s[tree3Index].y = tmp[end+j];
|
||||||
|
|
||||||
tree3Index = tree3Index +1;
|
tree3Index = tree3Index +1;
|
||||||
i = end;
|
i = end;
|
||||||
|
@ -192,18 +192,18 @@ defproc andtree (bool? in[N]; bool! out; power supply)
|
||||||
/* array to hold the actual C-elments, either A2C or A3C */
|
/* array to hold the actual C-elments, either A2C or A3C */
|
||||||
|
|
||||||
[lenTree2Count > 0 ->
|
[lenTree2Count > 0 ->
|
||||||
AND2_X1 C2Els[lenTree2Count];
|
AND2_X1 and2s[lenTree2Count];
|
||||||
]
|
]
|
||||||
|
|
||||||
[lenTree3Count > 0 ->
|
[lenTree3Count > 0 ->
|
||||||
AND3_X1 C3Els[lenTree3Count];
|
AND3_X1 and3s[lenTree3Count];
|
||||||
]
|
]
|
||||||
|
|
||||||
(h:lenTree2Count:C2Els[h].vdd = supply.vdd;)
|
(h:lenTree2Count:and2s[h].vdd = supply.vdd;)
|
||||||
(h:lenTree3Count:C3Els[h].vdd = supply.vdd;)
|
(h:lenTree3Count:and3s[h].vdd = supply.vdd;)
|
||||||
|
|
||||||
(h:lenTree2Count:C2Els[h].vss = supply.vss;)
|
(h:lenTree2Count:and2s[h].vss = supply.vss;)
|
||||||
(h:lenTree3Count:C3Els[h].vss = supply.vss;)
|
(h:lenTree3Count:and3s[h].vss = supply.vss;)
|
||||||
|
|
||||||
/* Reset the variables we just stole lol */
|
/* Reset the variables we just stole lol */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -226,25 +226,25 @@ defproc andtree (bool? in[N]; bool! out; power supply)
|
||||||
j = j + 1;
|
j = j + 1;
|
||||||
[ i+1 >= end ->
|
[ i+1 >= end ->
|
||||||
/*-- last piece: use either a 2 input C-element --*/
|
/*-- last piece: use either a 2 input C-element --*/
|
||||||
C2Els[tree2Index].a = tmp[i];
|
and2s[tree2Index].a = tmp[i];
|
||||||
C2Els[tree2Index].b = tmp[i+1];
|
and2s[tree2Index].b = tmp[i+1];
|
||||||
C2Els[tree2Index].y = tmp[end+j];
|
and2s[tree2Index].y = tmp[end+j];
|
||||||
tree2Index = tree2Index +1;
|
tree2Index = tree2Index +1;
|
||||||
i = end;
|
i = end;
|
||||||
[] i+2 >= end ->
|
[] i+2 >= end ->
|
||||||
/*-- last piece: use either a 3 input C-element --*/
|
/*-- last piece: use either a 3 input C-element --*/
|
||||||
C3Els[tree3Index].a = tmp[i];
|
and3s[tree3Index].a = tmp[i];
|
||||||
C3Els[tree3Index].b = tmp[i+1];
|
and3s[tree3Index].b = tmp[i+1];
|
||||||
C3Els[tree3Index].c = tmp[i+2];
|
and3s[tree3Index].c = tmp[i+2];
|
||||||
C3Els[tree3Index].y = tmp[end+j];
|
and3s[tree3Index].y = tmp[end+j];
|
||||||
|
|
||||||
tree3Index = tree3Index +1;
|
tree3Index = tree3Index +1;
|
||||||
i = end;
|
i = end;
|
||||||
[] else ->
|
[] else ->
|
||||||
/*-- more to come; so use a two input C-element --*/
|
/*-- more to come; so use a two input C-element --*/
|
||||||
C2Els[tree2Index].a = tmp[i];
|
and2s[tree2Index].a = tmp[i];
|
||||||
C2Els[tree2Index].b = tmp[i+1];
|
and2s[tree2Index].b = tmp[i+1];
|
||||||
C2Els[tree2Index].y = tmp[end+j];
|
and2s[tree2Index].y = tmp[end+j];
|
||||||
tree2Index = tree2Index +1;
|
tree2Index = tree2Index +1;
|
||||||
i = i + 2;
|
i = i + 2;
|
||||||
]
|
]
|
||||||
|
@ -311,15 +311,15 @@ defproc ctree (bool? in[N]; bool! out; power supply)
|
||||||
]
|
]
|
||||||
|
|
||||||
[lenTree3Count > 0 ->
|
[lenTree3Count > 0 ->
|
||||||
A_3C_B_X1 C3Els[lenTree3Count];
|
A_3C_B_X1 and3s[lenTree3Count];
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
(h:lenTree2Count:C2Els[h].vdd = supply.vdd;)
|
(h:lenTree2Count:C2Els[h].vdd = supply.vdd;)
|
||||||
(h:lenTree3Count:C3Els[h].vdd = supply.vdd;)
|
(h:lenTree3Count:and3s[h].vdd = supply.vdd;)
|
||||||
|
|
||||||
(h:lenTree2Count:C2Els[h].vss = supply.vss;)
|
(h:lenTree2Count:C2Els[h].vss = supply.vss;)
|
||||||
(h:lenTree3Count:C3Els[h].vss = supply.vss;)
|
(h:lenTree3Count:and3s[h].vss = supply.vss;)
|
||||||
|
|
||||||
/* Reset the variables we just stole lol */
|
/* Reset the variables we just stole lol */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -349,10 +349,10 @@ defproc ctree (bool? in[N]; bool! out; power supply)
|
||||||
i = end;
|
i = end;
|
||||||
[] i+2 >= end ->
|
[] i+2 >= end ->
|
||||||
/*-- last piece: use either a 3 input C-element --*/
|
/*-- last piece: use either a 3 input C-element --*/
|
||||||
C3Els[tree3Index].c1 = tmp[i];
|
and3s[tree3Index].c1 = tmp[i];
|
||||||
C3Els[tree3Index].c2 = tmp[i+1];
|
and3s[tree3Index].c2 = tmp[i+1];
|
||||||
C3Els[tree3Index].c3 = tmp[i+2];
|
and3s[tree3Index].c3 = tmp[i+2];
|
||||||
C3Els[tree3Index].y = tmp[end+j];
|
and3s[tree3Index].y = tmp[end+j];
|
||||||
|
|
||||||
tree3Index = tree3Index +1;
|
tree3Index = tree3Index +1;
|
||||||
i = end;
|
i = end;
|
||||||
|
|
Loading…
Reference in New Issue