-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Tools for reading and writing VCD files.
--
-- VCD (value change dump) is a format for capturing digital and analog
-- waveforms. GTKWave is a popular viewer of VCD files.
@package vcd
@version 0.1.3
-- | Generating and parsing Value Change Dump (VCD) files.
module Data.VCD
-- | The VCDHandle keeps track of generation state and the output handle.
data VCDHandle
-- | VCD Timescale.
data Timescale
-- | seconds
S :: Timescale
-- | milliseconds
MS :: Timescale
-- | microseconds
US :: Timescale
-- | picoseconds
PS :: Timescale
-- | Types that can be recorded as VCD variables.
class Variable a
var :: (Variable a) => VCDHandle -> String -> a -> IO (a -> IO ())
-- | Helper to create new Variable instances.
variable :: (Eq a) => String -> Int -> (a -> String) -> VCDHandle -> String -> a -> IO (a -> IO ())
-- | Create a new handle for generating a VCD file with a given timescale.
newVCD :: Handle -> Timescale -> IO VCDHandle
-- | Define a hierarchical scope.
scope :: VCDHandle -> String -> IO a -> IO a
-- | Set a time step. step will also transition a VCDHandle from the
-- definition to the recording phase.
step :: VCDHandle -> Int -> IO ()
-- | Save as step, but forces a step recording even if variables
-- have not changed. Useful for realtime simulation.
step' :: VCDHandle -> Int -> IO ()
-- | VCD database.
data VCD
VCD :: Timescale -> [Definition] -> [(Int, [(String, Value)])] -> VCD
-- | Variable definition.
data Definition
-- | Hierarchical scope.
Scope :: String -> [Definition] -> Definition
-- | Variable with type, width, code, name.
Var :: String -> Int -> String -> String -> Definition
-- | Recorded value.
data Value
Bool :: Bool -> Value
Bits :: [Bool] -> Value
Double :: Double -> Value
-- | Parse VCD data.
parseVCD :: String -> VCD
instance Show Token
instance Eq Token
instance Show Definition
instance Show Value
instance Show VCD
instance Variable Double
instance Variable Float
instance Variable Word64
instance Variable Word32
instance Variable Word16
instance Variable Word8
instance Variable Int64
instance Variable Int32
instance Variable Int16
instance Variable Int8
instance Variable Int
instance Variable Bool
instance Show Timescale