Commit 2cf50e56 authored by Denia Bouhired-Ferrag's avatar Denia Bouhired-Ferrag

Merge branch 'DB-dev'

parents 987fa158 cdf54c7d
*.bit
*.bin
*.pdf
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
\noindent \rule{\textwidth}{.1cm} \noindent \rule{\textwidth}{.1cm}
\hfill January 15, 2015 \hfill July 13, 2018
\vspace*{3cm} \vspace*{3cm}
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
%--------------------------------------------------------------- %---------------------------------------------------------------
% name % name
%--------------------------------------------------------------- %---------------------------------------------------------------
\noindent {\Large \textbf{Theodor-Adrian Stana (CERN/BE-CO-HT)}} \noindent {\Large \textbf{CERN/BE-CO-HT}}
\noindent \rule{\textwidth}{.05cm} \noindent \rule{\textwidth}{.05cm}
......
...@@ -194,6 +194,9 @@ system to gain remote access to the laptop, the installation of the system can a ...@@ -194,6 +194,9 @@ system to gain remote access to the laptop, the installation of the system can a
on the laptop directly. However, the steps related to network drivers and configuration on the laptop directly. However, the steps related to network drivers and configuration
should be followed in order to have a properly working PTS system. should be followed in order to have a properly working PTS system.
Also note that the admin account should be named \verb=pts-administrator=. This account
name is important as it is embedded in the PTS scripts (Password \verb=pts-admin=).
The guide should be followed until \textbf{step 17} of section \textbf{Set up the PTS user account}. The guide should be followed until \textbf{step 17} of section \textbf{Set up the PTS user account}.
After this step, the guide is SVEC-related and need not be followed. We will continue with After this step, the guide is SVEC-related and need not be followed. We will continue with
the details in the next section to test our system and network was properly installed. the details in the next section to test our system and network was properly installed.
...@@ -215,6 +218,7 @@ the details in the next section to test our system and network was properly inst ...@@ -215,6 +218,7 @@ the details in the next section to test our system and network was properly inst
login:admin login:admin
password: ADMIN password: ADMIN
%> %>
$
\end{verbatim} \end{verbatim}
\vspace{11pt} \vspace{11pt}
\item Make sure the ELMA crate has gateware version 2.31 or higher on it. In the SysMon Telnet prompt: \item Make sure the ELMA crate has gateware version 2.31 or higher on it. In the SysMon Telnet prompt:
...@@ -263,7 +267,7 @@ We will detail here the simplest of the two, downloading the ready-made archive. ...@@ -263,7 +267,7 @@ We will detail here the simplest of the two, downloading the ready-made archive.
See Appendix~\ref{app:build} for details on the second. See Appendix~\ref{app:build} for details on the second.
\begin{enumerate} \begin{enumerate}
\item Log in to the \verb=pts= user on the laptop \item Log in to the \verb=pts-administrator= user on the laptop
\item Open up a terminal window, download the PTS folder structure tarball from OHWR \item Open up a terminal window, download the PTS folder structure tarball from OHWR
to the home folder of the \verb=pts= user and extract the archive: to the home folder of the \verb=pts= user and extract the archive:
\begin{verbatim} \begin{verbatim}
...@@ -329,9 +333,9 @@ See Appendix~\ref{app:build} for details on the second. ...@@ -329,9 +333,9 @@ See Appendix~\ref{app:build} for details on the second.
\begin{verbatim} \begin{verbatim}
cd ~ cd ~
cp .bashrc .bashrc.old cp .bashrc .bashrc.old
cp /home/pts/ubuntu/t485/config/bashrc.pts .bashrc cp /home/pts-administrator/ubuntu/t485/config/bashrc.pts .bashrc
cd ~/Desktop/ cd ~/Desktop/
cp /home/pts/ubuntu/t485/config/*.desktop . cp /home/pts-administrator/ubuntu/t485/config/*.desktop .
\end{verbatim} \end{verbatim}
\item Right-click on the terminal icon in the launcher bar at the left and click \textbf{Lock to Launcher} \item Right-click on the terminal icon in the launcher bar at the left and click \textbf{Lock to Launcher}
\item Close the terminal window \item Close the terminal window
...@@ -341,7 +345,7 @@ See Appendix~\ref{app:build} for details on the second. ...@@ -341,7 +345,7 @@ See Appendix~\ref{app:build} for details on the second.
\begin{itemize} \begin{itemize}
\item on the Desktop, right-click and select \textbf{Change Desktop Background} \item on the Desktop, right-click and select \textbf{Change Desktop Background}
\item hit the \textbf{+} under Wallpapers \item hit the \textbf{+} under Wallpapers
\item navigate to \verb=/home/pts/ubuntu/t485/config/= \item navigate to \verb=/home/pts-administrator/ubuntu/t485/config/=
\item select \verb=t485-background.png= as the background image \item select \verb=t485-background.png= as the background image
\item make sure the scaling of the image is set to \textbf{Zoom} \item make sure the scaling of the image is set to \textbf{Zoom}
\end{itemize} \end{itemize}
...@@ -404,6 +408,10 @@ In order to build a test system from scratch, follow these steps: ...@@ -404,6 +408,10 @@ In order to build a test system from scratch, follow these steps:
cd conv-ttl-rs485-tst/pts-fm/ cd conv-ttl-rs485-tst/pts-fm/
make # ... set options here ... make # ... set options here ...
\end{verbatim} \end{verbatim}
\item Copy the entire \verb=./ubuntu= folder to the \verb=pts-administrator= home directory. Type:
\begin{verbatim}
cp -r ./ubuntu /home/pts-administrator/
\end{verbatim}
\end{enumerate} \end{enumerate}
This will generate an archive similar to that downloaded in Section~\ref{sec:environment}, This will generate an archive similar to that downloaded in Section~\ref{sec:environment},
......
This diff is collapsed.
This diff is collapsed.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
-- File : pts_regs.vhd -- File : pts_regs.vhd
-- Author : auto-generated by wbgen2 from pts_regs.wb -- Author : auto-generated by wbgen2 from pts_regs.wb
-- Created : Thu Dec 4 10:03:35 2014 -- Created : 01/26/18 11:51:31
-- Standard : VHDL'87 -- Standard : VHDL'87
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
-- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE pts_regs.wb -- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE pts_regs.wb
...@@ -51,13 +51,13 @@ entity pts_regs is ...@@ -51,13 +51,13 @@ entity pts_regs is
pts_csr_rst_unlock_o : out std_logic; pts_csr_rst_unlock_o : out std_logic;
pts_csr_rst_unlock_i : in std_logic; pts_csr_rst_unlock_i : in std_logic;
pts_csr_rst_unlock_load_o : out std_logic; pts_csr_rst_unlock_load_o : out std_logic;
-- Ports for BIT field: 'Reset bit' in reg: 'CSR' -- Ports for BIT field: 'Reset bit -- active only if RST_UNLOCK is 1' in reg: 'CSR'
pts_csr_rst_o : out std_logic; pts_csr_rst_o : out std_logic;
pts_csr_rst_i : in std_logic; pts_csr_rst_i : in std_logic;
pts_csr_rst_load_o : out std_logic; pts_csr_rst_load_o : out std_logic;
-- Port for std_logic_vector field: 'switches' in reg: 'CSR' -- Port for std_logic_vector field: 'switches' in reg: 'CSR'
pts_csr_switch_i : in std_logic_vector(7 downto 0); pts_csr_switch_i : in std_logic_vector(7 downto 0);
-- Port for std_logic_vector field: 'RTM' in reg: 'CSR' -- Port for std_logic_vector field: 'RTM detection lines' in reg: 'CSR'
pts_csr_rtm_i : in std_logic_vector(5 downto 0); pts_csr_rtm_i : in std_logic_vector(5 downto 0);
-- Ports for BIT field: 'I2C communication error' in reg: 'CSR' -- Ports for BIT field: 'I2C communication error' in reg: 'CSR'
pts_csr_i2c_err_o : out std_logic; pts_csr_i2c_err_o : out std_logic;
...@@ -82,7 +82,9 @@ entity pts_regs is ...@@ -82,7 +82,9 @@ entity pts_regs is
-- Port for std_logic_vector field: 'Input termination enable' in reg: 'TER' -- Port for std_logic_vector field: 'Input termination enable' in reg: 'TER'
pts_ter_iterm_o : out std_logic_vector(5 downto 0); pts_ter_iterm_o : out std_logic_vector(5 downto 0);
-- Port for std_logic_vector field: 'Output termination enable' in reg: 'TER' -- Port for std_logic_vector field: 'Output termination enable' in reg: 'TER'
pts_ter_oterm_o : out std_logic_vector(5 downto 0) pts_ter_oterm_o : out std_logic_vector(5 downto 0);
-- Port for std_logic_vector field: 'PCB version number' in reg: 'TER'
pts_ter_hwvers_i : in std_logic_vector(5 downto 0)
); );
end pts_regs; end pts_regs;
...@@ -223,16 +225,11 @@ begin ...@@ -223,16 +225,11 @@ begin
end if; end if;
rddata_reg(5 downto 0) <= pts_ter_iterm_int; rddata_reg(5 downto 0) <= pts_ter_iterm_int;
rddata_reg(11 downto 6) <= pts_ter_oterm_int; rddata_reg(11 downto 6) <= pts_ter_oterm_int;
rddata_reg(21 downto 16) <= pts_ter_hwvers_i;
rddata_reg(12) <= 'X'; rddata_reg(12) <= 'X';
rddata_reg(13) <= 'X'; rddata_reg(13) <= 'X';
rddata_reg(14) <= 'X'; rddata_reg(14) <= 'X';
rddata_reg(15) <= 'X'; rddata_reg(15) <= 'X';
rddata_reg(16) <= 'X';
rddata_reg(17) <= 'X';
rddata_reg(18) <= 'X';
rddata_reg(19) <= 'X';
rddata_reg(20) <= 'X';
rddata_reg(21) <= 'X';
rddata_reg(22) <= 'X'; rddata_reg(22) <= 'X';
rddata_reg(23) <= 'X'; rddata_reg(23) <= 'X';
rddata_reg(24) <= 'X'; rddata_reg(24) <= 'X';
...@@ -279,10 +276,10 @@ begin ...@@ -279,10 +276,10 @@ begin
pts_csr_tstcs1_o <= pts_csr_tstcs1_int; pts_csr_tstcs1_o <= pts_csr_tstcs1_int;
-- Reset unlock bit -- Reset unlock bit
pts_csr_rst_unlock_o <= wrdata_reg(14); pts_csr_rst_unlock_o <= wrdata_reg(14);
-- Reset bit -- Reset bit -- active only if RST_UNLOCK is 1
pts_csr_rst_o <= wrdata_reg(15); pts_csr_rst_o <= wrdata_reg(15);
-- switches -- switches
-- RTM -- RTM detection lines
-- I2C communication error -- I2C communication error
pts_csr_i2c_err_o <= wrdata_reg(30); pts_csr_i2c_err_o <= wrdata_reg(30);
-- I2C communication watchdog timeout error -- I2C communication watchdog timeout error
...@@ -297,6 +294,7 @@ begin ...@@ -297,6 +294,7 @@ begin
pts_ter_iterm_o <= pts_ter_iterm_int; pts_ter_iterm_o <= pts_ter_iterm_int;
-- Output termination enable -- Output termination enable
pts_ter_oterm_o <= pts_ter_oterm_int; pts_ter_oterm_o <= pts_ter_oterm_int;
-- PCB version number
rwaddr_reg <= wb_adr_i; rwaddr_reg <= wb_adr_i;
wb_stall_o <= (not ack_sreg(0)) and (wb_stb_i and wb_cyc_i); wb_stall_o <= (not ack_sreg(0)) and (wb_stb_i and wb_cyc_i);
-- ACK signal generation. Just pass the LSB of ACK counter. -- ACK signal generation. Just pass the LSB of ACK counter.
......
...@@ -326,7 +326,21 @@ peripheral { ...@@ -326,7 +326,21 @@ peripheral {
size = 6; size = 6;
access_dev = READ_ONLY; access_dev = READ_ONLY;
access_bus = READ_WRITE; access_bus = READ_WRITE;
};
field {
name = "PCB version number";
description = "6 bits representing HW/PCB version number \
4 MSB represent HW version number \
2 LSB represent number of execution \
Eg: value 010010 represents PCB version 4.2";
prefix = "hwvers";
align = 16;
type = SLV;
size = 6;
access_dev = WRITE_ONLY;
access_bus = READ_ONLY;
}; };
}; };
}; };
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
-- Title : Wishbone slave core for Pulse counter registers -- Title : Wishbone slave core for Pulse counter registers
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
-- File : pulse_cnt_wb.vhd -- File : .\pulse_cnt_wb.vhd
-- Author : auto-generated by wbgen2 from pulse_cnt_wb.wb -- Author : auto-generated by wbgen2 from .\pulse_cnt_wb.wb
-- Created : Mon Nov 3 09:56:02 2014 -- Created : 01/26/18 11:52:56
-- Standard : VHDL'87 -- Standard : VHDL'87
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
-- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE pulse_cnt_wb.wb -- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE .\pulse_cnt_wb.wb
-- DO NOT HAND-EDIT UNLESS IT'S ABSOLUTELY NECESSARY! -- DO NOT HAND-EDIT UNLESS IT'S ABSOLUTELY NECESSARY!
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
......
This diff is collapsed.
...@@ -103,27 +103,27 @@ NET "inv_o[3]" IOSTANDARD = LVCMOS33; ...@@ -103,27 +103,27 @@ NET "inv_o[3]" IOSTANDARD = LVCMOS33;
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Channel LEDs # Channel LEDs
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
NET "led_front_o[0]" LOC = H3; NET "led_front_n_o[0]" LOC = H3;
NET "led_front_o[0]" IOSTANDARD = LVCMOS33; NET "led_front_n_o[0]" IOSTANDARD = LVCMOS33;
NET "led_front_o[1]" LOC = J4; NET "led_front_n_o[1]" LOC = J4;
NET "led_front_o[1]" IOSTANDARD = LVCMOS33; NET "led_front_n_o[1]" IOSTANDARD = LVCMOS33;
NET "led_front_o[2]" LOC = J3; NET "led_front_n_o[2]" LOC = J3;
NET "led_front_o[2]" IOSTANDARD = LVCMOS33; NET "led_front_n_o[2]" IOSTANDARD = LVCMOS33;
NET "led_front_o[3]" LOC = K3; NET "led_front_n_o[3]" LOC = K3;
NET "led_front_o[3]" IOSTANDARD = LVCMOS33; NET "led_front_n_o[3]" IOSTANDARD = LVCMOS33;
NET "led_front_o[4]" LOC = L4; NET "led_front_n_o[4]" LOC = L4;
NET "led_front_o[4]" IOSTANDARD = LVCMOS33; NET "led_front_n_o[4]" IOSTANDARD = LVCMOS33;
NET "led_front_o[5]" LOC = L3; NET "led_front_n_o[5]" LOC = L3;
NET "led_front_o[5]" IOSTANDARD = LVCMOS33; NET "led_front_n_o[5]" IOSTANDARD = LVCMOS33;
NET "led_inv_o[0]" LOC = AA4; NET "led_front_inv_n_o[0]" LOC = AA4;
NET "led_inv_o[0]" IOSTANDARD = LVCMOS33; NET "led_front_inv_n_o[0]" IOSTANDARD = LVCMOS33;
NET "led_inv_o[1]" LOC = AB4; NET "led_front_inv_n_o[1]" LOC = AB4;
NET "led_inv_o[1]" IOSTANDARD = LVCMOS33; NET "led_front_inv_n_o[1]" IOSTANDARD = LVCMOS33;
NET "led_inv_o[2]" LOC = AB5; NET "led_front_inv_n_o[2]" LOC = AB5;
NET "led_inv_o[2]" IOSTANDARD = LVCMOS33; NET "led_front_inv_n_o[2]" IOSTANDARD = LVCMOS33;
NET "led_inv_o[3]" LOC = Y5; NET "led_front_inv_n_o[3]" LOC = Y5;
NET "led_inv_o[3]" IOSTANDARD = LVCMOS33; NET "led_front_inv_n_o[3]" IOSTANDARD = LVCMOS33;
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Status LEDs # Status LEDs
...@@ -158,6 +158,23 @@ NET "led_gf_syspw_o" IOSTANDARD = LVCMOS33; ...@@ -158,6 +158,23 @@ NET "led_gf_syspw_o" IOSTANDARD = LVCMOS33;
NET "led_ttl_i2c_o" LOC = E6; NET "led_ttl_i2c_o" LOC = E6;
NET "led_ttl_i2c_o" IOSTANDARD = LVCMOS33; NET "led_ttl_i2c_o" IOSTANDARD = LVCMOS33;
#------------------------------------------------------------------------------
# PCB version pins
#------------------------------------------------------------------------------
NET "pcbrev_i[0]" LOC = A3;
NET "pcbrev_i[0]" IOSTANDARD = LVCMOS33;
NET "pcbrev_i[1]" LOC = A4;
NET "pcbrev_i[1]" IOSTANDARD = LVCMOS33;
NET "pcbrev_i[2]" LOC = R4;
NET "pcbrev_i[2]" IOSTANDARD = LVCMOS33;
NET "pcbrev_i[3]" LOC = P4;
NET "pcbrev_i[3]" IOSTANDARD = LVCMOS33;
NET "pcbrev_i[4]" LOC = V5;
NET "pcbrev_i[4]" IOSTANDARD = LVCMOS33;
NET "pcbrev_i[5]" LOC = Y3;
NET "pcbrev_i[5]" IOSTANDARD = LVCMOS33;
#============================================================================= #=============================================================================
# Rear panel signals # Rear panel signals
#============================================================================= #=============================================================================
......
This diff is collapsed.
...@@ -20,6 +20,7 @@ all: ...@@ -20,6 +20,7 @@ all:
cp ubuntu/$(BOARD)/pyts/pts.py ubuntu/$(BOARD)/pts cp ubuntu/$(BOARD)/pyts/pts.py ubuntu/$(BOARD)/pts
cp ubuntu/$(BOARD)/pyts/jpts.py ubuntu/$(BOARD)/jpts cp ubuntu/$(BOARD)/pyts/jpts.py ubuntu/$(BOARD)/jpts
cp ubuntu/$(BOARD)/pyts/one.py ubuntu/$(BOARD)/one cp ubuntu/$(BOARD)/pyts/one.py ubuntu/$(BOARD)/one
ln -s pyts/hwvertest.py ubuntu/$(BOARD)/hwvertest.py
ln -s pyts/dac_vcxo_pll.py ubuntu/$(BOARD)/test01.py ln -s pyts/dac_vcxo_pll.py ubuntu/$(BOARD)/test01.py
ln -s pyts/leds.py ubuntu/$(BOARD)/test02.py ln -s pyts/leds.py ubuntu/$(BOARD)/test02.py
ln -s pyts/ttl_pulse_switch.py ubuntu/$(BOARD)/test03.py ln -s pyts/ttl_pulse_switch.py ubuntu/$(BOARD)/test03.py
...@@ -32,10 +33,9 @@ all: ...@@ -32,10 +33,9 @@ all:
mkdir -p ubuntu/$(BOARD)/boot mkdir -p ubuntu/$(BOARD)/boot
mv ubuntu/$(BOARD)/shell/program ubuntu/$(BOARD)/boot mv ubuntu/$(BOARD)/shell/program ubuntu/$(BOARD)/boot
mv ubuntu/$(BOARD)/shell/flash ubuntu/$(BOARD)/boot mv ubuntu/$(BOARD)/shell/flash ubuntu/$(BOARD)/boot
wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3738/pts.bit wget -P ubuntu/$(BOARD)/boot https://www.ohwr.org/attachments/5853/pts.bit
wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3710/flash_load.bit wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3710/flash_load.bit
wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3733/golden-v0.0_release-v1.0.bin wget -P ubuntu/$(BOARD)/boot https://www.ohwr.org/attachments/5860/golden-v0.1_release-v2.0.bin
chmod a+x ubuntu/$(BOARD)/shell/* chmod a+x ubuntu/$(BOARD)/shell/*
chmod a+x ubuntu/$(BOARD)/boot/* chmod a+x ubuntu/$(BOARD)/boot/*
chmod a+x ubuntu/$(BOARD)/jpts chmod a+x ubuntu/$(BOARD)/jpts
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Version=1.0 Version=1.0
Name=Copy Log to USB Name=Copy Log to USB
Comment=Copy log and info files to USB key Comment=Copy log and info files to USB key
Exec=gnome-terminal --title "Copy to USB Key" -e "bash -c 'cp /home/pts/ubuntu/t485/log/t485* /media/pts/log'" Exec=gnome-terminal --title "Copy to USB Key" -e "bash -c 'cp /home/pts-administrator/ubuntu/t485/log/t485* /media/pts-administrator/log'"
Icon=/usr/share/icons/Humanity/apps/48/gnome-session-switch.svg Icon=/usr/share/icons/Humanity/apps/48/gnome-session-switch.svg
Terminal=false Terminal=false
Type=Application Type=Application
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Version=1.0 Version=1.0
Name=VME OFF Name=VME OFF
Comment=Switch off crate Comment=Switch off crate
Exec=/home/pts/ubuntu/t485/shell/men-off Exec=/home/pts-administrator/ubuntu/t485/shell/men-off
Icon=/usr/share/icons/LoginIcons/apps/48/system-shutdown.svg Icon=/usr/share/icons/LoginIcons/apps/48/system-shutdown.svg
Terminal=true Terminal=true
Type=Application Type=Application
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Version=1.0 Version=1.0
Name=VME ON Name=VME ON
Comment=Switch on crate Comment=Switch on crate
Exec=/home/pts/ubuntu/t485/shell/men-on Exec=/home/pts-administrator/ubuntu/t485/shell/men-on
Icon=/usr/share/icons/LoginIcons/apps/48/view-refresh.svg Icon=/usr/share/icons/LoginIcons/apps/48/view-refresh.svg
Terminal=true Terminal=true
Type=Application Type=Application
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
Version=1.0 Version=1.0
Name=Run One PTS CONV-TTL-RS485 Test Name=Run One PTS CONV-TTL-RS485 Test
Comment=Automated testing for the CONV-TTL-RS485 board Comment=Automated testing for the CONV-TTL-RS485 board
Exec=gnome-terminal --geometry 81x32+0+0 --title "PTS Run One Window" -e "bash -c 'cd /home/pts/ubuntu/t485/;./one'" Exec=gnome-terminal --geometry 81x32+0+0 --title "PTS Run One Window" -e "bash -c 'cd /home/pts-administrator/ubuntu/t485/;./one'"
Icon=/home/pts/ubuntu/t485/config/pts-ico-2.png Icon=/home/pts-administrator/ubuntu/t485/config/pts-ico-2.png
Terminal=false Terminal=false
Type=Application Type=Application
Categories=Utility;Application; Categories=Utility;Application;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Version=1.0 Version=1.0
Name=Make log.tar.gz USB zip Name=Make log.tar.gz USB zip
Comment=Make tarball from log data on USB key Comment=Make tarball from log data on USB key
Exec=/home/pts/ubuntu/t485/shell/tar-log Exec=/home/pts-administrator/ubuntu/t485/shell/tar-log
Icon=/usr/share/icons/Humanity/devices/48/gnome-dev-zipdisk.svg Icon=/usr/share/icons/Humanity/devices/48/gnome-dev-zipdisk.svg
Terminal=true Terminal=true
Type=Application Type=Application
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Version=1.0 Version=1.0
Name=PTS Expert Tools Name=PTS Expert Tools
Comment=PTS Utilities Comment=PTS Utilities
Exec=/usr/bin/nautilus /home/pts/ubuntu/t485/config/ExpertTools/ Exec=/usr/bin/nautilus /home/pts-administrator/ubuntu/t485/config/ExpertTools/
Icon=/usr/share/icons/Humanity/apps/48/gconf-editor.svg Icon=/usr/share/icons/Humanity/apps/48/gconf-editor.svg
Terminal=false Terminal=false
Type=Application Type=Application
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
Version=1.0 Version=1.0
Name=Run PTS CONV-TTL-RS485 Name=Run PTS CONV-TTL-RS485
Comment=Automated testing for the CONV-TTL-RS485 board Comment=Automated testing for the CONV-TTL-RS485 board
Exec=gnome-terminal --geometry 81x32+0+0 --title "PTS Main Window" -e "bash -c 'cd /home/pts/ubuntu/t485/; ./pts'" Exec=gnome-terminal --geometry 81x32+0+0 --title "PTS Main Window" -e "bash -c 'cd /home/pts-administrator/ubuntu/t485/; ./pts'"
Icon=/home/pts/ubuntu/t485/config/pts-ico-2.png Icon=/home/pts-administrator/ubuntu/t485/config/pts-ico-2.png
Terminal=false Terminal=false
Type=Application Type=Application
Categories=Utility;Application; Categories=Utility;Application;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Version=1.0 Version=1.0
Name=Show PTS Info Name=Show PTS Info
Comment=Show PTS info Comment=Show PTS info
Exec=bash -c "cd /home/pts/ubuntu/t485/shell/; ./show-info" Exec=bash -c "cd /home/pts-administrator/ubuntu/t485/shell/; ./show-info"
Icon=/usr/share/icons/Humanity/apps/48/xfce-system-info.svg Icon=/usr/share/icons/Humanity/apps/48/xfce-system-info.svg
Terminal=false Terminal=false
Type=Application Type=Application
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Version=1.0 Version=1.0
Name=Show PTS Log Name=Show PTS Log
Comment=Show PTS log Comment=Show PTS log
Exec=bash -c "cd /home/pts/ubuntu/t485/shell/; ./show-log" Exec=bash -c "cd /home/pts-administrator/ubuntu/t485/shell/; ./show-log"
Icon=/usr/share/icons/Humanity/apps/48/xfce-man.svg Icon=/usr/share/icons/Humanity/apps/48/xfce-man.svg
Terminal=false Terminal=false
Type=Application Type=Application
......
...@@ -66,11 +66,11 @@ def main(bus,tname,inf,log): ...@@ -66,11 +66,11 @@ def main(bus,tname,inf,log):
""" """
tests : Flash chip IC62 tests : Flash chip IC62
uses : golden-v0.0_release-v1.0.bin and flashtest.py uses : golden-v0.1_release-v2.0.bin and flashtest.py
""" """
GWVERS_RELEASE = 1.0 GWVERS_RELEASE = 2.0
GWVERS_GOLDEN = 0.0 GWVERS_GOLDEN = 0.1
# Set the precision of gateware versions based on the number of digits the # Set the precision of gateware versions based on the number of digits the
# fractional part thereof has; this is done to avoid exceptions in the # fractional part thereof has; this is done to avoid exceptions in the
......
##_______________________________________________________________________________________________
##
## CONV-TTL-RS485 PTS
##
## CERN,BE/CO-HT
##_______________________________________________________________________________________________
##
##-----------------------------------------------------------------------------------------------
##
## CONV-TTL-RS485 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_target = 4.0
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(TER) & 0x3F0000) >> TER_HWVERS_OFS
maj = int(hwvers >> 2)
min = float(hwvers & 0x03)
min /= 10
hwvers = maj + min
# and now check if appropriate
if (hwvers == HWVERS_target):
msg = "HW/PCB version correct: %2.1f\n" % (hwvers)
inf.write(msg)
else:
msg = "ERROR: HW/PCBe version (%2.1f) incorrect - expected %2.1f" % (hwvers, HWVERS_target)
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))
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
## Import ## Import
##------------------------------------------------------------------------------------------------ ##------------------------------------------------------------------------------------------------
import sys import sys
sys.path.append('.') sys.path.append(".")
sys.path.append("pyts") sys.path.append("pyts")
import ptsexcept import ptsexcept
import ptsdefine import ptsdefine
...@@ -193,65 +193,99 @@ if __name__ == '__main__': ...@@ -193,65 +193,99 @@ if __name__ == '__main__':
except BusWarning, e: except BusWarning, e:
print "Warning:Bus Exception: %s" % (e) print "Warning:Bus Exception: %s" % (e)
# Start running the tests. # Test version of HW/PCB before running any other tests
for t in tns: tname = "hwvertest"
try:
# First load a firmware and read back a register to confirm correct load.
if bus.vv_load() == 0:
msg = "INFO: Found CONV-TTL-RS485 board in slot %d\n" % (lun)
inf.write(msg + '\n')
# The test is passed the test name, the log and info files and the
# bus object. The test program returns the number of errors that
# occured. If no errors occur, the test PASSes, otherwise it FAILs.
cc = run_test(tname,bus,inf,log)
if cc == 0:
msg = "PASS: %s" % (tname)
log.write(msg + '\n')
inf.write(msg + '\n')
print msg
else:
msg = "FAIL: %s->%s" % (tname, lnk_ptr(tname))
log.write(msg + '\n')
inf.write(msg + '\n')
print msg
tname = "test%02d" % t[0] except Exception, e:
pyt = "%s/%s.py" % (dir, tname) if options.debug:
print e
traceback.print_exc()
if path.exists(pyt) and path.isfile(pyt) and access(pyt, R_OK): msg = "FAIL: %s->%s (%s)" % (tname, lnk_ptr(tname), e)
log.write(msg + '\n')
inf.write(msg + '\n')
print msg
for n in range(t[1]): # Start running the tests, only if the HW/PCB version is OK
if cc == 0:
for t in tns:
if n == 10: tname = "test%02d" % t[0]
msg = "Printing suppresses after 10 runs" pyt = "%s/%s.py" % (dir, tname)
print msg
log.write('\n' + msg + '\n')
inf.write('\n' + msg + '\n')
if n < 10: if path.exists(pyt) and path.isfile(pyt) and access(pyt, R_OK):
msg = "Run:%d Begin:%s" % (n+1,tname)
print msg
log.write('\n' + msg + '\n')
inf.write('\n' + msg + '\n')
try: for n in range(t[1]):
# First load a firmware and read back a register to confirm correct load.
if bus.vv_load() == 0:
msg = "INFO: Found CONV-TTL-RS485 board in slot %d\n" % (lun)
inf.write(msg + '\n')
# Each test is passed the test name, the log and info files and the if n == 10:
# bus object. The test program is expected to return the number of msg = "Printing suppresses after 10 runs"
# errors that occured. If no errors occur, the test PASSes, otherwise print msg
# it FAILs. log.write('\n' + msg + '\n')
cc = run_test(tname,bus,inf,log) inf.write('\n' + msg + '\n')
if cc == 0:
msg = "PASS: %s" % (tname) if n < 10:
log.write(msg + '\n') msg = "Run:%d Begin:%s" % (n+1,tname)
inf.write(msg + '\n')
print msg print msg
else: log.write('\n' + msg + '\n')
msg = "FAIL: %s->%s" % (tname, lnk_ptr(tname)) inf.write('\n' + msg + '\n')
try:
# First load a firmware and read back a register to confirm correct load.
if bus.vv_load() == 0:
msg = "INFO: Found CONV-TTL-RS485 board in slot %d\n" % (lun)
inf.write(msg + '\n')
# Each test is passed the test name, the log and info files and the
# bus object. The test program is expected to return the number of
# errors that occured. If no errors occur, the test PASSes, otherwise
# it FAILs.
cc = run_test(tname,bus,inf,log)
if cc == 0:
msg = "PASS: %s" % (tname)
log.write(msg + '\n')
inf.write(msg + '\n')
print msg
else:
msg = "FAIL: %s->%s" % (tname, lnk_ptr(tname))
log.write(msg + '\n')
inf.write(msg + '\n')
print msg
except Exception, e:
if options.debug:
print e
traceback.print_exc()
msg = "FAIL: %s->%s (%s)" % (tname, lnk_ptr(tname), e)
log.write(msg + '\n') log.write(msg + '\n')
inf.write(msg + '\n') inf.write(msg + '\n')
print msg print msg
except Exception, e: if n < 10:
if options.debug: msg = "Run:%d End:%s\n" % (n+1,tname)
print e print msg
traceback.print_exc() log.write(msg + '\n')
inf.write(msg + '\n')
msg = "FAIL: %s->%s (%s)" % (tname, lnk_ptr(tname), e)
log.write(msg + '\n')
inf.write(msg + '\n')
print msg
if n < 10:
msg = "Run:%d End:%s\n" % (n+1,tname)
print msg
log.write(msg + '\n')
inf.write(msg + '\n')
# Close the bus and the files # Close the bus and the files
bus.vv_close() bus.vv_close()
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
## ##
## Authors Julian Lewis (Julian.Lewis@cern.ch) ## Authors Julian Lewis (Julian.Lewis@cern.ch)
## Theodor Stana (t.stana@cern.ch) ## Theodor Stana (t.stana@cern.ch)
## Denia Bouhired (denia.bouhired@gmail.com)
## Website http://www.ohwr.org/projects/conv-ttl-rs485 ## Website http://www.ohwr.org/projects/conv-ttl-rs485
## Date 30/10/2014 ## Date 30/10/2014
##------------------------------------------------------------------------------------------------- ##-------------------------------------------------------------------------------------------------
...@@ -64,6 +65,8 @@ import subprocess ...@@ -64,6 +65,8 @@ import subprocess
import re import re
# Import ptsdefine module to avoid wrong `make's # Import ptsdefine module to avoid wrong `make's
from ptsexcept import *
from vv_pts import *
from ptsdefine import * from ptsdefine import *
##------------------------------------------------------------------------------------------------- ##-------------------------------------------------------------------------------------------------
...@@ -104,6 +107,7 @@ if __name__ == '__main__': ...@@ -104,6 +107,7 @@ if __name__ == '__main__':
# Turn off the VME crate # Turn off the VME crate
men_off() men_off()
bus = SKT(ELMASLOT)
# Scan the first barcode # Scan the first barcode
while True: while True:
sn1 = raw_input("--> Scan the 1st barcode: ") sn1 = raw_input("--> Scan the 1st barcode: ")
...@@ -182,16 +186,58 @@ if __name__ == '__main__': ...@@ -182,16 +186,58 @@ if __name__ == '__main__':
subprocess.call("grep PASS log/*.log", shell=True, stdout=sys.stdout, stderr=sys.stderr) subprocess.call("grep PASS log/*.log", shell=True, stdout=sys.stdout, stderr=sys.stderr)
subprocess.call("grep FAIL log/*.log", shell=True, stdout=sys.stdout, stderr=sys.stderr) subprocess.call("grep FAIL log/*.log", shell=True, stdout=sys.stdout, stderr=sys.stderr)
# Save results on USB key... # Save results on local folder...
print "\nSaving test results on USB key" print "\nSaving test results in /home/pts-administrator/pts/log/t485"
try: try:
subprocess.call("mkdir -p /media/pts/log", shell=True, stdout=sys.stdout, stderr=sys.stderr) subprocess.call("mkdir -p /home/pts-administrator/pts/log/t485", shell=True, stdout=sys.stdout, stderr=sys.stderr)
subprocess.call("cp log/*.log /media/pts/log", shell=True, stdout=sys.stdout, stderr=sys.stderr) subprocess.call("cp log/*.log /home/pts-administrator/pts/log/t485", shell=True, stdout=sys.stdout, stderr=sys.stderr)
subprocess.call("cp log/*.inf /media/pts/log", shell=True, stdout=sys.stdout, stderr=sys.stderr) subprocess.call("cp log/*.inf /home/pts-administrator/pts/log/t485", shell=True, stdout=sys.stdout, stderr=sys.stderr)
except e: except e:
print "ERROR: No access to USB key at /media/pts" print "ERROR: No access to directory /home/pts-administrator/pts/t485"
print e print e
#-------------------------------------------------------------------------------
# Reading board unique ID and storing to separate log file
#-------------------------------------------------------------------------------
# ... power-cycle the crate
print "VME Crate power-cycle..."
men_off()
time.sleep(3)
men_on()
time.sleep(10)
#Read unique board ID
IDMS = bus.vv_read(UIDREGMS)
IDLS = bus.vv_read(UIDREGLS)
#Generate log file
# Generate output file named according to current time
fname = time.strftime("serial-num-CTDAP-%Y-%m-%d", time.localtime()) + ".txt"
ret = subprocess.call(["ls /home/pts-administrator/pts/log/t485 | grep " + fname], shell=True, stdout=None, stderr=None)
#print ("%d" % ret)
if (ret != 0):
f = open("/home/pts-administrator/pts/log/t485/" + fname, "w")
print(" File not found ... Create new one \n ")
f.write("\n")
f.write("CONV-TTL-RS485 Upgrade log created on %s \n" % time.strftime("%Y-%m-%d-%Hh%Mm%Ss", time.localtime()))
f.write("--------------------------------------------------------------------------------- \n")
f.write("Barcode 1 | Barcode 2 | PCB ID |\n")
f.write("--------------------------------------------------------------------------------- \n")
f.close()
print("Upgrade log can be found in /home/pts-administrator/pts/log/t485/%s \n" % fname)
print ("Board unique ID can be found in /home/pts-administrator/pts/log/t485/%s \n" % fname)
f = open("/home/pts-administrator/pts/log/t485/" + fname, "a")
f.write("%s \t %s \t %x%x\n" % (sn1, sn2, IDMS, IDLS) )
f.close()
#-------------------------------------------------------------------------------
# We're done, turn off the VME crate # We're done, turn off the VME crate
print "\nTesting completed!" print "\nTesting completed!"
men_off() men_off()
......
...@@ -55,7 +55,7 @@ BIDR_ARR = [ "TBLO", "T485" ] ...@@ -55,7 +55,7 @@ BIDR_ARR = [ "TBLO", "T485" ]
CSR = 0x004 CSR = 0x004
CSR_CHLEDT_OFS = 0 CSR_CHLEDT_OFS = 0
CSR_STLEDT_OFS = 1 CSR_STLEDT_OFS = 1
#CSR_RLEDT_OFS = 2 CSR_RLEDT_OFS = 2
CSR_TTLPT_OFS = 3 CSR_TTLPT_OFS = 3
CSR_REARPT_OFS = 4 CSR_REARPT_OFS = 4
CSR_TSTCVCC_OFS = 5 CSR_TSTCVCC_OFS = 5
...@@ -80,10 +80,14 @@ LSR_REARFS_OFS = 26 ...@@ -80,10 +80,14 @@ LSR_REARFS_OFS = 26
TER = 0x00c TER = 0x00c
TER_ITERM_OFS = 0 TER_ITERM_OFS = 0
TER_OTERM_OFS = 6 TER_OTERM_OFS = 6
TER_HWVERS_OFS = 16
# 1-Wire base address, used in therm_id.py # 1-Wire base address, used in therm_id.py
TEMP_1WIRE_BASE = 0x010 TEMP_1WIRE_BASE = 0x010
# 1-Wire unique ID
UIDREGLS = 0xac # 1-wire chip Unique ID - LSB
UIDREGMS = 0xb0 # 1-wire chip Unique ID - MSB
# DAC and clock info registers and offsets, used in dac_vcxo_pll.py # DAC and clock info registers and offsets, used in dac_vcxo_pll.py
PLL_DAC_BASE = 0X020 PLL_DAC_BASE = 0X020
VCXO_DAC_BASE = 0x080 VCXO_DAC_BASE = 0x080
......
...@@ -191,10 +191,10 @@ def main(bus, tname, inf, log): ...@@ -191,10 +191,10 @@ def main(bus, tname, inf, log):
# Ask the user to make the daisy-chain # Ask the user to make the daisy-chain
print("Connect the LEMO cable as follows:") print("Connect the LEMO cable as follows:")
print(" - BLU cable to INV-TTL CH A") print(" - BLU cable to INV-TTL CH A OUT")
print(" - GRN cable to INV-TTL CH B") print(" - GRN cable to INV-TTL CH B OUT")
print(" - RED cable to INV-TTL CH C") print(" - RED cable to INV-TTL CH C OUT")
print(" - YEL cable to INV-TTL CH D") print(" - YEL cable to INV-TTL CH D OUT")
reply = raw_input("Have the connections been made? (yes/no) ") reply = raw_input("Have the connections been made? (yes/no) ")
while (1): while (1):
......
...@@ -153,6 +153,19 @@ def main(bus, tname, inf, log): ...@@ -153,6 +153,19 @@ def main(bus, tname, inf, log):
chans = ['1', '2', '3', '4', '5', '6', 'A', 'B', 'C', 'D'] chans = ['1', '2', '3', '4', '5', '6', 'A', 'B', 'C', 'D']
try: try:
# Ask the user to make the daisy-chain
print("Please plug in the two patch boards 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 # Initialize a pulse counter object
pc = CPulseCounter(bus, PULSE_CNT_BASE) pc = CPulseCounter(bus, PULSE_CNT_BASE)
......
#!/bin/bash #!/bin/bash
xc3sprog -c xpc flash_load.bit xc3sprog -c xpc flash_load.bit
xc3sprog -c xpc -I golden-v0.0_release-v1.0.bin:w:0:bin xc3sprog -c xpc -I golden-v0.1_release-v2.0.bin:w:0:bin
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