Commit 7f95c22b authored by unknown's avatar unknown

Merge remote-tracking branch 'rw-origin/denia-tempo' into HEAD

parents 285344ce cfcfcb49
......@@ -3,7 +3,7 @@
---------------------------------------------------------------------------------------
-- File : .\pts_regs.vhd
-- Author : auto-generated by wbgen2 from .\pts_regs.wb
-- Created : 06/19/17 17:23:25
-- Created : 10/27/17 10:49:32
-- Standard : VHDL'87
---------------------------------------------------------------------------------------
-- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE .\pts_regs.wb
......
......@@ -155,7 +155,6 @@ entity pts is
sw_gp_n_i : in std_logic_vector(7 downto 0);
sw_multicast_n_i : in std_logic_vector(3 downto 0);
-- PCB version recognition
pcbrev_i : in std_logic_vector(5 downto 0);
......@@ -1901,8 +1900,10 @@ end generate gen_rear_test_logic;
end if;
end process p_led_seq;
max_led_seq <= to_unsigned(30,5) when pulse_led_en = '1' else to_unsigned(24,5); -- cycle 24 times for status leds
-- cycle 24 times for status leds
-- 30 times for pulse leds
max_led_seq <= to_unsigned(30,5) when pulse_led_en = '1' else to_unsigned(24,5);
-- Sequence the front-panel LEDs based on the sequence counter
front_led_seq <= "0000000001" when (pulse_led_en = '1') and (led_seq = 1) else
"0000000010" when (pulse_led_en = '1') and (led_seq = 2) else
......
......@@ -3,7 +3,7 @@
Version=1.0
Name=Copy Log to USB
Comment=Copy log and info files to USB key
Exec=gnome-terminal --title "Copy to USB Key" -e "bash -c 'cp /home/pts/ubuntu/ttlbl/log/ttlbl* /media/pts/log'"
Exec=gnome-terminal --title "Copy to USB Key" -e "bash -c 'cp /home/pts-administrator/ubuntu/ttlbl/log/ttlbl* /media/pts-administrator/log'"
Icon=/usr/share/icons/Humanity/apps/48/gnome-session-switch.svg
Terminal=false
Type=Application
......
......@@ -3,7 +3,7 @@
Version=1.0
Name=VME OFF
Comment=Switch off crate
Exec=/home/pts/ubuntu/ttlbl/shell/men-off
Exec=/home/pts-administrator/ubuntu/ttlbl/shell/men-off
Icon=/usr/share/icons/LoginIcons/apps/48/system-shutdown.svg
Terminal=true
Type=Application
......
......@@ -3,7 +3,7 @@
Version=1.0
Name=VME ON
Comment=Switch on crate
Exec=/home/pts/ubuntu/ttlbl/shell/men-on
Exec=/home/pts-administrator/ubuntu/ttlbl/shell/men-on
Icon=/usr/share/icons/LoginIcons/apps/48/view-refresh.svg
Terminal=true
Type=Application
......
......@@ -3,8 +3,8 @@
Version=1.0
Name=Run One PTS CONV-TTL-BLO Test
Comment=Automated testing for the CONV-TTL-BLO board
Exec=gnome-terminal --geometry 81x32+0+0 --title "PTS Run One Window" -e "bash -c 'cd /home/pts/ubuntu/ttlbl/;./one'"
Icon=/home/pts/ubuntu/ttlbl/config/pts-ico-2.png
Exec=gnome-terminal --geometry 81x32+0+0 --title "PTS Run One Window" -e "bash -c 'cd /home/pts-administrator/ubuntu/ttlbl/;./one'"
Icon=/home/pts-administrator/ubuntu/ttlbl/config/pts-ico-2.png
Terminal=false
Type=Application
Categories=Utility;Application;
......
......@@ -3,7 +3,7 @@
Version=1.0
Name=Make log.tar.gz USB zip
Comment=Make tarball from log data on USB key
Exec=/home/pts/ubuntu/ttlbl/shell/tar-log
Exec=/home/pts-administrator/ubuntu/ttlbl/shell/tar-log
Icon=/usr/share/icons/Humanity/devices/48/gnome-dev-zipdisk.svg
Terminal=true
Type=Application
......
##_______________________________________________________________________________________________
##
## CONV-TTL-BLO PTS
##
## CERN,BE/CO-HT
##_______________________________________________________________________________________________
##
##-----------------------------------------------------------------------------------------------
##
## CONV-TTL-BLO pcb version
##
##-----------------------------------------------------------------------------------------------
##
## Description Test whether the version of PCB is the expected one
##
##
## Authors Maciej Lipinski (maciej.lipinski@cern.ch)
## Website http://www.ohwr.org/projects/pts
## Date 17/08/2017
##-----------------------------------------------------------------------------------------------
##
##------------------------------------------------------------------------------------------------
## GNU LESSER GENERAL PUBLIC LICENSE
## ------------------------------------
## This source file is free software; you can redistribute it and/or modify it under the terms of
## the GNU Lesser General Public License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
## This source is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
## without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU Lesser General Public License for more details.
## You should have received a copy of the GNU Lesser General Public License along with this
## source; if not, download it from http://www.gnu.org/licenses/lgpl-2.1.html
##-------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
## Import
##-------------------------------------------------------------------------------------------------
# Import system modules
import sys
sys.path.append("log/")
import time
import os, errno, re, sys, struct
import os.path
import traceback
import glob
import binascii
# Import common modules
from ctypes import *
from ptsexcept import *
from vv_pts import *
from ptsdefine import *
##-------------------------------------------------------------------------------------------------
## main --
##-------------------------------------------------------------------------------------------------
def main(bus,tname,inf,log):
"""
tests : Hardware version
uses : pts.bit and hwvertest.py
"""
HWVERS = 0.0
GWVERS = 4.1
# Control and Status Register
CSR = 0x004
CSR_GWVERS_OFS = 0
CSR_HWVERS_OFS = 22
pel = PTS_ERROR_LOGGER(inf,log)
try:
# Read PCB version: a 6 bits representing HW/PCB version number
# 4 MSB represent HW version number (major)
# 2 LSB represent number of execution (minor)
# Eg: value 010010 represents PCB version 4.2
hwvers = (bus.vv_read(CSR) & 0xFC00000) >> CSR_HWVERS_OFS
maj = int(hwvers >> 2)
min = float(hwvers & 0x03)
min /= 10
hwvers = maj + min
# and now check if appropriate
if (hwvers == HWVERS):
if (HWVERS == 0.0)
msg = "HW/PCB version is version 3 or earlier \n"
inf.write(msg)
else:
msg = "HW/PCB version is version %2.1f \n" % (HWVERS)
inf.write(msg)
else:
msg = "ERROR: HW/PCBe version (%2.1f) incorrect - expected %2.1f" % (hwvers, HWVERS)
pel.set(msg)
print "-->%s" % msg
return pel.get()
except BusException, e:
raise PtsError("SKT Exception: %s" % (e))
except BusWarning, e:
raise PtsError("SKT Warning: %s" % (e))
try:
# Read GW release version: a 8 bits representing HW/PCB version number
# 4 MSB represent HW version number (major)
# 4 LSB represent number of execution (minor)
# Eg: value 01000010 represents PCB version 4.2
hwvers = (bus.vv_read(CSR) & 0xFF) >> CSR_GWVERS_OFS
maj = int(gwvers >> 4)
min = float(hwvers & 0x0F)
min /= 10
gwvers = maj + min
# and now check if appropriate
if (gwvers == GWVERS):
msg = "GW version is version %2.1f or earlier \n" % (GWVERS)
inf.write(msg)
else:
msg = "ERROR: GW version (%2.1f) incorrect - expected %2.1f \n" % (gwvers, GWVERS)
pel.set(msg)
print "-->%s" % msg
return pel.get()
except BusException, e:
raise PtsError("SKT Exception: %s" % (e))
except BusWarning, e:
raise PtsError("SKT Warning: %s" % (e))
......@@ -153,6 +153,20 @@ def main(bus, tname, inf, log):
chans = ['1', '2', '3', '4', '5', '6', 'A', 'B', 'C', 'D']
try:
# Ask the user to make the daisy-chain
print("Please plug in the patch board for front panel daisy-chaining:\n")
reply = raw_input("Is the patch board plugged-in? (yes/no) ")
while True:
if "yes" in reply.lower():
break
if "no" in reply.lower():
msg = "ERROR: No daisy-chain on front panel"
pel.set(msg)
return pel.get()
else:
reply = raw_input('Please type "yes" or "no" to continue: ')
# Initialize a pulse counter object
pc = CPulseCounter(bus, PULSE_CNT_BASE)
......
#!/bin/bash
xc3sprog -c xpc flash_load.bit
xc3sprog -c xpc -I golden-v0.2_release-v4.0.bin:w:0:bin
xc3sprog -c xpc -I golden-v0.3_release-v4.1.bin:w:0:bin
#!/bin/bash
xc3sprog -c xpc pts-v4.bit
xc3sprog -c xpc pts.bit
#!/bin/bash
cd
cd /media/pts
cd /media/pts-administrator
rm -f log.tar.gz
tar cvzf log.tar.gz log
cd
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