clean up warnings a bit

This commit is contained in:
Yehowshua Immanuel 2025-03-04 23:54:30 -05:00
parent 30650b870c
commit 67b44dedc0
8 changed files with 12 additions and 32 deletions

View file

@ -18,10 +18,8 @@ import BusTypes(
ReadRequest(..),
BusVal(..),
)
import Types(Addr,
Byte, HalfWord, FullWord, DoubleWord, QuadWord)
import Peripherals.Ram(read, write, bytesInRam)
import Distribution.Types.UnitId (DefUnitId(unDefUnitId))
import Types(Addr)
import Peripherals.Ram(write, bytesInRam)
data Peripherals = Peripherals
{
@ -40,7 +38,7 @@ busValToTransactionSize (BusDoubleWord _) = SizeDoubleWord
busValToTransactionSize (BusQuadWord _) = SizeQuadWord
alignCheck :: Addr -> TransactionSize -> Bool
alignCheck addr SizeByte = True
alignCheck _ SizeByte = True
alignCheck addr SizeHalfWord = addr `mod` 2 == 0
alignCheck addr SizeFullWord = addr `mod` 4 == 0
alignCheck addr SizeDoubleWord = addr `mod` 8 == 0