Skip to content

Commit 54dc172

Browse files
committed
Deploying to gh-pages from @ aa7c069 🚀
1 parent e3cb818 commit 54dc172

File tree

210 files changed

+1375
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+1375
-231
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.. _mem_clear:
2+
3+
Memory clear
4+
------------
5+
6+
Simple component that will generate addresses for memory clearing when RST is asserted.
7+
8+
Component port and generics description
9+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10+
11+
.. vhdl:autoentity:: MEM_CLEAR
12+
:noautogenerics:
13+
14+
15+
Instance template
16+
^^^^^^^^^^^^^^^^^
17+
18+
.. code-block::
19+
20+
data_clear_i : entity work.MEM_CLEAR
21+
generic map (
22+
DATA_WIDTH => BOX_WIDTH,
23+
ITEMS => BOX_CNT,
24+
CLEAR_EN => CLEAR_BY_RST
25+
)
26+
port map (
27+
CLK => CLK,
28+
RST => RST,
29+
30+
CLEAR_DONE => RST_DONE,
31+
CLEAR_WR => wr_clear,
32+
CLEAR_ADDR => wr_addr_clear
33+
);

devel/_sources/comp/debug/data_logger/readme.rst.txt

Lines changed: 109 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,22 +171,124 @@ Instance template (full usage)
171171
Control SW
172172
^^^^^^^^^^
173173

174-
Folder ``data_logger/sw/`` contains ``Python3`` package that provides:
174+
Folder ``data_logger/sw/`` contains following ``Python3`` packages:
175175

176-
* Module for basic interaction with ``DATA_LOGGER``
177-
* Modules for ``DATA_LOGGER`` wraps like ``MEM_LOGGER``
178-
* Simple graph generator based on `matplotlib` library
179-
* Simple PDF / Markdown report generator
180-
* Common tools
176+
* ``data_logger`` ... basic interaction with ``DATA_LOGGER``
177+
* ``mem_logger`` ... basic interaction with ``MEM_LOGGER``
178+
* ``logger_stats`` ... loading firmware statistics (multiple ``DATA_LOGGERS`` can be organized in tree hierarchy)
179+
* ``graph_tools`` ... simple plot functions for statistics from ``logger_stats``
181180

182181
Package can be installed using this command:
183182

184183
* You also need to install ``python nfb`` package
185184

186185
.. code-block::
186+
python3 -m pip install --upgrade pip
187187
188+
# Install nfb:
189+
cd swbase/pynfb
190+
python3 -m pip install Cython
191+
python3 -m pip install .
192+
cd -
193+
194+
# Install this package:
188195
cd data_logger/sw
189-
python3 setup.py install --user
196+
python3 -m pip install .
197+
198+
Example usage of ``logger_stats`` (for more usage see `mem_logger/mem_logger.py`):
199+
200+
.. code-block::
201+
202+
203+
import logger_stats as Stats
204+
from data_logger.data_logger import DataLogger
205+
206+
def create_stats():
207+
# Create DataLoggers
208+
logger_0 = DataLogger(index=0, dev='/dev/nfb0')
209+
logger_1 = DataLogger(index=1, dev='/dev/nfb0')
210+
211+
# Create Stats hierarchy
212+
stats = Stats.LoggerStats('Example stats')
213+
stats_0 = Stats.LoggerStats('Logger 0 stats', logger=logger_0)
214+
stats_1 = Stats.LoggerStats('Logger 1 stats', logger=logger_1)
215+
stats.add_stat(stats_0)
216+
stats.add_stat(stats_1)
217+
218+
# Add basic statistics
219+
stats_0.add_stat(Stats.Constant(index=7, name='X'))
220+
stats_0.add_stat(Stats.Counter(index=7, name='Y'))
221+
stats_0.add_stat(Stats.Value(index=7, name='Z'))
222+
223+
# FSM state statistic
224+
def fms_convert(v):
225+
states = [
226+
'IDLE',
227+
...
228+
]
229+
if v >= len(states):
230+
return "???"
231+
else:
232+
return states[int(v)]
233+
234+
fsm_format = Stats.FormatDefaultValue(format=Stats.FormatNone)
235+
stats_1.add_stat(Stats.Value(2, 'FSM states', convert=fms_convert, format=fsm_format))
236+
237+
# Latency statistic
238+
FREQ = 200 * 10**6
239+
time_conv = Stats.ConvertTime(FREQ)
240+
time_form = Stats.FormatDefaultValue(units='ns')
241+
stats_1.add_stat(Stats.Value(9, 'Latency', convert=time_conv, format=time_form))
242+
243+
# Add value statistic which includes multiple commands
244+
CMDS = [
245+
'CMD_A',
246+
...
247+
]
248+
stats_1.add_stat(Stats.ValueCMD(7, 'Latency of CMDs', cmd_width=2, cmds=CMDS, convert=time_conv, format=time_form))
249+
250+
# Add multiple counters
251+
counters = [
252+
'Counter A',
253+
...
254+
]
255+
stats_1.add_stats(
256+
name='Counters',
257+
names=counters,
258+
indexes=list(range(len(counters))),
259+
constructor=lambda i, n: Stats.Counter(i, n)
260+
)
261+
262+
return stats
263+
264+
265+
stats = create_stats()
266+
stats.load()
267+
print(stats.to_str())
268+
stats.save('stats.npz')
269+
270+
271+
Example usage of ``graph_tools``:
272+
273+
from graph_tools.graph_tools import load_data, plot_counter, plot_value, plot_value_2d
274+
275+
stats = load_data('stats.npz')
276+
277+
node = pd.DataFrame.from_dict(stats['Stats A']['Counters'])
278+
selected = ['Counter A', 'Counter B']
279+
280+
# Plot single counter
281+
plot_counter(node['Counter X'], 'Time', 'Requests', 'Plot title')
282+
283+
# Plot multiple counters
284+
plot_counter(node[selected], 'Time', 'Requests', 'Plot title')
285+
286+
# Plot histogram of the value interface
287+
plot_value(node['Value A'], 'Time', 'Blocks', 'Title' log=True)
288+
289+
# Plot 2D histogram of the value interface history
290+
plot_value_2d(node['Value A'], 'Time', 'Blocks', 'Title' log=True)
291+
190292

191293

192294
MI address space

devel/_sources/memory.rst.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ Allows setting type of memory (LUT, BRAM, URAM) or automatic mode. Optimized for
7575

7676
**SP_URAM_XILINX** - Structural implementation of single clock URAM memory based on Xilinx specific primitives with one read/write port. Only for Xilinx UltraScale+ FPGAs.
7777

78+
**<MEMORY>_CLEAR** - Wrap around **<MEMORY>** with additional clear logic.
79+
Detailed :ref:`documentation can be found here<mem_clear>`.
80+
7881
.. toctree::
7982
:maxdepth: 1
8083
:hidden:
@@ -83,6 +86,7 @@ Allows setting type of memory (LUT, BRAM, URAM) or automatic mode. Optimized for
8386
comp/base/mem/sdp_bram/readme
8487
comp/base/mem/mp_bram/readme
8588
comp/base/mem/lvt_mem/readme
89+
comp/base/mem/mem_clear/readme
8690
.. comp/base/mem/<something>
8791
8892
References

devel/app-minimal.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/sdp_bram/readme.html#simple-dual-port-bram-with-byte-enable">Simple dual-port BRAM with Byte Enable</a></li>
264264
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/mp_bram/readme.html">Multi-port BRAM</a></li>
265265
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/lvt_mem/readme.html">Live value table memory</a></li>
266+
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/mem_clear/readme.html">Memory clear</a></li>
266267
</ul>
267268
</li>
268269
<li class="toctree-l2 has-children"><a class="reference internal" href="fifo.html">FIFO components</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of FIFO components</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
@@ -732,7 +733,7 @@ <h2>The application MI offsets<a class="headerlink" href="#the-application-mi-of
732733
</div>
733734
<div class="right-details">
734735
<div style="font-size: var(--font-size--small)">
735-
Git branch: devel<br>Git hash: bf3c4314
736+
Git branch: devel<br>Git hash: aa7c0691
736737
</div>
737738

738739
</div>

devel/async.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/sdp_bram/readme.html#simple-dual-port-bram-with-byte-enable">Simple dual-port BRAM with Byte Enable</a></li>
264264
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/mp_bram/readme.html">Multi-port BRAM</a></li>
265265
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/lvt_mem/readme.html">Live value table memory</a></li>
266+
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/mem_clear/readme.html">Memory clear</a></li>
266267
</ul>
267268
</li>
268269
<li class="toctree-l2 has-children"><a class="reference internal" href="fifo.html">FIFO components</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of FIFO components</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
@@ -601,7 +602,7 @@ <h2>References<a class="headerlink" href="#references" title="Link to this headi
601602
</div>
602603
<div class="right-details">
603604
<div style="font-size: var(--font-size--small)">
604-
Git branch: devel<br>Git hash: bf3c4314
605+
Git branch: devel<br>Git hash: aa7c0691
605606
</div>
606607

607608
</div>

devel/base.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/sdp_bram/readme.html#simple-dual-port-bram-with-byte-enable">Simple dual-port BRAM with Byte Enable</a></li>
264264
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/mp_bram/readme.html">Multi-port BRAM</a></li>
265265
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/lvt_mem/readme.html">Live value table memory</a></li>
266+
<li class="toctree-l3"><a class="reference internal" href="comp/base/mem/mem_clear/readme.html">Memory clear</a></li>
266267
</ul>
267268
</li>
268269
<li class="toctree-l2 has-children"><a class="reference internal" href="fifo.html">FIFO components</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of FIFO components</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
@@ -599,7 +600,7 @@ <h1>Basic Tools<a class="headerlink" href="#basic-tools" title="Link to this hea
599600
</div>
600601
<div class="right-details">
601602
<div style="font-size: var(--font-size--small)">
602-
Git branch: devel<br>Git hash: bf3c4314
603+
Git branch: devel<br>Git hash: aa7c0691
603604
</div>
604605

605606
</div>

devel/comp/base/dsp/dsp_comparator/readme.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<li class="toctree-l3"><a class="reference internal" href="../../mem/sdp_bram/readme.html#simple-dual-port-bram-with-byte-enable">Simple dual-port BRAM with Byte Enable</a></li>
264264
<li class="toctree-l3"><a class="reference internal" href="../../mem/mp_bram/readme.html">Multi-port BRAM</a></li>
265265
<li class="toctree-l3"><a class="reference internal" href="../../mem/lvt_mem/readme.html">Live value table memory</a></li>
266+
<li class="toctree-l3"><a class="reference internal" href="../../mem/mem_clear/readme.html">Memory clear</a></li>
266267
</ul>
267268
</li>
268269
<li class="toctree-l2 has-children"><a class="reference internal" href="../../../../fifo.html">FIFO components</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of FIFO components</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
@@ -702,7 +703,7 @@
702703
</div>
703704
<div class="right-details">
704705
<div style="font-size: var(--font-size--small)">
705-
Git branch: devel<br>Git hash: bf3c4314
706+
Git branch: devel<br>Git hash: aa7c0691
706707
</div>
707708

708709
</div>

devel/comp/base/fifo/asfifox/readme.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<li class="toctree-l3"><a class="reference internal" href="../../mem/sdp_bram/readme.html#simple-dual-port-bram-with-byte-enable">Simple dual-port BRAM with Byte Enable</a></li>
264264
<li class="toctree-l3"><a class="reference internal" href="../../mem/mp_bram/readme.html">Multi-port BRAM</a></li>
265265
<li class="toctree-l3"><a class="reference internal" href="../../mem/lvt_mem/readme.html">Live value table memory</a></li>
266+
<li class="toctree-l3"><a class="reference internal" href="../../mem/mem_clear/readme.html">Memory clear</a></li>
266267
</ul>
267268
</li>
268269
<li class="toctree-l2 current has-children"><a class="reference internal" href="../../../../fifo.html">FIFO components</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of FIFO components</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
@@ -777,7 +778,7 @@ <h2>Block diagram<a class="headerlink" href="#block-diagram" title="Link to this
777778
</div>
778779
<div class="right-details">
779780
<div style="font-size: var(--font-size--small)">
780-
Git branch: devel<br>Git hash: bf3c4314
781+
Git branch: devel<br>Git hash: aa7c0691
781782
</div>
782783

783784
</div>

devel/comp/base/fifo/fifox/readme.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<li class="toctree-l3"><a class="reference internal" href="../../mem/sdp_bram/readme.html#simple-dual-port-bram-with-byte-enable">Simple dual-port BRAM with Byte Enable</a></li>
264264
<li class="toctree-l3"><a class="reference internal" href="../../mem/mp_bram/readme.html">Multi-port BRAM</a></li>
265265
<li class="toctree-l3"><a class="reference internal" href="../../mem/lvt_mem/readme.html">Live value table memory</a></li>
266+
<li class="toctree-l3"><a class="reference internal" href="../../mem/mem_clear/readme.html">Memory clear</a></li>
266267
</ul>
267268
</li>
268269
<li class="toctree-l2 current has-children"><a class="reference internal" href="../../../../fifo.html">FIFO components</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of FIFO components</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
@@ -803,7 +804,7 @@ <h2>Verification block diagram<a class="headerlink" href="#verification-block-di
803804
</div>
804805
<div class="right-details">
805806
<div style="font-size: var(--font-size--small)">
806-
Git branch: devel<br>Git hash: bf3c4314
807+
Git branch: devel<br>Git hash: aa7c0691
807808
</div>
808809

809810
</div>

devel/comp/base/fifo/fifox_multi/readme.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<li class="toctree-l3"><a class="reference internal" href="../../mem/sdp_bram/readme.html#simple-dual-port-bram-with-byte-enable">Simple dual-port BRAM with Byte Enable</a></li>
264264
<li class="toctree-l3"><a class="reference internal" href="../../mem/mp_bram/readme.html">Multi-port BRAM</a></li>
265265
<li class="toctree-l3"><a class="reference internal" href="../../mem/lvt_mem/readme.html">Live value table memory</a></li>
266+
<li class="toctree-l3"><a class="reference internal" href="../../mem/mem_clear/readme.html">Memory clear</a></li>
266267
</ul>
267268
</li>
268269
<li class="toctree-l2 current has-children"><a class="reference internal" href="../../../../fifo.html">FIFO components</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of FIFO components</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
@@ -774,7 +775,7 @@ <h2>Read interface behavior<a class="headerlink" href="#read-interface-behavior"
774775
</div>
775776
<div class="right-details">
776777
<div style="font-size: var(--font-size--small)">
777-
Git branch: devel<br>Git hash: bf3c4314
778+
Git branch: devel<br>Git hash: aa7c0691
778779
</div>
779780

780781
</div>

0 commit comments

Comments
 (0)