From bb11cb2a82a3a38f7bb3fdedef60123cdf6c147f Mon Sep 17 00:00:00 2001 From: Minyong Li <ml10g20@soton.ac.uk> Date: Mon, 5 Jul 2021 19:22:03 +0100 Subject: [PATCH] core.QuarterRound: private vals Boring change lol --- .../ac/soton/ecs/can/core/QuarterRound.scala | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/scala/uk/ac/soton/ecs/can/core/QuarterRound.scala b/src/main/scala/uk/ac/soton/ecs/can/core/QuarterRound.scala index 5e1ffba..b84740b 100644 --- a/src/main/scala/uk/ac/soton/ecs/can/core/QuarterRound.scala +++ b/src/main/scala/uk/ac/soton/ecs/can/core/QuarterRound.scala @@ -12,20 +12,20 @@ class QuarterRound extends MultiIOModule { private def rotateLeft(v: UInt, b: Int): UInt = v(31 - b, 0) ## v(31, 32 - b) - val a0 = in(0) - val b0 = in(1) - val c0 = in(2) - val d0 = in(3) - - val a1 = a0 + b0 - val d1 = rotateLeft(d0 ^ a1, 16) - val c1 = c0 + d1 - val b1 = rotateLeft(b0 ^ c1, 12) - - val a2 = a1 + b1 - val d2 = rotateLeft(d1 ^ a2, 8) - val c2 = c1 + d2 - val b2 = rotateLeft(b1 ^ c2, 7) + 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 a2 = a1 + b1 + private val d2 = rotateLeft(d1 ^ a2, 8) + private val c2 = c1 + d2 + private val b2 = rotateLeft(b1 ^ c2, 7) out(0) := a2 out(1) := b2 -- GitLab