Skip to content

Commit

Permalink
Move clash-protocols to its own folder
Browse files Browse the repository at this point in the history
  • Loading branch information
t-wallet committed Aug 16, 2024
1 parent 2baec88 commit cc7f4f0
Show file tree
Hide file tree
Showing 38 changed files with 35 additions and 14 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 2020, Martijn Bastiaan
2020, QBayLogic B.V.
Copyright (c) 2024, Martijn Bastiaan
2024, QBayLogic B.V.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
3 changes: 2 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
packages:
./clash-protocols-base, .
./clash-protocols-base
./clash-protocols

tests: True

Expand Down
23 changes: 23 additions & 0 deletions clash-protocols/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright (c) 2024, Martijn Bastiaan
2024, QBayLogic B.V.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ common common-options

default-language: Haskell2010
build-depends:
-- GHC >= 9.0
base >= 4.15.0.0,
Cabal,

Expand Down Expand Up @@ -135,6 +134,7 @@ library
, tasty-hedgehog >= 1.2

exposed-modules:
Protocols
Protocols.Avalon.MemMap
Protocols.Avalon.Stream
Protocols.Axi4.Common
Expand All @@ -152,7 +152,6 @@ library
Protocols.Wishbone
Protocols.Wishbone.Standard
Protocols.Wishbone.Standard.Hedgehog
Protocols

-- 'testProperty' is broken upstream, it reports wrong test names
-- TODO: test / upstream ^
Expand All @@ -179,13 +178,12 @@ test-suite unittests
Tests.Protocols.Axi4
Tests.Protocols.Plugin
Tests.Protocols.Wishbone

Util

build-depends:
clash-protocols-base,
clash-protocols,
clash-prelude-hedgehog,
data-default,
unordered-containers,
deepseq,
extra,
Expand All @@ -210,4 +208,3 @@ test-suite doctests
clash-protocols,
process,
doctest

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
with nixpkgs.pkgs;
with gitignore;

haskellPackages.callCabal2nix "clash-protocols" (gitignoreSource ./.) {}
haskellPackages.callCabal2nix "clash-protocols" (gitignoreSource ./clash-protocols) {}
2 changes: 1 addition & 1 deletion format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cd $DIR
if [ $1 == "diff" ] ; then
src_files=$(git diff --cached --name-only --diff-filter=ACMR -- '*.hs')
else
src_files=$(find clash-protocols-base/Setup.hs Setup.hs clash-protocols-base/src src tests -type f -name "*.hs")
src_files=$(find clash-protocols-base/Setup.hs clash-protocols/Setup.hs clash-protocols-base/src clash-protocols/src clash-protocols/tests -type f -name "*.hs")
fi

src_files_str=$(printf "%s\n" "${src_files[@]}" | sed 's| |\\ |g')
Expand Down
6 changes: 3 additions & 3 deletions hie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ cradle:
multi:
- path: "./clash-protocols-base/src"
config: {cradle: {cabal: {component: "lib:clash-protocols-base"}}}
- path: "./src"
- path: "./clash-protocols/src"
config: {cradle: {cabal: {component: "lib:clash-protocols"}}}
- path: "./tests"
- path: "./clash-protocols/tests"
config: {cradle: {cabal: {component: "test-suite:unittests"}}}
- path: "./bin/Clash.hs"
config: {cradle: {cabal: {component: "clash"}}}
- path: "./bin/Clashi.hs"
config: {cradle: {cabal: {component: "clashi"}}}
- path: "./clash-protocols-base/Setup.hs"
config: {cradle: {none: }}
- path: "./Setup.hs"
- path: "./clash-protocols/Setup.hs"
config: {cradle: {none: }}
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resolver: lts-21.25 # ghc-9.4.8

packages:
- clash-protocols-base
- .
- clash-protocols

extra-deps:
- git: https://github.com/cchalmers/circuit-notation.git
Expand Down

0 comments on commit cc7f4f0

Please sign in to comment.