Commit e036b85
Matt Davis
[IRON] PacketFifo: add end-to-end lowering tests against an aie.device context
Address review issue 5. The previous test suite covered the construction
surface, registry integration, and host-side behavioural simulation, but
didn't exercise PacketFifo.resolve() against a real MLIR context — so a
mismatch with the dialect's packetflow() signature would not have been
caught.
Add two new tests in test/iron/test_packet_fifo.py:
- test_resolve_emits_packetflow_op_in_module: builds a 2-producer /
1-consumer PacketFifo inside an aie.device body, calls resolve(),
and asserts the resulting MLIR contains 2 aie.packetflow ops (one
per producer).
- test_resolve_idempotent_does_not_emit_twice: verifies the resolve()
reentrancy guard.
Pattern mirrors the existing test_resolve_emits_cascade_flow_op_in_module
in test_cascade_fifo.py. Verified the call-site signature matches
dialects.aie.packetflow's __init__ (pkt_id, source, source_port,
source_channel, dests, keep_pkt_header).1 parent c14c5e2 commit e036b85
1 file changed
Lines changed: 70 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
0 commit comments