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
347e3d9d
Commit
347e3d9d
authored
Aug 27, 2019
by
Liangfu Chen
Committed by
Thierry Moreau
Aug 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[VTA] Parameterization and bug fix in TensorLoad module (#3841)
parent
891ee3ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vta/hardware/chisel/src/main/scala/core/TensorLoad.scala
+3
-3
No files found.
vta/hardware/chisel/src/main/scala/core/TensorLoad.scala
View file @
347e3d9d
...
...
@@ -55,8 +55,8 @@ class TensorLoad(tensorType: String = "none", debug: Boolean = false)
val
xPadCtrl0
=
Module
(
new
TensorPadCtrl
(
padType
=
"XPad0"
,
sizeFactor
))
val
xPadCtrl1
=
Module
(
new
TensorPadCtrl
(
padType
=
"XPad1"
,
sizeFactor
))
val
tag
=
Reg
(
UInt
(
8
.
W
))
val
set
=
Reg
(
UInt
(
8
.
W
))
val
tag
=
Reg
(
UInt
(
log2Ceil
(
tp
.
numMemBlock
)
.
W
))
val
set
=
Reg
(
UInt
(
log2Ceil
(
tp
.
tensorLength
)
.
W
))
val
sIdle
::
sYPad0
::
sXPad0
::
sReadCmd
::
sReadData
::
sXPad1
::
sYPad1
::
Nil
=
Enum
(
7
)
val
state
=
RegInit
(
sIdle
)
...
...
@@ -193,7 +193,7 @@ class TensorLoad(tensorType: String = "none", debug: Boolean = false)
tag
:=
tag
+
1.
U
}
when
(
state
===
sIdle
||
state
===
sReadCmd
||
(
set
===
(
tp
.
tensorLength
-
1
).
U
&&
tag
===
(
tp
.
numMemBlock
-
1
).
U
))
{
when
(
state
===
sIdle
||
dataCtrlDone
||
(
set
===
(
tp
.
tensorLength
-
1
).
U
&&
tag
===
(
tp
.
numMemBlock
-
1
).
U
))
{
set
:=
0.
U
}
.
elsewhen
((
io
.
vme_rd
.
data
.
fire
()
||
isZeroPad
)
&&
tag
===
(
tp
.
numMemBlock
-
1
).
U
)
{
set
:=
set
+
1.
U
...
...
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