diff --git a/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests.zig b/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests.zig index 9fa15b2d..0be9dfbc 100644 --- a/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests.zig +++ b/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests.zig @@ -16,6 +16,7 @@ const c = @cImport({ @cInclude("comparison_tests/i2c.pio.h"); @cInclude("comparison_tests/irq.pio.h"); @cInclude("comparison_tests/manchester_encoding.pio.h"); + @cInclude("comparison_tests/movrx.pio.h"); @cInclude("comparison_tests/nec_carrier_burst.pio.h"); @cInclude("comparison_tests/nec_carrier_control.pio.h"); @cInclude("comparison_tests/nec_receive.pio.h"); @@ -107,6 +108,11 @@ test "pio.comparison.manchester_encoding" { try pio_comparison(@embedFile("comparison_tests/manchester_encoding.pio")); } +test "pio.comparison.movrx" { + @setEvalBranchQuota(11000); + try pio_comparison_cpu(.RP2350, @embedFile("comparison_tests/movrx.pio")); +} + test "pio.comparison.nec_carrier_burst" { @setEvalBranchQuota(6000); try pio_comparison(@embedFile("comparison_tests/nec_carrier_burst.pio")); diff --git a/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests/movrx.pio b/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests/movrx.pio new file mode 100644 index 00000000..fdd12de4 --- /dev/null +++ b/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests/movrx.pio @@ -0,0 +1,14 @@ +.program movrx + +.wrap_target + mov rxfifoy, isr + mov rxfifo0, isr + mov rxfifo1, isr + mov rxfifo2, isr + mov rxfifo3, isr +; mov osr, rxfifoy +; mov osr, rxfifo0 +; mov osr, rxfifo1 +; mov osr, rxfifo2 +; mov osr, rxfifo3 +.wrap diff --git a/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests/movrx.pio.h b/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests/movrx.pio.h new file mode 100644 index 00000000..40b5c562 --- /dev/null +++ b/port/raspberrypi/rp2xxx/src/hal/pio/assembler/comparison_tests/movrx.pio.h @@ -0,0 +1,16 @@ +#pragma once + +static const uint16_t movrx_program_instructions[] = { + // 0b1000_ssss_0001_yiii + 0x8018, // mov rxfifoy, isr + 0x8010, // mov rxfifo0, isr + 0x8011, // mov rxfifo1, isr + 0x8012, // mov rxfifo2, isr + 0x8013, // mov rxfifo3, isr + // 0b1000_ssss_1001_yiii + // 0x8098, // mov osr, rxfifoy + // 0x8090, // mov osr, rxfifo0 + // 0x8091, // mov osr, rxfifo1 + // 0x8092, // mov osr, rxfifo2 + // 0x8093, // mov osr, rxfifo3 +};