From 8d030ac65d932896a57e55ecaf9b453f52b4fc6a Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 12 Dec 2024 16:25:38 -0800 Subject: [PATCH] sim/interpreter: add addresses to instruction listing --- crates/fayalite/src/sim/interpreter.rs | 1 + .../tests/sim/expected/connect_const.txt | 6 +- .../sim/expected/connect_const_reset.txt | 12 +- .../tests/sim/expected/counter_async.txt | 38 ++-- .../tests/sim/expected/counter_sync.txt | 32 +-- crates/fayalite/tests/sim/expected/enums.txt | 202 +++++++++--------- crates/fayalite/tests/sim/expected/mod1.txt | 36 ++-- .../tests/sim/expected/shift_register.txt | 62 +++--- 8 files changed, 195 insertions(+), 194 deletions(-) diff --git a/crates/fayalite/src/sim/interpreter.rs b/crates/fayalite/src/sim/interpreter.rs index b2b8a4b..54645eb 100644 --- a/crates/fayalite/src/sim/interpreter.rs +++ b/crates/fayalite/src/sim/interpreter.rs @@ -565,6 +565,7 @@ impl fmt::Debug for InsnDebug<'_, BK> { if let Some(source_location) = self.source_location { writeln!(f, "// at: {source_location}")?; } + write!(f, "{}: ", self.address)?; self.insn.debug_fmt(f, self.labels, Some(self.state_layout)) } } diff --git a/crates/fayalite/tests/sim/expected/connect_const.txt b/crates/fayalite/tests/sim/expected/connect_const.txt index c3f8569..e527678 100644 --- a/crates/fayalite/tests/sim/expected/connect_const.txt +++ b/crates/fayalite/tests/sim/expected/connect_const.txt @@ -32,17 +32,17 @@ Simulation { }, insns: [ // at: module-XXXXXXXXXX.rs:1:1 - Const { + 0: Const { dest: StatePartIndex(1), // SlotDebugData { name: "", ty: UInt<8> }, value: 5, }, // at: module-XXXXXXXXXX.rs:3:1 - Copy { + 1: Copy { dest: StatePartIndex(0), // SlotDebugData { name: "InstantiatedModule(connect_const: connect_const).connect_const::o", ty: UInt<8> }, src: StatePartIndex(1), // SlotDebugData { name: "", ty: UInt<8> }, }, // at: module-XXXXXXXXXX.rs:1:1 - Return, + 2: Return, ], .. }, diff --git a/crates/fayalite/tests/sim/expected/connect_const_reset.txt b/crates/fayalite/tests/sim/expected/connect_const_reset.txt index 8494a13..f74dbec 100644 --- a/crates/fayalite/tests/sim/expected/connect_const_reset.txt +++ b/crates/fayalite/tests/sim/expected/connect_const_reset.txt @@ -44,31 +44,31 @@ Simulation { }, insns: [ // at: module-XXXXXXXXXX.rs:1:1 - Const { + 0: Const { dest: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, value: 1, }, - Copy { + 1: Copy { dest: StatePartIndex(3), // SlotDebugData { name: "", ty: AsyncReset }, src: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:4:1 - Copy { + 2: Copy { dest: StatePartIndex(0), // SlotDebugData { name: "InstantiatedModule(connect_const_reset: connect_const_reset).connect_const_reset::reset_out", ty: AsyncReset }, src: StatePartIndex(3), // SlotDebugData { name: "", ty: AsyncReset }, }, // at: module-XXXXXXXXXX.rs:1:1 - Copy { + 3: Copy { dest: StatePartIndex(4), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(0), // SlotDebugData { name: "InstantiatedModule(connect_const_reset: connect_const_reset).connect_const_reset::reset_out", ty: AsyncReset }, }, // at: module-XXXXXXXXXX.rs:5:1 - Copy { + 4: Copy { dest: StatePartIndex(1), // SlotDebugData { name: "InstantiatedModule(connect_const_reset: connect_const_reset).connect_const_reset::bit_out", ty: Bool }, src: StatePartIndex(4), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:1:1 - Return, + 5: Return, ], .. }, diff --git a/crates/fayalite/tests/sim/expected/counter_async.txt b/crates/fayalite/tests/sim/expected/counter_async.txt index ab379a1..b2bcd56 100644 --- a/crates/fayalite/tests/sim/expected/counter_async.txt +++ b/crates/fayalite/tests/sim/expected/counter_async.txt @@ -81,89 +81,89 @@ Simulation { }, insns: [ // at: module-XXXXXXXXXX.rs:1:1 - Const { + 0: Const { dest: StatePartIndex(7), // SlotDebugData { name: "", ty: UInt<1> }, value: 1, }, - Copy { + 1: Copy { dest: StatePartIndex(6), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(1), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::cd.rst", ty: AsyncReset }, }, // at: module-XXXXXXXXXX.rs:3:1 - IsNonZeroDestIsSmall { + 2: IsNonZeroDestIsSmall { dest: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(1), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::cd.rst", ty: AsyncReset }, }, // at: module-XXXXXXXXXX.rs:1:1 - Const { + 3: Const { dest: StatePartIndex(5), // SlotDebugData { name: "", ty: UInt<4> }, value: 3, }, // at: module-XXXXXXXXXX.rs:3:1 - BranchIfZero { + 4: BranchIfZero { target: 6, value: StatePartIndex(6), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 5: Copy { dest: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, src: StatePartIndex(5), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:1:1 - Add { + 6: Add { dest: StatePartIndex(8), // SlotDebugData { name: "", ty: UInt<5> }, lhs: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, rhs: StatePartIndex(7), // SlotDebugData { name: "", ty: UInt<1> }, }, - CastToUInt { + 7: CastToUInt { dest: StatePartIndex(9), // SlotDebugData { name: "", ty: UInt<4> }, src: StatePartIndex(8), // SlotDebugData { name: "", ty: UInt<5> }, dest_width: 4, }, // at: module-XXXXXXXXXX.rs:4:1 - Copy { + 8: Copy { dest: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg$next", ty: UInt<4> }, src: StatePartIndex(9), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:6:1 - Copy { + 9: Copy { dest: StatePartIndex(2), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count", ty: UInt<4> }, src: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:3:1 - IsNonZeroDestIsSmall { + 10: IsNonZeroDestIsSmall { dest: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(0), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::cd.clk", ty: Clock }, }, - AndSmall { + 11: AndSmall { dest: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, lhs: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, rhs: StatePartIndex(0), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallNonZero { + 12: BranchIfSmallNonZero { target: 16, value: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallZero { + 13: BranchIfSmallZero { target: 17, value: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 14: Copy { dest: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, src: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg$next", ty: UInt<4> }, }, - Branch { + 15: Branch { target: 17, }, - Copy { + 16: Copy { dest: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, src: StatePartIndex(5), // SlotDebugData { name: "", ty: UInt<4> }, }, - NotSmall { + 17: NotSmall { dest: StatePartIndex(0), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:1:1 - Return, + 18: Return, ], .. }, diff --git a/crates/fayalite/tests/sim/expected/counter_sync.txt b/crates/fayalite/tests/sim/expected/counter_sync.txt index 7006c1f..1615917 100644 --- a/crates/fayalite/tests/sim/expected/counter_sync.txt +++ b/crates/fayalite/tests/sim/expected/counter_sync.txt @@ -77,75 +77,75 @@ Simulation { }, insns: [ // at: module-XXXXXXXXXX.rs:6:1 - Copy { + 0: Copy { dest: StatePartIndex(2), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count", ty: UInt<4> }, src: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:1:1 - Const { + 1: Const { dest: StatePartIndex(6), // SlotDebugData { name: "", ty: UInt<1> }, value: 1, }, - Add { + 2: Add { dest: StatePartIndex(7), // SlotDebugData { name: "", ty: UInt<5> }, lhs: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, rhs: StatePartIndex(6), // SlotDebugData { name: "", ty: UInt<1> }, }, - CastToUInt { + 3: CastToUInt { dest: StatePartIndex(8), // SlotDebugData { name: "", ty: UInt<4> }, src: StatePartIndex(7), // SlotDebugData { name: "", ty: UInt<5> }, dest_width: 4, }, // at: module-XXXXXXXXXX.rs:4:1 - Copy { + 4: Copy { dest: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg$next", ty: UInt<4> }, src: StatePartIndex(8), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:3:1 - IsNonZeroDestIsSmall { + 5: IsNonZeroDestIsSmall { dest: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(1), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::cd.rst", ty: SyncReset }, }, // at: module-XXXXXXXXXX.rs:1:1 - Const { + 6: Const { dest: StatePartIndex(5), // SlotDebugData { name: "", ty: UInt<4> }, value: 3, }, // at: module-XXXXXXXXXX.rs:3:1 - IsNonZeroDestIsSmall { + 7: IsNonZeroDestIsSmall { dest: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(0), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::cd.clk", ty: Clock }, }, - AndSmall { + 8: AndSmall { dest: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, lhs: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, rhs: StatePartIndex(0), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallZero { + 9: BranchIfSmallZero { target: 14, value: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallNonZero { + 10: BranchIfSmallNonZero { target: 13, value: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 11: Copy { dest: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, src: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg$next", ty: UInt<4> }, }, - Branch { + 12: Branch { target: 14, }, - Copy { + 13: Copy { dest: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> }, src: StatePartIndex(5), // SlotDebugData { name: "", ty: UInt<4> }, }, - NotSmall { + 14: NotSmall { dest: StatePartIndex(0), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:1:1 - Return, + 15: Return, ], .. }, diff --git a/crates/fayalite/tests/sim/expected/enums.txt b/crates/fayalite/tests/sim/expected/enums.txt index f970c34..5f958ad 100644 --- a/crates/fayalite/tests/sim/expected/enums.txt +++ b/crates/fayalite/tests/sim/expected/enums.txt @@ -397,480 +397,480 @@ Simulation { }, insns: [ // at: module-XXXXXXXXXX.rs:1:1 - Const { + 0: Const { dest: StatePartIndex(72), // SlotDebugData { name: "", ty: UInt<4> }, value: 0, }, - SliceInt { + 1: SliceInt { dest: StatePartIndex(61), // SlotDebugData { name: "", ty: UInt<2> }, src: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::data_in", ty: UInt<4> }, start: 2, len: 2, }, - CastToSInt { + 2: CastToSInt { dest: StatePartIndex(62), // SlotDebugData { name: "", ty: SInt<2> }, src: StatePartIndex(61), // SlotDebugData { name: "", ty: UInt<2> }, dest_width: 2, }, - Const { + 3: Const { dest: StatePartIndex(54), // SlotDebugData { name: "", ty: UInt<2> }, value: 2, }, - SliceInt { + 4: SliceInt { dest: StatePartIndex(41), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::data_in", ty: UInt<4> }, start: 1, len: 1, }, - Copy { + 5: Copy { dest: StatePartIndex(42), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(41), // SlotDebugData { name: "", ty: UInt<1> }, }, - Copy { + 6: Copy { dest: StatePartIndex(60), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(42), // SlotDebugData { name: "", ty: Bool }, }, - SliceInt { + 7: SliceInt { dest: StatePartIndex(38), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::data_in", ty: UInt<4> }, start: 0, len: 1, }, - Copy { + 8: Copy { dest: StatePartIndex(39), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(38), // SlotDebugData { name: "", ty: UInt<1> }, }, - Copy { + 9: Copy { dest: StatePartIndex(40), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(39), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 10: Copy { dest: StatePartIndex(36), // SlotDebugData { name: ".0", ty: UInt<1> }, src: StatePartIndex(40), // SlotDebugData { name: "", ty: UInt<1> }, }, - Copy { + 11: Copy { dest: StatePartIndex(37), // SlotDebugData { name: ".1", ty: Bool }, src: StatePartIndex(42), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 12: Copy { dest: StatePartIndex(58), // SlotDebugData { name: "[0]", ty: UInt<1> }, src: StatePartIndex(40), // SlotDebugData { name: "", ty: UInt<1> }, }, - Copy { + 13: Copy { dest: StatePartIndex(59), // SlotDebugData { name: "[1]", ty: UInt<1> }, src: StatePartIndex(60), // SlotDebugData { name: "", ty: UInt<1> }, }, - Copy { + 14: Copy { dest: StatePartIndex(55), // SlotDebugData { name: ".a[0]", ty: UInt<1> }, src: StatePartIndex(58), // SlotDebugData { name: "[0]", ty: UInt<1> }, }, - Copy { + 15: Copy { dest: StatePartIndex(56), // SlotDebugData { name: ".a[1]", ty: UInt<1> }, src: StatePartIndex(59), // SlotDebugData { name: "[1]", ty: UInt<1> }, }, - Copy { + 16: Copy { dest: StatePartIndex(57), // SlotDebugData { name: ".b", ty: SInt<2> }, src: StatePartIndex(62), // SlotDebugData { name: "", ty: SInt<2> }, }, - Copy { + 17: Copy { dest: StatePartIndex(50), // SlotDebugData { name: ".0", ty: UInt<2> }, src: StatePartIndex(54), // SlotDebugData { name: "", ty: UInt<2> }, }, - Copy { + 18: Copy { dest: StatePartIndex(51), // SlotDebugData { name: ".1.a[0]", ty: UInt<1> }, src: StatePartIndex(55), // SlotDebugData { name: ".a[0]", ty: UInt<1> }, }, - Copy { + 19: Copy { dest: StatePartIndex(52), // SlotDebugData { name: ".1.a[1]", ty: UInt<1> }, src: StatePartIndex(56), // SlotDebugData { name: ".a[1]", ty: UInt<1> }, }, - Copy { + 20: Copy { dest: StatePartIndex(53), // SlotDebugData { name: ".1.b", ty: SInt<2> }, src: StatePartIndex(57), // SlotDebugData { name: ".b", ty: SInt<2> }, }, - Shl { + 21: Shl { dest: StatePartIndex(63), // SlotDebugData { name: "", ty: UInt<2> }, lhs: StatePartIndex(52), // SlotDebugData { name: ".1.a[1]", ty: UInt<1> }, rhs: 1, }, - Or { + 22: Or { dest: StatePartIndex(64), // SlotDebugData { name: "", ty: UInt<2> }, lhs: StatePartIndex(51), // SlotDebugData { name: ".1.a[0]", ty: UInt<1> }, rhs: StatePartIndex(63), // SlotDebugData { name: "", ty: UInt<2> }, }, - CastToUInt { + 23: CastToUInt { dest: StatePartIndex(65), // SlotDebugData { name: "", ty: UInt<2> }, src: StatePartIndex(53), // SlotDebugData { name: ".1.b", ty: SInt<2> }, dest_width: 2, }, - Shl { + 24: Shl { dest: StatePartIndex(66), // SlotDebugData { name: "", ty: UInt<4> }, lhs: StatePartIndex(65), // SlotDebugData { name: "", ty: UInt<2> }, rhs: 2, }, - Or { + 25: Or { dest: StatePartIndex(67), // SlotDebugData { name: "", ty: UInt<4> }, lhs: StatePartIndex(64), // SlotDebugData { name: "", ty: UInt<2> }, rhs: StatePartIndex(66), // SlotDebugData { name: "", ty: UInt<4> }, }, - Shl { + 26: Shl { dest: StatePartIndex(68), // SlotDebugData { name: "", ty: UInt<6> }, lhs: StatePartIndex(67), // SlotDebugData { name: "", ty: UInt<4> }, rhs: 2, }, - Or { + 27: Or { dest: StatePartIndex(69), // SlotDebugData { name: "", ty: UInt<6> }, lhs: StatePartIndex(50), // SlotDebugData { name: ".0", ty: UInt<2> }, rhs: StatePartIndex(68), // SlotDebugData { name: "", ty: UInt<6> }, }, - CastToUInt { + 28: CastToUInt { dest: StatePartIndex(70), // SlotDebugData { name: "", ty: UInt<6> }, src: StatePartIndex(69), // SlotDebugData { name: "", ty: UInt<6> }, dest_width: 6, }, - Copy { + 29: Copy { dest: StatePartIndex(71), // SlotDebugData { name: "", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, src: StatePartIndex(70), // SlotDebugData { name: "", ty: UInt<6> }, }, - Const { + 30: Const { dest: StatePartIndex(31), // SlotDebugData { name: "", ty: UInt<2> }, value: 1, }, - CmpEq { + 31: CmpEq { dest: StatePartIndex(32), // SlotDebugData { name: "", ty: Bool }, lhs: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::which_in", ty: UInt<2> }, rhs: StatePartIndex(31), // SlotDebugData { name: "", ty: UInt<2> }, }, - Copy { + 32: Copy { dest: StatePartIndex(33), // SlotDebugData { name: ".0", ty: UInt<2> }, src: StatePartIndex(31), // SlotDebugData { name: "", ty: UInt<2> }, }, - Copy { + 33: Copy { dest: StatePartIndex(34), // SlotDebugData { name: ".1.0", ty: UInt<1> }, src: StatePartIndex(36), // SlotDebugData { name: ".0", ty: UInt<1> }, }, - Copy { + 34: Copy { dest: StatePartIndex(35), // SlotDebugData { name: ".1.1", ty: Bool }, src: StatePartIndex(37), // SlotDebugData { name: ".1", ty: Bool }, }, - Copy { + 35: Copy { dest: StatePartIndex(43), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(35), // SlotDebugData { name: ".1.1", ty: Bool }, }, - Shl { + 36: Shl { dest: StatePartIndex(44), // SlotDebugData { name: "", ty: UInt<2> }, lhs: StatePartIndex(43), // SlotDebugData { name: "", ty: UInt<1> }, rhs: 1, }, - Or { + 37: Or { dest: StatePartIndex(45), // SlotDebugData { name: "", ty: UInt<2> }, lhs: StatePartIndex(34), // SlotDebugData { name: ".1.0", ty: UInt<1> }, rhs: StatePartIndex(44), // SlotDebugData { name: "", ty: UInt<2> }, }, - Shl { + 38: Shl { dest: StatePartIndex(46), // SlotDebugData { name: "", ty: UInt<4> }, lhs: StatePartIndex(45), // SlotDebugData { name: "", ty: UInt<2> }, rhs: 2, }, - Or { + 39: Or { dest: StatePartIndex(47), // SlotDebugData { name: "", ty: UInt<4> }, lhs: StatePartIndex(33), // SlotDebugData { name: ".0", ty: UInt<2> }, rhs: StatePartIndex(46), // SlotDebugData { name: "", ty: UInt<4> }, }, - CastToUInt { + 40: CastToUInt { dest: StatePartIndex(48), // SlotDebugData { name: "", ty: UInt<6> }, src: StatePartIndex(47), // SlotDebugData { name: "", ty: UInt<4> }, dest_width: 6, }, - Copy { + 41: Copy { dest: StatePartIndex(49), // SlotDebugData { name: "", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, src: StatePartIndex(48), // SlotDebugData { name: "", ty: UInt<6> }, }, - Const { + 42: Const { dest: StatePartIndex(29), // SlotDebugData { name: "", ty: UInt<2> }, value: 0, }, - CmpEq { + 43: CmpEq { dest: StatePartIndex(30), // SlotDebugData { name: "", ty: Bool }, lhs: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::which_in", ty: UInt<2> }, rhs: StatePartIndex(29), // SlotDebugData { name: "", ty: UInt<2> }, }, - Copy { + 44: Copy { dest: StatePartIndex(13), // SlotDebugData { name: "", ty: UInt<6> }, src: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::the_reg", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, }, - SliceInt { + 45: SliceInt { dest: StatePartIndex(14), // SlotDebugData { name: "", ty: UInt<2> }, src: StatePartIndex(13), // SlotDebugData { name: "", ty: UInt<6> }, start: 2, len: 2, }, - SliceInt { + 46: SliceInt { dest: StatePartIndex(15), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(14), // SlotDebugData { name: "", ty: UInt<2> }, start: 0, len: 1, }, - SliceInt { + 47: SliceInt { dest: StatePartIndex(16), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(14), // SlotDebugData { name: "", ty: UInt<2> }, start: 1, len: 1, }, - Copy { + 48: Copy { dest: StatePartIndex(17), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(16), // SlotDebugData { name: "", ty: UInt<1> }, }, - Copy { + 49: Copy { dest: StatePartIndex(11), // SlotDebugData { name: ".0", ty: UInt<1> }, src: StatePartIndex(15), // SlotDebugData { name: "", ty: UInt<1> }, }, - Copy { + 50: Copy { dest: StatePartIndex(12), // SlotDebugData { name: ".1", ty: Bool }, src: StatePartIndex(17), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 51: Copy { dest: StatePartIndex(73), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(12), // SlotDebugData { name: ".1", ty: Bool }, }, - Shl { + 52: Shl { dest: StatePartIndex(74), // SlotDebugData { name: "", ty: UInt<2> }, lhs: StatePartIndex(73), // SlotDebugData { name: "", ty: UInt<1> }, rhs: 1, }, - Or { + 53: Or { dest: StatePartIndex(75), // SlotDebugData { name: "", ty: UInt<2> }, lhs: StatePartIndex(11), // SlotDebugData { name: ".0", ty: UInt<1> }, rhs: StatePartIndex(74), // SlotDebugData { name: "", ty: UInt<2> }, }, - CastToUInt { + 54: CastToUInt { dest: StatePartIndex(76), // SlotDebugData { name: "", ty: UInt<4> }, src: StatePartIndex(75), // SlotDebugData { name: "", ty: UInt<2> }, dest_width: 4, }, - SliceInt { + 55: SliceInt { dest: StatePartIndex(23), // SlotDebugData { name: "", ty: UInt<4> }, src: StatePartIndex(13), // SlotDebugData { name: "", ty: UInt<6> }, start: 2, len: 4, }, - SliceInt { + 56: SliceInt { dest: StatePartIndex(24), // SlotDebugData { name: "", ty: UInt<2> }, src: StatePartIndex(23), // SlotDebugData { name: "", ty: UInt<4> }, start: 0, len: 2, }, - SliceInt { + 57: SliceInt { dest: StatePartIndex(25), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(24), // SlotDebugData { name: "", ty: UInt<2> }, start: 0, len: 1, }, - SliceInt { + 58: SliceInt { dest: StatePartIndex(26), // SlotDebugData { name: "", ty: UInt<1> }, src: StatePartIndex(24), // SlotDebugData { name: "", ty: UInt<2> }, start: 1, len: 1, }, - Copy { + 59: Copy { dest: StatePartIndex(21), // SlotDebugData { name: "[0]", ty: UInt<1> }, src: StatePartIndex(25), // SlotDebugData { name: "", ty: UInt<1> }, }, - Copy { + 60: Copy { dest: StatePartIndex(22), // SlotDebugData { name: "[1]", ty: UInt<1> }, src: StatePartIndex(26), // SlotDebugData { name: "", ty: UInt<1> }, }, - SliceInt { + 61: SliceInt { dest: StatePartIndex(27), // SlotDebugData { name: "", ty: UInt<2> }, src: StatePartIndex(23), // SlotDebugData { name: "", ty: UInt<4> }, start: 2, len: 2, }, - CastToSInt { + 62: CastToSInt { dest: StatePartIndex(28), // SlotDebugData { name: "", ty: SInt<2> }, src: StatePartIndex(27), // SlotDebugData { name: "", ty: UInt<2> }, dest_width: 2, }, - Copy { + 63: Copy { dest: StatePartIndex(18), // SlotDebugData { name: ".a[0]", ty: UInt<1> }, src: StatePartIndex(21), // SlotDebugData { name: "[0]", ty: UInt<1> }, }, - Copy { + 64: Copy { dest: StatePartIndex(19), // SlotDebugData { name: ".a[1]", ty: UInt<1> }, src: StatePartIndex(22), // SlotDebugData { name: "[1]", ty: UInt<1> }, }, - Copy { + 65: Copy { dest: StatePartIndex(20), // SlotDebugData { name: ".b", ty: SInt<2> }, src: StatePartIndex(28), // SlotDebugData { name: "", ty: SInt<2> }, }, - Shl { + 66: Shl { dest: StatePartIndex(77), // SlotDebugData { name: "", ty: UInt<2> }, lhs: StatePartIndex(19), // SlotDebugData { name: ".a[1]", ty: UInt<1> }, rhs: 1, }, - Or { + 67: Or { dest: StatePartIndex(78), // SlotDebugData { name: "", ty: UInt<2> }, lhs: StatePartIndex(18), // SlotDebugData { name: ".a[0]", ty: UInt<1> }, rhs: StatePartIndex(77), // SlotDebugData { name: "", ty: UInt<2> }, }, - CastToUInt { + 68: CastToUInt { dest: StatePartIndex(79), // SlotDebugData { name: "", ty: UInt<2> }, src: StatePartIndex(20), // SlotDebugData { name: ".b", ty: SInt<2> }, dest_width: 2, }, - Shl { + 69: Shl { dest: StatePartIndex(80), // SlotDebugData { name: "", ty: UInt<4> }, lhs: StatePartIndex(79), // SlotDebugData { name: "", ty: UInt<2> }, rhs: 2, }, - Or { + 70: Or { dest: StatePartIndex(81), // SlotDebugData { name: "", ty: UInt<4> }, lhs: StatePartIndex(78), // SlotDebugData { name: "", ty: UInt<2> }, rhs: StatePartIndex(80), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:8:1 - AndBigWithSmallImmediate { + 71: AndBigWithSmallImmediate { dest: StatePartIndex(4), // SlotDebugData { name: "", ty: Enum {A, B, C} }, lhs: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::the_reg", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, rhs: 3, }, // at: module-XXXXXXXXXX.rs:15:1 - BranchIfSmallNeImmediate { + 72: BranchIfSmallNeImmediate { target: 75, lhs: StatePartIndex(4), // SlotDebugData { name: "", ty: Enum {A, B, C} }, rhs: 0, }, // at: module-XXXXXXXXXX.rs:16:1 - Copy { + 73: Copy { dest: StatePartIndex(5), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::which_out", ty: UInt<2> }, src: StatePartIndex(29), // SlotDebugData { name: "", ty: UInt<2> }, }, // at: module-XXXXXXXXXX.rs:17:1 - Copy { + 74: Copy { dest: StatePartIndex(6), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::data_out", ty: UInt<4> }, src: StatePartIndex(72), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:15:1 - BranchIfSmallNeImmediate { + 75: BranchIfSmallNeImmediate { target: 78, lhs: StatePartIndex(4), // SlotDebugData { name: "", ty: Enum {A, B, C} }, rhs: 1, }, // at: module-XXXXXXXXXX.rs:18:1 - Copy { + 76: Copy { dest: StatePartIndex(5), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::which_out", ty: UInt<2> }, src: StatePartIndex(31), // SlotDebugData { name: "", ty: UInt<2> }, }, // at: module-XXXXXXXXXX.rs:19:1 - Copy { + 77: Copy { dest: StatePartIndex(6), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::data_out", ty: UInt<4> }, src: StatePartIndex(76), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:15:1 - BranchIfSmallNeImmediate { + 78: BranchIfSmallNeImmediate { target: 81, lhs: StatePartIndex(4), // SlotDebugData { name: "", ty: Enum {A, B, C} }, rhs: 2, }, // at: module-XXXXXXXXXX.rs:20:1 - Copy { + 79: Copy { dest: StatePartIndex(5), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::which_out", ty: UInt<2> }, src: StatePartIndex(54), // SlotDebugData { name: "", ty: UInt<2> }, }, // at: module-XXXXXXXXXX.rs:21:1 - Copy { + 80: Copy { dest: StatePartIndex(6), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::data_out", ty: UInt<4> }, src: StatePartIndex(81), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:8:1 - IsNonZeroDestIsSmall { + 81: IsNonZeroDestIsSmall { dest: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(1), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::cd.rst", ty: SyncReset }, }, // at: module-XXXXXXXXXX.rs:1:1 - Const { + 82: Const { dest: StatePartIndex(9), // SlotDebugData { name: "", ty: UInt<6> }, value: 0, }, - Copy { + 83: Copy { dest: StatePartIndex(10), // SlotDebugData { name: "", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, src: StatePartIndex(9), // SlotDebugData { name: "", ty: UInt<6> }, }, // at: module-XXXXXXXXXX.rs:9:1 - BranchIfZero { + 84: BranchIfZero { target: 92, value: StatePartIndex(2), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::en", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:10:1 - BranchIfZero { + 85: BranchIfZero { target: 87, value: StatePartIndex(30), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:11:1 - Copy { + 86: Copy { dest: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::the_reg$next", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, src: StatePartIndex(10), // SlotDebugData { name: "", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, }, // at: module-XXXXXXXXXX.rs:10:1 - BranchIfNonZero { + 87: BranchIfNonZero { target: 92, value: StatePartIndex(30), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:12:1 - BranchIfZero { + 88: BranchIfZero { target: 90, value: StatePartIndex(32), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:13:1 - Copy { + 89: Copy { dest: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::the_reg$next", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, src: StatePartIndex(49), // SlotDebugData { name: "", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, }, // at: module-XXXXXXXXXX.rs:12:1 - BranchIfNonZero { + 90: BranchIfNonZero { target: 92, value: StatePartIndex(32), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:14:1 - Copy { + 91: Copy { dest: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::the_reg$next", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, src: StatePartIndex(71), // SlotDebugData { name: "", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, }, // at: module-XXXXXXXXXX.rs:8:1 - IsNonZeroDestIsSmall { + 92: IsNonZeroDestIsSmall { dest: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(0), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::cd.clk", ty: Clock }, }, - AndSmall { + 93: AndSmall { dest: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, lhs: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, rhs: StatePartIndex(0), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallZero { + 94: BranchIfSmallZero { target: 99, value: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallNonZero { + 95: BranchIfSmallNonZero { target: 98, value: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 96: Copy { dest: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::the_reg", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, src: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::the_reg$next", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, }, - Branch { + 97: Branch { target: 99, }, - Copy { + 98: Copy { dest: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(enums: enums).enums::the_reg", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, src: StatePartIndex(10), // SlotDebugData { name: "", ty: Enum {A, B(Bundle {0: UInt<1>, 1: Bool}), C(Bundle {a: Array, 2>, b: SInt<2>})} }, }, - NotSmall { + 99: NotSmall { dest: StatePartIndex(0), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:1:1 - Return, + 100: Return, ], .. }, diff --git a/crates/fayalite/tests/sim/expected/mod1.txt b/crates/fayalite/tests/sim/expected/mod1.txt index 2625acf..8c68108 100644 --- a/crates/fayalite/tests/sim/expected/mod1.txt +++ b/crates/fayalite/tests/sim/expected/mod1.txt @@ -92,90 +92,90 @@ Simulation { }, insns: [ // at: module-XXXXXXXXXX.rs:4:1 - Copy { + 0: Copy { dest: StatePartIndex(6), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::child.i2", ty: SInt<2> }, src: StatePartIndex(2), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::o.i2", ty: SInt<2> }, }, - Copy { + 1: Copy { dest: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::child.i", ty: UInt<4> }, src: StatePartIndex(0), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::o.i", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:2:1 - Copy { + 2: Copy { dest: StatePartIndex(10), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::i2", ty: SInt<2> }, src: StatePartIndex(6), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::child.i2", ty: SInt<2> }, }, - Copy { + 3: Copy { dest: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::i", ty: UInt<4> }, src: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::child.i", ty: UInt<4> }, }, // at: module-XXXXXXXXXX-2.rs:1:1 - Const { + 4: Const { dest: StatePartIndex(16), // SlotDebugData { name: "", ty: UInt<4> }, value: 15, }, - Const { + 5: Const { dest: StatePartIndex(14), // SlotDebugData { name: "", ty: UInt<4> }, value: 5, }, - CmpLt { + 6: CmpLt { dest: StatePartIndex(15), // SlotDebugData { name: "", ty: Bool }, lhs: StatePartIndex(14), // SlotDebugData { name: "", ty: UInt<4> }, rhs: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::i", ty: UInt<4> }, }, - CastToUInt { + 7: CastToUInt { dest: StatePartIndex(13), // SlotDebugData { name: "", ty: UInt<4> }, src: StatePartIndex(10), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::i2", ty: SInt<2> }, dest_width: 4, }, // at: module-XXXXXXXXXX-2.rs:7:1 - Copy { + 8: Copy { dest: StatePartIndex(11), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::o2", ty: UInt<4> }, src: StatePartIndex(13), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX-2.rs:8:1 - BranchIfZero { + 9: BranchIfZero { target: 11, value: StatePartIndex(15), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX-2.rs:9:1 - Copy { + 10: Copy { dest: StatePartIndex(11), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::o2", ty: UInt<4> }, src: StatePartIndex(16), // SlotDebugData { name: "", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:2:1 - Copy { + 11: Copy { dest: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::child.o2", ty: UInt<4> }, src: StatePartIndex(11), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::o2", ty: UInt<4> }, }, // at: module-XXXXXXXXXX.rs:4:1 - Copy { + 12: Copy { dest: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::o.o2", ty: UInt<4> }, src: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::child.o2", ty: UInt<4> }, }, // at: module-XXXXXXXXXX-2.rs:1:1 - CastToSInt { + 13: CastToSInt { dest: StatePartIndex(12), // SlotDebugData { name: "", ty: SInt<2> }, src: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::i", ty: UInt<4> }, dest_width: 2, }, // at: module-XXXXXXXXXX-2.rs:6:1 - Copy { + 14: Copy { dest: StatePartIndex(9), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::o", ty: SInt<2> }, src: StatePartIndex(12), // SlotDebugData { name: "", ty: SInt<2> }, }, // at: module-XXXXXXXXXX.rs:2:1 - Copy { + 15: Copy { dest: StatePartIndex(5), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::child.o", ty: SInt<2> }, src: StatePartIndex(9), // SlotDebugData { name: "InstantiatedModule(mod1.child: mod1_child).mod1_child::o", ty: SInt<2> }, }, // at: module-XXXXXXXXXX.rs:4:1 - Copy { + 16: Copy { dest: StatePartIndex(1), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::o.o", ty: SInt<2> }, src: StatePartIndex(5), // SlotDebugData { name: "InstantiatedModule(mod1: mod1).mod1::child.o", ty: SInt<2> }, }, // at: module-XXXXXXXXXX.rs:1:1 - Return, + 17: Return, ], .. }, diff --git a/crates/fayalite/tests/sim/expected/shift_register.txt b/crates/fayalite/tests/sim/expected/shift_register.txt index e33891c..007c15b 100644 --- a/crates/fayalite/tests/sim/expected/shift_register.txt +++ b/crates/fayalite/tests/sim/expected/shift_register.txt @@ -93,136 +93,136 @@ Simulation { }, insns: [ // at: module-XXXXXXXXXX.rs:13:1 - Copy { + 0: Copy { dest: StatePartIndex(3), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::q", ty: Bool }, src: StatePartIndex(11), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg3", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:12:1 - Copy { + 1: Copy { dest: StatePartIndex(12), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg3$next", ty: Bool }, src: StatePartIndex(9), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg2", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:10:1 - Copy { + 2: Copy { dest: StatePartIndex(10), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg2$next", ty: Bool }, src: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg1", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:8:1 - Copy { + 3: Copy { dest: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg1$next", ty: Bool }, src: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg0", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:6:1 - Copy { + 4: Copy { dest: StatePartIndex(5), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg0$next", ty: Bool }, src: StatePartIndex(2), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::d", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:5:1 - IsNonZeroDestIsSmall { + 5: IsNonZeroDestIsSmall { dest: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(1), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::cd.rst", ty: SyncReset }, }, // at: module-XXXXXXXXXX.rs:1:1 - Const { + 6: Const { dest: StatePartIndex(6), // SlotDebugData { name: "", ty: Bool }, value: 0, }, // at: module-XXXXXXXXXX.rs:5:1 - IsNonZeroDestIsSmall { + 7: IsNonZeroDestIsSmall { dest: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(0), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::cd.clk", ty: Clock }, }, - AndSmall { + 8: AndSmall { dest: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, lhs: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, rhs: StatePartIndex(0), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallZero { + 9: BranchIfSmallZero { target: 14, value: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallNonZero { + 10: BranchIfSmallNonZero { target: 13, value: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 11: Copy { dest: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg0", ty: Bool }, src: StatePartIndex(5), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg0$next", ty: Bool }, }, - Branch { + 12: Branch { target: 14, }, - Copy { + 13: Copy { dest: StatePartIndex(4), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg0", ty: Bool }, src: StatePartIndex(6), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:7:1 - BranchIfSmallZero { + 14: BranchIfSmallZero { target: 19, value: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallNonZero { + 15: BranchIfSmallNonZero { target: 18, value: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 16: Copy { dest: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg1", ty: Bool }, src: StatePartIndex(8), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg1$next", ty: Bool }, }, - Branch { + 17: Branch { target: 19, }, - Copy { + 18: Copy { dest: StatePartIndex(7), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg1", ty: Bool }, src: StatePartIndex(6), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:9:1 - BranchIfSmallZero { + 19: BranchIfSmallZero { target: 24, value: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallNonZero { + 20: BranchIfSmallNonZero { target: 23, value: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 21: Copy { dest: StatePartIndex(9), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg2", ty: Bool }, src: StatePartIndex(10), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg2$next", ty: Bool }, }, - Branch { + 22: Branch { target: 24, }, - Copy { + 23: Copy { dest: StatePartIndex(9), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg2", ty: Bool }, src: StatePartIndex(6), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:11:1 - BranchIfSmallZero { + 24: BranchIfSmallZero { target: 29, value: StatePartIndex(1), // SlotDebugData { name: "", ty: Bool }, }, - BranchIfSmallNonZero { + 25: BranchIfSmallNonZero { target: 28, value: StatePartIndex(3), // SlotDebugData { name: "", ty: Bool }, }, - Copy { + 26: Copy { dest: StatePartIndex(11), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg3", ty: Bool }, src: StatePartIndex(12), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg3$next", ty: Bool }, }, - Branch { + 27: Branch { target: 29, }, - Copy { + 28: Copy { dest: StatePartIndex(11), // SlotDebugData { name: "InstantiatedModule(shift_register: shift_register).shift_register::reg3", ty: Bool }, src: StatePartIndex(6), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:5:1 - NotSmall { + 29: NotSmall { dest: StatePartIndex(0), // SlotDebugData { name: "", ty: Bool }, src: StatePartIndex(2), // SlotDebugData { name: "", ty: Bool }, }, // at: module-XXXXXXXXXX.rs:1:1 - Return, + 30: Return, ], .. },