aboutsummaryrefslogtreecommitdiff
path: root/test/chisel3/Test.fir
blob: f0d8f80e8f29664c05658bee3c4755ccacbbf2e1 (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 | tee %s.out | FileCheck %s
; CHECK: Done!

circuit Test : 
  module Test : 
     input clk : Clock
     input reset : UInt<1>
     input falling : UInt<1>

     reg hold : UInt<100>, clk, UInt(1)

     hold := UInt("h42")
     when reset :
        hold := UInt("h7f")
     else :
        when falling :
           hold := UInt("h8f")