-
Notifications
You must be signed in to change notification settings - Fork 0
/
marv32.cabal
129 lines (115 loc) · 3.29 KB
/
marv32.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
cabal-version: 2.4
name: marv32
version: 0.1
license: BSD-2-Clause
author: Illia Ostapyshyn <[email protected]>
maintainer: Illia Ostapyshyn <[email protected]>
common common-options
default-extensions:
BangPatterns
BinaryLiterals
ConstraintKinds
DataKinds
DefaultSignatures
DeriveAnyClass
DeriveDataTypeable
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
DerivingStrategies
InstanceSigs
KindSignatures
LambdaCase
NoStarIsType
PolyKinds
RankNTypes
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
TypeFamilies
TypeOperators
ViewPatterns
-- TemplateHaskell is used to support convenience functions such as
-- 'listToVecTH' and 'bLit'.
TemplateHaskell
QuasiQuotes
-- Prelude isn't imported by default as Clash offers Clash.Prelude
NoImplicitPrelude
ghc-options:
-Wall -Wcompat -Wno-name-shadowing -Wno-incomplete-patterns
-Wno-type-defaults -Wno-missing-signatures
-haddock
-- Plugins to support type-level constraint solving on naturals
-fplugin GHC.TypeLits.Extra.Solver
-fplugin GHC.TypeLits.Normalise
-fplugin GHC.TypeLits.KnownNat.Solver
-- Clash needs access to the source code in compiled modules
-fexpose-all-unfoldings
-- Worker wrappers introduce unstable names for functions that might have
-- blackboxes attached for them. You can disable this, but be sure to add
-- a no-specialize pragma to every function with a blackbox.
-fno-worker-wrapper
-- Strict annotations - while sometimes preventing space leaks - trigger
-- optimizations Clash can't deal with. See:
--
-- https://github.com/clash-lang/clash-compiler/issues/2361
--
-- These flags disables these optimizations. Note that the fields will
-- remain strict.
-fno-unbox-small-strict-fields
-fno-unbox-strict-fields
-fwrite-ide-info
-hiedir=.hie
build-depends:
base,
Cabal,
-- clash-prelude will set suitable version bounds for the plugins
clash-prelude >= 1.6.4 && < 1.8,
ghc-typelits-natnormalise,
ghc-typelits-extra,
ghc-typelits-knownnat,
template-haskell,
bytestring,
data-default
library
import: common-options
hs-source-dirs: src
exposed-modules:
Utils.Maybe
Utils.Files
CPU.Machine
CPU.Instruction
CPU.Instruction.Format
CPU.Instruction.Action
CPU.Memory
CPU.Pipeline
CPU.Trace
Periph.IO
Periph.Memory
System
other-modules:
default-language: Haskell2010
executable create_rom
main-is: Utils/CreateRomFile4.hs
hs-source-dirs: src
other-modules:
Utils.Files
Build-Depends: base, filepath, directory, bytestring,
template-haskell, clash-prelude
-- Builds the executable 'clash', with marv32 project in scope
executable clash
main-is: bin/Clash.hs
default-language: Haskell2010
Build-Depends: base, clash-ghc, marv32
if !os(Windows)
ghc-options: -dynamic
-- Builds the executable 'clashi', with marv32 project in scope
executable clashi
main-is: bin/Clashi.hs
default-language: Haskell2010
if !os(Windows)
ghc-options: -dynamic
build-depends: base, clash-ghc, marv32