From: Sebastien Bourdeauducq Date: Sun, 24 Jun 2012 17:56:31 +0000 (+0200) Subject: doc: arithmetic and logic actors X-Git-Tag: 24jan2021_ls180~2099^2~883 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbfa120e2fbb2f3f49403d3325e1b63c7ba45d8c;p=litex.git doc: arithmetic and logic actors --- diff --git a/doc/dataflow.rst b/doc/dataflow.rst index d77971a1..463daf44 100644 --- a/doc/dataflow.rst +++ b/doc/dataflow.rst @@ -184,6 +184,12 @@ The ``Token`` class contains the following items: Arithmetic and logic actors =========================== +The ``migen.actorlib.ala`` module provides arithmetic and logic actors for the usual integer operations. + +If complex operation combinations are needed, the ``ComposableSource`` class can be used. It overloads Python operators to make them instantiate the arithmetic and logic actors and connect them into an existing network. This creates a small internal domain-specific language (DSL). + +The ``ComposableSource`` class is a derivative of the ``ActorNode`` class (see :ref:`actornetworks`) and should be used in the place of the latter when the DSL feature is desired. + .. _busactors: Bus actors diff --git a/migen/actorlib/composer.py b/migen/actorlib/composer.py index 683186d1..d8d86ce0 100644 --- a/migen/actorlib/composer.py +++ b/migen/actorlib/composer.py @@ -1,3 +1,5 @@ +# TODO: merge this into ala + derive ComposableSource from ActorNode + from migen.flow.actor import * from migen.flow.plumbing import * from migen.flow.network import *