-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add tests of the new "both" mode of edge.comp
- Loading branch information
1 parent
2111b4e
commit a67be0a
Showing
6 changed files
with
96 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
1 0 1 | ||
1 0 1 | ||
1 0 1 | ||
1 0 1 | ||
0 1 0 | ||
0 0 1 | ||
1 1 0 | ||
0 1 0 | ||
0 0 1 | ||
0 0 1 |
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,13 @@ | ||
#!/bin/sh | ||
halstreamer << EOF | ||
1 | ||
1 | ||
1 | ||
1 | ||
0 | ||
0 | ||
1 | ||
0 | ||
0 | ||
0 | ||
EOF |
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,25 @@ | ||
setexact_for_test_suite_only | ||
|
||
loadrt threads name1=fast period1=100000 | ||
loadrt edge | ||
|
||
loadrt sampler cfg=bbb depth=500 | ||
loadrt streamer cfg=b depth=500 | ||
|
||
net in streamer.0.pin.0 => sampler.0.pin.0 edge.0.in | ||
net out edge.0.out => sampler.0.pin.1 | ||
net out-invert edge.0.out-invert => sampler.0.pin.2 | ||
|
||
addf streamer.0 fast | ||
addf edge.0 fast | ||
addf sampler.0 fast | ||
|
||
# look for both falling and rising edges | ||
setp edge.0.both True | ||
|
||
# keep the .out pin high for 25,000 ns, rounded up to the nearest thread period | ||
setp edge.0.out-width-ns 25000 | ||
|
||
loadusr -w sh runstreamer | ||
start | ||
loadusr -w halsampler -n 10 |
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,10 @@ | ||
0 0 1 | ||
1 1 0 | ||
1 0 1 | ||
1 0 1 | ||
0 1 0 | ||
0 0 1 | ||
1 1 0 | ||
0 1 0 | ||
0 0 1 | ||
0 0 1 |
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,13 @@ | ||
#!/bin/sh | ||
halstreamer << EOF | ||
0 | ||
1 | ||
1 | ||
1 | ||
0 | ||
0 | ||
1 | ||
0 | ||
0 | ||
0 | ||
EOF |
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,25 @@ | ||
setexact_for_test_suite_only | ||
|
||
loadrt threads name1=fast period1=100000 | ||
loadrt edge | ||
|
||
loadrt sampler cfg=bbb depth=500 | ||
loadrt streamer cfg=b depth=500 | ||
|
||
net in streamer.0.pin.0 => sampler.0.pin.0 edge.0.in | ||
net out edge.0.out => sampler.0.pin.1 | ||
net out-invert edge.0.out-invert => sampler.0.pin.2 | ||
|
||
addf streamer.0 fast | ||
addf edge.0 fast | ||
addf sampler.0 fast | ||
|
||
# look for both falling and rising edges | ||
setp edge.0.both True | ||
|
||
# keep the .out pin high for 25,000 ns, rounded up to the nearest thread period | ||
setp edge.0.out-width-ns 25000 | ||
|
||
loadusr -w sh runstreamer | ||
start | ||
loadusr -w halsampler -n 10 |