Verified Commit bb11cb2a authored by Minyong Li's avatar Minyong Li 💬
Browse files

core.QuarterRound: private vals

Boring change lol
parent 0c38413f
...@@ -12,20 +12,20 @@ class QuarterRound extends MultiIOModule { ...@@ -12,20 +12,20 @@ class QuarterRound extends MultiIOModule {
private def rotateLeft(v: UInt, b: Int): UInt = private def rotateLeft(v: UInt, b: Int): UInt =
v(31 - b, 0) ## v(31, 32 - b) v(31 - b, 0) ## v(31, 32 - b)
val a0 = in(0) private val a0 = in(0)
val b0 = in(1) private val b0 = in(1)
val c0 = in(2) private val c0 = in(2)
val d0 = in(3) private val d0 = in(3)
val a1 = a0 + b0 private val a1 = a0 + b0
val d1 = rotateLeft(d0 ^ a1, 16) private val d1 = rotateLeft(d0 ^ a1, 16)
val c1 = c0 + d1 private val c1 = c0 + d1
val b1 = rotateLeft(b0 ^ c1, 12) private val b1 = rotateLeft(b0 ^ c1, 12)
val a2 = a1 + b1 private val a2 = a1 + b1
val d2 = rotateLeft(d1 ^ a2, 8) private val d2 = rotateLeft(d1 ^ a2, 8)
val c2 = c1 + d2 private val c2 = c1 + d2
val b2 = rotateLeft(b1 ^ c2, 7) private val b2 = rotateLeft(b1 ^ c2, 7)
out(0) := a2 out(0) := a2
out(1) := b2 out(1) := b2
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment