fix bus value calculation

This commit is contained in:
Stefan Frederik 2022-01-06 12:57:31 +01:00
parent 6f83b0cae5
commit 6297d1ac15
3 changed files with 8 additions and 7 deletions

View File

@ -1775,7 +1775,7 @@ void get_bus_value(int n_bits, int hex_digits, SPICE_DATA **idx_arr, int p, char
int hexdigit = 0; int hexdigit = 0;
int bin = 0; int bin = 0;
int hex = 0; int hex = 0;
char hexstr[] = "084C2A6E195D37BF"; /* mirrored (Left/right) hex */ char hexstr[] = "084C2A6E195D3B7F"; /* mirrored (Left/right) hex */
for(i = n_bits - 1; i >= 0; i--) { for(i = n_bits - 1; i >= 0; i--) {
val = idx_arr[i][p]; val = idx_arr[i][p];

View File

@ -4,7 +4,7 @@ K {}
V {} V {}
S {} S {}
E {} E {}
B 2 380 -840 1060 -660 {flags=1 B 2 380 -820 1060 -660 {flags=1
y1 = 0 y1 = 0
y2 = 2 y2 = 2
divy = 4 divy = 4
@ -13,7 +13,7 @@ x2=3.4e-07
divx=8 divx=8
node="v(xsa[0].ldqi) v(xsa[0].ldqib) v(xsa[0].ldsali)" node="v(xsa[0].ldqi) v(xsa[0].ldqib) v(xsa[0].ldsali)"
color="12\\ 5\\ 8\\ 11"} color="12\\ 5\\ 8\\ 11"}
B 2 380 -940 1060 -850 {flags=1 B 2 380 -940 1060 -830 {flags=1
y1 = 0 y1 = 0
y2 = 2 y2 = 2
divy = 2 divy = 2
@ -22,7 +22,7 @@ x2=3.4e-07
divx=8 divx=8
node="v(ldcp) v(ldprech)" node="v(ldcp) v(ldprech)"
color=12\\ 5\\ 8} color=12\\ 5\\ 8}
B 2 380 -650 1060 -540 {flags=1 B 2 380 -650 1060 -510 {flags=1
y1 = 0 y1 = 0
y2 = 2 y2 = 2
divy = 2 divy = 2

View File

@ -83,8 +83,8 @@ B 2 1840 -880 2890 -420 {flags=3
digital=1 digital=1
y1 = 0 y1 = 0
y2 = 1.6 y2 = 1.6
ypos1=-0.0272427 ypos1=0.0886114
ypos2=2.11513 ypos2=2.23099
divy = 1 divy = 1
x1=1.21536e-07 x1=1.21536e-07
x2=3.17599e-07 x2=3.17599e-07
@ -92,6 +92,7 @@ divx=12
subdivx=4 subdivx=4
node=" node="
---In/Out--- ---In/Out---
ldq[15]
ldcp ldcp
LDA,lda[12],lda[11],lda[10],lda[9],lda[8],lda[7],lda[6],lda[5],lda[4],lda[3],lda[2],lda[1],lda[0] LDA,lda[12],lda[11],lda[10],lda[9],lda[8],lda[7],lda[6],lda[5],lda[4],lda[3],lda[2],lda[1],lda[0]
LDQ,ldq[15],ldq[14],ldq[13],ldq[12],ldq[11],ldq[10],ldq[9],ldq[8],ldq[7],ldq[6],ldq[5],ldq[4],ldq[3],ldq[2],ldq[1],ldq[0] LDQ,ldq[15],ldq[14],ldq[13],ldq[12],ldq[11],ldq[10],ldq[9],ldq[8],ldq[7],ldq[6],ldq[5],ldq[4],ldq[3],ldq[2],ldq[1],ldq[0]
@ -103,7 +104,7 @@ LDL2X,ldl2x[3],ldl2x[2],ldl2x[1],ldl2x[0]
LDL1X,ldl1x[15],ldl1x[14],ldl1x[13],ldl1x[12],ldl1x[11],ldl1x[10],ldl1x[9],ldl1x[8],ldl1x[7],ldl1x[6],ldl1x[5],ldl1x[4],ldl1x[3],ldl1x[2],ldl1x[1],ldl1x[0] LDL1X,ldl1x[15],ldl1x[14],ldl1x[13],ldl1x[12],ldl1x[11],ldl1x[10],ldl1x[9],ldl1x[8],ldl1x[7],ldl1x[6],ldl1x[5],ldl1x[4],ldl1x[3],ldl1x[2],ldl1x[1],ldl1x[0]
LDY1,ldy1[3],ldy1[2],ldy1[1],ldy1[0] LDY1,ldy1[3],ldy1[2],ldy1[1],ldy1[0]
" "
color="18 15 4 15 18 15 4 18 4 15 4 15 4 15 4 15 4 15 4 15 4 15" color="18 4 15 4 15 18 15 4 18 4 15 4 15 4 15 4 15 4 15 4 15 4 15"
unitx=n unitx=n
ypos1=-2.20115 ypos2=2.79884 ypos1=-2.20115 ypos2=2.79884
} }