aboutsummaryrefslogtreecommitdiff
path: root/test/passes/infer-widths/dsh.fir
blob: f36b8ad4b63ca2dc300e395fc5ea8f58669ace87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
; RUN: firrtl -i %s -o %s.v -X verilog -p cd 2>&1 | tee %s.out | FileCheck %s

;CHECK: Infer Widths

circuit top :
   module top :
      wire x : UInt<16>
      wire z : SInt<16>
      wire y : UInt<3>
      wire a : UInt
      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)
      c <= dshr(x,y)
      d <= dshr(z,y)


; CHECK: wire a : UInt<23>
; CHECK: wire b : SInt<23>
; CHECK: wire c : UInt<16>
; CHECK: wire d : SInt<16>
; CHECK: Finished Infer Widths