From b0cc4b7625a0e967655fe3fefb0cd569d848f544 Mon Sep 17 00:00:00 2001 From: Angel Cascarino Date: Fri, 9 Feb 2024 15:07:07 +0000 Subject: [PATCH] hotfix: add subst. in I2S doc, move decl. in tests --- doc/programming_guide/reference/i2s/i2s_common.rst | 4 ++-- test/lib_i2s/i2s_slave_checker.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/programming_guide/reference/i2s/i2s_common.rst b/doc/programming_guide/reference/i2s/i2s_common.rst index a5fce51..54beb4a 100644 --- a/doc/programming_guide/reference/i2s/i2s_common.rst +++ b/doc/programming_guide/reference/i2s/i2s_common.rst @@ -7,9 +7,9 @@ =============== The macro I2S_DATA_WIDTH may be set as a compile flag (e.g. --DI2S_DATA_WIDTH=16) to alter the number of bits per word for both the I2S +-DI2S_DATA_WIDTH=16) to alter the number of bits per word for both the |I2S| Master and I2S Slave components; this defaults to 32 bits per word. This -value may be set to any value between 1 and 32. Correct operation of the I2S +value may be set to any value between 1 and 32. Correct operation of the |I2S| components has only currently been verified at 16 and 32 bits per word. The following structures and functions are used by an |I2S| master or slave instance. diff --git a/test/lib_i2s/i2s_slave_checker.py b/test/lib_i2s/i2s_slave_checker.py index 65daad4..7369977 100644 --- a/test/lib_i2s/i2s_slave_checker.py +++ b/test/lib_i2s/i2s_slave_checker.py @@ -99,7 +99,6 @@ def run(self): f"CONFIG: bclk:{bclk_frequency} in:{num_ins} out:{num_outs} data_bits: {data_bits} i2s_justified:{is_i2s_justified}" ) clock_half_period = float(ONE_SECOND_FS) / float(2 * bclk_frequency) - data_bit_mask = int("1" * data_bits, base=2) if self._invert_bclk: bclk0 = 1 @@ -214,6 +213,8 @@ def run(self): time = self.wait_until_ret( time + clock_half_period - din_sample_offset ) + + data_bit_mask = int("1" * data_bits, base=2) for p in range(0, num_outs): if (data_bit_mask & rx_data[p * 2][frame_count]) != rx_word[p]: