------------------------------------------------------------------------------- --- $Id: ComputeNetlist.hs#5 2010/09/21 16:53:24 REDMOND\\satnams $ ------------------------------------------------------------------------------- module Lava.ComputeNetlist (-- * Generating a Lava netlist computeNetlist ) where import Control.Monad.State import Lava.ApplyLayout import Lava.Netlist ------------------------------------------------------------------------------- computeNetlist :: Out () -> Netlist computeNetlist circuit = if nesting /= 0 then error ("Final layout nesting is not zero (" ++ show nesting ++ ")") else applyLayout netlist where netlist = execState circuit (Netlist [] [] 0 0 [] 0 undefined) nesting = layoutNesting netlist -------------------------------------------------------------------------------