forked from libre-chip/fayalite
520 lines
20 KiB
Plaintext
520 lines
20 KiB
Plaintext
Simulation {
|
|
state: State {
|
|
insns: Insns {
|
|
state_layout: StateLayout {
|
|
ty: TypeLayout {
|
|
small_slots: StatePartLayout<SmallSlots> {
|
|
len: 4,
|
|
debug_data: [
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: Bool,
|
|
},
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: Bool,
|
|
},
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: Bool,
|
|
},
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: Bool,
|
|
},
|
|
],
|
|
..
|
|
},
|
|
big_slots: StatePartLayout<BigSlots> {
|
|
len: 10,
|
|
debug_data: [
|
|
SlotDebugData {
|
|
name: "InstantiatedModule(counter: counter).counter::cd.clk",
|
|
ty: Clock,
|
|
},
|
|
SlotDebugData {
|
|
name: "InstantiatedModule(counter: counter).counter::cd.rst",
|
|
ty: AsyncReset,
|
|
},
|
|
SlotDebugData {
|
|
name: "InstantiatedModule(counter: counter).counter::count",
|
|
ty: UInt<4>,
|
|
},
|
|
SlotDebugData {
|
|
name: "InstantiatedModule(counter: counter).counter::count_reg",
|
|
ty: UInt<4>,
|
|
},
|
|
SlotDebugData {
|
|
name: "InstantiatedModule(counter: counter).counter::count_reg$next",
|
|
ty: UInt<4>,
|
|
},
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: UInt<4>,
|
|
},
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: Bool,
|
|
},
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: UInt<1>,
|
|
},
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: UInt<5>,
|
|
},
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: UInt<4>,
|
|
},
|
|
],
|
|
..
|
|
},
|
|
},
|
|
memories: StatePartLayout<Memories> {
|
|
len: 0,
|
|
debug_data: [],
|
|
layout_data: [],
|
|
..
|
|
},
|
|
},
|
|
insns: [
|
|
// at: module-XXXXXXXXXX.rs:1:1
|
|
Const {
|
|
dest: StatePartIndex<BigSlots>(7), // SlotDebugData { name: "", ty: UInt<1> },
|
|
value: 1,
|
|
},
|
|
Copy {
|
|
dest: StatePartIndex<BigSlots>(6), // SlotDebugData { name: "", ty: Bool },
|
|
src: StatePartIndex<BigSlots>(1), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::cd.rst", ty: AsyncReset },
|
|
},
|
|
// at: module-XXXXXXXXXX.rs:3:1
|
|
IsNonZeroDestIsSmall {
|
|
dest: StatePartIndex<SmallSlots>(3), // SlotDebugData { name: "", ty: Bool },
|
|
src: StatePartIndex<BigSlots>(1), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::cd.rst", ty: AsyncReset },
|
|
},
|
|
// at: module-XXXXXXXXXX.rs:1:1
|
|
Const {
|
|
dest: StatePartIndex<BigSlots>(5), // SlotDebugData { name: "", ty: UInt<4> },
|
|
value: 3,
|
|
},
|
|
// at: module-XXXXXXXXXX.rs:3:1
|
|
BranchIfZero {
|
|
target: 6,
|
|
value: StatePartIndex<BigSlots>(6), // SlotDebugData { name: "", ty: Bool },
|
|
},
|
|
Copy {
|
|
dest: StatePartIndex<BigSlots>(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> },
|
|
src: StatePartIndex<BigSlots>(5), // SlotDebugData { name: "", ty: UInt<4> },
|
|
},
|
|
// at: module-XXXXXXXXXX.rs:1:1
|
|
Add {
|
|
dest: StatePartIndex<BigSlots>(8), // SlotDebugData { name: "", ty: UInt<5> },
|
|
lhs: StatePartIndex<BigSlots>(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> },
|
|
rhs: StatePartIndex<BigSlots>(7), // SlotDebugData { name: "", ty: UInt<1> },
|
|
},
|
|
CastToUInt {
|
|
dest: StatePartIndex<BigSlots>(9), // SlotDebugData { name: "", ty: UInt<4> },
|
|
src: StatePartIndex<BigSlots>(8), // SlotDebugData { name: "", ty: UInt<5> },
|
|
dest_width: 4,
|
|
},
|
|
// at: module-XXXXXXXXXX.rs:4:1
|
|
Copy {
|
|
dest: StatePartIndex<BigSlots>(4), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg$next", ty: UInt<4> },
|
|
src: StatePartIndex<BigSlots>(9), // SlotDebugData { name: "", ty: UInt<4> },
|
|
},
|
|
// at: module-XXXXXXXXXX.rs:6:1
|
|
Copy {
|
|
dest: StatePartIndex<BigSlots>(2), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count", ty: UInt<4> },
|
|
src: StatePartIndex<BigSlots>(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> },
|
|
},
|
|
// at: module-XXXXXXXXXX.rs:3:1
|
|
IsNonZeroDestIsSmall {
|
|
dest: StatePartIndex<SmallSlots>(2), // SlotDebugData { name: "", ty: Bool },
|
|
src: StatePartIndex<BigSlots>(0), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::cd.clk", ty: Clock },
|
|
},
|
|
AndSmall {
|
|
dest: StatePartIndex<SmallSlots>(1), // SlotDebugData { name: "", ty: Bool },
|
|
lhs: StatePartIndex<SmallSlots>(2), // SlotDebugData { name: "", ty: Bool },
|
|
rhs: StatePartIndex<SmallSlots>(0), // SlotDebugData { name: "", ty: Bool },
|
|
},
|
|
BranchIfSmallNonZero {
|
|
target: 16,
|
|
value: StatePartIndex<SmallSlots>(3), // SlotDebugData { name: "", ty: Bool },
|
|
},
|
|
BranchIfSmallZero {
|
|
target: 17,
|
|
value: StatePartIndex<SmallSlots>(1), // SlotDebugData { name: "", ty: Bool },
|
|
},
|
|
Copy {
|
|
dest: StatePartIndex<BigSlots>(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> },
|
|
src: StatePartIndex<BigSlots>(4), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg$next", ty: UInt<4> },
|
|
},
|
|
Branch {
|
|
target: 17,
|
|
},
|
|
Copy {
|
|
dest: StatePartIndex<BigSlots>(3), // SlotDebugData { name: "InstantiatedModule(counter: counter).counter::count_reg", ty: UInt<4> },
|
|
src: StatePartIndex<BigSlots>(5), // SlotDebugData { name: "", ty: UInt<4> },
|
|
},
|
|
NotSmall {
|
|
dest: StatePartIndex<SmallSlots>(0), // SlotDebugData { name: "", ty: Bool },
|
|
src: StatePartIndex<SmallSlots>(2), // SlotDebugData { name: "", ty: Bool },
|
|
},
|
|
// at: module-XXXXXXXXXX.rs:1:1
|
|
Return,
|
|
],
|
|
..
|
|
},
|
|
pc: 18,
|
|
memory_write_log: [],
|
|
memories: StatePart {
|
|
value: [],
|
|
},
|
|
small_slots: StatePart {
|
|
value: [
|
|
18446744073709551614,
|
|
0,
|
|
1,
|
|
0,
|
|
],
|
|
},
|
|
big_slots: StatePart {
|
|
value: [
|
|
1,
|
|
0,
|
|
3,
|
|
3,
|
|
4,
|
|
3,
|
|
0,
|
|
1,
|
|
4,
|
|
4,
|
|
],
|
|
},
|
|
},
|
|
io: Instance {
|
|
name: <simulator>::counter,
|
|
instantiated: Module {
|
|
name: counter,
|
|
..
|
|
},
|
|
},
|
|
uninitialized_inputs: {},
|
|
io_targets: {
|
|
Instance {
|
|
name: <simulator>::counter,
|
|
instantiated: Module {
|
|
name: counter,
|
|
..
|
|
},
|
|
}.cd: CompiledValue {
|
|
layout: CompiledTypeLayout {
|
|
ty: Bundle {
|
|
/* offset = 0 */
|
|
clk: Clock,
|
|
/* offset = 1 */
|
|
rst: AsyncReset,
|
|
},
|
|
layout: TypeLayout {
|
|
small_slots: StatePartLayout<SmallSlots> {
|
|
len: 0,
|
|
debug_data: [],
|
|
..
|
|
},
|
|
big_slots: StatePartLayout<BigSlots> {
|
|
len: 2,
|
|
debug_data: [
|
|
SlotDebugData {
|
|
name: "InstantiatedModule(counter: counter).counter::cd.clk",
|
|
ty: Clock,
|
|
},
|
|
SlotDebugData {
|
|
name: "InstantiatedModule(counter: counter).counter::cd.rst",
|
|
ty: AsyncReset,
|
|
},
|
|
],
|
|
..
|
|
},
|
|
},
|
|
body: Bundle {
|
|
fields: [
|
|
CompiledBundleField {
|
|
offset: TypeIndex {
|
|
small_slots: StatePartIndex<SmallSlots>(0),
|
|
big_slots: StatePartIndex<BigSlots>(0),
|
|
},
|
|
ty: CompiledTypeLayout {
|
|
ty: Clock,
|
|
layout: TypeLayout {
|
|
small_slots: StatePartLayout<SmallSlots> {
|
|
len: 0,
|
|
debug_data: [],
|
|
..
|
|
},
|
|
big_slots: StatePartLayout<BigSlots> {
|
|
len: 1,
|
|
debug_data: [
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: Clock,
|
|
},
|
|
],
|
|
..
|
|
},
|
|
},
|
|
body: Scalar,
|
|
},
|
|
},
|
|
CompiledBundleField {
|
|
offset: TypeIndex {
|
|
small_slots: StatePartIndex<SmallSlots>(0),
|
|
big_slots: StatePartIndex<BigSlots>(1),
|
|
},
|
|
ty: CompiledTypeLayout {
|
|
ty: AsyncReset,
|
|
layout: TypeLayout {
|
|
small_slots: StatePartLayout<SmallSlots> {
|
|
len: 0,
|
|
debug_data: [],
|
|
..
|
|
},
|
|
big_slots: StatePartLayout<BigSlots> {
|
|
len: 1,
|
|
debug_data: [
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: AsyncReset,
|
|
},
|
|
],
|
|
..
|
|
},
|
|
},
|
|
body: Scalar,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
range: TypeIndexRange {
|
|
small_slots: StatePartIndexRange<SmallSlots> { start: 0, len: 0 },
|
|
big_slots: StatePartIndexRange<BigSlots> { start: 0, len: 2 },
|
|
},
|
|
write: None,
|
|
},
|
|
Instance {
|
|
name: <simulator>::counter,
|
|
instantiated: Module {
|
|
name: counter,
|
|
..
|
|
},
|
|
}.cd.clk: CompiledValue {
|
|
layout: CompiledTypeLayout {
|
|
ty: Clock,
|
|
layout: TypeLayout {
|
|
small_slots: StatePartLayout<SmallSlots> {
|
|
len: 0,
|
|
debug_data: [],
|
|
..
|
|
},
|
|
big_slots: StatePartLayout<BigSlots> {
|
|
len: 1,
|
|
debug_data: [
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: Clock,
|
|
},
|
|
],
|
|
..
|
|
},
|
|
},
|
|
body: Scalar,
|
|
},
|
|
range: TypeIndexRange {
|
|
small_slots: StatePartIndexRange<SmallSlots> { start: 0, len: 0 },
|
|
big_slots: StatePartIndexRange<BigSlots> { start: 0, len: 1 },
|
|
},
|
|
write: None,
|
|
},
|
|
Instance {
|
|
name: <simulator>::counter,
|
|
instantiated: Module {
|
|
name: counter,
|
|
..
|
|
},
|
|
}.cd.rst: CompiledValue {
|
|
layout: CompiledTypeLayout {
|
|
ty: AsyncReset,
|
|
layout: TypeLayout {
|
|
small_slots: StatePartLayout<SmallSlots> {
|
|
len: 0,
|
|
debug_data: [],
|
|
..
|
|
},
|
|
big_slots: StatePartLayout<BigSlots> {
|
|
len: 1,
|
|
debug_data: [
|
|
SlotDebugData {
|
|
name: "",
|
|
ty: AsyncReset,
|
|
},
|
|
],
|
|
..
|
|
},
|
|
},
|
|
body: Scalar,
|
|
},
|
|
range: TypeIndexRange {
|
|
small_slots: StatePartIndexRange<SmallSlots> { start: 0, len: 0 },
|
|
big_slots: StatePartIndexRange<BigSlots> { start: 1, len: 1 },
|
|
},
|
|
write: None,
|
|
},
|
|
Instance {
|
|
name: <simulator>::counter,
|
|
instantiated: Module {
|
|
name: counter,
|
|
..
|
|
},
|
|
}.count: CompiledValue {
|
|
layout: CompiledTypeLayout {
|
|
ty: UInt<4>,
|
|
layout: TypeLayout {
|
|
small_slots: StatePartLayout<SmallSlots> {
|
|
len: 0,
|
|
debug_data: [],
|
|
..
|
|
},
|
|
big_slots: StatePartLayout<BigSlots> {
|
|
len: 1,
|
|
debug_data: [
|
|
SlotDebugData {
|
|
name: "InstantiatedModule(counter: counter).counter::count",
|
|
ty: UInt<4>,
|
|
},
|
|
],
|
|
..
|
|
},
|
|
},
|
|
body: Scalar,
|
|
},
|
|
range: TypeIndexRange {
|
|
small_slots: StatePartIndexRange<SmallSlots> { start: 0, len: 0 },
|
|
big_slots: StatePartIndexRange<BigSlots> { start: 2, len: 1 },
|
|
},
|
|
write: None,
|
|
},
|
|
},
|
|
made_initial_step: true,
|
|
needs_settle: false,
|
|
trace_decls: TraceModule {
|
|
name: "counter",
|
|
children: [
|
|
TraceModuleIO {
|
|
name: "cd",
|
|
child: TraceBundle {
|
|
name: "cd",
|
|
fields: [
|
|
TraceClock {
|
|
location: TraceScalarId(0),
|
|
name: "clk",
|
|
flow: Source,
|
|
},
|
|
TraceAsyncReset {
|
|
location: TraceScalarId(1),
|
|
name: "rst",
|
|
flow: Source,
|
|
},
|
|
],
|
|
ty: Bundle {
|
|
/* offset = 0 */
|
|
clk: Clock,
|
|
/* offset = 1 */
|
|
rst: AsyncReset,
|
|
},
|
|
flow: Source,
|
|
},
|
|
ty: Bundle {
|
|
/* offset = 0 */
|
|
clk: Clock,
|
|
/* offset = 1 */
|
|
rst: AsyncReset,
|
|
},
|
|
flow: Source,
|
|
},
|
|
TraceModuleIO {
|
|
name: "count",
|
|
child: TraceUInt {
|
|
location: TraceScalarId(2),
|
|
name: "count",
|
|
ty: UInt<4>,
|
|
flow: Sink,
|
|
},
|
|
ty: UInt<4>,
|
|
flow: Sink,
|
|
},
|
|
TraceReg {
|
|
name: "count_reg",
|
|
child: TraceUInt {
|
|
location: TraceScalarId(3),
|
|
name: "count_reg",
|
|
ty: UInt<4>,
|
|
flow: Duplex,
|
|
},
|
|
ty: UInt<4>,
|
|
},
|
|
],
|
|
},
|
|
traces: [
|
|
SimTrace {
|
|
id: TraceScalarId(0),
|
|
kind: BigClock {
|
|
index: StatePartIndex<BigSlots>(0),
|
|
},
|
|
state: 0x1,
|
|
last_state: 0x1,
|
|
},
|
|
SimTrace {
|
|
id: TraceScalarId(1),
|
|
kind: BigAsyncReset {
|
|
index: StatePartIndex<BigSlots>(1),
|
|
},
|
|
state: 0x0,
|
|
last_state: 0x0,
|
|
},
|
|
SimTrace {
|
|
id: TraceScalarId(2),
|
|
kind: BigUInt {
|
|
index: StatePartIndex<BigSlots>(2),
|
|
ty: UInt<4>,
|
|
},
|
|
state: 0x3,
|
|
last_state: 0x2,
|
|
},
|
|
SimTrace {
|
|
id: TraceScalarId(3),
|
|
kind: BigUInt {
|
|
index: StatePartIndex<BigSlots>(3),
|
|
ty: UInt<4>,
|
|
},
|
|
state: 0x3,
|
|
last_state: 0x3,
|
|
},
|
|
],
|
|
trace_memories: {},
|
|
trace_writers: [
|
|
Running(
|
|
VcdWriter {
|
|
finished_init: true,
|
|
timescale: 1 ps,
|
|
..
|
|
},
|
|
),
|
|
],
|
|
instant: 66 μs,
|
|
clocks_triggered: [
|
|
StatePartIndex<SmallSlots>(1),
|
|
],
|
|
} |