1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-12-02 14:48:09 +00:00
Commit Graph

10144 Commits

Author SHA1 Message Date
Marcus Alagar
5bf77fc99b Fix unclear comment mistakes in xn resamplers
Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:10 -07:00
Marcus Alagar
b2f838ca5a Optimize xn resamplers
Optimize and clarify that `inPtr` is not stripmined in xn resamplers
by moving the declaration of the pointer out of the loop. This
may or may not remove an additional store or give a hint to the compiler
to keep the pointer value handy. More importantly, it clarifies
that the input data in this resampler is specifically not being
stripmined through, instead being referenced as the offsets buffer
and output are being stripmined through.

Also experimentally optimize xn resampler by doing remainder
and conversion (to address offset) in vector calculations instead
of in for loop.

Finally optimize xn resampler functions, by moving the
wrapping of the index and its conversion to a raw
address offset is moved from a basic for loop to vector
computation.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:10 -07:00
Marcus Alagar
08f93787c6 Make complex resampler tab style consistent
Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:09 -07:00
Marcus Alagar
eaf2785673 Implement 32fc xn resampler, puppet
Implement 32-bit floating-point complex number resampler using
RVV intrinsics using the same trick that worked with 16-bit
integer complex numbers. Namely, interpreting the two
32-bit components of the complex numbers as a single
64-bit number for the purposes of moving around.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:09 -07:00
Marcus Alagar
9aefe82cd8 Implement 16ic xn resampler, puppet
Implement 16-bit integer complex number resampler
using RVV intrinsics by interpreting each complex number
(with two 16-bit components) as a single 32-bit integer
for the purposes of moving them around.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:09 -07:00
Marcus Alagar
54f609e1fa Implement 16i xn resampler, puppet
Implement 16-bit integer xn resampler with a slightly
modifded copy of 32f xn resampler logic, along with the
16i resamplerxnpupper to allow it to be tested.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:08 -07:00
Marcus Alagar
4c32ee0fe6 Implement 32f xn resampler, puppet
Implement 32-bit floating-point xn resampler
utilizing RVV intrinsics. It essentially uses the generic
logic except for the actual transfer part. Instead, it
saves the indices to sample from in a temporary buffer
that it then uses in RVV to do a simple unordered
indexed load into a unit-stride store.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:08 -07:00
Marcus Alagar
308f7f4aa0 Optimize 32fc to 8ic conversion
Optimize 32-bit floating-point complex number to 8-bit
integer complex number conversion using RVV by skipping
the need to segment load/store by simply converting the raw
numbers stored within the complex numbers.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:07 -07:00
Marcus Alagar
71d4b045c9 Optimize 32fc to 16ic conversion
Optimize 32-bit floating-point complex numbers to 16-bit
integer complex number conversion using RVV intrinsics,
by not segment storing/loading and instead converting
the raw numbers.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:07 -07:00
Marcus Alagar
f5999872f6 Optimize 16ic to 32fc conversion
Optimize conversion from 16-bit integer complex numbers to
32-bit floating-point complex numbers using RVV intrinsics
by skipping any need to distinguish between real and imaginary
numbers and instead just loading a contiguous selectiong
of components.

Timing results:
Old - generic: 39736.8 ms, rvv: 10406.7 ms
New - generic: 40479.9 ms, rvv: 8245.38 ms

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:06 -07:00
Marcus Alagar
1b265d55be Make other conversion consistent with generic implementation
Make 32-bit floating-point complex number to 8-bit integer
complex number conversion consistent with the generic
implementation. Specifically, made it so, after
being multiplied by `INT8_MAX`, but before narrowing,
saturate each number to 8 bits.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:06 -07:00
Marcus Alagar
67c3c0f1ea Make conversion consistent with generic implementation
Make 32-bit floating point complex number to 16-bit integer
complex number conversion using RVV intrinsics consistent
with the generic implementation and documentation
by saturating the value within 16-bits before converting.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:05 -07:00
Marcus Alagar
f07af19b7e Implement RVV 32fc to 8i conversion
Implement converting a vector of 32-bit floating point
complex numbers into a vector of 8-bit integer complex numbers
using RVV C intrinsics in `volk_gnsssdr_32fc_convert_8i_rvv`.

Required a lot of debugging, with attempts ranging from
saturation to not doing a narrowing conversion to using
the specification-recommended "round-to-odd" conversion.

In end, the problem was that the generic
implementation, with no notice in the function documentation
at all, actually multiplies the floating-point number by `INT8_MAX`
before converting.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:05 -07:00
Marcus Alagar
bdddb5dd68 Implement RVV 32fc to 16i conversion
Since RVV 32fc to 8i is conversion is not working, try implementing
a smaller scale conversion of a vector of 32-bit floating-point
complex numbers to 16-bit integer complex numbers.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:04 -07:00
Marcus Alagar
1e1c18acf1 Implement RVV 16ic to 32fc conversion
Implement converting a vector of 16-bit integer complex numbers
to 32-bit floating point complex numbers using RVV C intrinsics
in `volk_gnsssdr_16ic_convert_32fc_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:04 -07:00
Marcus Alagar
bc6c5d968d Implement 16ic xn dot product, puppet, with RVV
Implement computing the dot products of multiple vectors
dotted with a common vector, all with elements of 16-bit complex
numbers (with both the real and imaginary part being 16 bits)
using RVV C intrinsics in `volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:04 -07:00
Marcus Alagar
566d286995 Implement 16ic saturated dot product with RVV
Implement computing the dot product of two vectors with
complex numbers (each part being 16 bits) using RVV C intrinsics
in `volk_gnsssdr_16ic_x2_dot_prod_16ic_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:03 -07:00
Marcus Alagar
b7940b1177 Implement 16ic multiply with RVV
Implement multiplying two vectors of 16-bit complex numbers (where
each part, real and imaginary, is represented by 16 bits) by element
using RVV C intrinsics in `volk_gnsssdr_16ic_x2_multiply_16ic_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:03 -07:00
Marcus Alagar
15d828a897 Implement 16ic conjugate with RVV
Implement computing the conjugate on each element in a complex
vector using RVV C intrinsics in
`volk_gnsssdr_16ic_conjugate_16ic_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:02 -07:00
Marcus Alagar
c0d9f121d9 Implement 8ic conjugate with RVV
Implement calculating the conjugate for every element in a
vector of complex numbers using RVV C inrinsics in
`volk_gnsssdr_8ic_conjugate_8ic_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:02 -07:00
Marcus Alagar
02dfb70ecd Implement 8ic multiply with RVV
Implement mulitplying two vectors of complex numbers together,
point by point, into a new vector, using RVV C intrinsics.
This is in `volk_gnsssdr_8ic_x2_multiply_8ic_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:01 -07:00
Marcus Alagar
425dd70450 Implement 8ic magnitude squared with RVV
Implement calculating the magnitude squared of each element in
a complex vector using RVV C intrinsics in the function
`volk_gnsssdr_8ic_magnitude_squared_8i_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:01 -07:00
Marcus Alagar
5fc9ec057d Implement 8ic dot product with RVV
Implement computing the dot product of two complex vectors
utilizing RVV C intrinsics. Was surprisingly satisfying to
puzzle out, though there are no doubt typos and whatnot to
be caught.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:01 -07:00
Marcus Alagar
00a48edddd Fix incorrect comments in RVV functions
Fix comments in RVV-utilizing functions that incorrectly
said that `__riscv_vsetvl_e8m8` actually set up any state. Setting
up the correct state in the `vtype` register is handled by
the compiler; instead, `__riscv_vsetvl_e8m8` simply returns
the number of elements to be processed with an AVL given as an
argument and the correctsponding intrinsic-set SEW and LMUL.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:00 -07:00
Marcus Alagar
87359c0743 Implement 8i accumulation with RVV
Implement `volk_gnsssdr_8i_accumulator_s8i_rvv` that accumulates
a vector of 1-byte numbers and stores it in `result`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 03:00:00 -07:00
Marcus Alagar
5212cb53a7 Implement 8u multiplying with RVV
Implement multiplying two byte vectors utilizing RVV
through C intrinisics. In other words, implement
`volk_gnsssdr_8u_x2_multiply_8u_rvv`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 02:59:59 -07:00
Marcus Alagar
cb1fd9782c Implement 8i sum with RVV
Specifically, implemented `volk_gnsssdr_8i_x2_add_8i_rvv`
through strip mining. Interestingly, strip mining is
built into RVV's design, making the code actually
very straightforward.

Had to fix after realizing that `char` != `int8_t`, as explained
by this stack overflow:
https://stackoverflow.com/questions/451375/what-does-it-mean-for-a-char-to-be-signed

Basically, `char` being signed or unsigned is actually
implementation-defined. As such, when the C intrinsics specify
that it is `int8_t`, not `char`, they expect `signed char`.

Signed-off-by: Marcus Alagar <mvala079@gmail.com>
2025-09-14 02:59:59 -07:00
Carles Fernandez
53962c9a63 Bump local version of Protocol Buffers to 32.1 2025-09-12 23:00:43 +02:00
Carles Fernandez
0a32ec6494 osnma_log_viewer.py: print number of verified tags found in log file 2025-09-12 22:55:45 +02:00
Carles Fernandez
8155ee3ef2 Merge branch 'MathieuFavreau-bug/fix-missing-test-file' into next 2025-09-09 08:29:21 +02:00
Carles Fernandez
3f4c4a5dc9 Add osnma_log_viewer.py tool 2025-09-09 08:29:11 +02:00
Mathieu Favreau
dcdf9c92d8 Copy missing test file 2025-09-08 18:20:06 +00:00
Carles Fernandez
63800aa423 Merge branch 'next' of github.com:gnss-sdr/gnss-sdr into next 2025-09-08 09:23:19 +02:00
dependabot[bot]
3729cf3c7f Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/setup-python](https://github.com/actions/setup-python) and [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/setup-python` from 5 to 6
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

Updates `actions/setup-node` from 4 to 5
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 09:23:02 +02:00
Carles Fernandez
96cacdf50a Remove unused function, improve logging 2025-09-08 09:03:20 +02:00
Carles Fernandez
76eedcd266 Fix formatting 2025-09-08 08:57:24 +02:00
Carles Fernandez
6cbc276057 Add guard for Galileo eph 2025-09-05 10:22:37 +02:00
Victor Castillo
7de30bbaeb style: removed unused statement 2025-09-01 16:00:09 +02:00
Victor Castillo
6060820e40 build: link resampler_gr_blocks target against algorithm_libs 2025-09-01 16:00:09 +02:00
Victor Castillo
0398d23ccd fix: maintain c++14 compatibility 2025-09-01 16:00:09 +02:00
Victor Castillo
22371ee301 style: added const to for each loop 2025-09-01 16:00:09 +02:00
Victor Castillo
a4a4241275 style: clang-format compliance 2025-09-01 16:00:09 +02:00
Victor Castillo
f20317effb docs(sensor_data): updated year in author line 2025-09-01 16:00:09 +02:00
Victor Castillo
1cab3d00bf style: improve readability 2025-09-01 16:00:09 +02:00
Victor Castillo
98f0b6bcb1 docs(sensor_data): updated comments 2025-09-01 16:00:09 +02:00
Victor Castillo
878df30050 fix(sensor_data): update sensor data tag timestamp in resampler block 2025-09-01 16:00:09 +02:00
Victor Castillo
59f4a4e6a6 fix(sensor_data): moved declarations from header file to source file 2025-09-01 16:00:09 +02:00
Victor Castillo
3452a4388b fix(sensor_data): avoid tagging samples to far in the past 2025-09-01 16:00:09 +02:00
Victor Castillo
a847240e59 feat(sensor_data): added support for double precision (f64) sensor measurements 2025-09-01 16:00:09 +02:00
Victor Castillo
01f3b79025 fix(observables): fixed sensor data tag timing 2025-09-01 16:00:09 +02:00