From c6e1a70df3881bddc2ad0fec254d64affcedf2ed Mon Sep 17 00:00:00 2001 From: Andreas Wallner Date: Fri, 20 Oct 2023 14:00:04 +0200 Subject: [PATCH] Add documentation for #* operator Use unusual n-times to not have to write 'repeat x n times' --- source/SpinalHDL/Data types/Int.rst | 3 +++ source/SpinalHDL/Data types/bits.rst | 3 +++ source/SpinalHDL/Data types/bool.rst | 3 +++ 3 files changed, 9 insertions(+) diff --git a/source/SpinalHDL/Data types/Int.rst b/source/SpinalHDL/Data types/Int.rst index 3626e619cb7..d127aa6e00e 100644 --- a/source/SpinalHDL/Data types/Int.rst +++ b/source/SpinalHDL/Data types/Int.rst @@ -500,6 +500,9 @@ to use the return values to assign to the original signal. * - x ## y - Concatenate, x->high, y->low - Bits(w(x) + w(y) bits) + * - x #* n + - Repeat x n-times + - Bits(w(x) * n bits) * - x @@ y - Concatenate x:T with y:Bool/SInt/UInt - T(w(x) + w(y) bits) diff --git a/source/SpinalHDL/Data types/bits.rst b/source/SpinalHDL/Data types/bits.rst index c5c6ca732e6..f9016e85199 100644 --- a/source/SpinalHDL/Data types/bits.rst +++ b/source/SpinalHDL/Data types/bits.rst @@ -375,6 +375,9 @@ to use the return values to assign to the original signal. * - x ## y - Concatenate, x->high, y->low - Bits(w(x) + w(y) bits) + * - x #* n + - Repeat x n-times + - Bits(w(x) * n bits) * - x.resize(y) - Return a resized representation of x, if enlarged, it is extended with zero padding at MSB as necessary, y: Int diff --git a/source/SpinalHDL/Data types/bool.rst b/source/SpinalHDL/Data types/bool.rst index 25082976422..10556cb562a 100644 --- a/source/SpinalHDL/Data types/bool.rst +++ b/source/SpinalHDL/Data types/bool.rst @@ -307,6 +307,9 @@ Misc * - x ## y - Concatenate, x->high, y->low - Bits(w(x) + w(y) bits) + * - x #* n + - Repeat x n-times + - Bits(n bits) .. code-block:: scala