-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed issues with cross chunk Spans, chunk string->array, and better …
…tests
- Loading branch information
Showing
14 changed files
with
424 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict'; | ||
|
||
function xoshiro128ss(a, b, c, d) { | ||
return function() { | ||
var t = b << 9, r = a * 5; r = (r << 7 | r >>> 25) * 9; | ||
c ^= a; d ^= b; | ||
b ^= c; a ^= d; c ^= t; | ||
d = d << 11 | d >>> 21; | ||
return (r >>> 0) / 4294967296; | ||
}; | ||
} | ||
|
||
|
||
function * chopper (src, step) { | ||
|
||
const chunker = len => { | ||
const chunk = src.slice(0, len); | ||
src = src.slice(chunk.length); | ||
return chunk; | ||
}; | ||
|
||
const random = xoshiro128ss(1134534345, 2145245245624, 313442566456, 4245642456456); | ||
// const random = Math.random; | ||
// const random = () => 0; | ||
// yield(chunker(395)); | ||
// yield(chunker(145)); | ||
while(true) { | ||
if (src.length === 0) { | ||
return; | ||
} | ||
yield(chunker(random() * step + step)); | ||
} | ||
} | ||
|
||
module.exports = chopper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
'use strict'; | ||
|
||
/* global BigInt */ | ||
|
||
const dotProp = require('dot-prop'); | ||
|
||
function _waitForStart(mod) { | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
$version Generated by VerilatedVcd $end | ||
$date Wed Sep 18 22:59:07 2019 | ||
$end | ||
$timescale 1ns $end | ||
|
||
$scope module top $end | ||
$var wire 1 "}G clock $end | ||
$scope module leaf $end | ||
$var wire 64 {u counter [63:0] $end | ||
$upscope $end | ||
$scope module fruit $end | ||
$var wire 4 u) point [3:0] $end | ||
$upscope $end | ||
$upscope $end | ||
|
||
$enddefinitions $end | ||
#100 | ||
0"}G | ||
#200 | ||
1"}G | ||
bzzzzxxxx11110000ZZZZXXXX11110000zzzzxxxx11110000zzzzxxxx11110000 {u | ||
#300 | ||
0"}G | ||
b1111000000000000000000000000000000000000000000000000000000000000 {u | ||
b0000 u) | ||
#301 | ||
b0000111100000000000000000000000000000000000000000000000000000000 {u | ||
b0001 u) | ||
#302 | ||
b0000000011110000000000000000000000000000000000000000000000000000 {u | ||
b0010 u) | ||
#303 | ||
b0000000000001111000000000000000000000000000000000000000000000000 {u | ||
b0011 u) | ||
#304 | ||
b0000000000000000111100000000000000000000000000000000000000000000 {u | ||
b0100 u) | ||
#305 | ||
b0000000000000000000011110000000000000000000000000000000000000000 {u | ||
b0101 u) | ||
#306 | ||
b0000000000000000000000001111000000000000000000000000000000000000 {u | ||
b0110 u) | ||
#307 | ||
b0000000000000000000000000000111100000000000000000000000000000000 {u | ||
b0111 u) | ||
#308 | ||
B0000000000000000000000000000000011110000000000000000000000000000 {u | ||
b1000 u) | ||
#309 | ||
b0000000000000000000000000000000000001111000000000000000000000000 {u | ||
b1001 u) | ||
#310 | ||
b0000000000000000000000000000000000000000111100000000000000000000 {u | ||
b1010 u) | ||
#311 | ||
b0000000000000000000000000000000000000000000011110000000000000000 {u | ||
b1011 u) | ||
#312 | ||
b0000000000000000000000000000000000000000000000001111000000000000 {u | ||
b1100 u) | ||
#313 | ||
b0000000000000000000000000000000000000000000000000000111100000000 {u | ||
b1101 u) | ||
#314 | ||
b0000000000000000000000000000000000000000000000000000000011110000 {u | ||
b1110 u) | ||
#315 | ||
b0000000000000000000000000000000000000000000000000000000000001111 {u | ||
b1111 u) | ||
#316 | ||
1"}G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.