11 Commits

Author SHA1 Message Date
Dolu1990
3cd200f9b6 Update build.sbt 2020-03-09 00:56:45 +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
3 changed files with 22 additions and 12 deletions

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.
## 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
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
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
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
//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
sbt "run-main mylib.MyTopLevelVhdl"
sbt "runMain mylib.MyTopLevelVhdl"
//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

View File

@@ -7,8 +7,9 @@ scalaVersion := "2.11.12"
EclipseKeys.withSource := true
libraryDependencies ++= Seq(
"com.github.spinalhdl" % "spinalhdl-core_2.11" % "1.3.0",
"com.github.spinalhdl" % "spinalhdl-lib_2.11" % "1.3.0"
"com.github.spinalhdl" % "spinalhdl-core_2.11" % "1.4.0",
"com.github.spinalhdl" % "spinalhdl-lib_2.11" % "1.4.0",
compilerPlugin("com.github.spinalhdl" % "spinalhdl-idsl-plugin_2.11" % "1.4.0")
)
fork := true

View File

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