Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform packing/unpacking of arguments and results in HDL #18

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clash-vexriscv-sim/clash-vexriscv-sim.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ test-suite unittests
default-language: Haskell2010
hs-source-dirs: tests
type: exitcode-stdio-1.0
-- TODO: enable parallel tests:
-- ghc-options: -threaded -rtsopts -with-rtsopts=-N
ghc-options: -threaded
main-is: tests.hs
build-depends:
Expand Down
15 changes: 2 additions & 13 deletions clash-vexriscv-sim/src/Utils/Cpu.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ import GHC.Stack (HasCallStack)
import Utils.ProgramLoad (Memory)
import Utils.Interconnect (interconnectTwo)

emptyInput :: Input
emptyInput =
Input
{ timerInterrupt = low,
externalInterrupt = low,
softwareInterrupt = low,
iBusWbS2M = (emptyWishboneS2M @(BitVector 32)) {readData = 0},
dBusWbS2M = (emptyWishboneS2M @(BitVector 32)) {readData = 0}
}


{-
Address space

Expand Down Expand Up @@ -72,8 +61,8 @@ cpu bootIMem bootDMem = (output, writes, iS2M, dS2M)
{ timerInterrupt = low,
externalInterrupt = low,
softwareInterrupt = low,
iBusWbS2M = makeDefined iBus,
dBusWbS2M = makeDefined dBus
iBusWbS2M = iBus,
dBusWbS2M = dBus
}
)
<$> iS2M
Expand Down
12 changes: 12 additions & 0 deletions clash-vexriscv/clash-vexriscv.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,36 @@ library
default-language: Haskell2010
exposed-modules:
VexRiscv
VexRiscv.BlackBox
VexRiscv.ClockTicks
VexRiscv.FFI
VexRiscv.TH
VexRiscv.VecToTuple

-- See https://github.com/clash-lang/clash-compiler/pull/2511
if impl(ghc >= 9.4)
CPP-Options: -DCLASH_OPAQUE=OPAQUE
else
CPP-Options: -DCLASH_OPAQUE=NOINLINE

build-depends:
base,
bytestring >= 0.10 && < 0.13,
clash-lib,
clash-prelude,
clash-protocols,
containers,
directory >= 1.3 && < 1.4,
filepath,
Glob,
infinite-list,
mtl,
pretty-show,
process >= 1.6 && < 1.8,
string-interpolate,
tagged,
template-haskell,
text,
extra-libraries: VexRiscvFFI, stdc++
include-dirs: src/

Expand Down
Loading
Loading