This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
PacketStream protocol, converters, UART stuff and async FIFO #51
Closed
Closed
Changes from 151 commits
Commits
Show all changes
152 commits
Select commit
Hold shift + click to select a range
a312860
Added a first nix environment to test working with nix-shell
Baublesaurus 227a8b9
This should use the shell.nix from the repo
Baublesaurus 58bb379
Added caching of the nix environment, otherwise nix has to be re-inst…
Baublesaurus 45f1899
Run tests during CI, uses the make test command
Baublesaurus fe441a8
added a name to a step
Baublesaurus dbab722
removed step to find error
Baublesaurus b1f76db
added build and test
Baublesaurus 1c6d0d8
spelling error
Baublesaurus 7e4e594
added git checkout
Baublesaurus 92043ec
removed cache action
Baublesaurus f6b1dbc
last working version
Baublesaurus 13512f8
adds caching
Baublesaurus 558d34a
added default.nix file to enable nix-build
Baublesaurus 38ca212
add nix build to the pipeline
Baublesaurus 8ea3637
add caching again
Baublesaurus 8552666
remove caching for now, to see if speed is OK
Baublesaurus dc3cdcf
magic nix cache is needed for speedy tests
Baublesaurus 8551684
Added names, and make verilog
Baublesaurus c7b6ff2
Indentation fix
Baublesaurus 0549e4d
More names for clarity of process
Baublesaurus 4eaf630
Add make netlist
Baublesaurus 77d3da9
Added test for illegal whitspace file endings
Baublesaurus b65bb96
Missing keyword
Baublesaurus ead6b9f
added run permissions to the .sh file
Baublesaurus 2d21be4
update checkout versions
Baublesaurus 4e8b72d
Adds make pnr, fixes file endings
Baublesaurus 4a6afef
add run permissions for the bash files
Baublesaurus 1ac53f5
fixed the end of file :(
Baublesaurus 42652cc
Merge pull request #10 from GiPHouse/2-setup-ci
rowanG077 8c9e340
Add hoogle and int commands to Makefile
JasmijnB be6a4b0
create initial stream protocol
JasmijnB 914d157
proper cabal configuration
JasmijnB 6b701b5
renamed the Stream types to PacketStream
JasmijnB 3717fcd
started on Simulate instance
JasmijnB 2f4f730
finalised Packetstream
JasmijnB 0efc206
fix hashable error
JasmijnB 55071d2
Change _byte_enable to _last of type Index
JasmijnB 5af9bfb
added documentation / style changes
cb82296
added stylish haskell check
Baublesaurus 047a947
syntax error
Baublesaurus d412407
ran make format
Baublesaurus 4f5ca97
Reorder tests for quicker testing
Baublesaurus 7f8b4af
Merge branch 'develop' into 2-setup-ci
Baublesaurus cd28ad1
Merge pull request #16 from GiPHouse/2-setup-ci
rowanG077 3a094e9
Add test with example
rowanG077 c4d4b25
Add test together with team
rowanG077 7680e47
Merge branch 'develop' into 5-define-a-streaming-protocol
JasmijnB 4c4182c
Added product backlog with color coding and full work breakdown struc…
rowanG077 ae35fad
Fixup XSGMII color
rowanG077 eae86eb
Merge pull request #12 from GiPHouse/5-define-a-streaming-protocol
rowanG077 20a622e
diagrams: Update product backlog with current issues in sprint
rowanG077 5f6950a
diagrams: update uart-eth to reflect our PacketStream protocol
rowanG077 3cba298
diagram: Update layer1+2 diagram with PacketStream protocol
rowanG077 fc1380c
diagrams: regenerate
rowanG077 44e030c
diagrams: Make github project issue names and task names in product-b…
rowanG077 43bd495
patch doctest
MatthijsMu 7510256
Remove doctest.patch
MatthijsMu 02d0284
initial version
t-wallet 351becc
component now handles backpressure and changed definition to return a…
t-wallet 49859cf
stylish haskell
t-wallet 33ec7ae
added noBaudGen version of the component
t-wallet 9e6c5b0
delete doctest for Eq instance
MatthijsMu d3143c9
Merge pull request #40 from GiPHouse/fix-doctest
MatthijsMu ae8c99a
Disable expensive CI for now
rowanG077 8a18559
defined uartTxC in terms of uartTxNoBaudGenC + style changes
t-wallet dcb49bb
initial version
t-wallet 552ffb3
Merge pull request #41 from GiPHouse/3-wrap-existing-clashcores-uart-…
rowanG077 d19ab70
Implement rudimentary up converter
Akribes 408521e
Change type signature of up converter to indicate last byte
Akribes a83cdd2
Add simple test for up converter
Akribes 570fd4f
refactor states of upconverter to flushing and filling
MatthijsMu 8a59052
working function, also correct?
MatthijsMu f669292
Rewrite upconverter to use packet stream protocol
Akribes cd25aa4
Write down converter for dataWidth 4
Akribes c219eb5
Down converter for any data width
Akribes 6110e3c
Revert "Down converter for any data width"
Akribes 84b2bfd
Revert "Write down converter for dataWidth 4"
Akribes 51aa747
Move up converter into its own file
Akribes 2185554
Change UpConverterState to use _uc prefix
JLaumen abb4609
Change type signature of upConverter to work better with fromSignals
JLaumen ccbbe87
Create clash-protocols Circuit for up converter
Akribes 213b371
Co-authored-by: Jasper Laumen <[email protected]>
MatthijsMu c5b4584
complete instance, add doctest
MatthijsMu 9235029
reformat with make format
MatthijsMu 7b0c19d
Co-authored-by: Jasper Laumen <[email protected]>
MatthijsMu e0f0411
not ready, for collaboration
MatthijsMu 114379c
Add UpConverter test to unittests.hs
JLaumen 1582a6d
Model type-checks, test has errors
JLaumen ea07c87
Added comments and type-signatures, test does not pass yet
JLaumen b2623f8
extra step for clarification of outData
MatthijsMu ea76402
fix rebase fallout
MatthijsMu 878a6ae
Merge pull request #37 from GiPHouse/product-backlog
Baublesaurus 72b94e5
Wrap Clash Cores UART receive
Akribes ee680c0
Clarify comments and code
Akribes 488429f
Create circuits for uart rx to match PR #3
Akribes 3c40295
make format oopsie
Akribes 1c27d14
Convert to CSignals instead of ignoring back pressure
Akribes c20cef0
Style changes
Akribes 6f66ed9
write function for model in Cores/.../UpConverter. Works fine.
MatthijsMu 36c8ded
delete some comments
MatthijsMu 86d844e
put useful test helper functions in Util.hs
MatthijsMu 148ef91
add Util to cabal
MatthijsMu dc5ed87
working tests, generic in dataWidth, fix warning
MatthijsMu 5e8356c
format code with make format
MatthijsMu a4f1795
fix upon review comments from Rowan. remove more warnings, redundant …
MatthijsMu 5402ce5
Id test uart tx and rx
Akribes a1c2bd8
Create test for toPacketsC
Akribes 8a1b37e
Fix test
Akribes 8f5bd1d
Fix test, so it no longer wants _last set for unfinished packets
Akribes a42ac45
Move unsafeToPacketStream
Akribes f8254e7
No longer test that _abort and _last don't come through uart id test
Akribes 3563ba9
remove comment
Akribes 0666873
Merge pull request #13 from GiPHouse/4-create-clash-protocols-updown-…
rowanG077 eddc292
Merge branch 'develop' into 22-wrap-uart-in-packetstream-protocol
rowanG077 51ae421
Merge pull request #42 from GiPHouse/22-wrap-uart-in-packetstream-pro…
rowanG077 21b8e1c
Write down converter for dataWidth 4
Akribes f3dc666
Modify down converter to output data correctly
Akribes 9830183
Change DownConverterState to use camelCase and _dc prefix
JLaumen 41caa0d
Small formatting changes
JLaumen 0155678
Change logic of toMaybePacketStreamM2S
JLaumen c49612c
Restore flipped condition
Akribes a21553c
Formatting
Akribes 3513a92
Create clash-protocols Circuit
Akribes c92f5e4
Set up unimplemented test for DownConverter
JLaumen 2a6e222
Fix rebase missing some changes
JLaumen afff1ff
Properly set up test this time
JLaumen 6e074de
Implementation(?) of test, does not type-check. Cannot figure it out …
JLaumen 660272a
Type checks now
JLaumen 4ab8064
Add chopPacket, remove singletonToPackets, takeFirst, copyAndShift
MatthijsMu 35dc5dd
reimplement model, add Test. ... .DownConverter module to cabal
MatthijsMu c545fad
add small sample tests to DownConverter for interactive debugging
MatthijsMu 63fb8dd
add type of top-level entities
MatthijsMu 4e6b424
construct downConverterC with forceResetEnable => tests succeed
MatthijsMu aa36d3c
begin of a Util file, as requested in comment of toMaybe
MatthijsMu 129273b
remove toMaybe (not in Util), redundant exports, unit tests, model fu…
MatthijsMu 5fe1514
bye redundant imports, bye warnings, hello make format!
MatthijsMu d8230ea
Small formatting fix
JLaumen b68789b
Merge pull request #15 from GiPHouse/14-create-stream-down-converter
JLaumen 409badb
initial version
t-wallet 5047c74
added interpacket gap inserter tests and fixed state transition function
t-wallet f68278b
merged changes from develop
t-wallet a9c7b6d
fixed tests and style changes
t-wallet 827656c
removed gapSize, hardcoded 12
t-wallet 54fab18
use Index 12 instead of Unsigned 4 + style changes
t-wallet 16c3566
configurable gapSize instead of hardcoded 12 cycles
t-wallet 59ba1bf
Merge pull request #48 from GiPHouse/28-implement-interpacket-gap-ins…
t-wallet 57dec2b
initial version of async FIFO + tests. Tests currently fail due to a …
t-wallet 9b4a28e
Added a check that the AsyncFifo is non empty before it is ready to read
Daanww e86ad49
AsyncFifo gefixed met Rowan's hulp. Passed nu de tests
Daanww 081e837
Removed unnecessary comments
Daanww 721205d
final style and comment changes
t-wallet ae8af02
Handle Lucas's review comments
Akribes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -xou pipefail | ||
|
||
grep \ | ||
-E ' $' -n -r . \ | ||
--include=*.{hs,hs-boot,sh,cabal,md,yml} \ | ||
--exclude-dir=dist-newstyle --exclude-dir=deps | ||
if [[ $? == 0 ]]; then | ||
echo "EOL whitespace detected. See ^" | ||
exit 1; | ||
fi |
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,40 @@ | ||
name: "CI pipeline" | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
file_endings: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v4 | ||
- name: Whitespace file endings | ||
run: | | ||
.ci/test_whitespace.sh | ||
|
||
|
||
# build_and_synthesize: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: git checkout | ||
# uses: actions/checkout@v4 | ||
# - name: install nix | ||
# uses: cachix/install-nix-action@v22 | ||
# with: | ||
# nix_path: nixpkgs=channel:nixos-unstable | ||
# - name: cache nix | ||
# uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
# - name: build the nix environment | ||
# run: nix-build | ||
# - name: check stylish-haskell | ||
# run: nix-shell --run "make check_format" | ||
# - name: clean linting process | ||
# run: nix-shell --run "make clean_tests" | ||
# - name: Test suite | ||
# run: nix-shell --run "make test" | ||
# - name: Test synthesis | ||
# run: nix-shell --run "make verilog" | ||
# - name: Create netlist | ||
# run: nix-shell --run "make netlist" | ||
# - name: Create Place and Route | ||
# run: nix-shell --run "make pnr" |
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,5 @@ | ||
import Prelude | ||
import Distribution.Extra.Doctest (defaultMainWithDoctests) | ||
|
||
main :: IO () | ||
main = defaultMainWithDoctests "doctests" |
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 |
---|---|---|
|
@@ -33,6 +33,7 @@ common common-options | |
TypeFamilies | ||
TypeOperators | ||
ViewPatterns | ||
ImportQualifiedPost | ||
|
||
-- TemplateHaskell is used to support convenience functions such as | ||
-- 'listToVecTH' and 'bLit'. | ||
|
@@ -78,18 +79,35 @@ common common-options | |
ghc-typelits-extra, | ||
ghc-typelits-knownnat | ||
|
||
custom-setup | ||
setup-depends: | ||
base >= 4.11 && <5, | ||
Cabal >= 2.4, | ||
cabal-doctest >= 1.0.1 && <1.1 | ||
|
||
library | ||
import: common-options | ||
hs-source-dirs: src | ||
exposed-modules: | ||
Clash.Lattice.ECP5.Colorlight.TopEntity | ||
Clash.Cores.Ethernet.RGMII | ||
Clash.Cores.Ethernet.PacketStream | ||
Clash.Cores.Ethernet.UpConverter | ||
Clash.Cores.Ethernet.DownConverter | ||
Clash.Cores.Ethernet.Util | ||
Clash.Cores.Ethernet.InterpacketGapInserter | ||
Clash.Cores.Ethernet.AsyncFIFO | ||
Clash.Lattice.ECP5.Prims | ||
Clash.Lattice.ECP5.UART | ||
Clash.Lattice.ECP5.Colorlight.CRG | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sort |
||
default-language: Haskell2010 | ||
build-depends: | ||
interpolate, | ||
clash-cores | ||
clash-cores, | ||
deepseq, | ||
hashable, | ||
-- For debugging | ||
pretty-show | ||
|
||
test-suite doctests | ||
type: exitcode-stdio-1.0 | ||
|
@@ -100,7 +118,8 @@ test-suite doctests | |
build-depends: | ||
base, | ||
clash-eth, | ||
doctest-parallel >= 0.2 && < 0.4, | ||
doctest >= 0.17 && <= 0.19, | ||
process, | ||
|
||
test-suite test-library | ||
import: common-options | ||
|
@@ -110,11 +129,20 @@ test-suite test-library | |
ghc-options: -threaded | ||
main-is: unittests.hs | ||
other-modules: | ||
Test.Cores.Ethernet.Ethernet | ||
Test.Cores.Ethernet.Util | ||
Test.Cores.Ethernet.PacketStream | ||
Test.Lattice.ECP5.UART | ||
Test.Cores.Ethernet.DownConverter | ||
Test.Cores.Ethernet.UpConverter | ||
Test.Cores.Ethernet.InterpacketGapInserter | ||
Test.Cores.Ethernet.AsyncFIFO | ||
build-depends: | ||
clash-eth, | ||
QuickCheck, | ||
hedgehog, | ||
clash-cores, | ||
hashable, | ||
unordered-containers, | ||
tasty >= 1.2 && < 1.5, | ||
tasty-hedgehog, | ||
tasty-th | ||
|
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,9 @@ | ||
with import ./nix/nixpkgs.nix {}; | ||
|
||
stdenv.mkDerivation{ | ||
name = "qbaylogic-clash-based-macipudp-stack-spring24" ; | ||
src = ./. ; | ||
installPhase= '' | ||
touch $out | ||
''; | ||
} |
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,5 +1,7 @@ | ||
#!/usr/bin/env sh | ||
set -euxo pipefail | ||
|
||
plantuml -tsvg layer1+2-arch.puml | ||
plantuml -tsvg uart-eth.puml | ||
for i in *.puml | ||
do | ||
plantuml -tsvg "$i" | ||
done |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort