diff options
| author | azidar | 2015-07-07 10:13:29 -0700 |
|---|---|---|
| committer | azidar | 2015-07-07 10:13:29 -0700 |
| commit | df4bae5c7a95d3a56f95d86212f083b7ba121da7 (patch) | |
| tree | af46f090557734528d9d29fcf499d73024c575ac /test | |
| parent | c8d1fc06443e81374b1af95e17e3ecbecf863700 (diff) | |
Pass most tests. The ones that do not pass are not expected to, yet
Diffstat (limited to 'test')
28 files changed, 114 insertions, 65 deletions
diff --git a/test/chisel3/Core.fir b/test/chisel3/Core.fir index 5c446b3d..e9aef65f 100644 --- a/test/chisel3/Core.fir +++ b/test/chisel3/Core.fir @@ -100,19 +100,19 @@ circuit Core : cmem regs : UInt<32>[32] node T_1286 = eq(raddr1, UInt<1>(0)) node T_1287 = bit-not(T_1286) - accessor T_1288 = regs[raddr1] + infer accessor T_1288 = regs[raddr1] node T_1289 = mux(T_1287, T_1288, UInt<1>(0)) rdata1 := T_1289 node T_1290 = eq(raddr2, UInt<1>(0)) node T_1291 = bit-not(T_1290) - accessor T_1292 = regs[raddr2] + infer accessor T_1292 = regs[raddr2] node T_1293 = mux(T_1291, T_1292, UInt<1>(0)) rdata2 := T_1293 node T_1294 = eq(waddr, UInt<1>(0)) node T_1295 = bit-not(T_1294) node T_1296 = bit-and(wen, T_1295) when T_1296 : - accessor T_1297 = regs[waddr] + infer accessor T_1297 = regs[waddr] T_1297 := wdata module ImmGenWire : output out : UInt<32> diff --git a/test/chisel3/Datapath.fir b/test/chisel3/Datapath.fir index 7d684395..c2752a37 100644 --- a/test/chisel3/Datapath.fir +++ b/test/chisel3/Datapath.fir @@ -100,19 +100,19 @@ circuit Datapath : cmem regs : UInt<32>[32] node T_495 = eq(raddr1, UInt<1>(0)) node T_496 = bit-not(T_495) - accessor T_497 = regs[raddr1] + infer accessor T_497 = regs[raddr1] node T_498 = mux(T_496, T_497, UInt<1>(0)) rdata1 := T_498 node T_499 = eq(raddr2, UInt<1>(0)) node T_500 = bit-not(T_499) - accessor T_501 = regs[raddr2] + infer accessor T_501 = regs[raddr2] node T_502 = mux(T_500, T_501, UInt<1>(0)) rdata2 := T_502 node T_503 = eq(waddr, UInt<1>(0)) node T_504 = bit-not(T_503) node T_505 = bit-and(wen, T_504) when T_505 : - accessor T_506 = regs[waddr] + infer accessor T_506 = regs[waddr] T_506 := wdata module ImmGenWire : output out : UInt<32> diff --git a/test/chisel3/Datapath_new.fir b/test/chisel3/Datapath_new.fir index 9f018394..2d3072b2 100644 --- a/test/chisel3/Datapath_new.fir +++ b/test/chisel3/Datapath_new.fir @@ -96,19 +96,19 @@ circuit Datapath : cmem regs : UInt<32>[32] node T_485 = eq(raddr1, UInt<1>(0)) node T_486 = bit-not(T_485) - accessor T_487 = regs[raddr1] + infer accessor T_487 = regs[raddr1] node T_488 = mux(T_486, T_487, UInt<1>(0)) rdata1 := T_488 node T_489 = eq(raddr2, UInt<1>(0)) node T_490 = bit-not(T_489) - accessor T_491 = regs[raddr2] + infer accessor T_491 = regs[raddr2] node T_492 = mux(T_490, T_491, UInt<1>(0)) rdata2 := T_492 node T_493 = eq(waddr, UInt<1>(0)) node T_494 = bit-not(T_493) node T_495 = bit-and(wen, T_494) when T_495 : - accessor T_496 = regs[waddr] + infer accessor T_496 = regs[waddr] T_496 := wdata module ImmGenWire : output out : UInt<32> diff --git a/test/chisel3/MemorySearch.fir b/test/chisel3/MemorySearch.fir index a0cc0b7d..fec082c0 100644 --- a/test/chisel3/MemorySearch.fir +++ b/test/chisel3/MemorySearch.fir @@ -18,7 +18,7 @@ circuit MemorySearch : elts[4] := UInt<4>(2) elts[5] := UInt<4>(5) elts[6] := UInt<4>(13) - accessor elt = elts[index] + infer accessor elt = elts[index] node T_35 = bit-not(en) node T_36 = eq(elt, target) node T_37 = eq(index, UInt<3>(7)) diff --git a/test/chisel3/Mul.fir b/test/chisel3/Mul.fir index c5dccb6f..b80b8a83 100644 --- a/test/chisel3/Mul.fir +++ b/test/chisel3/Mul.fir @@ -26,5 +26,5 @@ circuit Mul : tbl[15] := UInt<4>(9) node T_42 = shl(x, 2) node T_43 = bit-or(T_42, y) - accessor T_44 = tbl[T_43] + infer accessor T_44 = tbl[T_43] z := T_44 diff --git a/test/chisel3/Risc.fir b/test/chisel3/Risc.fir index 425f8a91..a1ba01b9 100644 --- a/test/chisel3/Risc.fir +++ b/test/chisel3/Risc.fir @@ -14,23 +14,23 @@ circuit Risc : cmem code : UInt<32>[256] reg pc : UInt<8> on-reset pc := UInt<8>(0) - accessor inst = code[pc] + infer accessor inst = code[pc] node op = bits(inst, 31, 24) node rci = bits(inst, 23, 16) node rai = bits(inst, 15, 8) node rbi = bits(inst, 7, 0) node T_51 = eq(rai, UInt<1>(0)) - accessor T_52 = file[rai] + infer accessor T_52 = file[rai] node ra = mux(T_51, UInt<1>(0), T_52) node T_53 = eq(rbi, UInt<1>(0)) - accessor T_54 = file[rbi] + infer accessor T_54 = file[rbi] node rb = mux(T_53, UInt<1>(0), T_54) wire rc : UInt<32> valid := UInt<1>(0) out := UInt<1>(0) rc := UInt<1>(0) when isWr : - accessor T_55 = code[wrAddr] + infer accessor T_55 = code[wrAddr] T_55 := wrData else : when boot : pc := UInt<1>(0) else : @@ -47,7 +47,7 @@ circuit Risc : node T_61 = eq(rci, UInt<8>(255)) when T_61 : valid := UInt<1>(1) else : - accessor T_62 = file[rci] + infer accessor T_62 = file[rci] T_62 := rc node T_63 = add-wrap(pc, UInt<1>(1)) pc := T_63 diff --git a/test/chisel3/Rom.fir b/test/chisel3/Rom.fir index 1c19d9b3..f91593a4 100644 --- a/test/chisel3/Rom.fir +++ b/test/chisel3/Rom.fir @@ -23,5 +23,5 @@ circuit Rom : r[13] := UInt<5>(26) r[14] := UInt<5>(28) r[15] := UInt<5>(30) - accessor T_39 = r[addr] + infer accessor T_39 = r[addr] out := T_39 diff --git a/test/chisel3/Stack.fir b/test/chisel3/Stack.fir index caa70da5..52c9b437 100644 --- a/test/chisel3/Stack.fir +++ b/test/chisel3/Stack.fir @@ -18,7 +18,7 @@ circuit Stack : node T_30 = lt(sp, UInt<5>(16)) node T_31 = bit-and(push, T_30) when T_31 : - accessor T_32 = stack_mem[sp] + infer accessor T_32 = stack_mem[sp] T_32 := dataIn node T_33 = add-wrap(sp, UInt<1>(1)) sp := T_33 @@ -31,6 +31,6 @@ circuit Stack : node T_37 = gt(sp, UInt<1>(0)) when T_37 : node T_38 = sub-wrap(sp, UInt<1>(1)) - accessor T_39 = stack_mem[T_38] + infer accessor T_39 = stack_mem[T_38] out := T_39 dataOut := out diff --git a/test/chisel3/Tbl.fir b/test/chisel3/Tbl.fir index e7397f61..013fd098 100644 --- a/test/chisel3/Tbl.fir +++ b/test/chisel3/Tbl.fir @@ -11,9 +11,9 @@ circuit Tbl : cmem m : UInt<10>[256] o := UInt<1>(0) when we : - accessor T_13 = m[i] + infer accessor T_13 = m[i] node T_14 = bits(d, 9, 0) T_13 := T_14 else : - accessor T_15 = m[i] + infer accessor T_15 = m[i] o := T_15 diff --git a/test/chisel3/Tile.fir b/test/chisel3/Tile.fir index b84684db..9efb079c 100644 --- a/test/chisel3/Tile.fir +++ b/test/chisel3/Tile.fir @@ -100,19 +100,19 @@ circuit Tile : cmem regs : UInt<32>[32] node T_1616 = eq(raddr1, UInt<1>(0)) node T_1617 = bit-not(T_1616) - accessor T_1618 = regs[raddr1] + infer accessor T_1618 = regs[raddr1] node T_1619 = mux(T_1617, T_1618, UInt<1>(0)) rdata1 := T_1619 node T_1620 = eq(raddr2, UInt<1>(0)) node T_1621 = bit-not(T_1620) - accessor T_1622 = regs[raddr2] + infer accessor T_1622 = regs[raddr2] node T_1623 = mux(T_1621, T_1622, UInt<1>(0)) rdata2 := T_1623 node T_1624 = eq(waddr, UInt<1>(0)) node T_1625 = bit-not(T_1624) node T_1626 = bit-and(wen, T_1625) when T_1626 : - accessor T_1627 = regs[waddr] + infer accessor T_1627 = regs[waddr] T_1627 := wdata module ImmGenWire : output out : UInt<32> @@ -1046,7 +1046,7 @@ circuit Tile : node T_2387 = bit-not(do_flow) node do_deq = bit-and(T_2386, T_2387) when do_enq : - accessor T_2388 = ram[T_2381] + infer accessor T_2388 = ram[T_2381] T_2388 := enq.bits node T_2389 = eq(T_2381, UInt<2>(3)) node T_2390 = bit-and(UInt<1>(0), T_2389) @@ -1069,7 +1069,7 @@ circuit Tile : node T_2402 = bit-and(UInt<1>(0), deq.ready) node T_2403 = bit-or(T_2401, T_2402) enq.ready := T_2403 - accessor T_2404 = ram[T_2382] + infer accessor T_2404 = ram[T_2382] wire T_2405 : {mask : UInt<4>, tag : UInt<5>, rw : UInt<1>, addr : UInt<32>} node T_2406 = mux(maybe_flow, enq.bits.mask, T_2404.mask) T_2405.mask := T_2406 @@ -1109,7 +1109,7 @@ circuit Tile : node T_2418 = bit-not(do_flow) node do_deq = bit-and(T_2417, T_2418) when do_enq : - accessor T_2419 = ram[T_2412] + infer accessor T_2419 = ram[T_2412] T_2419 := enq.bits node T_2420 = eq(T_2412, UInt<2>(3)) node T_2421 = bit-and(UInt<1>(0), T_2420) @@ -1132,7 +1132,7 @@ circuit Tile : node T_2433 = bit-and(UInt<1>(0), deq.ready) node T_2434 = bit-or(T_2432, T_2433) enq.ready := T_2434 - accessor T_2435 = ram[T_2413] + infer accessor T_2435 = ram[T_2413] wire T_2436 : {data : UInt<32>} node T_2437 = mux(maybe_flow, enq.bits.data, T_2435.data) T_2436.data := T_2437 diff --git a/test/errors/high-form/InvalidLOC.fir b/test/errors/high-form/InvalidLOC.fir index cbbb53a9..a4cc49ef 100644 --- a/test/errors/high-form/InvalidLOC.fir +++ b/test/errors/high-form/InvalidLOC.fir @@ -2,15 +2,11 @@ ; CHECK: Invalid connect to an expression that is not a reference or a WritePort. ; CHECK: Invalid connect to an expression that is not a reference or a WritePort. ; CHECK: Invalid connect to an expression that is not a reference or a WritePort. -; CHECK: Invalid connect to an expression that is not a reference or a WritePort. -; CHECK: Invalid connect to an expression that is not a reference or a WritePort. circuit Top : module Top : wire x : UInt add(x,x) := UInt(1) - Register(x,x) := UInt(1) - ReadPort(x,x,x) := UInt(1) UInt(1) := UInt(1) SInt(1) := UInt(1) diff --git a/test/features/BulkConnect.fir b/test/features/BulkConnect.fir index f78ba45b..f8840f46 100644 --- a/test/features/BulkConnect.fir +++ b/test/features/BulkConnect.fir @@ -3,7 +3,14 @@ circuit Top : module Top : wire a : { w : UInt<42>, x : UInt<10>, flip y : UInt<42>, z : SInt<42>} + a.w := UInt(1) + a.y := UInt(1) + a.z := SInt(1) wire b : { w : UInt<42>, x : UInt<20>, y : UInt<42>, z : UInt<42>} + b.w := UInt(1) + b.x := UInt(1) + b.y := UInt(1) + b.z := UInt(1) a <> b ; CHECK: a$w := b$w ; CHECK: a$x := b$x @@ -13,7 +20,15 @@ circuit Top : wire c : { x : { y : UInt<1>, z : UInt<1>}}[4] + c[0].x.z := UInt(1) + c[1].x.z := UInt(1) + c[2].x.y := UInt(1) + c[2].x.z := UInt(1) + c[3].x.y := UInt(1) + c[3].x.z := UInt(1) wire d : { x : { y : UInt<1>}}[2] + d[0].x.y := UInt(1) + d[1].x.y := UInt(1) c <> d ; CHECK: c$0$x$y := d$0$x$y ; CHECK: c$1$x$y := d$1$x$y diff --git a/test/features/SeqMem.fir b/test/features/SeqMem.fir index 998df8c9..4b346ea9 100644 --- a/test/features/SeqMem.fir +++ b/test/features/SeqMem.fir @@ -3,20 +3,21 @@ circuit Top : module Top : wire i : UInt<5> + i := UInt(1) wire i0 : UInt<5> wire j : UInt<128> i0 := UInt(10) cmem m-com : UInt<128>[32] - accessor r-com = m-com[i] - accessor w-com = m-com[i] + infer accessor r-com = m-com[i] + infer accessor w-com = m-com[i] j := r-com w-com := j smem m-seq : UInt<128>[32] - accessor r-seq = m-seq[i] - accessor w-seq = m-seq[i] + infer accessor r-seq = m-seq[i] + infer accessor w-seq = m-seq[i] j := r-seq w-seq := j diff --git a/test/passes/infer-types/bundle.fir b/test/passes/infer-types/bundle.fir index 892103d2..6309b46f 100644 --- a/test/passes/infer-types/bundle.fir +++ b/test/passes/infer-types/bundle.fir @@ -4,9 +4,21 @@ circuit top : module top : wire z : { x : UInt, flip y: SInt} + z.x := UInt(1) + z.y := SInt(1) node x = z.x ;CHECK: node x = z@<t:{ x : UInt@<t:UInt>, flip y : SInt@<t:SInt>}>.x@<t:UInt> node y = z.y ;CHECK: node y = z@<t:{ x : UInt@<t:UInt>, flip y : SInt@<t:SInt>}>.y@<t:SInt> wire a : UInt<3>[10] ;CHECK: wire a : UInt<3>[10]@<t:UInt>@<t:UInt<3>[10]@<t:UInt>> + a[0] := UInt(1) + a[1] := UInt(1) + a[2] := UInt(1) + a[3] := UInt(1) + a[4] := UInt(1) + a[5] := UInt(1) + a[6] := UInt(1) + a[7] := UInt(1) + a[8] := UInt(1) + a[9] := UInt(1) node b = a[2] ;CHECK: node b = a@<t:UInt<3>[10]@<t:UInt>>[2]@<t:UInt> read accessor c = a[UInt(3)] ;CHECK: read accessor c = a@<t:UInt<3>[10]@<t:UInt>>[UInt(3)] ; CHECK: Finished Infer Types diff --git a/test/passes/infer-widths/dsh.fir b/test/passes/infer-widths/dsh.fir index 6b683e56..08396978 100644 --- a/test/passes/infer-widths/dsh.fir +++ b/test/passes/infer-widths/dsh.fir @@ -11,6 +11,9 @@ circuit top : wire b : SInt wire c : UInt wire d : SInt + x := UInt(1) + y := UInt(1) + z := SInt(1) a := dshl(x,y) b := dshl(z,y) diff --git a/test/passes/infer-widths/simple.fir b/test/passes/infer-widths/simple.fir index 590515e7..6a50ae77 100644 --- a/test/passes/infer-widths/simple.fir +++ b/test/passes/infer-widths/simple.fir @@ -4,12 +4,16 @@ circuit top : module top : wire e : UInt<30> + e := UInt(1) reg y : UInt y := e wire a : UInt<20> + a := UInt(1) wire b : UInt<10> + b := UInt(1) wire c : UInt + c := UInt(1) wire z : UInt z := mux(c,a,b) diff --git a/test/passes/jacktest/MemorySearch.fir b/test/passes/jacktest/MemorySearch.fir index 1953e39b..59352162 100644 --- a/test/passes/jacktest/MemorySearch.fir +++ b/test/passes/jacktest/MemorySearch.fir @@ -17,7 +17,7 @@ circuit MemorySearch : elts[4] := UInt<4>(2) elts[5] := UInt<4>(5) elts[6] := UInt<4>(13) - accessor elt = elts[index] + infer accessor elt = elts[index] node T_35 = bit-not(en) node T_36 = eq(elt, target) node T_37 = eq(index, UInt<3>(7)) diff --git a/test/passes/jacktest/Mul.fir b/test/passes/jacktest/Mul.fir index 58515110..14db8769 100644 --- a/test/passes/jacktest/Mul.fir +++ b/test/passes/jacktest/Mul.fir @@ -25,5 +25,5 @@ circuit Mul : tbl[15] := UInt<4>(9) node T_42 = shl(x, 2) node T_43 = bit-or(T_42, y) - accessor T_44 = tbl[T_43] + infer accessor T_44 = tbl[T_43] z := T_44 diff --git a/test/passes/jacktest/Rom.fir b/test/passes/jacktest/Rom.fir index ee417771..3c70c670 100644 --- a/test/passes/jacktest/Rom.fir +++ b/test/passes/jacktest/Rom.fir @@ -22,5 +22,5 @@ circuit Rom : r[13] := UInt<5>(26) r[14] := UInt<5>(28) r[15] := UInt<5>(30) - accessor T_39 = r[addr] + infer accessor T_39 = r[addr] out := T_39 diff --git a/test/passes/jacktest/Stack.fir b/test/passes/jacktest/Stack.fir index 43f61827..4bce2bd4 100644 --- a/test/passes/jacktest/Stack.fir +++ b/test/passes/jacktest/Stack.fir @@ -17,7 +17,7 @@ circuit Stack : node T_30 = lt(sp, UInt<5>(16)) node T_31 = bit-and(push, T_30) when T_31 : - accessor T_32 = stack_mem[sp] + infer accessor T_32 = stack_mem[sp] T_32 := dataIn node T_33 = add-wrap(sp, UInt<1>(1)) sp := T_33 @@ -30,6 +30,6 @@ circuit Stack : node T_37 = gt(sp, UInt<1>(0)) when T_37 : node T_38 = sub-wrap(sp, UInt<1>(1)) - accessor T_39 = stack_mem[T_38] + infer accessor T_39 = stack_mem[T_38] out := T_39 dataOut := out diff --git a/test/passes/jacktest/Tbl.fir b/test/passes/jacktest/Tbl.fir index 4e0e954c..f315aaa9 100644 --- a/test/passes/jacktest/Tbl.fir +++ b/test/passes/jacktest/Tbl.fir @@ -10,9 +10,9 @@ circuit Tbl : cmem m : UInt<10>[256] o := UInt<1>(0) when we : - accessor T_13 = m[i] + infer accessor T_13 = m[i] node T_14 = bits(d, 9, 0) T_13 := T_14 else : - accessor T_15 = m[i] + infer accessor T_15 = m[i] o := T_15 diff --git a/test/passes/jacktest/risc.fir b/test/passes/jacktest/risc.fir index 4d02bcf7..21030448 100644 --- a/test/passes/jacktest/risc.fir +++ b/test/passes/jacktest/risc.fir @@ -13,23 +13,23 @@ circuit Risc : cmem code : UInt<32>[256] reg pc : UInt<8> on-reset pc := UInt<8>(0) - accessor inst = code[pc] + infer accessor inst = code[pc] node op = bits(inst, 31, 24) node rci = bits(inst, 23, 16) node rai = bits(inst, 15, 8) node rbi = bits(inst, 7, 0) node T_51 = eq(rai, UInt<1>(0)) - accessor T_52 = file[rai] + infer accessor T_52 = file[rai] node ra = mux(T_51, UInt<1>(0), T_52) node T_53 = eq(rbi, UInt<1>(0)) - accessor T_54 = file[rbi] + infer accessor T_54 = file[rbi] node rb = mux(T_53, UInt<1>(0), T_54) wire rc : UInt<32> valid := UInt<1>(0) out := UInt<1>(0) rc := UInt<1>(0) when isWr : - accessor T_55 = code[wrAddr] + infer accessor T_55 = code[wrAddr] T_55 := wrData else : when boot : pc := UInt<1>(0) else : @@ -46,7 +46,7 @@ circuit Risc : node T_61 = eq(rci, UInt<8>(255)) when T_61 : valid := UInt<1>(1) else : - accessor T_62 = file[rci] + infer accessor T_62 = file[rci] T_62 := rc node T_63 = add-wrap(pc, UInt<1>(1)) pc := T_63 diff --git a/test/passes/lower-to-ground/accessor.fir b/test/passes/lower-to-ground/accessor.fir index 8fe1bc52..cede6f43 100644 --- a/test/passes/lower-to-ground/accessor.fir +++ b/test/passes/lower-to-ground/accessor.fir @@ -12,21 +12,21 @@ circuit top : ; CHECK: wire a$2 : UInt<32> ; CHECK: wire a$3 : UInt<32> - accessor b = a[i] + infer accessor b = a[i] ; CHECK: wire b : UInt<32> ; CHECK: b := (a$0 a$1 a$2 a$3)[i] j := b - accessor c = a[i] + infer accessor c = a[i] ; CHECK: wire c : UInt<32> ; CHECK: (a$0 a$1 a$2 a$3)[i] := c c := j cmem p : UInt<32>[4] - accessor t = p[i] + infer accessor t = p[i] ; CHECK: accessor t = p[i] j := t - accessor r = p[i] + infer accessor r = p[i] ; CHECK: accessor r = p[i] r := j diff --git a/test/passes/lower-to-ground/bundle-vecs.fir b/test/passes/lower-to-ground/bundle-vecs.fir index 0b9d9799..e71e9104 100644 --- a/test/passes/lower-to-ground/bundle-vecs.fir +++ b/test/passes/lower-to-ground/bundle-vecs.fir @@ -12,14 +12,14 @@ circuit top : ; CHECK: wire a$1$x : UInt<32> ; CHECK: wire a$1$y : UInt<32> - accessor b = a[i] + infer accessor b = a[i] ; CHECK: wire b$x : UInt<32> ; CHECK: wire b$y : UInt<32> ; CHECK: b$x := (a$0$x a$1$x)[i] ; CHECK: (a$0$y a$1$y)[i] := b$y j := b - accessor c = a[i] + infer accessor c = a[i] ; CHECK: wire c$x : UInt<32> ; CHECK: wire c$y : UInt<32> ; CHECK: (a$0$x a$1$x)[i] := c$x diff --git a/test/passes/lower-to-ground/nested-vec.fir b/test/passes/lower-to-ground/nested-vec.fir index c39850f4..a2eb1215 100644 --- a/test/passes/lower-to-ground/nested-vec.fir +++ b/test/passes/lower-to-ground/nested-vec.fir @@ -13,7 +13,7 @@ circuit top : ; CHECK: wire a$1$x : UInt<32> ; CHECK: wire a$1$y : UInt<32> - accessor b = a[i] + infer accessor b = a[i] ; CHECK: wire b$x : UInt<32> ; CHECK: wire b$y : UInt<32> ; CHECK: b$x := (a$0$x a$1$x)[i] @@ -24,7 +24,7 @@ circuit top : ; CHECK: cmem m$x : UInt<32>[2] ; CHECK: cmem m$y : UInt<32>[2] - accessor c = m[i] ; MALE + infer accessor c = m[i] ; MALE ; CHECK: accessor c$x = m$x[i] ; CHECK: accessor c$y = m$y[i] diff --git a/test/passes/lower-to-ground/test.fir b/test/passes/lower-to-ground/test.fir index 7fcf0013..7e123fc3 100644 --- a/test/passes/lower-to-ground/test.fir +++ b/test/passes/lower-to-ground/test.fir @@ -4,10 +4,13 @@ circuit Top : module Queue : output out : {valid : UInt<1>, flip ready : UInt<1>} + out.valid := UInt(1) module Top : output this : {out : {valid : UInt<1>, flip ready : UInt<1>}} inst queue of Queue this.out := queue.out wire w : { x : UInt<5>, flip y : UInt<5>} + w.x := UInt(1) wire a : UInt<5> + a := UInt(1) w.y := a diff --git a/test/passes/resolve-genders/accessor.fir b/test/passes/resolve-genders/accessor.fir index 41aea1f4..8a86868b 100644 --- a/test/passes/resolve-genders/accessor.fir +++ b/test/passes/resolve-genders/accessor.fir @@ -4,16 +4,31 @@ circuit top : module top : wire m : UInt<32>[2][2][2] + m[0][0][0] := UInt(1) + m[1][0][0] := UInt(1) + m[0][1][0] := UInt(1) + m[1][1][0] := UInt(1) + m[0][0][1] := UInt(1) + m[1][0][1] := UInt(1) + m[0][1][1] := UInt(1) + m[1][1][1] := UInt(1) wire i : UInt - accessor a = m[i] ;CHECK: accessor a = m@<g:m>[i@<g:m>]@<g:m> - accessor b = a[i] ;CHECK: accessor b = a@<g:m>[i@<g:m>]@<g:m> - accessor c = b[i] ;CHECK: accessor c = b@<g:m>[i@<g:m>]@<g:m> + i := UInt(1) + infer accessor a = m[i] ;CHECK: accessor a = m@<g:m>[i@<g:m>]@<g:m> + infer accessor b = a[i] ;CHECK: accessor b = a@<g:m>[i@<g:m>]@<g:m> + infer accessor c = b[i] ;CHECK: accessor c = b@<g:m>[i@<g:m>]@<g:m> wire j : UInt j := c - accessor x = m[i] ;CHECK: accessor x = m@<g:f>[i@<g:m>]@<g:f> - accessor y = x[i] ;CHECK: accessor y = x@<g:f>[i@<g:m>]@<g:f> - accessor z = y[i] ;CHECK: accessor z = y@<g:f>[i@<g:m>]@<g:f> + infer accessor x = m[i] ;CHECK: accessor x = m@<g:f>[i@<g:m>]@<g:f> + x[0][0] := UInt(1) + x[1][0] := UInt(1) + x[0][1] := UInt(1) + x[1][1] := UInt(1) + infer accessor y = x[i] ;CHECK: accessor y = x@<g:f>[i@<g:m>]@<g:f> + y[0] := UInt(1) + y[1] := UInt(1) + infer accessor z = y[i] ;CHECK: accessor z = y@<g:f>[i@<g:m>]@<g:f> z := j ; CHECK: Finished Resolve Genders diff --git a/test/riscv-mini/Core.fir b/test/riscv-mini/Core.fir index aea05940..439cf1db 100644 --- a/test/riscv-mini/Core.fir +++ b/test/riscv-mini/Core.fir @@ -100,19 +100,19 @@ circuit Core : cmem regs : UInt<32>[32] node T_1286 = eq(raddr1, UInt<1>(0)) node T_1287 = bit-not(T_1286) - accessor T_1288 = regs[raddr1] + infer accessor T_1288 = regs[raddr1] node T_1289 = mux(T_1287, T_1288, UInt<1>(0)) rdata1 := T_1289 node T_1290 = eq(raddr2, UInt<1>(0)) node T_1291 = bit-not(T_1290) - accessor T_1292 = regs[raddr2] + infer accessor T_1292 = regs[raddr2] node T_1293 = mux(T_1291, T_1292, UInt<1>(0)) rdata2 := T_1293 node T_1294 = eq(waddr, UInt<1>(0)) node T_1295 = bit-not(T_1294) node T_1296 = bit-and(wen, T_1295) when T_1296 : - accessor T_1297 = regs[waddr] + infer accessor T_1297 = regs[waddr] T_1297 := wdata module ImmGenWire : output out : UInt<32> |
