aboutsummaryrefslogtreecommitdiff
path: root/test/features/Poison.fir
blob: d8aa441109d3ba5fe7ace1d38fd2ad6a67ff664f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: firrtl -i %s -o %s.v -X verilog -p c 2>&1 | tee %s.out | FileCheck %s
; CHECK: Done!
circuit Poison :
  module Poison :
    input clk : Clock
    input reset : UInt<1>
    input index : UInt<7>
    input p : UInt<1>
    output out : {x : UInt<10>, y : UInt<10>}
     
    poison q : {x : UInt<10>, y : UInt<10>}
    smem m : {x : UInt<10>, y : UInt<10>}[128],clk
    infer accessor r = m[index]
    when p : 
      out := r
    else :
      out := q