vcd-0.1.3: Tools for reading and writing VCD files.

Data.VCD

Contents

Description

Generating and parsing Value Change Dump (VCD) files.

Synopsis

VCD Generation

data VCDHandle Source

The VCDHandle keeps track of generation state and the output handle.

data Timescale Source

VCD Timescale.

Constructors

S

seconds

MS

milliseconds

US

microseconds

PS

picoseconds

Instances

class Variable a whereSource

Types that can be recorded as VCD variables.

Methods

var :: VCDHandle -> String -> a -> IO (a -> IO ())Source

Define a new variable.

variable :: Eq a => String -> Int -> (a -> String) -> VCDHandle -> String -> a -> IO (a -> IO ())Source

Helper to create new Variable instances.

newVCD :: Handle -> Timescale -> IO VCDHandleSource

Create a new handle for generating a VCD file with a given timescale.

scope :: VCDHandle -> String -> IO a -> IO aSource

Define a hierarchical scope.

step :: VCDHandle -> Int -> IO ()Source

Set a time step. step will also transition a VCDHandle from the definition to the recording phase.

step' :: VCDHandle -> Int -> IO ()Source

Save as step, but forces a step recording even if variables have not changed. Useful for realtime simulation.

VCD Parsing

data VCD Source

VCD database.

Constructors

VCD Timescale [Definition] [(Int, [(String, Value)])] 

Instances

data Definition Source

Variable definition.

Constructors

Scope String [Definition]

Hierarchical scope.

Var String Int String String

Variable with type, width, code, name.

Instances

data Value Source

Recorded value.

Constructors

Bool Bool 
Bits [Bool] 
Double Double 

Instances

parseVCD :: String -> VCDSource

Parse VCD data.