From 950b707c9fefdf32c057b3b20b30e560067e6199 Mon Sep 17 00:00:00 2001 From: Thorsten Knoll Date: Sat, 6 Feb 2021 19:31:27 +0100 Subject: [PATCH] spinal code cleaning --- .../src/main/scala/quantumrisc/MyMem.scala | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/vexriscv/src/main/scala/quantumrisc/MyMem.scala b/vexriscv/src/main/scala/quantumrisc/MyMem.scala index 235517a..2a731a2 100644 --- a/vexriscv/src/main/scala/quantumrisc/MyMem.scala +++ b/vexriscv/src/main/scala/quantumrisc/MyMem.scala @@ -18,30 +18,14 @@ class MyMem() extends Component { val bus = slave(Apb3(MyMem.getApb3Config)) } - // Define a bundle "mapMem" for the state and the status - // case object mapMem extends Bundle { - // val state = Reg(Bits(128 bit)) - // val key = Reg(Bits(128 bit)) - // val status = Reg(Bits(32 bit)) - // } - + // Create the AES Core from the library spinalCrypto val aesCore = new AESCore_Std(128 bits) // Create a BusslaveFactory on the io.bus val busCtrl = Apb3SlaveFactory(io.bus) + // Drive the AES Core bus from the mem-mapped Vexriscv bus at + // the address 0x30000. See the c code struct for the layout of + // the memory. aesCore.io.driveFrom(busCtrl,baseAddress=0x30000) - - // Register the bundle "myReg" to the BusSlaveFactory at address 0x30000 - // busCtrl.readMultiWord(aesCore.io.rsp,address = 0x30000) - // busCtrl.writeMultiWord(aesCore.io.cmd,address = 0x30000) - - - // When state and key are loaded, the status becomes 1 - // and the calculation can start (state = state XOR key). - // After the calcualtion is finished, the status is set to 0. - // when (mapMem.status === 1){ - // mapMem.state := mapMem.state ^ mapMem.key - // mapMem.status := 0 - // } }