#!/bin/bash

slot=$1
vtu=$2
b=$3
ht=$4
mode=$5

# Check we have basic access to the register space over VME
./wr2rf -s $slot hwver

# place vtu in reset
./wr2rf -s $slot vtu $vtu reset 1
# take vtu out of reset
./wr2rf -s $slot vtu $vtu reset 0

# configure vtu mode
./wr2rf -s $slot vtu $vtu mode $mode

# configure vtu parameter
./wr2rf -s $slot vtu $vtu ht $ht
./wr2rf -s $slot vtu $vtu b $b


# confirm the configuration is complete
./wr2rf -s $slot vtu $vtu valid

# Dump the state
./wr2rf -s $slot vtu $vtu
