This model is already translatable to VHDL.
q = s
s' = d
+type ShifterState = (Bit, Bit, Bit, Bit)
+shifter :: Bit -> ShifterState -> (ShifterState, Bit)
+shifter a s =
+ (s', o)
+ where
+ s' = (a, b, c, d)
+ (b, c, d, o) = s
+
-- Combinatoric stateless no-carry adder
-- A -> B -> S
no_carry_adder :: (Bit, Bit) -> Bit
-- Load the module
core <- loadModule "Adders.hs"
-- Translate to VHDL
- vhdl <- moduleToVHDL core ["dff"]
+ vhdl <- moduleToVHDL core ["shifter"]
-- Write VHDL to file
writeVHDL vhdl "../vhdl/vhdl/output.vhdl"