Skip to content

Getting started

Dolu1990 edited this page Apr 7, 2022 · 10 revisions

Installation

Execute the following commands in order to get SpinalCrypto into your sbt repository.

# Get the last version of SpinalCrypto
git clone https://github.com/SpinalHDL/SpinalCrypto.git
cd SpinalCrypto
sbt publishLocal 

Project configuration

Modify your sbt as follow:

name := "MyProject"

version := "1.0"

scalaVersion := "2.11.6"

EclipseKeys.withSource := true

libraryDependencies ++= Seq(
  "com.github.spinalhdl" % "spinalhdl-core_2.11" % "latest.release",
  "com.github.spinalhdl" % "spinalhdl-lib_2.11" % "latest.release",
  "com.github.spinalhdl" % "spinalhdl-crypto_2.11" % "latest.release"
)

Example

import spinal.core._
import spinal.crypto.symmetric.des.DESCore_Std


object PlayWithSpinalCrypto{

  def main(args: Array[String]): Unit = {
    SpinalVerilog(new DESCore_Std)
  }
}

Using the library without publishLocal

You can integrate this repository directly as a SBT module in your project. Here is an similar example but for VexRiscv : https://github.com/SpinalHDL/SpinalTemplateSbtDependencies/blob/b66d4937d40fcc979bea1f9662a3724244393c8d/build.sbt#L19

Clone this wiki locally