26 lines
577 B
Haskell
26 lines
577 B
Haskell
{-# LANGUAGE DataKinds #-}
|
|
{-# LANGUAGE NumericUnderscores #-}
|
|
|
|
module Types(Pc, BusVal(..), Mem, FullWord, Insn, 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
|
|
type Insn = FullWord
|
|
|
|
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
|