From bbfa120e2fbb2f3f49403d3325e1b63c7ba45d8c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 24 Jun 2012 19:56:31 +0200 Subject: [PATCH] doc: arithmetic and logic actors --- doc/dataflow.rst | 6 ++++++ migen/actorlib/composer.py | 2 ++ 2 files changed, 8 insertions(+) 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 * -- 2.30.2