Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/migen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fe18397accdc
Choose a base ref
...
head repository: m-labs/migen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 794c4e60418f
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 22, 2013

  1. doc/bus/CSR: add automatic CSR name info

    Sebastien Bourdeauducq committed Jul 22, 2013
    Copy the full SHA
    aef78b2 View commit details
  2. doc/fhdl: document Module API

    Sebastien Bourdeauducq committed Jul 22, 2013
    Copy the full SHA
    794c4e6 View commit details
Showing with 143 additions and 26 deletions.
  1. +2 −0 doc/bus.rst
  2. +141 −26 doc/fhdl.rst
2 changes: 2 additions & 0 deletions doc/bus.rst
Original file line number Diff line number Diff line change
@@ -52,6 +52,8 @@ The lowest-level description of a register is provided by the ``CSR`` class, whi
* ``re``, which is the strobe signal for ``r``. It is active for one cycle, after or during a write from the bus. ``r`` is only valid when ``re`` is high.
* ``w``, which must provide at all times the value to be read from the bus.

Names of CSRs can be omitted if they can be extracted from the variable name. When using this automatic naming feature, prefixes ``_``, ``r_`` and ``_r_`` are removed.

Compound CSRs (which are transformed into ``CSR`` plus additional logic for implementation) provide additional features optimized for common applications.

The ``CSRStatus`` class is meant to be used as a status register that is read-only from the CPU. The user design is expected to drive its ``status`` signal. The advantage of using ``CSRStatus`` instead of using ``CSR`` and driving ``w`` is that the width of ``CSRStatus`` can be arbitrary. Status registers larger than the bus word width are automatically broken down into several ``CSR`` registers to span several addresses. Be careful that the atomicity of reads is not guaranteed.
Loading