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
14b8a115
Commit
14b8a115
authored
Jul 19, 2016
by
Jens Korinth
Browse files
DecoupledDataSource: unassert valid during reset
* minor bug: valid would be asserted during reset, fixed
parent
3f3fef24
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/scala/DecoupledDataSource.scala
View file @
14b8a115
...
...
@@ -25,7 +25,7 @@ class DecoupledDataSource[T <: Data](gen: T, val size : Int, data: (Int) => T, v
val
i
=
Reg
(
UInt
(
width
=
log2Up
(
if
(
repeat
)
size
else
size
+
1
)))
// index
val
rom
=
Vec
.
tabulate
(
size
)(
n
=>
ds
(
n
))
// ROM with data
io
.
out
.
bits
:=
rom
(
i
)
// current index data
io
.
out
.
valid
:=
i
<
UInt
(
size
)
// valid until exceeded
io
.
out
.
valid
:=
!
reset
&&
i
<
UInt
(
size
)
// valid until exceeded
when
(
reset
)
{
i
:=
UInt
(
0
)
}
...
...
Jens Korinth
@jk
mentioned in commit
17f0d672
·
Mar 05, 2018
mentioned in commit
17f0d672
mentioned in commit 17f0d67240ebf5d7e1d0be9162d272b04256c47d
Toggle commit list
Write
Preview
Markdown
is supported
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