Commit a934874d authored by David Cussans's avatar David Cussans

* Moving enclustra_ax3_pm3_infra.vhd out of the way - since we use the patched file from IPBus

* Bug fixes to enclustra_ax3_pm3_infra.patch ( dos2unix problem )

* Move ipbus_decode_TLUaddrmap.vhd out of the way - since we generate a new one each time

* Increment version number in top_enclustra_tlu_v1e.vhd

* Fixes/improvements to build script build_tlu_firmware.sh
parent 86e360c4
-- enclustra_ax3_pm3_infra
--
-- All board-specific stuff goes here
-- Example "infra" file.
-- DO NOT USE THIS FILE.
-- Use the "patch" file to patch enclustra_ax3_pm3_infra.vhd in
-- ipbus-firmware/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl
-- David Cussans, January 2019
--
-- Original:
-- Dave Newbold, June 2013
library IEEE;
......
diff --git a/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl/enclustra_ax3_pm3_infra.vhd b/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl/enclustra_ax3_pm3_infra.vhd
index acdda9a..efd0aa7 100644
--- a/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl/enclustra_ax3_pm3_infra.vhd
+++ b/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl/enclustra_ax3_pm3_infra.vhd
@@ -41,6 +41,7 @@ entity enclustra_ax3_pm3_infra is
--- enclustra_ax3_pm3_infra.vhd 2019-01-23 14:06:26.356312145 +0000
+++ enclustra_ax3_pm3_infra.vhd.new 2019-01-23 14:07:31.598717626 +0000
@@ -41,6 +41,7 @@
clk_ipb_o: out std_logic; -- IPbus clock
rst_ipb_o: out std_logic;
clk125_o: out std_logic;
+ clk_200_o: out std_logic;
+ clk_200_o: out std_logic;
rst125_o: out std_logic;
clk_aux_o: out std_logic; -- 50MHz clock
rst_aux_o: out std_logic;
@@ -93,6 +94,7 @@ begin
@@ -93,6 +94,7 @@
rst_ipb_o <= rst_ipb;
clk125_o <= clk125;
rst125_o <= rst125;
+ clk_200_o<=clk200;
+ clk_200_o <= clk200;
stretch: entity work.led_stretcher
generic map(
-- Address decode logic for ipbus fabric
--
-- This file has been AUTOGENERATED from the address table - do not hand edit
--
-- We assume the synthesis tool is clever enough to recognise exclusive conditions
-- in the if statement.
-- DO NOT USE THIS FILE. AUTOGENERATE ONE FROM TLUaddrmap.xml using gen_ipbus_addr_decode
-- David Cussans, January 2019
--
-- The template for this file, plus tools:
-- Dave Newbold, February 2011
library IEEE;
......
......@@ -25,7 +25,7 @@ use work.ipbus.ALL;
entity top is
generic(
constant FW_VERSION : unsigned(31 downto 0):= X"1e000014"; -- Firmware revision. Remember to change this as needed.
constant FW_VERSION : unsigned(31 downto 0):= X"1e000015"; -- Firmware revision. Remember to change this as needed.
g_NUM_DUTS : positive := 4; -- <- was 3
g_NUM_TRIG_INPUTS :positive := 6;-- <- was 4
g_NUM_EDGE_INPUTS :positive := 6;-- <-- was 4
......
#!/bin/sh
IPBUS_BRANCH="enhancement/68"
# Put which branch of Git to use here...
IPBUS_BRANCH="-b enhancement/68"
TLU_BRANCH=""
mkdir work
cd work
# git clone git@github.com:ipbus/ipbb.git
# ( ... or curl -L https://github.com/ipbus/ipbb/archive/v0.2.5.tar.gz | tar xvz )
curl -L https://github.com/ipbus/ipbb/archive/v0.3.11.tar.gz | tar xvz
ln -s ipbb-0.3.11 ipbb
source ipbb/env.sh
curl -L https://github.com/ipbus/ipbb/archive/v0.2.8.tar.gz | tar xvz
# ( or git clone git@github.com:ipbus/ipbb.git )
source ipbb-0.2.8/env.sh
ipbb init build
cd build
ipbb add git https://github.com/ipbus/ipbus-firmware.git -b ${IPBUS_BRANCH}
ipbb add git git://ohwr.org/fmc-projects/fmc-mtlu/fmc-mtlu-gw.git
# For read/write load a valid ssh key and use
ipbb add git https://github.com/ipbus/ipbus-firmware.git ${IPBUS_BRANCH}
ipbb add git git://ohwr.org/fmc-projects/fmc-mtlu/fmc-mtlu-gw.git ${TLU_BRANCH}
# For read/write load a valid ssh key and use the repo below ....
# ipbb add git ssh://git@ohwr.org/fmc-projects/fmc-mtlu/fmc-mtlu-gw.git
......@@ -24,18 +27,17 @@ pwd
mv ipbus_decode_TLUaddrmap.vhd ../firmware/hdl/
popd
# Edit the files in the IPBus repostitory to expose the 200MHz clock
echo "BUILD: Editing enclustra_ax3_pm3_infra.vhd to add 200MHz clock port"
sed -i 's/onehz);/onehz); clk_200_o<=clk200;/' src/ipbus-firmware/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl/enclustra_ax3_pm3_infra.vhd
echo "BUILD: Editing enclustra_ax3_pm3_infra.vhd to add signals"
sed -i 's/clk125_o: out std_logic/clk125_o, clk_200_o: out std_logic/' src/ipbus-firmware/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl/enclustra_ax3_pm3_infra.vhd
echo "BUILD: patching enclustra_ax3_pm3_infra.vhd"
pushd src/ipbus-firmware/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl
dos2unix enclustra_ax3_pm3_infra.vhd
patch < ../../../../../../../fmc-mtlu-gw/AIDA_tlu/boards/enclustra_ax3_pm3/base_fw/synth/firmware/hdl/enclustra_ax3_pm3_infra.patch
popd
# Comment out the cfg signals in the IPBus constraints file enclustra_ax3_pm3.tcl
echo "BUILD: patching /enclustra_ax3_pm3.patch"
pushd src/ipbus-firmware/boards/enclustra_ax3_pm3/base_fw/synth/firmware/ucf
patch < ../../../../../../../fmc-mtlu-gw/AIDA_tlu/boards/enclustra_ax3_pm3/base_fw/synth/firmware/ucf/enclustra_ax3_pm3.patch
popd
#echo "BUILD: patching enclustra_ax3_pm3.tcl"
#pushd src/ipbus-firmware/boards/enclustra_ax3_pm3/base_fw/synth/firmware/ucf
#patch < ../../../../../../../fmc-mtlu-gw/AIDA_tlu/boards/enclustra_ax3_pm3/base_fw/synth/firmware/ucf/enclustra_ax3_pm3.patch
#popd
echo "BUILD: ipbb proj create"
ipbb proj create vivado TLU_1e fmc-mtlu-gw:AIDA_tlu/projects/TLU_v1e -t top_tlu_1e_a35.dep
......
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