blarney-0.1.0.0
Copyright(c) Alexandre Joannou 2020-2021
(c) Matthew Naylor 2021
LicenseMIT
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageGHC2021

Blarney.Netlist

Description

This module exports some utilities to work with Blarney Netlists. It is typically omported by code in modules such as Backend.

Synopsis

Default set of Netlist transformations

runDefaultNetlistPasses :: Opts -> Netlist -> Netlist Source #

Run the default set of netlist passes

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

wrapWithMandatoryNetlistPasses :: MNetlistPass s a -> MNetlistPass s () Source #

Wrap a custom pass with the mandatory netlist transformation passes

Exports of individual MNetlistPasses and other utils

others

onNetlists Source #

Arguments

:: 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 Netlists hierarchy for the given circuit (effectively one Netlist per eligible Custom Net). The Netlists 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 Netlists using the $sel:customName:Const field of the elaborated Custom as a key.