aboutsummaryrefslogtreecommitdiff
path: root/test/chisel3/Tbl.fir
blob: d64916f179654364219081a3c1b661d508ea35f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: firrtl -i %s -o %s.flo -X flo -p c | tee %s.out | FileCheck %s
;CHECK: Done!

circuit Tbl : 
  module Tbl : 
    input i : UInt<16>
    input d : UInt<16>
    output o : UInt<16>
    input we : UInt<1>
    
    mem m : UInt<10>[256]
    o := UInt<1>(0)
    when we : 
      accessor T_13 = m[i]
      node T_14 = bits(d, 9, 0)
      T_13 := T_14
    else : 
      accessor T_15 = m[i]
      o := T_15