Skip to content

Commit

Permalink
Add movrx comparison tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather committed Dec 20, 2024
1 parent d0a6bb0 commit 871c34e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
};

0 comments on commit 871c34e

Please sign in to comment.