Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL RS485 - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Conv TTL RS485 - Testing
Commits
3b1e9930
Commit
3b1e9930
authored
Jan 09, 2015
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: Amost finished PTS system setup guide
parent
c4e9a8ff
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
159 additions
and
12 deletions
+159
-12
Makefile
doc/setup/Makefile
+1
-0
cern-title.tex
doc/setup/cern-title.tex
+1
-1
setup.bib
doc/setup/setup.bib
+3
-6
setup.tex
doc/setup/setup.tex
+154
-5
No files found.
doc/setup/Makefile
View file @
3b1e9930
...
...
@@ -3,6 +3,7 @@ FILE=setup
all
:
$(MAKE)
-C
fig
pdflatex
-synctex
=
1
-interaction
=
nonstopmode
$(FILE)
.tex
*
.tex
bibtex
$(FILE)
.aux
pdflatex
-synctex
=
1
-interaction
=
nonstopmode
$(FILE)
.tex
*
.tex
pdflatex
-synctex
=
1
-interaction
=
nonstopmode
$(FILE)
.tex
*
.tex
evince
$(FILE)
.pdf &
...
...
doc/setup/cern-title.tex
View file @
3b1e9930
...
...
@@ -9,7 +9,7 @@
\noindent
\rule
{
\textwidth
}{
.1cm
}
\hfill
DATE
\hfill
January 12, 2015
\vspace*
{
3cm
}
...
...
doc/setup/setup.bib
View file @
3b1e9930
@misc{coding-guidelines,
author = "Patrick Loschmidt and Nata{\v s}a Simani\'c and C\'esar Prados and Pablo Alvarez and Javier Serrano",
title = {{Guidelines for VHDL Coding}},
month = 04,
year = 2011,
note = {\url{http://www.ohwr.org/documents/24}}
@misc{board-id,
title = {{Converter board IDs page on OHWR}},
note = {\url{http://www.ohwr.org/projects/conv-common-gw/wiki/Board-id}}
}
doc/setup/setup.tex
View file @
3b1e9930
...
...
@@ -77,7 +77,7 @@ work, see \\
\hline
\multicolumn
{
1
}{
c
}{
\textbf
{
Date
}}
&
\multicolumn
{
1
}{
c
}{
\textbf
{
Version
}}
&
\multicolumn
{
1
}{
c
}{
\textbf
{
Change
}}
\\
\hline
DATE
&
0.1
&
First draft
\\
12-01-2015
&
0.1
&
First draft
\\
\hline
\end{tabular}
}
...
...
@@ -89,9 +89,6 @@ work, see \\
\pdfbookmark
[1]
{
\contentsname
}{
toc
}
\tableofcontents
\listoffigures
\listoftables
%------------------------------------------------------------------------------
% List of abbreviations
%------------------------------------------------------------------------------
...
...
@@ -99,6 +96,8 @@ work, see \\
\section*
{
List of abbreviations
}
\begin{tabular}
{
l l
}
FM
&
Front Module
\\
PTS
&
Production Test Suite
\\
RTM
&
Rear-Transition Module
\\
\end{tabular}
\addcontentsline
{
toc
}{
section
}{
List of abbreviations
}
...
...
@@ -201,7 +200,8 @@ the details in the next section to test our system and network was properly inst
%>
\end
{
verbatim
}
\item
If the prompt appears as above, the setup is fine. Now we need to disable the telnet ping
that the SysMon does, so it doesn't get in the way of our Python scripts:
that the SysMon does, so it doesn't get in the way of our Python scripts, which use Telnet
to talk to the CONV
-
TTL
-
RS
485
FPGA:
\begin
{
verbatim
}
%> telnetping 0
%> saveenv
...
...
@@ -215,7 +215,156 @@ the details in the next section to test our system and network was properly inst
%==============================================================================
% SEC: Test environment
%==============================================================================
\pagebreak
\section
{
Preparing the laptop test environment
}
\label
{
sec:environment
}
After Ubuntu has been set up and the ELMA connection tested, we need to set up the
actual test scripts and a way of running them. This entails copying the PTS folder
structure for the CONV
-
TTL
-
RS
485
PTS to the laptop, copying the shortcuts to the
Desktop so that a user can run them and creating a dedicated Ubuntu user for the
CONV
-
TTL
-
RS
485
PTS.
Note that there are two ways of obtaining the PTS folder structure:
\begin
{
itemize
}
\item
Download the ready
-
made archive from OHWR
\item
Build the test system from the repository
\end
{
itemize
}
We will detail here the simplest of the two, downloading the ready
-
made archive.
See Appendix~
\ref
{
app:build
}
for details on the second.
\begin
{
enumerate
}
\item
Log in to the
\verb
=
pts
=
user on the laptop
\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:
\begin
{
verbatim
}
cd ~
wget http:
//
www.ohwr.org
/
attachments
/
download
/
3745
/
ubuntu.tar.gz
tar xzvf ubuntu.tar.gz
\end
{
verbatim
}
\item
Check that all extracted files and folders have write permissions:
\begin
{
small
}
\begin
{
verbatim
}
$
cd ubuntu/t485/
$
ls
-
l
total
56
drwxrwxr
-
x
7
tstana tstana
4096
Jan
8
11
:
45
.
/
drwxrwxr
-
x
3
tstana tstana
4096
Jan
8
11
:
45
..
/
drwxrwxr
-
x
2
tstana tstana
4096
Jan
8
11
:
45
boot
/
drwxrwxr
-
x
3
tstana tstana
4096
Jan
8
11
:
45
config
/
lrwxrwxrwx
1
tstana tstana
17
Jan
8
11
:
45
flashtest.py
-
> pyts
/
flashtest.py
-
rwxrwxr
-
x
1
tstana tstana
10933
Jan
8
11
:
45
jpts
*
drwxrwxr
-
x
2
tstana tstana
4096
Jan
8
11
:
45
log
/
-
rwxrwxr
-
x
1
tstana tstana
2949
Jan
8
11
:
45
one
*
-
rwxrwxr
-
x
1
tstana tstana
9906
Jan
8
11
:
45
pts
*
drwxrwxr
-
x
2
tstana tstana
4096
Jan
8
11
:
45
pyts
/
drwxrwxr
-
x
2
tstana tstana
4096
Jan
8
11
:
45
shell
/
lrwxrwxrwx
1
tstana tstana
20
Jan
8
11
:
45
test
01
.py
-
> pyts
/
dac
_
vcxo
_
pll.py
lrwxrwxrwx
1
tstana tstana
12
Jan
8
11
:
45
test
02
.py
-
> pyts
/
leds.py
lrwxrwxrwx
1
tstana tstana
24
Jan
8
11
:
45
test
03
.py
-
> pyts
/
ttl
_
pulse
_
switch.py
lrwxrwxrwx
1
tstana tstana
23
Jan
8
11
:
45
test
04
.py
-
> pyts
/
rs
485
_
pulse
_
rtm.py
lrwxrwxrwx
1
tstana tstana
16
Jan
8
11
:
45
test
05
.py
-
> pyts
/
therm
_
id.py
lrwxrwxrwx
1
tstana tstana
18
Jan
8
11
:
45
test
06
.py
-
> pyts
/
sfp
_
eeprom.py
lrwxrwxrwx
1
tstana tstana
16
Jan
8
11
:
45
test
07
.py
-
> pyts
/
sfp
_
test.py
\end
{
verbatim
}
\end
{
small
}
\item
If they do not have write permissions, as in the case above, make sure they do:
\begin
{
verbatim
}
chmod a
+
w
*
\end
{
verbatim
}
\item
Now we that have the test scripts on the system we can create a dedicated
user that will be used to run the PTS for the CONV
-
TTL
-
RS
485
. Open up Ubuntu's
\textbf
{
User Accounts
}
window
(
click the
\verb
=
pts
=
user account name at the top
left of the screen
)
, unlock this window by providing the
\verb
=
pts
=
user account's
password
(
\verb
=
pts
-
user
=)
and create a new user with the following settings:
\begin
{
itemize
}
\item
\textbf
{
Account Type:
}
Standard
\item
\textbf
{
Full name:
}
conv
-
ttl
-
rs
485
\item
\textbf
{
Username:
}
conv
-
ttl
-
rs
485
\end
{
itemize
}
\item
While still in the
\textbf
{
User Accounts
}
window, click the new
\verb
=
conv
-
ttl
-
rs
485
=
user account
\item
Under
\textbf
{
Login options
}
, click the
\textbf
{
Password
}
dialog which should
at this moment be set to
\textit
{
Account disabled
}
\item
In the dialog that opens up, set the following parameters:
\begin
{
itemize
}
\item
\textbf
{
Action:
}
Set a password now
\item
\textbf
{
New password:
}
pts
-
user
\end
{
itemize
}
\item
Log in to the new
\verb
=
conv
-
ttl
-
rs
485
=
user account
\item
Open up a terminal window here, and copy
the desktop shortcuts from the extracted PTS tarball to this user's desktop:
\begin
{
verbatim
}
cd ~
/
Desktop
/
cp
/
home
/
pts
/
ubuntu
/
t
485
/
config
/*
.desktop .
\end
{
verbatim
}
\item
You should now have a working PTS test system. Navigate to the desktop and
try to run the new
\textbf
{
Run CONV
-
TTL
-
RS
485
PTS
}
executable here. Plug in a card
to see if the PTS system communicates to it
(
no need to set up daisy
-
chains or anything
for this test, you can do that later
)
.
\end
{
enumerate
}
%==============================================================================
\pagebreak
\begin
{
appendices
}
%==============================================================================
\section
{
Building the test system from the repository
}
\label
{
app:build
}
The CONV
-
TTL
-
RS
485
test system is devised to be built using a simple
\verb
=
make
=
command. The system contains a Makefile which, based on a few PTS
-
specific options,
builds up a folder structure for the PTS as the designer wants it. The
\verb
=
make
=
options for the PTS are:
\begin
{
itemize
}
\item
\textbf
{
BOARD
}
--
in the case of converter boards, it is the board ID~
\cite
{
board
-
id
}
; this
option also specifies what is the starting string of the PTS log files
(
in the
case of CONV
-
TTL
-
RS
485
:
\verb
=
t
485
-*
.log
=
,
\verb
=
t
485
-*
.inf
=
)
\item
\textbf
{
ELMAIP
}
--
the IP or hostname of the ELMA crate the PTS is built for
\item
\textbf
{
ELMAPWD
}
--
the password for the admin account of the ELMA crate
the PTS is built for
\item
\textbf
{
ELMASLOT
}
--
the slot number where the CONT
-
TTL
-
RS
485
card is placed during testing
\end
{
itemize
}
As an example, the PTS folder structure for the CONV
-
TTL
-
RS
485
was built using the following
command:
\begin
{
verbatim
}
make ELMAIP
=
elma ELMAPWD
=
ADMIN ELMASLOT
=
5
\end
{
verbatim
}
This built a system that communicates with the ELMA crate with the hostname
\verb
=
elma
=
that
has the RS
485
pulse repeaters placed in slot
5
when the PTS is run.
In order to build a test system from scratch, follow these steps:
\begin
{
enumerate
}
\item
Clone the repository for the CONV
-
TTL
-
RS
485
(
\verb
=
git
=
is needed for this
)
:
\begin
{
small
}
\begin
{
verbatim
}
git clone git:
//
ohwr.org
/
level
-
conversion
/
conv
-
ttl
-
rs
485
/
conv
-
ttl
-
rs
485
-
tst.git
\end
{
verbatim
}
\end
{
small
}
\item
Run
\verb
=
make
=
in the
\verb
=
pts
-
fm
/=
folder, setting the options as appropriate
in your case:
\begin
{
verbatim
}
cd conv
-
ttl
-
rs
485
-
tst
/
pts
-
fm
/
make # ... set options here ...
\end
{
verbatim
}
\end
{
enumerate
}
This will generate an archive similar to that downloaded in Section~
\ref
{
sec:environment
}
,
that should be copied to the test system as described in Section~
\ref
{
sec:environment
}
.
%==============================================================================
\end
{
appendices
}
%==============================================================================
\pagebreak
\bibliographystyle
{
ieeetr
}
\bibliography
{
setup
}
\addcontentsline
{
toc
}{
section
}{
References
}
\end
{
document
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment