Skip to content

Commit

Permalink
Move EbTb out of Sgmii
Browse files Browse the repository at this point in the history
  • Loading branch information
jvnknvlgl committed Jun 21, 2024
1 parent 513c7b4 commit a4a15d5
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 3,299 deletions.
6 changes: 1 addition & 5 deletions clash-cores/clash-cores.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,15 @@ library
Clash.Cores.LatticeSemi.ECP5.IO
Clash.Cores.LatticeSemi.ICE40.Blackboxes.IO
Clash.Cores.LatticeSemi.ICE40.IO
Clash.Cores.Sgmii
Clash.Cores.Sgmii.AutoNeg
Clash.Cores.Sgmii.BitSlip
Clash.Cores.Sgmii.Common
Clash.Cores.Sgmii.EbTb
Clash.Cores.Sgmii.Gearbox
Clash.Cores.Sgmii.PcsReceive
Clash.Cores.Sgmii.PcsTransmit
Clash.Cores.Sgmii.PcsTransmit.CodeGroup
Clash.Cores.Sgmii.PcsTransmit.OrderedSet
Clash.Cores.Sgmii.Sgmii
Clash.Cores.Sgmii.Sync
Clash.Cores.SPI
Clash.Cores.UART
Expand Down Expand Up @@ -176,8 +175,6 @@ library
Clash.Cores.Xilinx.Xpm.Cdc.SyncRst

other-modules:
Clash.Cores.Sgmii.EbTb.Decoder
Clash.Cores.Sgmii.EbTb.Encoder
Data.Text.Extra

ghc-options:
Expand Down Expand Up @@ -216,7 +213,6 @@ test-suite unittests
Test.Cores.Sgmii.AutoNeg
Test.Cores.Sgmii.BitSlip
Test.Cores.Sgmii.Common
Test.Cores.Sgmii.EbTb
Test.Cores.Sgmii.Gearbox
Test.Cores.Sgmii.PcsReceive
Test.Cores.Sgmii.PcsTransmit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module Clash.Cores.Sgmii.Sgmii where
module Clash.Cores.Sgmii where

import Clash.Cores.EbTb
import Clash.Cores.Sgmii.AutoNeg
import Clash.Cores.Sgmii.BitSlip
import Clash.Cores.Sgmii.Common
Expand Down
28 changes: 1 addition & 27 deletions clash-cores/src/Clash/Cores/Sgmii/Common.hs
Original file line number Diff line number Diff line change
@@ -1,37 +1,11 @@
module Clash.Cores.Sgmii.Common where

import Clash.Cores.EbTb
import Clash.Prelude

-- | Format of rxConfReg and txConfReg, size of two data words
type ConfReg = BitVector 16

-- | Data type that contains a 'BitVector 8' with the corresponding error
-- condition of the decode function
data DataWord
= Dw (BitVector 8)
| Cw (BitVector 8)
| DwError (BitVector 8)
| RdError (BitVector 8)
deriving (Generic, NFDataX, Eq, Show)

-- | Function to check whether a 'DataWord' results in a data word
isDw :: DataWord -> Bool
isDw (Dw _) = True
isDw _ = False

-- | Function to check whether a 'DataWord' results in a data word or
-- control word
isValidDw :: DataWord -> Bool
isValidDw (Cw _) = True
isValidDw dw = isDw dw

-- | Function to convert a 'DataWord' to a plain 'BitVector 8'
fromDw :: DataWord -> BitVector 8
fromDw dw = case dw of
Dw _dw -> _dw
Cw _dw -> _dw
_ -> 0

-- | Defines the possible values for the RUDI output signal of the PCS Receive
-- block as defined in IEEE 802.3 Clause 36
data Rudi = C | I | Invalid
Expand Down
85 changes: 0 additions & 85 deletions clash-cores/src/Clash/Cores/Sgmii/EbTb.hs

This file was deleted.

Loading

0 comments on commit a4a15d5

Please sign in to comment.