| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.KansasLava.VCD
Contents
Description
This module contains functions for generating VCD debug traces. It also provides functionality for (de)serializing Traces.
- newtype VCD = VCD [(String, VC)]
- writeVCDFile :: Bool -> Integer -> FilePath -> VCD -> IO ()
- readVCDFile :: FilePath -> Signature -> IO VCD
- addEvent :: forall w. Rep w => String -> Int -> X w -> VCD -> VCD
- toSignature :: VCD -> Signature
- fromSignature :: Signature -> VCD
- cmpVCD :: VCD -> VCD -> Bool
- ioOnly :: VCD -> VCD
- mkVCD :: Int -> Fabric () -> [(String, Pad)] -> IO VCD
- mkVCDCM :: Int -> Fabric () -> [(String, Pad)] -> (KLEG -> IO KLEG) -> IO (VCD, KLEG)
- readTBF :: [String] -> Signature -> VCD
- writeTBF :: String -> VCD -> IO ()
- tbw2rep :: String -> RepValue
- rep2tbw :: RepValue -> String
Documentation
VCD is a primary bit-wise record of an interactive session with some circuit
Map from module/name to stream.
Arguments
| :: Bool | Whether to include the clock signal in the list of signals |
| -> Integer | Timescale in nanoseconds |
| -> FilePath | name of VCD file |
| -> VCD | |
| -> IO () |
Convert a VCD to a VCD file.
Generate a Signature from a VCD trace
toSignature :: VCD -> Signature Source
Generate a signature from a trace. TODO: support generics in both these functions?
fromSignature :: Signature -> VCD Source
Creates an (empty) trace from a signature
Compare two VCDs
cmpVCD :: VCD -> VCD -> Bool Source
Compare two trace objects. First argument is the golden value. See notes for cmpRepValue
Make a VCD trace from a Fabric and input Pads
Arguments
| :: Int | number of cycles to capture |
| -> Fabric () | Fabric we are tracing |
| -> [(String, Pad)] | Inputs to the Fabric |
| -> (KLEG -> IO KLEG) | KLEG Mod |
| -> IO (VCD, KLEG) |
Version of mkVCD that accepts arbitrary circuit mods.
Reading and Writing the Test Bench Format (.tbf)
readTBF :: [String] -> Signature -> VCD Source
Inverse of showTBF, needs a signature for the shape of the desired VCD. Creates a VCD from testbench signal files.
writeTBF :: String -> VCD -> IO () Source
Convert the inputs and outputs of a VCD to the textual format expected by a testbench.