Skip to content

Commit 973b86e

Browse files
committed
remove no-mast version comment-out code
1 parent d7118e4 commit 973b86e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/main/scala/aes/AES.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,23 @@ class AES(Nk: Int, unrolled: Boolean, SubBytes_SCD: Boolean, InvSubBytes_SCD: Bo
4242
// A roundKey is Params.StateLength bytes, and 1+(10/12/14) (< EKDepth) of them are needed
4343
// Mem = combinational/asynchronous-read, sequential/synchronous-write = register banks
4444
// Create a asynchronous-read, synchronous-write memory block big enough for any key length
45-
//val expandedKeyARMem = Mem(EKDepth, UInt((Params.StateLength * 8).W))
4645
val expandedKeyARMem = Mem(EKDepth, Vec(Params.StateLength, UInt(8.W)))
4746

4847

4948
// SyncReadMem = sequential/synchronous-read, sequential/synchronous-write = SRAMs
5049
// Create a synchronous-read, synchronous-write memory block big enough for any key length
51-
//val expandedKeySRMem = SyncReadMem(EKDepth, UInt((Params.StateLength * 8).W))
5250
val expandedKeySRMem = SyncReadMem(EKDepth, Vec(Params.StateLength, UInt(8.W)))
5351

5452
// use the same address and dataOut val elements to interface with the parameterized memory
5553
val address = RegInit(0.U(log2Ceil(EKDepth).W))
56-
//val dataOut = RegInit(0.U((Params.StateLength * 8).W))
5754
val dataOut = Wire(Vec(Params.StateLength, UInt(8.W)))
5855

5956
when(io.AES_mode === 1.U) { // write to memory
6057
if (expandedKeyMemType == "Mem") {
6158
expandedKeyARMem(address) := io.input_text
62-
//Cat(io.input_text(0), io.input_text(1), io.input_text(2), io.input_text(3), io.input_text(4), io.input_text(5), io.input_text(6), io.input_text(7), io.input_text(8), io.input_text(9), io.input_text(10), io.input_text(11), io.input_text(12), io.input_text(13), io.input_text(14), io.input_text(15))
6359
}
6460
else if (expandedKeyMemType == "SyncReadMem") {
6561
expandedKeySRMem(address) := io.input_text
66-
//Cat(io.input_text(0), io.input_text(1), io.input_text(2), io.input_text(3), io.input_text(4), io.input_text(5), io.input_text(6), io.input_text(7), io.input_text(8), io.input_text(9), io.input_text(10), io.input_text(11), io.input_text(12), io.input_text(13), io.input_text(14), io.input_text(15))
6762
}
6863
dataOut := DontCare
6964
address := address + 1.U
@@ -107,9 +102,7 @@ class AES(Nk: Int, unrolled: Boolean, SubBytes_SCD: Boolean, InvSubBytes_SCD: Bo
107102
// The roundKey for each round can go to both the cipher and inverse cipher (for now TODO)
108103
if (expandedKeyMemType == "Mem" || expandedKeyMemType == "SyncReadMem") {
109104
CipherModule.io.roundKey := dataOut
110-
//Array(dataOut(127, 120), dataOut(119, 112), dataOut(111, 104), dataOut(103, 96), dataOut(95, 88), dataOut(87, 80), dataOut(79, 72), dataOut(71, 64), dataOut(63, 56), dataOut(55, 48), dataOut(47, 40), dataOut(39, 32), dataOut(31, 24), dataOut(23, 16), dataOut(15, 8), dataOut(7, 0))
111105
InvCipherModule.io.roundKey := dataOut
112-
//Array(dataOut(127, 120), dataOut(119, 112), dataOut(111, 104), dataOut(103, 96), dataOut(95, 88), dataOut(87, 80), dataOut(79, 72), dataOut(71, 64), dataOut(63, 56), dataOut(55, 48), dataOut(47, 40), dataOut(39, 32), dataOut(31, 24), dataOut(23, 16), dataOut(15, 8), dataOut(7, 0))
113106
} else if (expandedKeyMemType == "ROM") {
114107
CipherModule.io.roundKey := ROMeKeyOut
115108
InvCipherModule.io.roundKey := ROMeKeyOut

0 commit comments

Comments
 (0)