Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
SVEC BST Receiver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tom Levens
SVEC BST Receiver
Commits
e2fa8940
Commit
e2fa8940
authored
May 01, 2019
by
Tom Levens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add MCS build, update README.md
parent
8b0e7842
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
14 deletions
+93
-14
README.md
README.md
+53
-14
.gitignore
hdl/syn/.gitignore
+3
-0
build_mcs.sh
hdl/syn/build_mcs.sh
+21
-0
--SDB-CONFIG--
hdl/syn/fs/--SDB-CONFIG--
+15
-0
afpga.bin
hdl/syn/fs/afpga.bin
+1
-0
svec-bootloader.bin
hdl/syn/fs/svec-bootloader.bin
+0
-0
No files found.
README.md
View file @
e2fa8940
...
...
@@ -9,31 +9,70 @@ OHWR hardware components:
The gateware implements the BST decoder and extracts the following signals on
the front-panel LEMO outputs:
*
**LEMO 1:**
bunch clock (40 MHz, 50% duty cycle)
*
**LEMO 2:**
turn clock (43 kHz, 25 ns pulse)
*
**LEMO 1:**
bunch clock
(40 MHz, 50% duty cycle)
*
**LEMO 2:**
turn clock
(43 kHz, 25 ns pulse)
*
**LEMO 3:**
injection pre-pulse (23 us pulse)
*
**LEMO 4:**
turn clock divided by N
(23 us pulse)
*
**LEMO 4:**
UA9 trigger
(23 us pulse)
##
Building the firmware
##
Hardware configuration
Building the firmware requires
[
hdlmake
](
https://www.ohwr.org/project/hdl-make/
)
to create the project.
The TTC_FMC should be installed in FMC slot 1 (bottom) on the SVEC.
Generally the following steps are required to be executed from the root
directory of the project repository to build a firmware:
## Building the gateware
### Required tooling
Building the gateware requires Xilinx ISE 14.7 running on Linux.
[
hdlmake
]
is required in order to create the ISE project.
Generating the MCS file for flashing the PROM requires the
*gensdbfs*
utility
from the
[
fpga-config-space
]
repository. Clone the repository and execute:
```
sh
cd
hdl/syn/
./update_sdb.sh
hdlmak
e
cd
fpga-config-space/sdbfs/lib
make
cd
../userspac
e
make
```
After this, you should end up with a
*svec_top.bit*
file which can be loaded
onto a SVEC via VME with the following command:
Then copy the
*gensdbfs*
binary to somewhere in your PATH.
[
hdlmake
]:
https://www.ohwr.org/project/hdl-make
[
fpga-config-space
]:
https://ohwr.org/project/fpga-config-space
### Synthesising the gateware
Generally the following steps are required to be executed from the
*/hdl/syn/*
directory to synthesise the gateware image:
```
sh
./update_sdb.sh
# Generate the file ../rtl/sdb_meta_pkg.sh
hdlmake
# Generate the ISE project
make
# Run ISE to perform the synthesis
```
After ISE has completed, you should end up with the file
*svec_top.bit*
.
### Loading the gateware
The gateware can be loaded onto a SVEC over VME by running the following
command on the front-end:
```
sh
sudo dd
if
=
svec_top.bit
of
=
/dev/svec.0
obs
=
10M
```
(assuming the SVEC driver is installed with LUN=0)
This is assuming the SVEC driver is installed with LUN=0. If not, then adjust
the device number as appropriate.
### Flashing the PROM
To generate the MCS file for flashing the PROM, run the script:
```
sh
./build_mcs.sh
```
The resulting
*image.mcs*
file can be flashed via JTAG to the M25P128 SPI PROM
attached to the XC6SLX9 system FPGA.
hdl/syn/.gitignore
View file @
e2fa8940
...
...
@@ -2,3 +2,6 @@
!.gitignore
!Manifest.py
!update_sdb.sh
!build_mcs.sh
!fs/
!fs/*
hdl/syn/build_mcs.sh
0 → 100755
View file @
e2fa8940
#!/bin/bash
# A trivial script to build the SDB flash image for the SVEC. Requires sdb-tools installed in the system
PROMGEN
=
`
which promgen
`
GENSDBFS
=
`
which gensdbfs
`
if
[
!
-f
"
$PROMGEN
"
]
;
then
echo
"You seem to not have the promgen utility. Do you have Xilinx ISE installed?"
exit
fi
if
[
!
-f
"
$GENSDBFS
"
]
;
then
echo
"You seem to not have the gensdbfs. Have you compiled and installed it (check the manual)?"
exit
fi
gensdbfs fs image.bin
promgen
-p
mcs
-o
image.mcs
-spi
-data_file
up 0 image.bin
-w
#./bin2vmf image.bin > image.vmf
hdl/syn/fs/--SDB-CONFIG--
0 → 100644
View file @
e2fa8940
# This is an example config file, that can be used to build a filesystem
# from this very directory. Please note that gensdbfs doesn't look for
# config files in subdirectories but only in the tol-level one.
.
vendor = 0xce42
device = 0x5fec
position = 0x600000
svec-bootloader.bin
position = 0
afpga.bin
position = 0x100000
hdl/syn/fs/afpga.bin
0 → 120000
View file @
e2fa8940
../svec_top.bit
\ No newline at end of file
hdl/syn/fs/svec-bootloader.bin
0 → 100644
View file @
e2fa8940
File added
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