Comments (6)
within SBT to build the Verilator C++ model?
it isn't SBT which build the verilator, it is the scala code itself.
Which scala code are you running through SBT ?
from spinalhdl.
The "issue" can be reproduced by just cloning the SpinalTemplateSbt
project, firing up sbt
and running: runMain projectname.MyTopLevelSim
.
On a non-GNU system this errors because make
is not GNU make:
sbt:projectname> runMain projectname.MyTopLevelSim
[info] running (fork) projectname.MyTopLevelSim
[info] [Runtime] SpinalHDL v1.9.4 git head : 270018552577f3bb8e5339ee2583c9c22d324215
[info] [Runtime] JVM max memory : 14536.0MiB
[info] [Runtime] Current date : 2023.11.06 17:06:24
[info] [Progress] at 0.000 : Elaborate components
[error] [Thread-2] INFO net.openhft.affinity.Affinity - Using dummy affinity control implementation
[info] [Progress] at 0.156 : Checks and transforms
[info] [Progress] at 0.226 : Generate Verilog
[info] [Done] at 0.268
[info] [Progress] Simulation workspace in /usr/home/jbo/projects/spinalhdl_template/./simWorkspace/MyTopLevel
[info] [Progress] Verilator compilation started
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 60: Variable/Value missing from "export"
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 65: Invalid line type
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 66: Unknown modifier " GNU Make cannot build in directories containing spaces, build elsewhere"
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 66: Unknown modifier " '$(CURDIR"
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 66: Invalid line type
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 67: Invalid line type
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 88: Invalid line type
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 90: Invalid line type
[error] Exception in thread "main" java.lang.AssertionError: assertion failed: Verilator C++ model compilation failed
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 109: Invalid line type
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 111: Invalid line type
[error] at scala.Predef$.assert(Predef.scala:223)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 144: Invalid line type
[error] at spinal.sim.VerilatorBackend.$anonfun$compileVerilator$21(VerilatorBackend.scala:686)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 147: Invalid line type
[error] at spinal.sim.VerilatorBackend.cacheSynchronized(VerilatorBackend.scala:75)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 152: Invalid line type
[error] at spinal.sim.VerilatorBackend.compileVerilator(VerilatorBackend.scala:649)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 156: Invalid line type
[error] at spinal.sim.VerilatorBackend.<init>(VerilatorBackend.scala:770)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 159: Invalid line type
[error] at spinal.core.sim.SpinalVerilatorBackend$.apply(SimBootstraps.scala:144)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 160: Invalid line type
[error] at spinal.core.sim.SpinalSimConfig.compile(SimBootstraps.scala:1003)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 168: Invalid line type
[error] at spinal.core.sim.SpinalSimConfig.compileCloned(SimBootstraps.scala:934)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 169: Invalid line type
[error] at spinal.core.sim.SpinalSimConfig.compile(SimBootstraps.scala:897)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 171: Invalid line type
[error] at projectname.MyTopLevelSim$.delayedEndpoint$projectname$MyTopLevelSim$1(MyTopLevelSim.scala:7)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 172: Invalid line type
[error] at projectname.MyTopLevelSim$delayedInit$body.apply(MyTopLevelSim.scala:6)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 204: Invalid line type
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 214: Invalid line type
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 219: Invalid line type
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 261: Invalid line type
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 288: Invalid line type
[error] at scala.collection.immutable.List.foreach(List.scala:431)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 297: Invalid line type
[error] at scala.App.main(App.scala:80)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 298: Invalid line type
[error] at scala.App.main$(App.scala:78)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 300: Invalid line type
[error] at projectname.MyTopLevelSim$.main(MyTopLevelSim.scala:6)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 302: Invalid line type
[error] at projectname.MyTopLevelSim.main(MyTopLevelSim.scala)
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 304: Invalid line type
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 328: Invalid line type
[info] make: "/usr/local/share/verilator/include/verilated.mk" line 356: Invalid line type
[info] make: /usr/local/share/verilator/include/: read error: Is a directory
[error] Nonzero exit code returned from runner: 1
[error] (Compile / runMain) Nonzero exit code returned from runner: 1
[error] Total time: 1 s, completed Nov 6, 2023 5:06:25 PM
If I create a wrapper named make
which calls gmake
internally, put that into $PATH
and then firing up SBT again it works fine:
sbt:projectname> runMain projectname.MyTopLevelSim
[info] running (fork) projectname.MyTopLevelSim
[info] [Runtime] SpinalHDL v1.9.4 git head : 270018552577f3bb8e5339ee2583c9c22d324215
[info] [Runtime] JVM max memory : 14536.0MiB
[info] [Runtime] Current date : 2023.11.06 17:07:30
[info] [Progress] at 0.000 : Elaborate components
[error] [Thread-2] INFO net.openhft.affinity.Affinity - Using dummy affinity control implementation
[info] [Progress] at 0.155 : Checks and transforms
[info] [Progress] at 0.223 : Generate Verilog
[info] [Done] at 0.263
[info] [Progress] Simulation workspace in /usr/home/jbo/projects/spinalhdl_template/./simWorkspace/MyTopLevel
[info] [Progress] Verilator compilation started
[info] [Progress] Verilator compilation done in 9490.887 ms
[info] [Progress] Start MyTopLevel test simulation with seed 985360247
[info] [Done] Simulation done in 22.594 ms
[success] Total time: 11 s, completed Nov 6, 2023 5:07:40 PM
Hence I think the only thing required would be to somehow & somewhere being able to specify the path to the make
binary that is being invoked.
from spinalhdl.
Ahh got it. So, this make command is comming from :
Could add a environnement variable in that kind of way :
and replace the s"make ..." by s"$makeEnv ..."
from spinalhdl.
currently we have a lot of incompatibility with non-GNU system. Not only on make, but also verilator, due to "sh" is introduced.
from spinalhdl.
Do you refer non-GNU system == Windows? or MacOS?
from spinalhdl.
@Dolu1990 Yeah exactly, something like that! I assume you could assign it a default value so existing consumers are unaffected by this change/feature.
currently we have a lot of incompatibility with non-GNU system. Not only on make, but also verilator, due to "sh" is introduced.
sh
would be more of a POSIX thing. You can have a non-GNU system that is still POSIX compatible.
So far the GNU make issue mentioned here is the only problem I encountered.
Do you refer non-GNU system == Windows? or MacOS?
In my case it would be FreeBSD.
from spinalhdl.
Related Issues (20)
- signed `AFix` right shift does not sign-extend
- Timescale of the trace file generated by Verilator does not match the value defined in the scala simulation setup
- defualtReadBits spelling mistake HOT 1
- no waveforms displayed when using xsim HOT 5
- SystemVerilog Generation
- switch SInt support
- switch SInt support
- XSIM backend not working on Linux
- Problems with `setCompositeName` in combination with `removePruned` HOT 1
- Run test for InterfaceTesterCocotbBoot failed when only use 2.11 scala compilier. HOT 1
- LATCH DETECTED from the combinatorial signal HOT 3
- XSim in spinalhdl fail to simulate IPs like FFT or complex multiplier, but works fine in Vivado HOT 3
- Assign bits (BigInt) back to Bundle/Union/Enum in SpinalSim HOT 8
- Memory of Depth 1 Produces Unhelpful Error Message HOT 1
- Inconsistent naming for nested `Composite` areas HOT 2
- Add support for AMBA5 CHIοΌ HOT 1
- synchronous StreamFork valid/ready are not decoupled properly HOT 3
- regif's html doc not support setname function
- duplicate module when multi inst
- Outer FSM `whenIsActive` statements always win vs. nested FSM `onEntry` statements for combinational logic HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spinalhdl.