blarney-0.1.0.0
Copyright(c) Matthew Naylor 2019
(c) Alexandre Joannou 2019-2021
LicenseMIT
Maintainermattfn@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageGHC2021

Blarney.Core.NetHelpers

Description

This module provides various functions over Nets and Netlists. See Prim for the definition of Net and Netlist. (The definitions were moved there to break an import cycle.)

Synopsis

Documentation

netInputWireIds :: NetInput -> [WireId] Source #

Helper function to extract all NetInput's WireIds

remapNetInputInstId :: (InstId -> InstId) -> NetInput -> NetInput Source #

Helper function remap the InstIds of a NetInput

remapNetInstId :: (InstId -> InstId) -> Net -> Net Source #

Helper function remap the InstIds of a Net

class ToNetlist a where Source #

Methods

toNetlist :: a -> Netlist Source #

Instances

Instances details
ToNetlist (Module ()) #

Convert Module monad to a netlist

Instance details

Defined in Blarney.Core.Flatten

Methods

toNetlist :: Module () -> Netlist Source #

ToNetlist (RTL ()) #

Convert RTL monad to a netlist

Instance details

Defined in Blarney.Core.Flatten

Methods

toNetlist :: RTL () -> Netlist Source #

getNet :: Netlist -> InstId -> Net Source #

Extract the Net from a Netlist at the provided InstId. Raise an error if no Net with this InstId is present.

topologicalSort :: Netlist -> [InstId] Source #

get a topologically sorted '[InstId]' for the given Netlist

partialTopologicalSort :: Netlist -> InstId -> [InstId] Source #

get a partially topologically sorted '[InstId]' for the subset of the given Netlist from the given Net's InstId