Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Can
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Minyong Li
Can
Commits
0cf08793
Verified
Commit
0cf08793
authored
3 years ago
by
Minyong Li
Browse files
Options
Downloads
Patches
Plain Diff
core.TwoStageQuarterRound: add
parent
3bd8edb2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/uk/ac/soton/ecs/can/core/TwoStageQuarterRound.scala
+34
-0
34 additions, 0 deletions
...scala/uk/ac/soton/ecs/can/core/TwoStageQuarterRound.scala
with
34 additions
and
0 deletions
src/main/scala/uk/ac/soton/ecs/can/core/TwoStageQuarterRound.scala
0 → 100644
+
34
−
0
View file @
0cf08793
// SPDX-FileCopyrightText: 2021 Minyong Li <ml10g20@soton.ac.uk>
// SPDX-License-Identifier: CERN-OHL-W-2.0
package
uk.ac.soton.ecs.can.core
import
chisel3._
class
TwoStageQuarterRound
extends
BaseQuarterRound
{
private
val
a0
=
in
(
0
)
private
val
b0
=
in
(
1
)
private
val
c0
=
in
(
2
)
private
val
d0
=
in
(
3
)
private
val
a1
=
a0
+
b0
private
val
d1
=
rotateLeft
(
d0
^
a1
,
16
)
private
val
c1
=
c0
+
d1
private
val
b1
=
rotateLeft
(
b0
^
c1
,
12
)
private
val
reg
=
Reg
(
Vec
(
4
,
UInt
(
32.
W
)))
reg
(
0
)
:=
a1
reg
(
1
)
:=
b1
reg
(
2
)
:=
c1
reg
(
3
)
:=
d1
private
val
a2
=
reg
(
0
)
+
reg
(
1
)
private
val
d2
=
rotateLeft
(
reg
(
3
)
^
a2
,
8
)
private
val
c2
=
reg
(
2
)
+
d2
private
val
b2
=
rotateLeft
(
reg
(
1
)
^
c2
,
7
)
out
(
0
)
:=
a2
out
(
1
)
:=
b2
out
(
2
)
:=
c2
out
(
3
)
:=
d2
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment