diff --git a/test/Dialect/LLHD/Simulator/sim_arbitrary_signal_size.mlir b/test/Dialect/LLHD/Simulator/sim_arbitrary_signal_size.mlir deleted file mode 100644 index 95e45223e318..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_arbitrary_signal_size.mlir +++ /dev/null @@ -1,15 +0,0 @@ -// REQUIRES: llhd-sim -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// CHECK: 0ps 0d 0e root/bool 0x01 -// CHECK-NEXT: 0ps 0d 0e root/fair 0xff00 -// CHECK-NEXT: 0ps 0d 0e root/ginormous 0x000000000000000000000008727f6369aaf83ca15026747af8c7f196ce3f0ad2 - -hw.module @root() { - %small = hw.constant 1 : i1 - %r = hw.constant 0xff00 : i16 - %b = hw.constant 12345678901234567890123456789012345678901234567890 : i256 - %1 = llhd.sig "bool" %small : i1 - %2 = llhd.sig "fair" %r : i16 - %3 = llhd.sig "ginormous" %b : i256 -} diff --git a/test/Dialect/LLHD/Simulator/sim_bit_precision_drives.mlir b/test/Dialect/LLHD/Simulator/sim_bit_precision_drives.mlir deleted file mode 100644 index 2e6e8dac9f96..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_bit_precision_drives.mlir +++ /dev/null @@ -1,31 +0,0 @@ -// REQUIRES: llhd-sim -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// CHECK: 0ps 0d 0e root/sameByte 0xffffffff -// CHECK-NEXT: 0ps 0d 0e root/spanBytes 0xffffffff -// CHECK-NEXT: 0ps 0d 0e root/twoBytes 0x12345678 -// CHECK-NEXT: 1000ps 0d 0e root/sameByte 0xfffffffc -// CHECK-NEXT: 1000ps 0d 0e root/spanBytes 0xfffff00f -// CHECK-NEXT: 1000ps 0d 0e root/twoBytes 0x1234ffff -hw.module @root() { - %0 = hw.constant 0x12345678 : i32 - %1 = hw.constant 0xffffffff : i32 - %s0 = llhd.sig "twoBytes" %0 : i32 - %s1 = llhd.sig "spanBytes" %1 : i32 - %s2 = llhd.sig "sameByte" %1 : i32 - %c0 = hw.constant 0xffff : i16 - %c1 = hw.constant 0 : i8 - %c2 = hw.constant 0 : i1 - %2 = hw.constant 0 : i5 - %3 = hw.constant 1 : i5 - %4 = hw.constant 4 : i5 - %t = llhd.constant_time #llhd.time<1ns, 0d, 0e> - %e0 = llhd.sig.extract %s0 from %2 : (!hw.inout) -> !hw.inout - %e1 = llhd.sig.extract %s1 from %4 : (!hw.inout) -> !hw.inout - %e2 = llhd.sig.extract %s2 from %2 : (!hw.inout) -> !hw.inout - %e3 = llhd.sig.extract %s2 from %3 : (!hw.inout) -> !hw.inout - llhd.drv %e0, %c0 after %t : !hw.inout - llhd.drv %e1, %c1 after %t : !hw.inout - llhd.drv %e2, %c2 after %t : !hw.inout - llhd.drv %e3, %c2 after %t : !hw.inout -} diff --git a/test/Dialect/LLHD/Simulator/sim_comb_concat.mlir b/test/Dialect/LLHD/Simulator/sim_comb_concat.mlir deleted file mode 100644 index 826352d4dc47..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_comb_concat.mlir +++ /dev/null @@ -1,23 +0,0 @@ -// REQUIRES: llhd-sim -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// This test checks correct simulation of the following operations and ensures -// that the endianess semantics as described in the rationale are followed. -// * comb.concat - -// CHECK: 0ps 0d 0e root/int 0x00000000 -// CHECK-NEXT: 1000ps 0d 0e root/int 0x01020304 -hw.module @root() { - %init = hw.constant 0 : i32 - %0 = hw.constant 1 : i8 - %1 = hw.constant 2 : i8 - %2 = hw.constant 3 : i8 - %3 = hw.constant 4 : i8 - - %con = comb.concat %0, %1, %2, %3 : i8,i8,i8,i8 - %intsig = llhd.sig "int" %init : i32 - - %time = llhd.constant_time #llhd.time<1ns, 0d, 0e> - - llhd.drv %intsig, %con after %time : !hw.inout -} diff --git a/test/Dialect/LLHD/Simulator/sim_formats.mlir b/test/Dialect/LLHD/Simulator/sim_formats.mlir deleted file mode 100644 index 0d5665ac9dc2..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_formats.mlir +++ /dev/null @@ -1,115 +0,0 @@ -// REQUIRES: llhd-sim -// REQUIRES: llhd-sim-fixed -// RUN: llhd-sim %s -T 5000 --trace-format=full -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s --check-prefix=FULL -// RUN: llhd-sim %s -T 5000 --trace-format=reduced -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s --check-prefix=REDUCED -// RUN: llhd-sim %s -T 5000 --trace-format=merged -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s --check-prefix=MERGED -// RUN: llhd-sim %s -T 5000 --trace-format=merged-reduce -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s --check-prefix=MERGEDRED -// RUN: llhd-sim %s -T 5000 --trace-format=named-only -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s --check-prefix=NAMED - -// FULL: 0ps 0d 0e root/1 0x01 -// FULL: 0ps 0d 0e root/foo/s 0x01 -// FULL: 0ps 0d 0e root/s 0x01 -// FULL: 0ps 0d 1e root/foo/s 0x02 -// FULL: 0ps 0d 1e root/s 0x02 -// FULL: 0ps 0d 2e root/foo/s 0x03 -// FULL: 0ps 0d 2e root/s 0x03 -// FULL: 1000ps 0d 1e root/foo/s 0x06 -// FULL: 1000ps 0d 1e root/s 0x06 -// FULL: 1000ps 0d 2e root/foo/s 0x09 -// FULL: 1000ps 0d 2e root/s 0x09 -// FULL: 2000ps 0d 1e root/foo/s 0x12 -// FULL: 2000ps 0d 1e root/s 0x12 -// FULL: 2000ps 0d 2e root/foo/s 0x1b -// FULL: 2000ps 0d 2e root/s 0x1b -// FULL: 3000ps 0d 1e root/foo/s 0x36 -// FULL: 3000ps 0d 1e root/s 0x36 -// FULL: 3000ps 0d 2e root/foo/s 0x51 -// FULL: 3000ps 0d 2e root/s 0x51 -// FULL: 4000ps 0d 1e root/foo/s 0xa2 -// FULL: 4000ps 0d 1e root/s 0xa2 -// FULL: 4000ps 0d 2e root/foo/s 0xf3 -// FULL: 4000ps 0d 2e root/s 0xf3 -// FULL: 5000ps 0d 1e root/foo/s 0xe6 -// FULL: 5000ps 0d 1e root/s 0xe6 -// FULL: 5000ps 0d 2e root/foo/s 0xd9 -// FULL: 5000ps 0d 2e root/s 0xd9 - -// REDUCED: 0ps 0d 0e root/1 0x01 -// REDUCED: 0ps 0d 0e root/s 0x01 -// REDUCED: 0ps 0d 1e root/s 0x02 -// REDUCED: 0ps 0d 2e root/s 0x03 -// REDUCED: 1000ps 0d 1e root/s 0x06 -// REDUCED: 1000ps 0d 2e root/s 0x09 -// REDUCED: 2000ps 0d 1e root/s 0x12 -// REDUCED: 2000ps 0d 2e root/s 0x1b -// REDUCED: 3000ps 0d 1e root/s 0x36 -// REDUCED: 3000ps 0d 2e root/s 0x51 -// REDUCED: 4000ps 0d 1e root/s 0xa2 -// REDUCED: 4000ps 0d 2e root/s 0xf3 -// REDUCED: 5000ps 0d 1e root/s 0xe6 -// REDUCED: 5000ps 0d 2e root/s 0xd9 - -// MERGED: 0ps -// MERGED: root/1 0x01 -// MERGED: root/foo/s 0x03 -// MERGED: root/s 0x03 -// MERGED: 1000ps -// MERGED: root/foo/s 0x09 -// MERGED: root/s 0x09 -// MERGED: 2000ps -// MERGED: root/foo/s 0x1b -// MERGED: root/s 0x1b -// MERGED: 3000ps -// MERGED: root/foo/s 0x51 -// MERGED: root/s 0x51 -// MERGED: 4000ps -// MERGED: root/foo/s 0xf3 -// MERGED: root/s 0xf3 -// MERGED: 5000ps -// MERGED: root/foo/s 0xd9 -// MERGED: root/s 0xd9 - -// MERGEDRED: 0ps -// MERGEDRED: root/1 0x01 -// MERGEDRED: root/s 0x03 -// MERGEDRED: 1000ps -// MERGEDRED: root/s 0x09 -// MERGEDRED: 2000ps -// MERGEDRED: root/s 0x1b -// MERGEDRED: 3000ps -// MERGEDRED: root/s 0x51 -// MERGEDRED: 4000ps -// MERGEDRED: root/s 0xf3 -// MERGEDRED: 5000ps -// MERGEDRED: root/s 0xd9 - -// NAMED: 0ps -// NAMED: root/s 0x03 -// NAMED: 1000ps -// NAMED: root/s 0x09 -// NAMED: 2000ps -// NAMED: root/s 0x1b -// NAMED: 3000ps -// NAMED: root/s 0x51 -// NAMED: 4000ps -// NAMED: root/s 0xf3 -// NAMED: 5000ps -// NAMED: root/s 0xd9 -hw.module @root() { - %0 = hw.constant 1 : i8 - %s = llhd.sig "s" %0 : i8 - %1 = llhd.sig "1" %0 : i8 - llhd.process { - cf.br ^entry - ^entry: - %1 = llhd.prb %s : !hw.inout - %2 = comb.add %1, %1 : i8 - %t0 = llhd.constant_time #llhd.time<0ns, 0d, 1e> - llhd.drv %s, %2 after %t0 : !hw.inout - %3 = comb.add %2, %1 : i8 - %t1 = llhd.constant_time #llhd.time<0ns, 0d, 2e> - llhd.drv %s, %3 after %t1 : !hw.inout - %t2= llhd.constant_time #llhd.time<1ns, 0d, 0e> - llhd.wait for %t2, ^entry - } -} diff --git a/test/Dialect/LLHD/Simulator/sim_hw_array_get_concat.mlir b/test/Dialect/LLHD/Simulator/sim_hw_array_get_concat.mlir deleted file mode 100644 index b01548ad6d18..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_hw_array_get_concat.mlir +++ /dev/null @@ -1,50 +0,0 @@ -// REQUIRES: llhd-sim -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// This test checks correct simulation of the following operations and ensures -// that the endianess semantics as described in the rationale are followed. -// * hw.array_create -// * hw.array_slice -// * hw.array_get -// * hw.array_concat - -// CHECK: 0ps 0d 0e root/concat[0] 0x00 -// CHECK-NEXT: 0ps 0d 0e root/concat[1] 0x00 -// CHECK-NEXT: 0ps 0d 0e root/concat[2] 0x00 -// CHECK-NEXT: 0ps 0d 0e root/concat[3] 0x00 -// CHECK-NEXT: 0ps 0d 0e root/get 0x00 -// CHECK-NEXT: 0ps 0d 0e root/slice[0] 0x01 -// CHECK-NEXT: 0ps 0d 0e root/slice[1] 0x00 -// CHECK-NEXT: 1000ps 0d 0e root/concat[0] 0x03 -// CHECK-NEXT: 1000ps 0d 0e root/concat[1] 0x02 -// CHECK-NEXT: 1000ps 0d 0e root/concat[2] 0x01 -// CHECK-NEXT: 1000ps 0d 0e root/get 0x02 -// CHECK-NEXT: 1000ps 0d 0e root/slice[0] 0x03 -// CHECK-NEXT: 1000ps 0d 0e root/slice[1] 0x02 -hw.module @root() { - %0 = hw.constant 0 : i8 - %1 = hw.constant 1 : i8 - %2 = hw.constant 2 : i8 - %3 = hw.constant 3 : i8 - %init = hw.constant 0 : i32 - %index = hw.constant 1 : i2 - %indexz = hw.constant 0 : i2 - - %arrayinit = hw.array_create %0, %0, %0, %0 : i8 - %array1 = hw.array_create %0, %1 : i8 - %array2 = hw.array_create %2, %3 : i8 - - %array = hw.array_concat %array1, %array2 : !hw.array<2xi8>, !hw.array<2xi8> - %get = hw.array_get %array[%index] : !hw.array<4xi8>, i2 - %slice = hw.array_slice %array[%indexz] : (!hw.array<4xi8>) -> !hw.array<2xi8> - - %concatsig = llhd.sig "concat" %arrayinit : !hw.array<4xi8> - %getsig = llhd.sig "get" %0 : i8 - %slicesig = llhd.sig "slice" %array1 : !hw.array<2xi8> - - %time = llhd.constant_time #llhd.time<1ns, 0d, 0e> - - llhd.drv %concatsig, %array after %time : !hw.inout> - llhd.drv %getsig, %get after %time : !hw.inout - llhd.drv %slicesig, %slice after %time : !hw.inout> -} diff --git a/test/Dialect/LLHD/Simulator/sim_hw_bitcast.mlir b/test/Dialect/LLHD/Simulator/sim_hw_bitcast.mlir deleted file mode 100644 index 629d6dc70fad..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_hw_bitcast.mlir +++ /dev/null @@ -1,41 +0,0 @@ -// REQUIRES: llhd-sim -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// This test checks correct simulation of the following operations and ensures -// that the endianess semantics as described in the rationale are followed. -// * hw.array_create -// * hw.struct_create -// * hw.bitcast - -// CHECK: 0ps 0d 0e root/arr 0xffff0000 -// CHECK-NEXT: 0ps 0d 0e root/int[0] 0xffff -// CHECK-NEXT: 0ps 0d 0e root/int[1] 0x0000 -// CHECK-NEXT: 0ps 0d 0e root/struct 0xffff0000 -// CHECK-NEXT: 1000ps 0d 0e root/arr 0x0000ffff -// CHECK-NEXT: 1000ps 0d 0e root/int[0] 0x0000 -// CHECK-NEXT: 1000ps 0d 0e root/int[1] 0xffff -// CHECK-NEXT: 1000ps 0d 0e root/struct 0x0000ff00 -hw.module @root() { - %allset = hw.constant 0xffff : i16 - %allset2 = hw.constant 0xff : i8 - %zero = hw.constant 0 : i16 - %zero2 = hw.constant 0 : i8 - %init = hw.constant 0xffff0000 : i32 - - %arr = hw.array_create %zero, %allset : i16 - %struct = hw.struct_create (%zero, %allset2, %zero2) : !hw.struct - - %arrsig = llhd.sig "arr" %init : i32 - %structsig = llhd.sig "struct" %init : i32 - %intsig = llhd.sig "int" %arr : !hw.array<2xi16> - - %0 = hw.bitcast %init : (i32) -> !hw.array<2xi16> - %1 = hw.bitcast %arr : (!hw.array<2xi16>) -> i32 - %2 = hw.bitcast %struct : (!hw.struct) -> i32 - - %time = llhd.constant_time #llhd.time<1ns, 0d, 0e> - - llhd.drv %intsig, %0 after %time : !hw.inout> - llhd.drv %arrsig, %1 after %time : !hw.inout - llhd.drv %structsig, %2 after %time : !hw.inout -} diff --git a/test/Dialect/LLHD/Simulator/sim_hw_struct_extract_inject.mlir b/test/Dialect/LLHD/Simulator/sim_hw_struct_extract_inject.mlir deleted file mode 100644 index 271d489d5e2e..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_hw_struct_extract_inject.mlir +++ /dev/null @@ -1,36 +0,0 @@ -// REQUIRES: llhd-sim -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// This test checks correct simulation of the following operations and ensures -// that the endianess semantics as described in the rationale are followed. -// * hw.struct_create -// * hw.struct_extract -// * hw.struct_inject - -// CHECK: 0ps 0d 0e root/ext 0x00 -// CHECK-NEXT: 0ps 0d 0e root/struct 0x00000000 -// CHECK-NEXT: 1000ps 0d 0e root/ext 0x03 -// CHECK-NEXT: 1000ps 0d 0e root/struct 0x01050304 -hw.module @root() { - %zero = hw.constant 0 : i8 - %init = hw.constant 0 : i32 - %1 = hw.constant 1 : i8 - %2 = hw.constant 2 : i8 - %3 = hw.constant 3 : i8 - %4 = hw.constant 4 : i8 - %5 = hw.constant 5 : i8 - - %struct = hw.struct_create (%1, %2, %3, %4) : !hw.struct - %ext = hw.struct_extract %struct["c"] : !hw.struct - %inj = hw.struct_inject %struct["b"], %5 : !hw.struct - - %structsig = llhd.sig "struct" %init : i32 - %extsig = llhd.sig "ext" %zero : i8 - - %0 = hw.bitcast %inj : (!hw.struct) -> i32 - - %time = llhd.constant_time #llhd.time<1ns, 0d, 0e> - - llhd.drv %structsig, %0 after %time : !hw.inout - llhd.drv %extsig, %ext after %time : !hw.inout -} diff --git a/test/Dialect/LLHD/Simulator/sim_process.mlir b/test/Dialect/LLHD/Simulator/sim_process.mlir deleted file mode 100644 index eab656494ab1..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_process.mlir +++ /dev/null @@ -1,25 +0,0 @@ -// REQUIRES: llhd-sim -// REQUIRES: llhd-sim-fixed -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// CHECK: 0ps 0d 0e root/proc/toggle 0x01 -// CHECK-NEXT: 0ps 0d 0e root/toggle 0x01 -// CHECK-NEXT: 1000ps 0d 1e root/proc/toggle 0x00 -// CHECK-NEXT: 1000ps 0d 1e root/toggle 0x00 -hw.module @root() { - %0 = hw.constant 1 : i1 - %a = llhd.sig "toggle" %0 : i1 - llhd.process { - cf.br ^wait - ^wait: - %1 = llhd.prb %a : !hw.inout - %allset = hw.constant 1 : i1 - %0 = comb.xor %1, %allset : i1 - %wt = llhd.constant_time #llhd.time<1ns, 0d, 0e> - llhd.wait for %wt, ^drive - ^drive: - %dt = llhd.constant_time #llhd.time<0ns, 0d, 1e> - llhd.drv %a, %0 after %dt : !hw.inout - llhd.halt - } -} diff --git a/test/Dialect/LLHD/Simulator/sim_reg.mlir b/test/Dialect/LLHD/Simulator/sim_reg.mlir deleted file mode 100644 index f1567824f85d..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_reg.mlir +++ /dev/null @@ -1,44 +0,0 @@ -// REQUIRES: llhd-sim -// REQUIRES: llhd-sim-fixed -// RUN: llhd-sim %s -n 10 -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// CHECK: 0ps 0d 0e root/clock 0x00 -// CHECK-NEXT: 0ps 0d 0e root/sig1 0x00000000 -// CHECK-NEXT: 0ps 0d 0e root/sig2 0x00000000 -// CHECK-NEXT: 1000ps 0d 0e root/sig1 0x00000002 -// CHECK-NEXT: 2000ps 0d 0e root/clock 0x01 -// CHECK-NEXT: 3000ps 0d 0e root/sig1 0x00000001 -// CHECK-NEXT: 3000ps 0d 0e root/sig2 0xffffffff -// CHECK-NEXT: 4000ps 0d 0e root/clock 0x00 -// CHECK-NEXT: 4000ps 0d 0e root/sig1 0x00000003 -// CHECK-NEXT: 5000ps 0d 0e root/sig1 0x00000000 -// CHECK-NEXT: 5000ps 0d 0e root/sig2 0x00000000 -// CHECK-NEXT: 6000ps 0d 0e root/clock 0x01 -// CHECK-NEXT: 6000ps 0d 0e root/sig1 0x00000002 -// CHECK-NEXT: 7000ps 0d 0e root/sig1 0x00000001 -// CHECK-NEXT: 7000ps 0d 0e root/sig2 0xffffffff -// CHECK-NEXT: 8000ps 0d 0e root/clock 0x00 -// CHECK-NEXT: 8000ps 0d 0e root/sig1 0x00000003 -// CHECK-NEXT: 9000ps 0d 0e root/sig1 0x00000000 -// CHECK-NEXT: 9000ps 0d 0e root/sig2 0x00000000 -hw.module @root() { - %0 = llhd.constant_time #llhd.time<1ns, 0d, 0e> - %t1 = llhd.constant_time #llhd.time<2ns, 0d, 0e> - %1 = hw.constant 0 : i1 - %c0 = hw.constant 0 : i32 - %c1 = hw.constant 1 : i32 - %c2 = hw.constant 2 : i32 - %c3 = hw.constant 3 : i32 - %s0 = llhd.sig "sig1" %c0 : i32 - %s1 = llhd.sig "sig2" %c0 : i32 - %c = llhd.sig "clock" %1 : i1 - %p = llhd.prb %c : !hw.inout - %allset1 = hw.constant 1 : i1 - %nc = comb.xor %p, %allset1 : i1 - llhd.drv %c, %nc after %t1 : !hw.inout - llhd.reg %s0, (%c0, "fall" %p after %0 : i32), (%c1, "rise" %p after %0 : i32), (%c2, "low" %p after %0 : i32), (%c3, "high" %p after %0 : i32) : !hw.inout - %2 = llhd.prb %s1 : !hw.inout - %allset32 = hw.constant -1 : i32 - %3 = comb.xor %2, %allset32 : i32 - llhd.reg %s1, (%3, "both" %p after %0 : i32) : !hw.inout -} diff --git a/test/Dialect/LLHD/Simulator/sim_shifts.mlir b/test/Dialect/LLHD/Simulator/sim_shifts.mlir deleted file mode 100644 index 479e0cb00e5a..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_shifts.mlir +++ /dev/null @@ -1,40 +0,0 @@ -// REQUIRES: llhd-sim -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// CHECK: 0ps 0d 0e root/shl 0x01 -// CHECK-NEXT: 0ps 0d 0e root/shrs 0x08 -// CHECK-NEXT: 0ps 0d 0e root/shru 0x08 -// CHECK-NEXT: 1000ps 0d 0e root/shl 0x02 -// CHECK-NEXT: 1000ps 0d 0e root/shrs 0x0c -// CHECK-NEXT: 1000ps 0d 0e root/shru 0x04 -// CHECK-NEXT: 2000ps 0d 0e root/shl 0x04 -// CHECK-NEXT: 2000ps 0d 0e root/shrs 0x0e -// CHECK-NEXT: 2000ps 0d 0e root/shru 0x02 -// CHECK-NEXT: 3000ps 0d 0e root/shl 0x08 -// CHECK-NEXT: 3000ps 0d 0e root/shrs 0x0f -// CHECK-NEXT: 3000ps 0d 0e root/shru 0x01 -// CHECK-NEXT: 4000ps 0d 0e root/shl 0x00 -// CHECK-NEXT: 4000ps 0d 0e root/shru 0x00 - -hw.module @root() { - %time = llhd.constant_time #llhd.time<1ns, 0d, 0e> - - %init = hw.constant 8 : i4 - %init1 = hw.constant 1 : i4 - %amnt = hw.constant 1 : i4 - - %sig = llhd.sig "shrs" %init : i4 - %prbd = llhd.prb %sig : !hw.inout - %shrs = comb.shrs %prbd, %amnt : i4 - llhd.drv %sig, %shrs after %time : !hw.inout - - %sig1 = llhd.sig "shru" %init : i4 - %prbd1 = llhd.prb %sig1 : !hw.inout - %shru = comb.shru %prbd1, %amnt : i4 - llhd.drv %sig1, %shru after %time : !hw.inout - - %sig2 = llhd.sig "shl" %init1 : i4 - %prbd2 = llhd.prb %sig2 : !hw.inout - %shl = comb.shl %prbd2, %amnt : i4 - llhd.drv %sig2, %shl after %time : !hw.inout -} diff --git a/test/Dialect/LLHD/Simulator/sim_simple.mlir b/test/Dialect/LLHD/Simulator/sim_simple.mlir deleted file mode 100644 index 7961c323a618..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_simple.mlir +++ /dev/null @@ -1,22 +0,0 @@ -// REQUIRES: llhd-sim -// RUN: llhd-sim %s -n 10 -r Foo -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// CHECK: 0ps 0d 0e Foo/toggle 0x00 -// CHECK-NEXT: 1000ps 0d 0e Foo/toggle 0x01 -// CHECK-NEXT: 2000ps 0d 0e Foo/toggle 0x00 -// CHECK-NEXT: 3000ps 0d 0e Foo/toggle 0x01 -// CHECK-NEXT: 4000ps 0d 0e Foo/toggle 0x00 -// CHECK-NEXT: 5000ps 0d 0e Foo/toggle 0x01 -// CHECK-NEXT: 6000ps 0d 0e Foo/toggle 0x00 -// CHECK-NEXT: 7000ps 0d 0e Foo/toggle 0x01 -// CHECK-NEXT: 8000ps 0d 0e Foo/toggle 0x00 -// CHECK-NEXT: 9000ps 0d 0e Foo/toggle 0x01 -hw.module @Foo() { - %0 = hw.constant 0 : i1 - %toggle = llhd.sig "toggle" %0 : i1 - %1 = llhd.prb %toggle : !hw.inout - %allset = hw.constant 1 : i1 - %2 = comb.xor %1, %allset : i1 - %dt = llhd.constant_time #llhd.time<1ns, 0d, 0e> - llhd.drv %toggle, %2 after %dt : !hw.inout -} diff --git a/test/Dialect/LLHD/Simulator/sim_wait.mlir b/test/Dialect/LLHD/Simulator/sim_wait.mlir deleted file mode 100644 index 49a7b8faa0a5..000000000000 --- a/test/Dialect/LLHD/Simulator/sim_wait.mlir +++ /dev/null @@ -1,64 +0,0 @@ -// REQUIRES: llhd-sim -// REQUIRES: llhd-sim-fixed -// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s - -// CHECK: 0ps 0d 0e root/proc/s1 0x00000000 -// CHECK-NEXT: 0ps 0d 0e root/proc/s2 0x00000000 -// CHECK-NEXT: 0ps 0d 0e root/s1 0x00000000 -// CHECK-NEXT: 0ps 0d 0e root/s2 0x00000000 -// CHECK-NEXT: 0ps 0d 2e root/proc/s1 0x00000001 -// CHECK-NEXT: 0ps 0d 2e root/s1 0x00000001 -// CHECK-NEXT: 0ps 0d 3e root/proc/s2 0x00000001 -// CHECK-NEXT: 0ps 0d 3e root/s2 0x00000001 -// CHECK-NEXT: 0ps 0d 4e root/proc/s2 0x00000002 -// CHECK-NEXT: 0ps 0d 4e root/s2 0x00000002 -// CHECK-NEXT: 0ps 0d 5e root/proc/s2 0x00000003 -// CHECK-NEXT: 0ps 0d 5e root/s2 0x00000003 -// CHECK-NEXT: 0ps 0d 7e root/proc/s2 0x00000004 -// CHECK-NEXT: 0ps 0d 7e root/s2 0x00000004 -// CHECK-NEXT: 0ps 0d 8e root/proc/s1 0x00000004 -// CHECK-NEXT: 0ps 0d 8e root/s1 0x00000004 -// CHECK-NEXT: 0ps 0d 10e root/proc/s2 0x00000005 -// CHECK-NEXT: 0ps 0d 10e root/s2 0x00000005 -hw.module @root() { - %0 = hw.constant 0 : i32 - %a = llhd.sig "s1" %0 : i32 - %b = llhd.sig "s2" %0 : i32 - llhd.process { - cf.br ^timed - ^timed: - %t1 = llhd.constant_time #llhd.time<0ns, 0d, 1e> - %t2 = llhd.constant_time #llhd.time<0ns, 0d, 2e> - llhd.wait for %t1, ^observe - ^observe: - %c0 = hw.constant 1 : i32 - %p0 = llhd.prb %b : !hw.inout - %a0 = comb.add %c0, %p0 : i32 - llhd.drv %a, %a0 after %t1 : !hw.inout - llhd.drv %b, %a0 after %t2 : !hw.inout - llhd.wait (%b : !hw.inout), ^timed_observe - ^timed_observe: - %p1 = llhd.prb %b : !hw.inout - %a1 = comb.add %c0, %p1 : i32 - llhd.drv %b, %a1 after %t1 : !hw.inout - llhd.wait for %t2, (%b : !hw.inout), ^overlap_invalidated - ^overlap_invalidated: - %p2 = llhd.prb %b : !hw.inout - %a2 = comb.add %c0, %p2 : i32 - llhd.drv %b, %a2 after %t1 : !hw.inout - llhd.wait for %t2, ^observe_both - ^observe_both: - %p3 = llhd.prb %b : !hw.inout - %a3 = comb.add %c0, %p3 : i32 - llhd.drv %a, %a3 after %t2 : !hw.inout - llhd.drv %b, %a3 after %t1 : !hw.inout - llhd.wait (%a, %b : !hw.inout, !hw.inout), ^blockArgs - ^blockArgs: - %p4 = llhd.prb %b : !hw.inout - %a4 = comb.add %c0, %p4 : i32 - llhd.wait (%a, %b : !hw.inout, !hw.inout), ^end(%a4 : i32) - ^end (%arg : i32): - llhd.drv %b, %arg after %t2 : !hw.inout - llhd.halt - } -}