aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/blackboxes/RenamedExtModuleTester.fir
blob: a5979d5991058a907bef4a43fcfc2f059462766f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; SPDX-License-Identifier: Apache-2.0
circuit RenamedExtModuleTester :
  extmodule ThisIsJustTheFirrtlName :
    input foo : UInt<16>
    output bar : UInt<16>

    defname = SimpleExtModule

  module RenamedExtModuleTester :
    input clock : Clock
    input reset : UInt<1>

    inst dut of ThisIsJustTheFirrtlName

    dut.foo <= UInt(1234)

    when not(reset) :
      when neq(dut.bar, UInt(1234)) :
        printf(clock, not(reset), "Assertion failed\nTest Failed!\n")
        stop(clock, not(reset), 1)
      else :
        stop(clock, not(reset), 0)