Skip to content

Instantly share code, notes, and snippets.

View martijnbastiaan's full-sized avatar

Martijn Bastiaan martijnbastiaan

View GitHub Profile
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wall -Wno-missing-methods #-}
module HasNat where
[..]
data CPUState waitCycles
= Idle
| Waiting (Index waitCycles)
deriving (Generic, NFData, Show)
[..]
[..]
data CPUState waitCycles
= Idle
| Waiting (Index waitCycles)
deriving (Generic, NFData, Show)
[..]
cpu
module Pipeline where
import Clash.Prelude
(<@>)
:: ( HiddenClockResetEnable dom
, Undefined b
, Default b
)
=> (a -> b)
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
module CPU where
import Clash.Prelude
import Data.Maybe (isJust)
import Control.DeepSeq (NFData)
import GHC.Generics (Generic)
src/Clash/Primitives/Intel/Fourteennm.hs:419:43: error:
• Expected kind ‘k1 -> *’, but ‘Reset clk’ has kind ‘*’
• In the second argument of ‘(:::)’, namely ‘Reset clk synchronous’
In the type signature:
fourteennm_mac# :: forall ax
ay_scan_in
az
bx
by
bz
[ { "BlackBox" :
{ "name" : "BlockRamHack.blockRam1#"
, "type" :
"blockRam#
:: HasCallStack -- ARG[0]
=> Clock dom gated -- clk, ARG[1]
-> Vec n a -- init hack ARG[2]
-> a -- init, ARG[3]
-> Signal dom Int -- rd, ARG[4]
-> Signal dom Bool -- wren, ARG[5]
data Person = Person
{ firstName :: !String
-- ^ First name
, lastName :: !String
-- ^ Last name
, age :: !Int
-- ^ Age
} deriving (Eq, Show)
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
module Lib where
Up to date
Loading dependencies took 0.742528095s
Parsing and compiling primitives took 0.067847811s
Compiling: MAC.topEntity
Ignoring .manifest files
MAC.topEntity8214565720323808422 before normalization:
λ(clk :: Clash.Signal.Internal.Clock
(Clash.Signal.Internal.Dom A 5000)
Clash.Signal.Internal.Source) ->