-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong output when running dsps_mulc_s16_ functions (DSP-108) #70
Comments
Hello, the problem here is data format. In the esp-dsp repository, all the Peter |
@peter-marcisovsky Wouldn't be the case to implement the shift parameter as it is implemented for dsps_add_s16? |
@peter-marcisovsky Thank you for your time, and I'm sorry to continue to bother you. I took a look at both ANSI and ae32 implementations, and simply just removing the shift instruction solved the problem. It would be very helpful if the shift parameter could be implemented. For those who are facing the same issue. I'm talking about lines 41 and 24 of the ae32 and ANSI implementation, respectively. I'm appending here the custom implementations that solve the problem for me.
|
Environment
I am running this library from the latest arduino-esp32 package release (2.0.9). Since I'm assuming the issue is not directly related to arduino-esp32 package, I'm opening the issue here. I'm sorry if this is a mistake.
I'm compiling the project using the latest arduino-cli release as well.
Problem Description
I was trying to use the dsps_mulc functions to multiply an array by a constant, as described in its documentation, but I realized that the output for the int16_t version of the function is either [-1,-1,-1,...] or [0,0,0,...]. However, the float version works very well, always providing the expected output.
Example:
Expected Behavior
dsp_error = 0;
Output: [-25, -10, -40, -45]
Actual Behavior
dsp_error = 0;
Output: [-1, -1, -1, -1]
Steps to reproduce
Compiling with the following options and executing the above piece of code should reproduce the bug.
_id=esp32s3
bootloader.tool=esptool_py
bootloader.tool.default=esptool_py
build.arch=ESP32
build.board=ESP32S3_DEV
build.boot=qio
build.boot_freq=80m
build.bootloader_addr=0x0
build.cdc_on_boot=1
build.code_debug=4
build.copy_jtag_files=0
build.core=esp32
build.core.path=
build.custom_bootloader=bootloader
build.custom_partitions=partitions
build.defines=
build.dfu_on_boot=0
build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
build.extra_flags=-DESP32 -DCORE_DEBUG_LEVEL=4 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0
build.extra_flags.esp32=-DARDUINO_USB_CDC_ON_BOOT=0
build.extra_flags.esp32c3=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1
build.extra_flags.esp32s2=-DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0
build.extra_flags.esp32s3=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0
build.extra_libs=
build.f_cpu=240000000L
build.flash_freq=80m
build.flash_mode=dio
build.flash_size=8MB
build.fqbn=esp32:esp32:esp32s3:PartitionScheme=8MBCustom,FlashMode=qio,EraseFlash=all,CDCOnBoot=cdc,UploadMode=cdc
build.library_discovery_phase=0
build.loop_core=-DARDUINO_RUNNING_CORE=1
build.mcu=esp32s3
build.memory_type=qio_qspi
build.msc_on_boot=0
build.openocdscript=esp32s3-builtin.cfg
build.openocdscript.esp32=esp32-wrover-kit-3.3v.cfg
build.openocdscript.esp32c3=esp32c3-builtin.cfg
build.openocdscript.esp32s2=esp32s2-kaluga-1.cfg
build.openocdscript.esp32s3=esp32s3-builtin.cfg
build.opt.name=build_opt.h
build.opt.path=
build.partitions=8Mpartition
build.path=
build.project_name=test_bench.ino
build.psram_type=qspi
build.source.path=
build.system.path=
build.tarch=xtensa
build.target=esp32s3
build.usb_mode=1
build.variant=esp32s3
build.variant.path=
The code was compiled using the following command line:
arduino-cli compile -b esp32:esp32:esp32s3 --board-options "PartitionScheme=8MBCustom,FlashMode=qio,EraseFlash=all,CDCOnBoot=cdc,UploadMode=cdc" --build-property "compiler.optimization_flags=-O2" --build-property "build.flash_size=8MB" --build-property "build.partitions=8Mpartition" --build-property "build.code_debug=4" --output-dir source/build/bpi-board/output --log-format text --log-file source/build/temp/build.log --log-level warn --verbose
Other items
elf-file.zip
The text was updated successfully, but these errors were encountered: