first commit
This commit is contained in:
commit
ef58d5b07e
34 changed files with 2210 additions and 0 deletions
24
hs/Types.hs
Normal file
24
hs/Types.hs
Normal file
|
@ -0,0 +1,24 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE NumericUnderscores #-}
|
||||
|
||||
module Types(Pc, BusVal(..), Mem, FullWord, Addr) where
|
||||
|
||||
import Clash.Prelude
|
||||
|
||||
type Byte = Unsigned 8
|
||||
type HalfWord = Unsigned 16
|
||||
type FullWord = Unsigned 32
|
||||
type DoubleWord = Unsigned 64
|
||||
type QuadWord = Unsigned 128
|
||||
|
||||
data BusVal
|
||||
= BusByte Byte
|
||||
| BusHalfWord HalfWord
|
||||
| BusWord FullWord
|
||||
| BusDoubleWord DoubleWord
|
||||
| BusQuadWord QuadWord
|
||||
deriving (Generic, Show, Eq, NFDataX)
|
||||
|
||||
type Pc = DoubleWord
|
||||
type Addr = DoubleWord
|
||||
type Mem n = Vec n FullWord
|
Reference in a new issue