Moved redundant blocks into the lfsr_rbyd_t struct

This simplifies dependent structs with redundancy, mainly lfsr_mdir_t,
at a significant RAM cost:

            code          stack          structs
  before:  30976           2496             1072
  after:   30948 (-0.1%)   2528 (+1.3%)     1100 (+2.6%)

Which, to be honest, is not as bad as I thought it would be. Though it
is still pretty bad for no new features.

The motivation for this change:

1. The organization of the previous lfsr_mdir_t struct was a bit hacky
   and relied on exact padding so the redund block array and rbyd block
   lined up at the right offset.

2. The previous organization prevented theoretical "read-only rbyd
   structs" that could omit write-related fields, e.g. eoff and cksum.

   This idea is currently unused.

3. The current mdir=level-1, btree/data=level-0 redund design makes this
   RAM tradeoff pretty bad, but in theory higher btree redund levels
   would need the extra redund blocks in the rbyd struct anyways.

Still, the RAM impact to the current default configuration means this
should probably be reverted...
This commit is contained in:
Christopher Haster
2023-11-26 00:19:08 -06:00
parent 019044e4c6
commit becbc0c2ad
6 changed files with 1171 additions and 1169 deletions
+169 -166
View File
File diff suppressed because it is too large Load Diff
+2 -14
View File
@@ -363,14 +363,13 @@ typedef struct lfs_cache {
typedef struct lfsr_rbyd {
// note this lines up with weight in lfsr_btree_t
lfsr_srid_t weight;
lfs_block_t blocks[2];
// eoff=0, trunk=0 => not yet committed
// eoff=0, trunk>0 => not yet fetched
// eoff>=block_size => rbyd not erased/needs compaction
lfs_size_t trunk;
lfs_size_t eoff;
uint32_t cksum;
// note this lines up with arrays of redundant blocks in lfsr_mdir_t
lfs_block_t block;
} lfsr_rbyd_t;
typedef struct lfsr_bptr {
@@ -389,18 +388,7 @@ typedef struct lfsr_mptr {
typedef struct lfsr_mdir {
lfsr_smid_t mid;
union {
// here we make sure to line up our block array so it overlaps with
// the block stored as the first entry in the rbyd
struct {
lfsr_srid_t weight;
lfs_off_t trunk;
lfs_off_t eoff;
uint32_t cksum;
lfs_block_t blocks[2];
} mdir;
lfsr_rbyd_t rbyd;
} u;
lfsr_rbyd_t rbyd;
} lfsr_mdir_t;
typedef struct lfsr_openedmdir {
+27 -24
View File
@@ -176,22 +176,23 @@ code = '''
if (tinfo.tag == LFSR_TAG_MDIR) {
printf("traversal: 0x%x mdir 0x{%x,%x}\n",
tinfo.tag,
tinfo.u.mdir.u.mdir.blocks[0],
tinfo.u.mdir.u.mdir.blocks[1]);
tinfo.u.mdir.rbyd.blocks[0],
tinfo.u.mdir.rbyd.blocks[1]);
// keep track of seen blocks
seen[tinfo.u.mdir.u.mdir.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[1] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[0] % 8);
seen[tinfo.u.mdir.rbyd.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.rbyd.blocks[1] % 8);
seen[tinfo.u.mdir.rbyd.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.rbyd.blocks[0] % 8);
} else if (tinfo.tag == LFSR_TAG_BRANCH) {
printf("traversal: 0x%x btree 0x%x.%x\n",
tinfo.tag,
tinfo.u.rbyd.block, tinfo.u.rbyd.trunk);
tinfo.u.rbyd.blocks[0], tinfo.u.rbyd.trunk);
// keep track of seen blocks
seen[tinfo.u.rbyd.block / 8] |= 1 << (tinfo.u.rbyd.block % 8);
seen[tinfo.u.rbyd.blocks[0] / 8]
|= 1 << (tinfo.u.rbyd.blocks[0] % 8);
} else {
// this shouldn't happen
@@ -332,22 +333,23 @@ code = '''
if (tinfo.tag == LFSR_TAG_MDIR) {
printf("traversal: 0x%x mdir 0x{%x,%x}\n",
tinfo.tag,
tinfo.u.mdir.u.mdir.blocks[0],
tinfo.u.mdir.u.mdir.blocks[1]);
tinfo.u.mdir.rbyd.blocks[0],
tinfo.u.mdir.rbyd.blocks[1]);
// keep track of seen blocks
seen[tinfo.u.mdir.u.mdir.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[1] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[0] % 8);
seen[tinfo.u.mdir.rbyd.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.rbyd.blocks[1] % 8);
seen[tinfo.u.mdir.rbyd.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.rbyd.blocks[0] % 8);
} else if (tinfo.tag == LFSR_TAG_BRANCH) {
printf("traversal: 0x%x btree 0x%x.%x\n",
tinfo.tag,
tinfo.u.rbyd.block, tinfo.u.rbyd.trunk);
tinfo.u.rbyd.blocks[0], tinfo.u.rbyd.trunk);
// keep track of seen blocks
seen[tinfo.u.rbyd.block / 8] |= 1 << (tinfo.u.rbyd.block % 8);
seen[tinfo.u.rbyd.blocks[0] / 8]
|= 1 << (tinfo.u.rbyd.blocks[0] % 8);
} else if (tinfo.tag == LFSR_TAG_BLOCK) {
printf("traversal: 0x%x block 0x%x\n",
@@ -478,22 +480,23 @@ code = '''
if (tinfo.tag == LFSR_TAG_MDIR) {
printf("traversal: 0x%x mdir 0x{%x,%x}\n",
tinfo.tag,
tinfo.u.mdir.u.mdir.blocks[0],
tinfo.u.mdir.u.mdir.blocks[1]);
tinfo.u.mdir.rbyd.blocks[0],
tinfo.u.mdir.rbyd.blocks[1]);
// keep track of seen blocks
seen[tinfo.u.mdir.u.mdir.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[1] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[0] % 8);
seen[tinfo.u.mdir.rbyd.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.rbyd.blocks[1] % 8);
seen[tinfo.u.mdir.rbyd.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.rbyd.blocks[0] % 8);
} else if (tinfo.tag == LFSR_TAG_BRANCH) {
printf("traversal: 0x%x btree 0x%x.%x\n",
tinfo.tag,
tinfo.u.rbyd.block, tinfo.u.rbyd.trunk);
tinfo.u.rbyd.blocks[0], tinfo.u.rbyd.trunk);
// keep track of seen blocks
seen[tinfo.u.rbyd.block / 8] |= 1 << (tinfo.u.rbyd.block % 8);
seen[tinfo.u.rbyd.blocks[0] / 8]
|= 1 << (tinfo.u.rbyd.blocks[0] % 8);
} else if (tinfo.tag == LFSR_TAG_BLOCK) {
printf("traversal: 0x%x block 0x%x\n",
+75 -73
View File
@@ -120,7 +120,7 @@ code = '''
lfsr_btree_alloc(&lfs, &btree) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 0);
@@ -154,7 +154,7 @@ code = '''
LFSR_DATA_BUF("a", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -196,7 +196,7 @@ code = '''
LFSR_DATA_BUF("b", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 2);
@@ -243,7 +243,7 @@ code = '''
LFSR_DATA_BUF("a", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 2);
@@ -293,7 +293,7 @@ code = '''
LFSR_DATA_BUF("c", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 3);
@@ -348,7 +348,7 @@ code = '''
LFSR_DATA_BUF("a", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 3);
@@ -412,7 +412,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == n);
@@ -465,7 +465,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == n);
@@ -549,7 +549,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == sim_size);
@@ -605,7 +605,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == n*W);
@@ -727,7 +727,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
lfs_size_t total_weight = 0;
@@ -810,7 +810,7 @@ code = '''
LFSR_DATA_BUF("A", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -856,7 +856,7 @@ code = '''
LFSR_DATA_BUF("B", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 2);
@@ -912,7 +912,7 @@ code = '''
LFSR_DATA_BUF("C", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 3);
@@ -969,7 +969,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -983,7 +983,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -991,7 +991,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == N);
@@ -1042,7 +1042,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1089,7 +1089,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == N);
@@ -1139,7 +1139,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1153,7 +1153,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1161,7 +1161,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == N*W);
@@ -1228,7 +1228,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1294,7 +1294,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
lfs_size_t total_weight = 0;
@@ -1377,7 +1377,7 @@ code = '''
lfsr_btree_pop(&lfs, &btree, 0) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 0);
@@ -1394,7 +1394,7 @@ code = '''
LFSR_DATA_BUF("A", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -1433,7 +1433,7 @@ code = '''
lfsr_btree_pop(&lfs, &btree, 1) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -1456,7 +1456,7 @@ code = '''
LFSR_DATA_BUF("B", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 2);
@@ -1501,7 +1501,7 @@ code = '''
lfsr_btree_pop(&lfs, &btree, 0) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -1524,7 +1524,7 @@ code = '''
LFSR_DATA_BUF("A", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 2);
@@ -1571,7 +1571,7 @@ code = '''
lfsr_btree_pop(&lfs, &btree, 2) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 2);
@@ -1600,7 +1600,7 @@ code = '''
LFSR_DATA_BUF("C", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 3);
@@ -1654,7 +1654,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1667,7 +1667,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1676,7 +1676,7 @@ code = '''
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == REMAINING);
@@ -1746,7 +1746,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1759,7 +1759,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1767,7 +1767,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == REMAINING);
@@ -1839,7 +1839,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1887,7 +1887,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == sim_size);
@@ -1938,7 +1938,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1951,7 +1951,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -1959,7 +1959,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == REMAINING*W);
@@ -2079,7 +2079,7 @@ code = '''
if (err == LFS_ERR_NOSPC) {
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
return;
}
@@ -2136,7 +2136,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
lfs_size_t total_weight = 0;
@@ -2228,7 +2228,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == n);
@@ -2318,7 +2318,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == sim_size);
@@ -2377,7 +2377,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == n*W);
@@ -2518,7 +2518,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
lfs_size_t total_weight = 0;
@@ -2621,7 +2621,7 @@ code = '''
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -2687,7 +2687,7 @@ code = '''
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -2748,7 +2748,7 @@ code = '''
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -2818,7 +2818,7 @@ code = '''
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -2932,7 +2932,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == sim_size);
@@ -3074,7 +3074,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
lfs_size_t total_weight = 0;
@@ -3150,7 +3150,7 @@ code = '''
lfsr_btree_alloc(&lfs, &btree) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 0);
@@ -3188,7 +3188,7 @@ code = '''
LFSR_ATTR(0, DATA, 0, BUF("0", 1)))) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 1);
@@ -3244,7 +3244,7 @@ code = '''
LFSR_TAG_DATA, 1, LFSR_DATA_BUF("1", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 2);
@@ -3312,7 +3312,7 @@ code = '''
LFSR_TAG_DATA, 1, LFSR_DATA_BUF("2", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 3);
@@ -3388,7 +3388,7 @@ code = '''
LFSR_TAG_DATA, 1, LFSR_DATA_BUF("1", 1)) => 0;
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == 3);
@@ -3478,7 +3478,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == n);
@@ -3593,7 +3593,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == sim_size);
@@ -3665,7 +3665,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == n*W);
@@ -3808,7 +3808,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
lfs_size_t total_weight = 0;
@@ -3991,7 +3991,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == sim_size);
@@ -4193,7 +4193,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
lfs_size_t total_weight = 0;
@@ -4264,7 +4264,7 @@ code = '''
}
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == n);
@@ -4306,10 +4306,11 @@ code = '''
binfo.bid,
binfo.tag,
binfo.weight,
binfo.u.rbyd.block, binfo.u.rbyd.trunk);
binfo.u.rbyd.blocks[0], binfo.u.rbyd.trunk);
// keep track of seen blocks
seen[binfo.u.rbyd.block / 8] |= 1 << (binfo.u.rbyd.block % 8);
seen[binfo.u.rbyd.blocks[0] / 8]
|= 1 << (binfo.u.rbyd.blocks[0] % 8);
} else if (binfo.tag == LFSR_TAG_DATA) {
printf("traversal: %d 0x%x w%d data %d\n",
@@ -4417,7 +4418,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == sim_size);
@@ -4458,10 +4459,11 @@ code = '''
binfo.bid,
binfo.tag,
binfo.weight,
binfo.u.rbyd.block, binfo.u.rbyd.trunk);
binfo.u.rbyd.blocks[0], binfo.u.rbyd.trunk);
// keep track of seen blocks
seen[binfo.u.rbyd.block / 8] |= 1 << (binfo.u.rbyd.block % 8);
seen[binfo.u.rbyd.blocks[0] / 8]
|= 1 << (binfo.u.rbyd.blocks[0] % 8);
} else if (binfo.tag == LFSR_TAG_DATA) {
printf("traversal: %d 0x%x w%d data %d\n",
@@ -4506,7 +4508,7 @@ code = '''
printf("]\n");
printf("btree: w%d 0x%x.%x\n",
btree.weight,
btree.block,
btree.blocks[0],
btree.trunk);
assert(btree.weight == sim_size);
+365 -359
View File
File diff suppressed because it is too large Load Diff
+533 -533
View File
File diff suppressed because it is too large Load Diff