Browse Source

spinal code cleaning

master
Thorsten Knoll 4 years ago
parent
commit
950b707c9f
1 changed files with 4 additions and 20 deletions
  1. +4
    -20
      vexriscv/src/main/scala/quantumrisc/MyMem.scala

+ 4
- 20
vexriscv/src/main/scala/quantumrisc/MyMem.scala View File

@ -18,30 +18,14 @@ class MyMem() extends Component {
val bus = slave(Apb3(MyMem.getApb3Config)) 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) val aesCore = new AESCore_Std(128 bits)
// Create a BusslaveFactory on the io.bus // Create a BusslaveFactory on the io.bus
val busCtrl = Apb3SlaveFactory(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) 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
// }
} }

Loading…
Cancel
Save