Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
4c01e8ee
Commit
4c01e8ee
authored
Aug 13, 2019
by
Benjamin Tu
Committed by
Thierry Moreau
Aug 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syntax fix (#3765)
parent
e9782030
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vta/hardware/chisel/src/test/scala/unittest/MvmTest.scala
+2
-2
No files found.
vta/hardware/chisel/src/test/scala/unittest/MvmTest.scala
View file @
4c01e8ee
...
...
@@ -33,7 +33,7 @@ class TestMatrixVectorMultiplication(c: MatrixVectorMultiplication) extends Peek
* This is a software function that computes dot product with a programmable shift
* This is used as a reference for the hardware
*/
def
mvm
_r
ef
(
inp
:
Array
[
Int
],
wgt
:
Array
[
Array
[
Int
]],
shift
:
Int
)
:
Array
[
Int
]
=
{
def
mvm
R
ef
(
inp
:
Array
[
Int
],
wgt
:
Array
[
Array
[
Int
]],
shift
:
Int
)
:
Array
[
Int
]
=
{
val
size
=
inp
.
length
val
res
=
Array
.
fill
(
size
)
{
0
}
for
(
i
<-
0
until
size
)
{
...
...
@@ -53,7 +53,7 @@ class TestMatrixVectorMultiplication(c: MatrixVectorMultiplication) extends Peek
val
wgtGen
=
new
RandomArray
(
c
.
size
,
c
.
wgtBits
)
val
in_a
=
inpGen
.
any
val
in_b
=
Array
.
fill
(
c
.
size
)
{
wgtGen
.
any
}
val
res
=
mvm
_r
ef
(
in_a
,
in_b
,
0
)
val
res
=
mvm
R
ef
(
in_a
,
in_b
,
0
)
val
inpMask
=
helper
.
getMask
(
c
.
inpBits
)
val
wgtMask
=
helper
.
getMask
(
c
.
wgtBits
)
val
accMask
=
helper
.
getMask
(
c
.
accBits
)
...
...
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