dep-software-0.1.0.0
Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Dep.Bricks.Gate

Description

This module has functions to create gates with an arbitrary number of inputs.

Synopsis

Create generic gates

gateH Source #

Arguments

:: Char

The Char that will be printed (repeatedly) on the gate to specify the type of gate.

-> Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

Create a gate in the horizontal direction with the given Char that specifies what type of gate it is, and the number of input wires.

gateV Source #

Arguments

:: Char

The Char that will be printed (repeatedly) on the gate to specify the type of gate.

-> Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

Create a gate in the vertical direction with the given Char that specifies what type of gate it is, and the number of input wires.

gate Source #

Arguments

:: Char

The Char that will be printed (repeatedly) on the gate to specify the type of gate.

-> CircuitLayout

The given CircuitLayout that specifies in what direction the gate is written.

-> Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

Create a gate in the given CircuitLayout with the given Char that specifies what type of gate it is, and the number of input wires.

genericGate Source #

Arguments

:: Char

The Char that specifies what type of gate it is. This Character will be printed (repeatedly) on the gate.

-> CircuitLayout

The CircuitLayout that specifies in what direction the gate is written.

-> [Bool]

Specifies what wires have negators at the input side.

-> Bool

Specifies if the output side has a negator.

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A function to create a gate with negators and the input and output.

A collection of and gates

andGate Source #

Arguments

:: CircuitLayout

The given CircuitLayout that specifies in what direction the gate is written.

-> Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create and gates in a more effective way.

andGateH Source #

Arguments

:: Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create horizontal and gates in a more effective way.

andGateH2 Source #

Arguments

:: Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create a horizontal and gate with two input wires.

andGateH3 Source #

Arguments

:: Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create a horizontal and gate with three input wires.

andGateV Source #

Arguments

:: Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create vertical and gates in a more effective way.

andGateV2 Source #

Arguments

:: Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create a vertical and gate with two input wires.

andGateV3 Source #

Arguments

:: Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create a vertical and gate with three input wires.

A collection of or gates

orGate Source #

Arguments

:: CircuitLayout

The given CircuitLayout that specifies in what direction the gate is written.

-> Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create or gates in a more effective way.

orGateH Source #

Arguments

:: Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create horizontal or gates in a more effective way.

orGateH2 Source #

Arguments

:: Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create a horizontal or gate with two input wires.

orGateH3 Source #

Arguments

:: Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create a horizontal or gate with three input wires.

orGateV Source #

Arguments

:: Int

The number of input wires (fan-in).

-> Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create vertical or gates in a more effective way.

orGateV2 Source #

Arguments

:: Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create a vertical or gate with two input wires.

orGateV3 Source #

Arguments

:: Attr

The Attr that specifies the style of the gate.

-> Image

The corresponding Image.

A helper function to create a vertical or gate with three input wires.