Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
2ae7b74d
Commit
2ae7b74d
authored
Sep 28, 2016
by
Jens Korinth
Browse files
AxiSlidingWindow: reverse order in window
parent
992c37c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/scala/AxiSlidingWindow.scala
View file @
2ae7b74d
...
...
@@ -87,9 +87,9 @@ class AxiSlidingWindow[T <: Data](val cfg: AxiSlidingWindowConfiguration[T]) ext
// shift data on handshake
when
(
data_in
.
ready
&&
data_in
.
valid
)
{
mem
(
0
)
:=
data_in
.
bits
for
(
i
<-
1
until
cfg
.
depth
)
mem
(
i
)
:=
mem
(
i
-
1
)
mem
(
cfg
.
depth
-
1
)
:=
data_in
.
bits
for
(
i
<-
0
until
cfg
.
depth
-
1
)
mem
(
i
)
:=
mem
(
i
+
1
)
when
(
state
===
init
)
{
cnt
:=
cnt
+
UInt
(
1
)
...
...
src/test/scala/AxiSlidingWindowSuite.scala
View file @
2ae7b74d
...
...
@@ -47,7 +47,7 @@ class AxiSlidingWindowTester[T <: Data](m: AxiSlidingWindowTestModule[T], isTrac
// check all sliding windows within size of memory slave (no border handling)
for
(
i
<-
0
until
totalSteps
if
noErrors
)
{
val
expected
=
(
0
until
m
.
asw
.
cfg
.
depth
)
map
(
i
=>
(
i
+
start
)
%
maxData
)
val
found
=
(
0
until
m
.
asw
.
cfg
.
depth
)
map
(
i
=>
peek
(
m
.
asw
.
io
.
data
.
bits
)(
i
))
val
found
=
(
0
until
m
.
asw
.
cfg
.
depth
)
map
(
i
=>
peek
(
m
.
asw
.
io
.
data
.
bits
)(
m
.
asw
.
cfg
.
depth
-
i
-
1
))
noErrors
=
expected
.
equals
(
found
)
if
(!
noErrors
)
println
(
"Mismatch at step #%d: expected %s, found %s"
.
format
(
start
,
expected
.
toString
,
found
.
toString
))
...
...
Jens Korinth
@jk
mentioned in commit
17f0d672
·
Mar 05, 2018
mentioned in commit
17f0d672
mentioned in commit 17f0d67240ebf5d7e1d0be9162d272b04256c47d
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment