-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add missing SimAction arguments * Fix FFI example termination * Fix `ffi:example` CI It did not check the exit codes, continuing after an error and ultimately reporting success. `ffi:example` does not profit from having the `build` job's artifact available, so we remove that dependency. Now `ffi:example` can run earlier in the CI pipeline. `ffi:interface-tests` is moved to public runners as it runs in a single minute. --------- Co-authored-by: Felix Klein <felix@qbaylogic.com> Co-authored-by: Peter Lebbing <peter@digitalbrains.com>
- Loading branch information
1 parent
29ee170
commit 117e2ba
Showing
5 changed files
with
88 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
packages: . .. ../../clash-ghc ../../clash-lib ../../clash-prelude | ||
|
||
write-ghc-environment-files: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
# This is just a minimalistic script for demonstrating the process of | ||
# running the clash-ffi example using the ModelSim / QuestaSim runtime | ||
# engine. The script is not designed to work in any possible system | ||
# environment and may not work immediately for you. It is intended to | ||
# serve as an easy starter instead. Adapt it to your needs if it's not | ||
# working out-of-the-box for you. | ||
|
||
############################### | ||
|
||
# Adjust these variables if the tools are not in your PATH already | ||
|
||
# Cabal | ||
# https://www.haskell.org/cabal | ||
CABAL=cabal | ||
# Clash | ||
# https://github.com/clash-lang/clash-compiler | ||
CLASH="${CABAL} run clash --" | ||
# ModelSim / QuestaSim binaries | ||
VLIB=vlib | ||
VLOG=vlog | ||
VSIM=vsim | ||
# Clash examples folder | ||
# https://github.com/clash-lang/clash-compiler/tree/master/examples | ||
EXAMPLES=../../examples | ||
|
||
############################### | ||
|
||
${CABAL} build clash-ffi-example || exit $? | ||
${CLASH} --verilog -i${EXAMPLES} ${EXAMPLES}/Calculator.hs || exit $? | ||
${VLIB} work || exit $? | ||
${VLOG} verilog/Calculator.topEntity/topEntity.v || exit $? | ||
echo "" | ||
echo "Running Simulation Runtime Engine:" | ||
echo "" | ||
${VSIM} -no_autoacc -c -do "onfinish exit; run -all" topEntity -pli lib/libclash-ffi-example.vpl |