Commit f0b4ca7b authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: Small changes in output of rs485_pulse_rtm.py

parent 8f0e37a5
......@@ -19,7 +19,7 @@
## send pulses back to inputs. Externally to the RTM, there should be two boards
## containing differential multiplexers, and these are controlled by the FPGA HDL
## through this script such that each channel sends pulses back to itself, in the
## sequence O1->I, O2->I, O3->I.
## sequence Out1->In, Out2->In, Out3->In.
##
## In short, what this script does is to turn on pulse repetition, sleep for a
## predefined amount of time, and then check that the same number of pulses that has
......@@ -188,10 +188,12 @@ def main(bus, tname, inf, log):
val = bus.vv_read(CSR)
val |= (1 << CSR_TESTER_VCC_OFS)
bus.vv_write(CSR, val)
time.sleep(1)
#---------------------------
# Test with terminations OFF
#---------------------------
inf.write('\n')
# Read out fail-safe lines -- should now be high, since the MUXes are
# powered but not enabled
......@@ -229,7 +231,7 @@ def main(bus, tname, inf, log):
time.sleep(1)
# Generate pulses from different outputs to inputs
msg = "Testing channel connections (term. OFF): O1 -> I"
msg = "Testing channel connections (term. OFF): Out1 -> In"
print(msg)
mux_sel(bus, 0x1)
inf.write('\n')
......@@ -241,7 +243,7 @@ def main(bus, tname, inf, log):
clear_counters(pc)
time.sleep(1)
msg = "Testing channel connections (term. OFF): O2 -> I"
msg = "Testing channel connections (term. OFF): Out2 -> In"
print(msg)
mux_sel(bus, 0x2)
inf.write('\n')
......@@ -253,7 +255,7 @@ def main(bus, tname, inf, log):
clear_counters(pc)
time.sleep(1)
msg = "Testing channel connections (term. OFF): O3 -> I"
msg = "Testing channel connections (term. OFF): Out3 -> In"
print(msg)
mux_sel(bus, 0x3)
inf.write('\n')
......@@ -275,6 +277,8 @@ def main(bus, tname, inf, log):
#--------------------------
# Test with terminations ON
#--------------------------
inf.write('\n')
# Read out fail-safe lines -- should now be high, since the MUXes are
# powered but not enabled
val = bus.vv_read(LSR)
......@@ -319,7 +323,7 @@ def main(bus, tname, inf, log):
time.sleep(1)
# Generate pulses from different outputs to inputs
msg = "Testing channel connections (term. ON): O1 -> I"
msg = "Testing channel connections (term. ON): Out1 -> In"
print(msg)
mux_sel(bus, 0x1)
inf.write('\n')
......@@ -331,7 +335,7 @@ def main(bus, tname, inf, log):
clear_counters(pc)
time.sleep(1)
msg = "Testing channel connections (term. ON): O2 -> I"
msg = "Testing channel connections (term. ON): Out2 -> In"
print(msg)
mux_sel(bus, 0x2)
inf.write('\n')
......@@ -343,7 +347,7 @@ def main(bus, tname, inf, log):
clear_counters(pc)
time.sleep(1)
msg = "Testing channel connections (term. ON): O3 -> I"
msg = "Testing channel connections (term. ON): Out3 -> In"
print(msg)
mux_sel(bus, 0x3)
inf.write('\n')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment