Copyright | (c) Alexandre Joannou 2020-2021 (c) Matthew Naylor 2021 |
---|---|
License | MIT |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
This module exports some utilities to work with Blarney
Netlists
. It is
typically omported by code in modules such as Backend
.
Synopsis
- runDefaultNetlistPasses :: Opts -> Netlist -> Netlist
- runNetlistPass :: (forall s. MNetlistPass s a) -> Netlist -> Netlist
- optionalNetlistPasses :: Opts -> MNetlistPass s ()
- wrapWithMandatoryNetlistPasses :: MNetlistPass s a -> MNetlistPass s ()
- module Blarney.Netlist.Passes
- onNetlists :: Modular a => a -> String -> (Map String Netlist -> IO b) -> IO b
Default set of Netlist
transformations
Netlist
transformation passes (MNetlistPass
) helpers
runNetlistPass :: (forall s. MNetlistPass s a) -> Netlist -> Netlist Source #
Run an MNetlistPass
on a Netlist
and return the resulting Netlist
optionalNetlistPasses :: Opts -> MNetlistPass s () Source #
wrapWithMandatoryNetlistPasses :: MNetlistPass s a -> MNetlistPass s () Source #
Wrap a custom pass with the mandatory netlist transformation passes
Exports of individual MNetlistPass
es and other utils
module Blarney.Netlist.Passes
others
:: Modular a | |
=> a | Blarney circuit |
-> String | circuit name |
-> (Map String Netlist -> IO b) | function to run |
-> IO b |
Run an IO
function with the elaborated Netlist
s hierarchy for the
given circuit (effectively one Netlist
per eligible Custom
Net
). The
Netlist
s are passed to the provided function as a 'Map String Netlist',
with the toplevel Netlist'
s key being the provided String
argument, and
the other Netlist
s using the $sel:customName:Const
field of the elaborated
Custom
as a key.