Skip to content

Commit

Permalink
Adapt the source code to support the new 'module::set_n_frames' method.
Browse files Browse the repository at this point in the history
  • Loading branch information
kouchy committed Nov 1, 2020
1 parent 3c0b716 commit 62d2a4a
Show file tree
Hide file tree
Showing 578 changed files with 3,061 additions and 2,465 deletions.
44 changes: 44 additions & 0 deletions doc/source/user/simulation/parameters/simulation/simulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,50 @@ parameter is enabled, it becomes the codeword size (:math:`N`).
number of threads is high, the memory footprint can exceeds the size of the
CPU caches and it becomes less interesting to use a large number of threads.

.. _sim-sim-inter-fra:

``--sim-inter-fra, -F``
"""""""""""""""""""""""

:Type: integer
:Default: 1
:Examples: ``--sim-inter-fra 3``

|factory::Simulation::p+inter-fra,F|

The default behavior is to generate one frame at a time. This parameter enables
to process more than one frame during the execution of a task.

The number of frames consumed and produced when a task is executed is called the
**inter frame level** or |IFL|. Setting the |IFL| will automatically affect the
|IFL| level in all the simulation modules (c.f. :numref:`fig_sim_fra_inter`).

.. _fig_sim_fra_inter:

.. figure:: images/sim_fra_inter.svg
:figwidth: 70 %
:align: center

3-way inter frame level in the communication chain.

The |IFL| also allows multi-user configurations to be simulated (see
:numref:`fig_sim_fra_multi_user`). This configurations is used when using |SCMA|
modulation (see the :ref:`mdm-mdm-type` ``SCMA`` parameter).

.. _fig_sim_fra_multi_user:

.. figure:: images/sim_fra_multi_user.svg
:figwidth: 70 %
:align: center

3-way inter frame level with multi-user channel in the communication chain.

.. note:: **For short frames**, increase the |IFL| can **increase the
simulation throughput**, it can hide task call overheads.

.. note:: **For large frames**, increase the |IFL| can **decrease the
simulation throughput** due the CPU cache size limitation.

.. _sim-sim-crc-start:

``--sim-crc-start``
Expand Down
46 changes: 0 additions & 46 deletions doc/source/user/simulation/parameters/source/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,52 +83,6 @@ Description of the allowed values:
.. |src-implem_descr_fast| replace:: Fast implementation, only available for the
``RAND`` source type.

.. _src-src-fra:

``--src-fra, -F``
"""""""""""""""""

:Type: integer
:Default: 1
:Examples: ``--src-fra 8``

|factory::Source::p+fra,F|

The default behavior is to generate one frame at a time. This parameter enables
to process more than one frame when the *generate* task (from the source module)
is called.

The number of frames consumed and produced when a task is executed is called the
**inter frame level** or |IFL|. Setting the |IFL| in the source module will
automatically affect the |IFL| level in all the other simulation modules (c.f.
:numref:`fig_src_fra_inter`).

.. _fig_src_fra_inter:

.. figure:: images/src_fra_inter.svg
:figwidth: 70 %
:align: center

3-way inter frame level in the communication chain.

The |IFL| also allows multi-user configurations to be simulated (see
:numref:`fig_src_fra_multi_user`). This configurations is used when using |SCMA|
modulation (see the :ref:`mdm-mdm-type` ``SCMA`` parameter).

.. _fig_src_fra_multi_user:

.. figure:: images/src_fra_multi_user.svg
:figwidth: 70 %
:align: center

3-way inter frame level with multi-user channel in the communication chain.

.. note:: **For short frames**, increase the |IFL| can **increase the
simulation throughput**, it can hide task call overheads.

.. note:: **For large frames**, increase the |IFL| can **decrease the
simulation throughput** due the CPU cache size limitation.

.. _src-src-path:

``--src-path``
Expand Down
51 changes: 3 additions & 48 deletions doc/strings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
.. |factory::Simulation::p+seed,S| replace::
Set the |PRNG| seed used in the Monte Carlo simulation.

.. |factory::Simulation::p+inter-fra,F| replace::
Set the number of frames to process for each task execution.

.. ---------------------------------------------------- factory BFER parameters
.. |factory::BFER::p+coset,c| replace::
Expand Down Expand Up @@ -183,9 +186,6 @@
.. |factory::Channel::p+fra-size,N| replace::
Set the number of symbols by frame.

.. |factory::Channel::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Channel::p+type| replace::
Select the channel type.

Expand Down Expand Up @@ -247,18 +247,12 @@
.. |factory::Coset::p+type| replace::
Set the coset type.

.. |factory::Coset::p+fra,F| replace::
Set the number of inter frame level to process.

.. ----------------------------------------------------- factory CRC parameters
.. |factory::CRC::p+info-bits,K| replace::
Set the number of generated bits (information bits :math:`K`, the CRC is not
included).

.. |factory::CRC::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::CRC::p+type,p+poly| replace::
Select the |CRC| type you want to use among the predefined (or not)
polynomials.
Expand All @@ -278,9 +272,6 @@
.. |factory::Decoder::p+info-bits,K| replace::
Set the number of information bits :math:`K`.

.. |factory::Decoder::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Decoder::p+type,D| replace::
Select the decoder algorithm.

Expand Down Expand Up @@ -481,9 +472,6 @@
.. |factory::Encoder::p+cw-size,N| replace::
Set the codeword size :math:`N`.

.. |factory::Encoder::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Encoder::p+type| replace::
Select the encoder type.

Expand Down Expand Up @@ -531,9 +519,6 @@
.. |factory::Encoder_NO::p+info-bits,K| replace::
Set the number of information bits :math:`K`.

.. |factory::Encoder_NO::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Encoder_NO::p+type| replace::
Select the encoder type.

Expand Down Expand Up @@ -601,9 +586,6 @@
.. |factory::Modem::p+fra-size,N| replace::
Set the number of symbols by frame.

.. |factory::Modem::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Modem::p+type| replace::
Select the modulation type.

Expand Down Expand Up @@ -666,9 +648,6 @@
.. |factory::Monitor_BFER::p+info-bits,K| replace::
Set the number of bits to check.

.. |factory::Monitor_BFER::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Monitor_BFER::p+max-fe,e| replace::
Set the maximum number of frame errors to simulated for each noise point.

Expand All @@ -689,9 +668,6 @@
.. |factory::Monitor_EXIT::p+size,K| replace::
Set the number of bits to check.

.. |factory::Monitor_EXIT::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Monitor_EXIT::p+trials,n| replace::
Set the number of frames to simulate per :math:`\sigma A` value.

Expand All @@ -700,9 +676,6 @@
.. |factory::Monitor_MI::p+fra-size,N| replace::
Select the frame size for the mutual information computation.

.. |factory::Monitor_MI::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Monitor_MI::p+trials,n| replace::
Set the number of frames to simulate.

Expand All @@ -715,9 +688,6 @@
Set the frame size :math:`N`. This is not necessarily the codeword size if a
puncturing pattern is used.

.. |factory::Puncturer::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Puncturer::p+type| replace::
Select the puncturer type.

Expand Down Expand Up @@ -749,9 +719,6 @@
.. |factory::Quantizer::p+size,N| replace::
Set the number of real to quantize.

.. |factory::Quantizer::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Quantizer::p+type| replace::
Select the quantizer type.

Expand All @@ -772,9 +739,6 @@
.. |factory::Sink::p+info-bits,K| replace::
Select the number of information bits :math:`K`.

.. |factory::Sink::p+fra,F| replace::
Set the number of frames to process for each task execution.

.. |factory::Sink::p+type| replace::
Select the sink type.

Expand All @@ -790,9 +754,6 @@
.. |factory::Source::p+info-bits,K| replace::
Select the number of information bits :math:`K`.

.. |factory::Source::p+fra,F| replace::
Set the number of frames to process for each task execution.

.. |factory::Source::p+type| replace::
Method used to generate the :math:`K` information bits.

Expand Down Expand Up @@ -881,9 +842,6 @@
.. |factory::Flip_and_check::p+size| replace::
Set the size (in bit) of the extrinsic for the |FNC| processing.

.. |factory::Flip_and_check::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Flip_and_check::p+q| replace::
Set the search space for the |FNC| technique.

Expand Down Expand Up @@ -930,9 +888,6 @@
.. |factory::Interleaver_core::p+size| replace::
Select the number of symbols to interleave.

.. |factory::Interleaver_core::p+fra,F| replace::
Set the number of inter frame level to process.

.. |factory::Interleaver_core::p+type| replace::
Select the interleaver type.

Expand Down
1 change: 0 additions & 1 deletion include/Factory/Module/CRC/CRC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class CRC : public Factory
std::string type = "NO"; // "32-GZIP"; // type is the polynomial
std::string implem = "FAST";
int size = 0;
int n_frames = 1;

// -------------------------------------------------------------------------------------------------------- METHODS
explicit CRC(const std::string &p = CRC_prefix);
Expand Down
1 change: 0 additions & 1 deletion include/Factory/Module/Channel/Channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Channel : public Factory
std::string block_fading = "NO";
bool add_users = false;
bool complex = false;
int n_frames = 1;
int seed = 0;
int gain_occur = 1;

Expand Down
1 change: 0 additions & 1 deletion include/Factory/Module/Coset/Coset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class Coset : public Factory

// optional parameters
std::string type = "STD";
int n_frames = 1;

// -------------------------------------------------------------------------------------------------------- METHODS
explicit Coset(const std::string &p = Coset_prefix);
Expand Down
1 change: 0 additions & 1 deletion include/Factory/Module/Decoder/Decoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Decoder : public Factory
std::string implem = "STD";
bool systematic = true;
bool hamming = false;
int n_frames = 1;
int tail_length = 0;
int flips = 3;
int seed = 0;
Expand Down
3 changes: 1 addition & 2 deletions include/Factory/Module/Decoder/RA/Decoder_RA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ class Decoder_RA : public Decoder

// builder
template <typename B = int, typename Q = float>
module::Decoder_SIHO<B,Q>* build(const module::Interleaver<Q> &itl,
module::Encoder<B> *encoder = nullptr) const;
module::Decoder_SIHO<B,Q>* build(module::Interleaver<Q> &itl, module::Encoder<B> *encoder = nullptr) const;
};
}
}
Expand Down
6 changes: 3 additions & 3 deletions include/Factory/Module/Decoder/Turbo/Decoder_turbo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ class Decoder_turbo : public Decoder

// builder
template <typename B = int, typename Q = float>
module::Decoder_turbo<B,Q>* build(const module::Interleaver<Q> &itl,
const module::Decoder_SISO<B,Q> &siso_n,
module::Decoder_turbo<B,Q>* build(const module::Decoder_SISO<B,Q> &siso_n,
const module::Decoder_SISO<B,Q> &siso_i,
module::Encoder<B> *encoder = nullptr) const;
module::Interleaver<Q> &itl,
module::Encoder<B> *encoder = nullptr) const;

template <typename B = int, typename Q = float>
module::Decoder_SIHO<B,Q>* build(module::Encoder<B> *encoder = nullptr) const;
Expand Down
Loading

0 comments on commit 62d2a4a

Please sign in to comment.