Skip to content
GitLab
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
1fee5bb1
Commit
1fee5bb1
authored
Sep 22, 2017
by
Jens Korinth
Browse files
Remove direct references of reset
parent
2685786a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/scala/DecoupledDataSource.scala
View file @
1fee5bb1
...
...
@@ -33,9 +33,9 @@ class DecoupledDataSource[T <: Data](gen: T,
val
rom
=
Vec
.
tabulate
(
size
)(
n
=>
ds
(
n
))
// ROM with data
io
.
out
.
bits
:=
rom
(
i
)
// current index data
io
.
out
.
valid
:=
i
<
size
.
U
// valid until exceeded
io
.
out
.
valid
:=
repeat
.
B
|
i
<
size
.
U
// valid until exceeded
when
(
io
.
out
.
ready
&&
io
.
out
.
valid
)
{
when
(
io
.
out
.
fire
()
)
{
val
next
=
if
(
repeat
)
{
if
(
math
.
pow
(
2
,
log2Ceil
(
size
)).
toInt
==
size
)
i
+
1.
U
...
...
src/test/scala/datawidthconverter/MinimalDelayHarness.scala
View file @
1fee5bb1
...
...
@@ -38,7 +38,7 @@ class MinimalDelayHarness(val inWidth: Int,
val
dwc2
=
Module
(
new
DataWidthConverter
(
outWidth
,
inWidth
,
littleEndian
))
dwc
.
io
.
inq
<>
dsrc
.
io
.
out
dwc2
.
io
.
inq
<>
dwc
.
io
.
deq
dwc2
.
io
.
deq
.
ready
:=
!
reset
dwc2
.
io
.
deq
.
ready
:=
RegNext
(
true
.
B
,
init
=
false
.
B
)
// internal peek-and-poke does not work, need to wire as outputs:
io
.
dsrc_out_valid
:=
dsrc
.
io
.
out
.
valid
...
...
src/test/scala/decoupleddatasource/DecoupledDataSourceSpec.scala
View file @
1fee5bb1
...
...
@@ -19,7 +19,7 @@ class OutputCheck[T <: UInt](m: DecoupledDataSource[T], data: Int => Int) extend
reset
(
10
)
poke
(
m
.
io
.
out
.
ready
,
true
)
var
i
=
0
while
(
peek
(
m
.
io
.
out
.
valid
)
>
0
&
&
i
<=
m
.
size
)
{
while
(
peek
(
m
.
io
.
out
.
valid
)
>
0
&
i
<=
m
.
size
)
{
if
(
i
>=
m
.
size
)
{
expect
(
m
.
repeat
,
"repeat is false, but index (%d) exceeds size(%d)"
.
format
(
i
,
m
.
size
))
// :: errors
}
else
{
...
...
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
.
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