Last active
February 22, 2018 19:55
-
-
Save cemerick/ee3016e55db93a44bfe98f323e701488 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Core.Shift where | |
import CLaSH.Prelude | |
import CLaSH.Signal | |
import CLaSH.Sized.BitVector | |
import Data.Word | |
import Data.Bits | |
type Word256 = BitVector 256 | |
shiftT :: Word256 -> Word256 -> (Word256, Word256) | |
shiftT _ inp = (0, shiftL inp 32) | |
{-# ANN topEntity | |
(defTop | |
{ t_name = "core_shift" | |
, t_inputs = ["input"] | |
, t_outputs = ["shifted"] | |
, t_extraIn = [ ("CLOCK_100", 1) | |
] | |
, t_clocks = [ clockWizard "clkwiz100" "CLOCK_100(0)" "" ] | |
}) #-} | |
topEntity :: Signal Word256 -> Signal Word256 | |
topEntity = mealy shiftT 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment