From: Florent Kermarrec Date: Tue, 26 Feb 2013 22:41:22 +0000 (+0100) Subject: doc: update X-Git-Tag: 24jan2021_ls180~2575^2~115 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5accd48a1786c2233a49e6ce3fdbc22dcd3d4a4b;p=litex.git doc: update --- diff --git a/README b/README index 222df2b8..58156cdc 100644 --- a/README +++ b/README @@ -33,8 +33,7 @@ all the cores! miscope produces.vcd output files to be analyzed in your favorite waveform viewer. [> Status: -Complete flow tested on board with a classic Term. RangeDetector, EdgeDetector -still not tested. +Refactoring in progress... [> Examples: test_MigIo : Led & Switch Test controlled by Python Host. diff --git a/doc/Illustrations/miIo.png b/doc/Illustrations/miIo.png new file mode 100644 index 00000000..3e267ebe Binary files /dev/null and b/doc/Illustrations/miIo.png differ diff --git a/doc/Illustrations/miLa.png b/doc/Illustrations/miLa.png new file mode 100644 index 00000000..54ac8459 Binary files /dev/null and b/doc/Illustrations/miLa.png differ diff --git a/doc/Illustrations/miLa_structure.png b/doc/Illustrations/miLa_structure.png new file mode 100644 index 00000000..e7e6b1a3 Binary files /dev/null and b/doc/Illustrations/miLa_structure.png differ diff --git a/doc/Illustrations/migIo.png b/doc/Illustrations/migIo.png deleted file mode 100644 index 270e331e..00000000 Binary files a/doc/Illustrations/migIo.png and /dev/null differ diff --git a/doc/Illustrations/migLa.png b/doc/Illustrations/migLa.png deleted file mode 100644 index 5eb5d41f..00000000 Binary files a/doc/Illustrations/migLa.png and /dev/null differ diff --git a/doc/Illustrations/migLa_structure.png b/doc/Illustrations/migLa_structure.png deleted file mode 100644 index c61becdb..00000000 Binary files a/doc/Illustrations/migLa_structure.png and /dev/null differ diff --git a/doc/Illustrations/migscope_logo.png b/doc/Illustrations/migscope_logo.png deleted file mode 100644 index da1c24ef..00000000 Binary files a/doc/Illustrations/migscope_logo.png and /dev/null differ diff --git a/doc/Illustrations/migscope_structure.png b/doc/Illustrations/migscope_structure.png deleted file mode 100644 index 9e07fd7d..00000000 Binary files a/doc/Illustrations/migscope_structure.png and /dev/null differ diff --git a/doc/Illustrations/migscope_structure.svg b/doc/Illustrations/migscope_structure.svg deleted file mode 100644 index cdb64ad2..00000000 --- a/doc/Illustrations/migscope_structure.svg +++ /dev/null @@ -1,2321 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - MigIo - MigLa - - MigIo - [...] - - - - - - - - - Design - - - - - - CSR Bus - - Wishbone2CSR Bridge - - Spi2CSR Bridge - - Ethernet2CSR Bridge - or - or - or - [...] - - MigIo - - - - - CSR Bus - N Synchronous Inputs - and/or - N Synchronous Outputs - - MigScope - - - MigLa - - - - - CSR Bus - N Data Bits - N Trig Bits - - MigLa - - - - - CSR Bus - N Data Bits - N Trig Bits - - Trigger - - Recorder - - - - - - - hit - N Trig Bits - - Trigger - - - TrigElt 0 - - TrigElt 1 - [...] - - TrigElt N - - - - - - - Sum - - - hit - hit - hit - - hit - - - CSR Bus - - Recorder - - Storage - - - CSR Bus - - N Data Bits - - Sequencer - - hit - - - - - - - put - - - diff --git a/doc/Illustrations/miscope_logo.png b/doc/Illustrations/miscope_logo.png new file mode 100644 index 00000000..c0dbd641 Binary files /dev/null and b/doc/Illustrations/miscope_logo.png differ diff --git a/doc/Illustrations/miscope_structure.png b/doc/Illustrations/miscope_structure.png new file mode 100644 index 00000000..beaf8b6a Binary files /dev/null and b/doc/Illustrations/miscope_structure.png differ diff --git a/doc/Illustrations/miscope_structure.svg b/doc/Illustrations/miscope_structure.svg new file mode 100644 index 00000000..754f5ba6 --- /dev/null +++ b/doc/Illustrations/miscope_structure.svg @@ -0,0 +1,2326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + MiIo + MiLa + + MiIo + [...] + + + + + + + + + Design + + + + + + CSR Bus + + Wishbone2CSR Bridge + + Spi2CSR Bridge + + Ethernet2CSR Bridge + or + or + or + [...] + + MiIo + + + + + CSR Bus + N Synchronous Inputs + and/or + N Synchronous Outputs + + MiScope + + + MiLa + + + + + CSR Bus + M Data Bits + N Trig Bits + + MiLa + + + + + CSR Bus + M Data Bits + N Trig Bits + + Trigger + + Recorder + + + + + + + hit + N Trig Bits + + Trigger + + + TrigElt 0 + + TrigElt 1 + [...] + + TrigElt N + + + + + + + Sum + + + hit + hit + hit + + hit + + + CSR Bus + + Recorder + + Storage + + + CSR Bus + + M Data Bits + + Sequencer + + hit + + + + + + + put + + + + diff --git a/doc/Makefile b/doc/Makefile index ff19dac2..fb4218cb 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,7 +1,7 @@ PYTHON=c:\Python32\python all: - pandoc -o build/migScope.pdf migScope.rst + pandoc -o build/miscope.pdf miscope.rst clean: rm -rf build/* diff --git a/doc/miscope.rst b/doc/miscope.rst index 50f46094..a45343ff 100644 --- a/doc/miscope.rst +++ b/doc/miscope.rst @@ -1,13 +1,13 @@ -.. image:: Illustrations/migscope_logo.png +.. image:: Illustrations/miscope_logo.png Introduction ############ -MigScope is a small logic analyzer to be embedded in an FPGA. +Miscope is a small logic analyzer to be embedded in an FPGA. While free vendor toolchains are generally used by beginners or for prototyping (situations where having a logic analyser in the design is generally very helpful) free toolchains are always provided without the proprietary logic analyzer solution. . . :( -Based on Migen, MigScope aims to provide a free and portable / flexible alternative to vendor's solutions. +Based on Migen, Miscope aims to provide a free and portable / flexible alternative to vendor's solutions. About Migen *********** @@ -17,59 +17,59 @@ Migen is a Python-based tool that aims at automating further the VLSI design pro Migen makes it possible to apply modern software concepts such as object-oriented programming and metaprogramming to design hardware. This results in more elegant and easily maintained designs and reduces the incidence of human errors. -Installing MigScope +Installing Miscope ******************* Either run the setup.py installation script or simply set PYTHONPATH to the root of the source directory. Feedback ******** -Feedback concerning MigScope or this manual should be sent to florent@enjoy-digital.fr +Feedback concerning Miscope or this manual should be sent to florent@enjoy-digital.fr -The MigScope Structure +The Miscope Structure ###################### -Migscope provides two kinds of cores: +Miscope provides two kinds of cores: - - MigIo : the virtual Input / Output core - - MigLa : the virtual Logic Analyser core + - MiIo : the virtual Input / Output core + - MiLa : the virtual Logic Analyser core -A CSR bus controls the MigIo and MigLa cores. The CSR bus is a very simple bus originally used to control peripheral registers in milkymist Soc.[*]_ +A CSR bus controls the MiIo and MiLa cores. The CSR bus is a very simple bus originally used to control peripheral registers in milkymist Soc.[*]_ .. [*] More information on Milkymist on : http://github.com/milkymist/milkymist-ng Because of its simplicity, it can be adapted very easily to a wide range of interfaces: Wishbone, Uart, Spi, I2C, Ethernet... -MigScope uses CSR library from Migen to inter-connect the cores. MigScope provides a Spi2Csr Bridge and is tested with an external Spi Interface. Support for others externals interfaces will be added in future versions. +Miscope uses CSR library from Migen to inter-connect the cores. Miscope provides a Spi2Csr Bridge and is tested with an external Spi Interface. Support for others externals interfaces will be added in future versions. -Because Migen is a Python-based tool, using Python to control MigScope gives lot's of advantages : Python classes can provide the HDL description **AND** driver functions! +Because Migen is a Python-based tool, using Python to control Miscope gives lot's of advantages : Python classes can provide the HDL description **AND** driver functions! -.. image:: Illustrations/migscope_structure.png +.. image:: Illustrations/Miscope_structure.png -MigIo +MiIo ##### Description ----------- -The MigIo is simply an internal GPIO equivalent. It provides N (configurable) inputs and/or outputs and can be used for lots of purposes: +The MiIo is simply an internal GPIO equivalent. It provides N (configurable) inputs and/or outputs and can be used for lots of purposes: - stimulation of a core's parameters in a design where external control interface is not yet developped or still under developpement. - update of a Look-Up-Table or a Ram. - read an internal / external bus. - ... -.. image:: Illustrations/migIo.png +.. image:: Illustrations/MiIo.png Instanciation ------------- :: - MIGIO_ADDR = 0x0000 - migIo0 = migIo.MigIo(MIGIO_ADDR, 8, "IO") + MIIO_ADDR = 0x0000 + MiIo0 = MiIo.MiIo(MiIo_ADDR, 8, "IO") -MigIo parameters are: +MiIo parameters are: - CSR address : core base Address - Bus width : size of input / output buses. **(a power of two)** @@ -80,13 +80,13 @@ Driver To use drivers functions, an interface is defined:: csr = Uart2Spi(1,115200) - migIo0 = migIo.MigIo(MIGIO_ADDR, 8, "IO", csr) + MiIo0 = MiIo.MiIo(MIIO_ADDR, 8, "IO", csr) -MigIo drivers functions will now use our csr interface. Note that it's only useful to define the migIo interface in the Python code that will be executed on the Host, the code that will be translated in HDL don't need it. +MiIo drivers functions will now use our csr interface. Note that it's only useful to define the MiIo interface in the Python code that will be executed on the Host, the code that will be translated in HDL don't need it. Write Method:: - migIo0.write(0x1234, 0x5A) + MiIo0.write(0x1234, 0x5A) Write parameters are: - CSR Address @@ -94,7 +94,7 @@ Write parameters are: Read Method:: - migIo0.read(0x1234) + MiIo0.read(0x1234) Read parameters are: @@ -103,25 +103,25 @@ Read parameters are: Examples Design --------------- -de0_nano and de1 examples instanciate a MigIo Core. +de0_nano and de1 examples instanciate a MiIo Core. The HDL Code is in examples/deX/top.py -The Host Code is in examples/deX/client/test_MigIo.py +The Host Code is in examples/deX/client/test_MiIo.py -MigLa +MiLa ##### Description ----------- -The MigLa is the Logic Analyser core, it provides N (configurable) Trigger bits and M (Configurable) Data bits: +The MiLa is the Logic Analyser core, it provides N (configurable) Trigger bits and M (Configurable) Data bits: -.. image:: Illustrations/migLa.png +.. image:: Illustrations/MiLa.png -Each MigLa instance is composed of a Trigger and a Recorder controlled by the CSR Bus: +Each MiLa instance is composed of a Trigger and a Recorder controlled by the CSR Bus: -.. image:: Illustrations/migLa_structure.png +.. image:: Illustrations/MiLa_structure.png The Trigger is configured by the user to detect particular events on the N Trigger bits. Once detected, the hit signal rise. @@ -166,9 +166,9 @@ Instanciation trigger0 = trigger.Trigger(trig0_width, [term0]) recorder0 = recorder.Recorder(dat0_width, record_size) - migLa0 = migLa.MigLa(MIGLA0_ADDR, trigger0, recorder0) + MiLa0 = MiLa.MiLa(MILA0_ADDR, trigger0, recorder0) -This example above describes a MigLa instance with 1 trig element (Term term0) +This example above describes a MiLa instance with 1 trig element (Term term0) Term parameters are: @@ -184,7 +184,7 @@ Recorder parameters are: - Data Width - Maximum size of Record -MigLa parameters are: +MiLa parameters are: - CSR address : core base Address - Trigger object to use @@ -199,18 +199,18 @@ To use drivers functions, an interface is defined:: [...] - migLa0 = migLa.MigLa(MIGLA_ADDR, trigger0, recorder0, csr) + MiLa0 = MiLa.MiLa(MiLa_ADDR, trigger0, recorder0, csr) -MigLa drivers functions will now use our csr interface. Note that it's only useful to define the migLa interface in the Python code that will be executed on the Host, the code that will be translated in HDL don't need it +MiLa drivers functions will now use our csr interface. Note that it's only useful to define the MiLa interface in the Python code that will be executed on the Host, the code that will be translated in HDL don't need it Examples Design --------------- -de0_nano and de1 examples instanciate a MigLa Core. +de0_nano and de1 examples instanciate a MiLa Core. The HDL Code is in examples/deX/top.py -The Host Code is in examples/deX/client/test_MigLa_0.py and test_MigLa_1.py +The Host Code is in examples/deX/client/test_MiLa_0.py and test_MiLa_1.py Examples Design ###############