15 Commits

Author SHA1 Message Date
Dolu1990
514b43937b withAssembly 2020-04-21 10:23:10 +02:00
Dolu1990
b524ddddd8 cleanup build.sbt 2020-03-09 12:34:41 +01:00
Dolu1990
648d530e4d Merge remote-tracking branch 'origin/compiler_plugin' 2020-03-09 12:25:15 +01:00
Dolu1990
3cd200f9b6 Update build.sbt 2020-03-09 00:56:45 +01:00
Dolu1990
4f93c929d4 sbt 1.3.3 for windows compatibility 2020-03-02 19:41:14 +01:00
Charles Papon
4c1ec24f9b boot 2020-02-18 18:48:19 +01:00
Dolu1990
83ae9ff28b SpinalHDL 1.3.8 2020-01-10 15:50:47 +01:00
Charles Papon
13cd788fdc SpinalHDl 1.3.5 2019-05-22 11:08:03 +02:00
Charles Papon
53b4595be9 SpinalHDL 1.3.3 2019-04-25 17:59:53 +02:00
Dolu1990
8ab19a2b3e SpinalHDL 1.3.2 2019-03-10 11:15:52 +01:00
Dolu1990
9ff9388be2 Update README.md 2019-01-29 12:36:27 +01:00
Dolu1990
70ee49e249 SpinalHDL 1.3.1 2019-01-14 13:35:34 +01:00
Dolu1990
31f3b617a9 fix readme run-main into runMain 2019-01-03 20:04:08 +01:00
Dolu1990
0c8143eebc Merge remote-tracking branch 'origin/dev' 2018-12-30 15:41:59 +01:00
Dolu1990
84b413aefc Update README.md
fix #3
2018-12-06 23:05:41 +01:00
6 changed files with 28 additions and 17 deletions

1
.gitignore vendored
View File

@@ -38,3 +38,4 @@ bin/
simWorkspace/ simWorkspace/
tmp/ tmp/
null

View File

@@ -2,13 +2,25 @@ Spinal Base Project
============ ============
This repository is a base SBT project added to help non Scala/SBT native people in their first steps. This repository is a base SBT project added to help non Scala/SBT native people in their first steps.
## Basics, without any IDE Just one important note, you need a java JDK >= 8
You need to install Java JDK and SBT On debian :
```sh ```sh
sudo apt-get install openjdk-8-jdk sudo add-apt-repository -y ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk -y
#To set the default java
sudo update-alternatives --config java
sudo update-alternatives --config javac
```
## Basics, without any IDE
You need to install SBT
```sh
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update sudo apt-get update
@@ -46,13 +58,13 @@ Open a terminal in the root of it and run "sbt run". At the first execution, the
cd SpinalTemplateSbt cd SpinalTemplateSbt
//If you want to generate the Verilog of your design //If you want to generate the Verilog of your design
sbt "run-main mylib.MyTopLevelVerilog" sbt "runMain mylib.MyTopLevelVerilog"
//If you want to generate the VHDL of your design //If you want to generate the VHDL of your design
sbt "run-main mylib.MyTopLevelVhdl" sbt "runMain mylib.MyTopLevelVhdl"
//If you want to run the scala written testbench //If you want to run the scala written testbench
sbt "run-main mylib.MyTopLevelSim" sbt "runMain mylib.MyTopLevelSim"
``` ```
The top level spinal code is defined into src\main\scala\mylib The top level spinal code is defined into src\main\scala\mylib

View File

@@ -1,14 +1,13 @@
name := "SpinalTemplateSbt" name := "SpinalTemplateSbt"
version := "1.0" version := "1.0"
scalaVersion := "2.11.12" scalaVersion := "2.11.12"
val spinalVersion = "1.4.0"
EclipseKeys.withSource := true
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
"com.github.spinalhdl" % "spinalhdl-core_2.11" % "1.3.0", "com.github.spinalhdl" % "spinalhdl-core_2.11" % spinalVersion,
"com.github.spinalhdl" % "spinalhdl-lib_2.11" % "1.3.0" "com.github.spinalhdl" % "spinalhdl-lib_2.11" % spinalVersion,
compilerPlugin("com.github.spinalhdl" % "spinalhdl-idsl-plugin_2.11" % spinalVersion)
) )
fork := true fork := true
EclipseKeys.withSource := true

View File

@@ -1 +1 @@
sbt.version=1.2.7 sbt.version=1.3.3

View File

@@ -1,2 +1,4 @@
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")

View File

@@ -15,8 +15,7 @@ object MyTopLevelSim {
dut.clockDomain.forkStimulus(period = 10) dut.clockDomain.forkStimulus(period = 10)
var modelState = 0 var modelState = 0
var idx = 0 for(idx <- 0 to 99){
while(idx < 100){
//Drive the dut inputs with random values //Drive the dut inputs with random values
dut.io.cond0 #= Random.nextBoolean() dut.io.cond0 #= Random.nextBoolean()
dut.io.cond1 #= Random.nextBoolean() dut.io.cond1 #= Random.nextBoolean()
@@ -33,8 +32,6 @@ object MyTopLevelSim {
if(dut.io.cond0.toBoolean) { if(dut.io.cond0.toBoolean) {
modelState = (modelState + 1) & 0xFF modelState = (modelState + 1) & 0xFF
} }
idx += 1
} }
} }
} }