Commit d840928c authored by Marek Gumiński's avatar Marek Gumiński

Finished masterfip_pts.

Added masterfip_pts core to top module.
Modified and verified test06 to match gateware changes.
Changed sync input to inout on top module.
parent 7dabae5e
......@@ -3,7 +3,7 @@
---------------------------------------------------------------------------------------
-- File : /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/fmc_masterfip_csr_pts.vhd
-- Author : auto-generated by wbgen2 from /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/fmc_masterfip_csr.wb
-- Created : Wed Mar 29 15:35:06 2017
-- Created : Thu Mar 30 10:54:22 2017
-- Standard : VHDL'87
---------------------------------------------------------------------------------------
-- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/fmc_masterfip_csr.wb
......
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use work.masterFIP_pkg.all;
use work.gencores_pkg.all;
use work.wishbone_pkg.all;
-- use work.wrcore_pkg.all;
use work.genram_pkg.all;
--=================================================================================================
-- Entity declaration for fmc_masterFIP_core
--=================================================================================================
entity masterfip_pts is
port(
-- Clock and reset
clk_i : in std_logic; -- 100 MHz clock
rst_i : in std_logic;
-- External synchronisation pulse transceiver
ext_sync_term_en_o : out std_logic; -- enable 50 Ohms termination of the pulse
ext_sync_dir_o : out std_logic; -- transceiver direction
ext_sync_oe_n_o : out std_logic; -- transceiver output enable
ext_sync_io : inout std_logic; -- sync pulse
-- FielDrive
fd_rxcdn_i : in std_logic;
fd_txer_i : in std_logic;
fd_wdgn_i : in std_logic;
fd_txd_corrupt_o : out std_logic;
-- WISHBONE classic bus interface
slave_i : in t_wishbone_slave_in;
slave_o : out t_wishbone_slave_out
);
end masterfip_pts;
--=================================================================================================
-- architecture declaration
--=================================================================================================
architecture rtl of masterfip_pts is
-- resets
signal rst_n : std_logic;
signal core_rst,
core_rst_n,
core_rst_tmp : std_logic;
-- ext pulse
signal ext_sync_p,
ext_sync_oe,
ext_sync_iodir,
ext_sync_out_val,
ext_sync_dir : std_logic;
-- FielDrive output monitoring
signal fd_cnt_reinit,
fd_wdgn_sync,
fd_wdgn_latch,
fd_txer_p,
fd_rxcdn_p : std_logic;
signal fd_txer_cnt,
fd_rxcdn_cnt : std_logic_vector (32-1 downto 0);
-- signals that should be driven by masterfip core
-- not sure if removing them will work
signal fd_host_rstn : std_logic;
signal macrocyc_load_p : std_logic;
--=================================================================================================
-- architecture begin
--=================================================================================================
begin
---------------------------------------------------------------------------------------------------
-- resets --
---------------------------------------------------------------------------------------------------
rst_n <= not rst_i;
core_rst <= core_rst_tmp or rst_i;
core_rst_n <= not core_rst;
macrocyc_load_p <= '1';
fd_host_rstn <= '0';
---------------------------------------------------------
---- External synchronisation IO
---------------------------------------------------------
-- FPGA IO direction is controlled by ext_sync_iodir line
-- external bidirectional buffer is controlled by other line
-- during normal operation direction should be the same
-- but for PTS directions are controlled separately
ext_sync_io <= ext_sync_out_val when ext_sync_iodir = '1' else 'Z';
ext_sync_dir_o <= ext_sync_dir;
-- since external line oe_n is active low and wbregs default value is zero
-- register is called oe and its value is negated here
ext_sync_oe_n_o <= '0' when ext_sync_oe = '1' else 'Z';
---------------------------------------------------------------------------------------------------
-- FielDrive TXERR, WDGN --
---------------------------------------------------------------------------------------------------
-- synchronisation of the fd_wdgn_i signal
cmp_fd_wdgn_i_pulse_detect: gc_sync_ffs
generic map(
g_sync_edge => "positive"
)
port map(
clk_i => clk_i,
rst_n_i => rst_n,
data_i => fd_wdgn_i,
synced_o => fd_wdgn_sync
);
-- process that registers the activation of fd_wdgn_i
-- the signals are reset upon a core_rst_n or a fd_host_rstn
p_fd_wdgn_capture : process(clk_i)
begin
if rising_edge(clk_i) then
if(core_rst = '1' or fd_host_rstn = '0') then
fd_wdgn_latch <= '1';
else
if fd_wdgn_sync = '0' then
fd_wdgn_latch <= '0';
end if;
end if;
end if;
end process;
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
fd_cnt_reinit <= '1' when core_rst_n = '0' or
macrocyc_load_p = '1' or
fd_host_rstn = '0' else
'0';
-- edge detection on the fd_txer_i signal
cmp_fd_txer_i_pulse_detect: gc_sync_ffs
generic map(
g_sync_edge => "positive"
)
port map(
clk_i => clk_i,
rst_n_i => rst_n,
data_i => fd_txer_i,
ppulse_o => fd_txer_p
);
-- counter counting the number of fd_wdgn_p
cmp_fd_txer_cnt:incr_counter
generic map(
g_counter_lgth => 32
)
port map(
clk_i => clk_i,
counter_incr_i => fd_txer_p,
counter_reinit_i => fd_cnt_reinit,
counter_is_full_o => open,
counter_o => fd_txer_cnt
);
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- edge detection on the fd_rxcdn_i signal
cmp_fd_cdn_i_pulse_detect: gc_sync_ffs
generic map(
g_sync_edge => "positive"
)
port map(
clk_i => clk_i,
rst_n_i => rst_n,
data_i => fd_rxcdn_i,
ppulse_o => fd_rxcdn_p
);
-- counter counting the number of fd_rxcdn_p
cmp_fd_cdn_cnt:incr_counter
generic map(
g_counter_lgth => 32
)
port map(
clk_i => clk_i,
counter_incr_i => fd_rxcdn_p,
counter_reinit_i => fd_cnt_reinit,
counter_is_full_o => open,
counter_o => fd_rxcdn_cnt
);
---------------------------------------------------------------------------------------------------
-- REGISTERS --
---------------------------------------------------------------------------------------------------
cmp_masterfip_csr: entity work.masterfip_pts_csr
port map (
-- wishbone
rst_n_i => rst_n,
clk_sys_i => clk_i,
wb_adr_i => slave_i.adr(4 downto 2),
wb_dat_i => slave_i.dat,
wb_dat_o => slave_o.dat,
wb_cyc_i => slave_i.cyc,
wb_sel_i => slave_i.sel,
wb_stb_i => slave_i.stb,
wb_we_i => slave_i.we,
wb_ack_o => slave_o.ack,
wb_stall_o => slave_o.stall,
-- resets
mfpts_rst_core_o => core_rst_tmp, -- reset has to be confirmed with lock word mf_rstn_lock_o
-- external sync pulse
mfpts_ext_sync_term_en_o => ext_sync_term_en_o,
mfpts_ext_sync_dir_o => ext_sync_dir,
mfpts_ext_sync_oe_o => ext_sync_oe,
mfpts_ext_sync_output_value_o => ext_sync_out_val,
mfpts_ext_sync_fpga_io_dir_o => ext_sync_iodir,
mfpts_ext_sync_raw_input_i => ext_sync_io,
mfpts_tx_corrupt_enable_o => fd_txd_corrupt_o,
mfpts_fd_wdgn_i => fd_wdgn_i, -- FIELDRIVE watchdog, signal comes from the FIELDRIVE
mfpts_fd_wdgn_latch_i => fd_wdgn_latch,
mfpts_fd_cd_n_i => fd_rxcdn_i,
mfpts_fd_rxcdn_cnt_i => fd_rxcdn_cnt,
mfpts_fd_txer_i => fd_txer_i, -- FIELDRIVE txerr, signal comes from the FIELDRIVE
mfpts_fd_txerr_cnt_i => fd_txer_cnt
);
end rtl;
----------------------------------------------------------------------------------------------------
-- architecture ends
----------------------------------------------------------------------------------------------------
......@@ -3,7 +3,7 @@
---------------------------------------------------------------------------------------
-- File : /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/masterfip_csr.vhd
-- Author : auto-generated by wbgen2 from /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/ip_cores/gw-masterfip/rtl/wbgen/masterfip_csr.wb
-- Created : Wed Mar 29 15:35:08 2017
-- Created : Thu Mar 30 10:54:24 2017
-- Standard : VHDL'87
---------------------------------------------------------------------------------------
-- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/ip_cores/gw-masterfip/rtl/wbgen/masterfip_csr.wb
......
......@@ -3,7 +3,7 @@
---------------------------------------------------------------------------------------
-- File : /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/masterfip_pts_csr.vhd
-- Author : auto-generated by wbgen2 from /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/masterfip_pts_csr.wb
-- Created : Wed Mar 29 15:35:11 2017
-- Created : Thu Mar 30 10:54:26 2017
-- Standard : VHDL'87
---------------------------------------------------------------------------------------
-- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/masterfip_pts_csr.wb
......@@ -37,11 +37,9 @@ entity masterfip_pts_csr is
mfpts_ext_sync_oe_o : out std_logic;
-- Port for BIT field: 'External sync output value (when buffer is switched)' in reg: 'ext sync'
mfpts_ext_sync_output_value_o : out std_logic;
-- Port for BIT field: 'pulses counter reset' in reg: 'ext sync'
mfpts_ext_sync_p_cnt_rst_o : out std_logic;
-- Port for BIT field: 'FPGA IO direction' in reg: 'ext sync'
mfpts_ext_sync_fpga_io_dir_o : out std_logic;
-- Port for BIT field: 'ext_sync_raw_input' in reg: 'ext sync raw input'
-- Port for BIT field: 'raw_input' in reg: 'ext sync'
mfpts_ext_sync_raw_input_i : in std_logic;
-- Port for BIT field: 'enable' in reg: 'PTS options'
mfpts_tx_corrupt_enable_o : out std_logic;
......@@ -53,6 +51,8 @@ entity masterfip_pts_csr is
mfpts_fd_cd_n_i : in std_logic;
-- Port for BIT field: 'fd transmitter error' in reg: 'fieldrive status'
mfpts_fd_txer_i : in std_logic;
-- Port for std_logic_vector field: 'fieldrive rx not carrier detect counter' in reg: 'fieldrive rx not carrier detect counter'
mfpts_fd_rxcdn_cnt_i : in std_logic_vector(31 downto 0);
-- Port for std_logic_vector field: 'fieldrive tx error counter' in reg: 'fieldrive tx error counter'
mfpts_fd_txerr_cnt_i : in std_logic_vector(31 downto 0)
);
......@@ -66,7 +66,6 @@ signal mfpts_ext_sync_term_en_int : std_logic ;
signal mfpts_ext_sync_dir_int : std_logic ;
signal mfpts_ext_sync_oe_int : std_logic ;
signal mfpts_ext_sync_output_value_int : std_logic ;
signal mfpts_ext_sync_p_cnt_rst_int : std_logic ;
signal mfpts_ext_sync_fpga_io_dir_int : std_logic ;
signal mfpts_tx_corrupt_enable_int : std_logic ;
signal ack_sreg : std_logic_vector(9 downto 0);
......@@ -101,7 +100,6 @@ begin
mfpts_ext_sync_dir_int <= '0';
mfpts_ext_sync_oe_int <= '0';
mfpts_ext_sync_output_value_int <= '0';
mfpts_ext_sync_p_cnt_rst_int <= '0';
mfpts_ext_sync_fpga_io_dir_int <= '0';
mfpts_tx_corrupt_enable_int <= '0';
elsif rising_edge(clk_sys_i) then
......@@ -162,52 +160,14 @@ begin
mfpts_ext_sync_dir_int <= wrdata_reg(1);
mfpts_ext_sync_oe_int <= wrdata_reg(2);
mfpts_ext_sync_output_value_int <= wrdata_reg(3);
mfpts_ext_sync_p_cnt_rst_int <= wrdata_reg(8);
mfpts_ext_sync_fpga_io_dir_int <= wrdata_reg(9);
mfpts_ext_sync_fpga_io_dir_int <= wrdata_reg(4);
end if;
rddata_reg(0) <= mfpts_ext_sync_term_en_int;
rddata_reg(1) <= mfpts_ext_sync_dir_int;
rddata_reg(2) <= mfpts_ext_sync_oe_int;
rddata_reg(3) <= mfpts_ext_sync_output_value_int;
rddata_reg(8) <= mfpts_ext_sync_p_cnt_rst_int;
rddata_reg(9) <= mfpts_ext_sync_fpga_io_dir_int;
rddata_reg(4) <= 'X';
rddata_reg(5) <= 'X';
rddata_reg(6) <= 'X';
rddata_reg(7) <= 'X';
rddata_reg(10) <= 'X';
rddata_reg(11) <= 'X';
rddata_reg(12) <= 'X';
rddata_reg(13) <= 'X';
rddata_reg(14) <= '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(23) <= 'X';
rddata_reg(24) <= 'X';
rddata_reg(25) <= 'X';
rddata_reg(26) <= 'X';
rddata_reg(27) <= 'X';
rddata_reg(28) <= 'X';
rddata_reg(29) <= 'X';
rddata_reg(30) <= 'X';
rddata_reg(31) <= 'X';
ack_sreg(0) <= '1';
ack_in_progress <= '1';
when "010" =>
if (wb_we_i = '1') then
end if;
rddata_reg(0) <= mfpts_ext_sync_raw_input_i;
rddata_reg(1) <= 'X';
rddata_reg(2) <= 'X';
rddata_reg(3) <= 'X';
rddata_reg(4) <= 'X';
rddata_reg(5) <= 'X';
rddata_reg(4) <= mfpts_ext_sync_fpga_io_dir_int;
rddata_reg(5) <= mfpts_ext_sync_raw_input_i;
rddata_reg(6) <= 'X';
rddata_reg(7) <= 'X';
rddata_reg(8) <= 'X';
......@@ -236,7 +196,7 @@ begin
rddata_reg(31) <= 'X';
ack_sreg(0) <= '1';
ack_in_progress <= '1';
when "011" =>
when "010" =>
if (wb_we_i = '1') then
mfpts_tx_corrupt_enable_int <= wrdata_reg(0);
end if;
......@@ -274,7 +234,7 @@ begin
rddata_reg(31) <= 'X';
ack_sreg(0) <= '1';
ack_in_progress <= '1';
when "100" =>
when "011" =>
if (wb_we_i = '1') then
end if;
rddata_reg(0) <= mfpts_fd_wdgn_i;
......@@ -311,6 +271,12 @@ begin
rddata_reg(31) <= 'X';
ack_sreg(0) <= '1';
ack_in_progress <= '1';
when "100" =>
if (wb_we_i = '1') then
end if;
rddata_reg(31 downto 0) <= mfpts_fd_rxcdn_cnt_i;
ack_sreg(0) <= '1';
ack_in_progress <= '1';
when "101" =>
if (wb_we_i = '1') then
end if;
......@@ -351,17 +317,16 @@ begin
mfpts_ext_sync_oe_o <= mfpts_ext_sync_oe_int;
-- External sync output value (when buffer is switched)
mfpts_ext_sync_output_value_o <= mfpts_ext_sync_output_value_int;
-- pulses counter reset
mfpts_ext_sync_p_cnt_rst_o <= mfpts_ext_sync_p_cnt_rst_int;
-- FPGA IO direction
mfpts_ext_sync_fpga_io_dir_o <= mfpts_ext_sync_fpga_io_dir_int;
-- ext_sync_raw_input
-- raw_input
-- enable
mfpts_tx_corrupt_enable_o <= mfpts_tx_corrupt_enable_int;
-- fd watchdog
-- fd watchdog latched
-- fd carrier detect
-- fd transmitter error
-- fieldrive rx not carrier detect counter
-- fieldrive tx error counter
rwaddr_reg <= wb_adr_i;
wb_stall_o <= (not ack_sreg(0)) and (wb_stb_i and wb_cyc_i);
......
......@@ -70,16 +70,6 @@ peripheral {
access_dev = READ_ONLY;
};
field {
name = "pulses counter reset";
prefix = "p_cnt_rst";
description = "resets the pulses counter";
type = BIT;
align = 8;
access_bus = READ_WRITE;
access_dev = READ_ONLY;
};
field {
name = "FPGA IO direction";
prefix = "fpga_io_dir";
......@@ -89,22 +79,21 @@ peripheral {
access_dev = READ_ONLY;
};
};
reg {
name = "ext sync raw input";
prefix = "ext_sync_raw_input";
field {
name = "ext_sync_raw_input";
description = "External sync input value. Only valid whrn direction is set to input";
name = "raw_input";
prefix = "raw_input";
description = "External sync input value. Only valid when direction is set to input";
type = BIT;
access_bus = READ_ONLY;
access_dev = WRITE_ONLY;
};
};
};
};
-------------------------------------------------------------------------------
-- fieldrive status signals --
-------------------------------------------------------------------------------
reg {
name = "PTS options";
......@@ -118,12 +107,8 @@ peripheral {
access_bus = READ_WRITE;
access_dev = READ_ONLY;
};
};
};
-------------------------------------------------------------------------------
-- fieldrive status signals --
-------------------------------------------------------------------------------
reg {
name = "fieldrive status";
prefix = "fd";
......@@ -162,6 +147,21 @@ peripheral {
};
};
reg{
name = "fieldrive rx not carrier detect counter";
prefix = "fd_rxcdn_cnt";
field {
name = "fieldrive rx not carrier detect counter";
description = "Number of RX NOT carrier detect periods. Counter is reset by macrocycle, core reset and fd reset";
type = SLV;
size = 32;
access_bus = READ_ONLY;
access_dev = WRITE_ONLY;
};
};
reg{
name = "fieldrive tx error counter";
prefix = "fd_txerr_cnt";
......
......@@ -524,7 +524,7 @@
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/common/gc_glitch_filt.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="188"/>
<association xil_pn:name="Implementation" xil_pn:seqID="171"/>
<association xil_pn:name="Implementation" xil_pn:seqID="172"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/wishbone/wb_dma/xwb_streamer.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -544,7 +544,7 @@
</file>
<file xil_pn:name="../../ip_cores/gw-masterfip/rtl/decr_counter.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="179"/>
<association xil_pn:name="Implementation" xil_pn:seqID="167"/>
<association xil_pn:name="Implementation" xil_pn:seqID="168"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/wishbone/wb_simple_pwm/wb_simple_pwm.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -552,7 +552,7 @@
</file>
<file xil_pn:name="../../ip_cores/wr-node-core/hdl/rtl/wrnc/wr_node_core_with_etherbone.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="182"/>
<association xil_pn:name="Implementation" xil_pn:seqID="160"/>
<association xil_pn:name="Implementation" xil_pn:seqID="161"/>
</file>
<file xil_pn:name="../../ip_cores/wr-node-core/hdl/rtl/wrnc/cpu/wrn_cpu_csr_wb.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="115"/>
......@@ -588,7 +588,7 @@
</file>
<file xil_pn:name="../../ip_cores/wr-node-core/hdl/top/spec/node_template/spec_reset_gen.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="180"/>
<association xil_pn:name="Implementation" xil_pn:seqID="158"/>
<association xil_pn:name="Implementation" xil_pn:seqID="159"/>
</file>
<file xil_pn:name="../../ip_cores/nanofip-gateware/src/wf_rx_deserializer.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="150"/>
......@@ -724,7 +724,7 @@
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/wishbone/wb_i2c_master/xwb_i2c_master.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
<association xil_pn:name="Implementation" xil_pn:seqID="177"/>
<association xil_pn:name="Implementation" xil_pn:seqID="179"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/wishbone/wbgen2/wbgen2_pkg.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="3"/>
......@@ -740,7 +740,7 @@
</file>
<file xil_pn:name="../../ip_cores/wr-node-core/hdl/top/spec/node_template/spec_node_template.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="207"/>
<association xil_pn:name="Implementation" xil_pn:seqID="175"/>
<association xil_pn:name="Implementation" xil_pn:seqID="177"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/common/gc_dyn_glitch_filt.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -808,7 +808,7 @@
</file>
<file xil_pn:name="../../ip_cores/gw-masterfip/rtl/masterfip_rx.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="178"/>
<association xil_pn:name="Implementation" xil_pn:seqID="166"/>
<association xil_pn:name="Implementation" xil_pn:seqID="167"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/wishbone/wb_lm32/src/lm32_addsub.v" xil_pn:type="FILE_VERILOG">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="23"/>
......@@ -836,11 +836,11 @@
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/wishbone/wb_vic/xwb_vic.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="187"/>
<association xil_pn:name="Implementation" xil_pn:seqID="169"/>
<association xil_pn:name="Implementation" xil_pn:seqID="170"/>
</file>
<file xil_pn:name="../../ip_cores/gw-masterfip/rtl/fmc_masterFIP_core.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="206"/>
<association xil_pn:name="Implementation" xil_pn:seqID="176"/>
<association xil_pn:name="Implementation" xil_pn:seqID="178"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/wishbone/wb_irq/irqm_core.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -892,7 +892,7 @@
</file>
<file xil_pn:name="../../ip_cores/wr-node-core/hdl/top/spec/node_template/spec_node_pkg.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="181"/>
<association xil_pn:name="Implementation" xil_pn:seqID="159"/>
<association xil_pn:name="Implementation" xil_pn:seqID="160"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/genrams/xilinx/generic_spram.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -952,7 +952,7 @@
</file>
<file xil_pn:name="../../ip_cores/gw-masterfip/rtl/masterfip_tx.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="177"/>
<association xil_pn:name="Implementation" xil_pn:seqID="165"/>
<association xil_pn:name="Implementation" xil_pn:seqID="166"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/common/gc_delay_gen.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -964,7 +964,7 @@
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/wishbone/wb_i2c_master/wb_i2c_master.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
<association xil_pn:name="Implementation" xil_pn:seqID="170"/>
<association xil_pn:name="Implementation" xil_pn:seqID="171"/>
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/common/gc_rr_arbiter.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -1007,11 +1007,11 @@
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/common/gc_ds182x_interface.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="190"/>
<association xil_pn:name="Implementation" xil_pn:seqID="173"/>
<association xil_pn:name="Implementation" xil_pn:seqID="174"/>
</file>
<file xil_pn:name="../../ip_cores/gw-masterfip/rtl/masterfip_wbgen2_csr.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="176"/>
<association xil_pn:name="Implementation" xil_pn:seqID="164"/>
<association xil_pn:name="Implementation" xil_pn:seqID="165"/>
</file>
<file xil_pn:name="../../ip_cores/gw-masterfip/rtl/masterfip_wbgen2_pkg.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="110"/>
......@@ -1290,7 +1290,7 @@
</file>
<file xil_pn:name="../../ip_cores/gn4124-core/hdl/gn4124core/rtl/spartan6/gn4124_core.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="186"/>
<association xil_pn:name="Implementation" xil_pn:seqID="168"/>
<association xil_pn:name="Implementation" xil_pn:seqID="169"/>
</file>
<file xil_pn:name="../../ip_cores/gn4124-core/hdl/gn4124core/rtl/spartan6/gn4124_core_pkg.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="130"/>
......@@ -1350,7 +1350,7 @@
</file>
<file xil_pn:name="../../ip_cores/wr-cores/platform/xilinx/wr_xilinx_pkg.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="183"/>
<association xil_pn:name="Implementation" xil_pn:seqID="161"/>
<association xil_pn:name="Implementation" xil_pn:seqID="162"/>
</file>
<file xil_pn:name="../../ip_cores/wr-cores/modules/fabric/xwb_fabric_sink.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -1394,7 +1394,7 @@
</file>
<file xil_pn:name="../../ip_cores/wr-cores/modules/wr_dacs/spec_serial_dac_arb.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="184"/>
<association xil_pn:name="Implementation" xil_pn:seqID="162"/>
<association xil_pn:name="Implementation" xil_pn:seqID="163"/>
</file>
<file xil_pn:name="../../ip_cores/wr-cores/modules/wr_tlu/tlu.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="0"/>
......@@ -1700,7 +1700,7 @@
</file>
<file xil_pn:name="../../ip_cores/wr-cores/modules/wrc_core/xwr_core.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="185"/>
<association xil_pn:name="Implementation" xil_pn:seqID="163"/>
<association xil_pn:name="Implementation" xil_pn:seqID="164"/>
</file>
<file xil_pn:name="../../ip_cores/wr-cores/modules/wrc_core/xwr_syscon_wb.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="102"/>
......@@ -1708,7 +1708,7 @@
</file>
<file xil_pn:name="../../ip_cores/general-cores/modules/common/gc_dyn_extend_pulse.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="189"/>
<association xil_pn:name="Implementation" xil_pn:seqID="172"/>
<association xil_pn:name="Implementation" xil_pn:seqID="173"/>
</file>
<file xil_pn:name="../../ip_cores/gn4124-core/hdl/spec/ip_cores/fifo_32x512.ngc" xil_pn:type="FILE_NGC">
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
......@@ -1764,15 +1764,23 @@
</file>
<file xil_pn:name="../../top/spec/carrier_csr.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="396"/>
<association xil_pn:name="Implementation" xil_pn:seqID="174"/>
<association xil_pn:name="Implementation" xil_pn:seqID="175"/>
</file>
<file xil_pn:name="../../top/spec/spec_masterfip_pts2.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="433"/>
<association xil_pn:name="Implementation" xil_pn:seqID="178"/>
<association xil_pn:name="Implementation" xil_pn:seqID="180"/>
</file>
<file xil_pn:name="../../top/spec/spec_masterfip_pts2.ucf" xil_pn:type="FILE_UCF">
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
</file>
<file xil_pn:name="../../rtl/masterfip_pts.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="474"/>
<association xil_pn:name="Implementation" xil_pn:seqID="176"/>
</file>
<file xil_pn:name="../../rtl/wbgen/masterfip_pts_csr.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="475"/>
<association xil_pn:name="Implementation" xil_pn:seqID="158"/>
</file>
<file xil_pn:name="../../ip_cores/gn4124-core/hdl/spec/ip_cores/fifo_32x512.xise" xil_pn:type="FILE_COREGENISE">
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
</file>
......
......@@ -228,8 +228,8 @@ NET "speed_b1_i" IOSTANDARD = "LVCMOS25";
NET "ext_sync_term_en_o" LOC = AB13;
NET "ext_sync_term_en_o" IOSTANDARD = "LVCMOS25";
NET "ext_sync_i" LOC = T8;
NET "ext_sync_i" IOSTANDARD = "LVCMOS25";
NET "ext_sync_io" LOC = T8;
NET "ext_sync_io" IOSTANDARD = "LVCMOS25";
NET "ext_sync_oe_n_o" LOC = W6;
NET "ext_sync_oe_n_o" IOSTANDARD = "LVCMOS25";
......
......@@ -232,7 +232,7 @@ entity spec_masterfip_pts2 is
ext_sync_term_en_o : out std_logic; -- enable 50 Ohm termin of the pulse
ext_sync_dir_o : out std_logic := '0'; -- direction fixed B -> A
ext_sync_oe_n_o : out std_logic := '0'; -- output fixed to enabled
ext_sync_i : in std_logic; -- sync pulse
ext_sync_io : inout std_logic; -- sync pulse
-- FMC Front panel LEDs: controlled by the MT firmware, updated every macrocycle
led_rx_act_n_o : out std_logic;
......@@ -333,21 +333,25 @@ architecture rtl of spec_masterfip_pts2 is
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- crossbar constants
constant c_NUM_WB_SLAVES : integer := 3;
constant c_NUM_WB_SLAVES : integer := 4;
constant c_WB_SLAVE_MF_CORE : integer := 0;
constant c_WB_SLAVE_STATUS_CSR : integer := 1;
constant c_WB_SLAVE_FMC_I2C : integer := 2;
constant c_WB_SLAVE_MF_PTS_CSR : integer := 3;
constant C_SLAVE_ADDR : t_wishbone_address_array(c_NUM_WB_SLAVES-1 downto 0):= (
c_WB_SLAVE_MF_CORE => x"00010000",
c_WB_SLAVE_STATUS_CSR => x"00011000",
c_WB_SLAVE_FMC_I2C => x"00012000"
c_WB_SLAVE_FMC_I2C => x"00012000",
c_WB_SLAVE_MF_PTS_CSR => x"00013000"
);
constant C_SLAVE_MASK : t_wishbone_address_array(c_NUM_WB_SLAVES-1 downto 0):= (
c_WB_SLAVE_MF_CORE => x"fffff000",
c_WB_SLAVE_STATUS_CSR => x"fffff000",
c_WB_SLAVE_FMC_I2C => x"fffff000"
c_WB_SLAVE_FMC_I2C => x"fffff000",
c_WB_SLAVE_MF_PTS_CSR => x"fffff000"
);
......@@ -375,6 +379,9 @@ architecture rtl of spec_masterfip_pts2 is
signal sys_sda_in : std_logic;
signal sys_sda_out : std_logic;
signal sys_sda_oe_n : std_logic;
signal rst_sys : std_logic;
signal fd_txd_corrupt : std_logic;
--=================================================================================================
......@@ -385,8 +392,8 @@ begin
---------------------------------------------------------------------------------------------------
-- FIXED SIGNALS --
---------------------------------------------------------------------------------------------------
ext_sync_dir_o <= '0'; -- Direction fixed to: B -> A
ext_sync_oe_n_o <= '0'; -- Output fixed to: enabled
-- ext_sync_dir_o <= '0'; -- Direction fixed to: B -> A
-- ext_sync_oe_n_o <= '0'; -- Output fixed to: enabled
-- To be removed on hw V3
-- Note: For the hw v1 signals ext_sync_tst_n_o, adc_prim_conn_n_o and adc_sec_conn_n_o, in order
......@@ -396,7 +403,7 @@ begin
adc_m5v_shdn_n_o <= '0'; -- OFF
adc_5v_en_n_o <= '1'; -- OFF
rst_sys <= not rst_n_sys;
---------------------------------------------------------------------------------------------------
-- MOCK TURTLE CORE --
......@@ -511,8 +518,8 @@ begin
fd_txd_o => fd_txd,
fd_txena_o => fd_txena_o,
-- External Synch
ext_sync_term_en_o => ext_sync_term_en_o,
ext_sync_a_i => ext_sync_i,
ext_sync_term_en_o => open,
ext_sync_a_i => '0',
ext_sync_dir_o => open, -- hard-wired to '0'
ext_sync_oe_n_o => open, -- hard-wired to '0'
-- LEDs
......@@ -543,7 +550,8 @@ begin
led_sync_err_n_o <= leds(5); -- probe on R6
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
fd_txd_o <= fd_txd;
-- fd_txd_o <= fd_txd;
fd_txd_o <= fd_txd when fd_txd_corrupt = '0' else '0';
tp1_o <= fd_rxd_i;
tp2_o <= fd_txd;
tp3_o <= leds(8);
......@@ -623,6 +631,35 @@ begin
-- Tri-state buffer for SDA and SCL
---------------------------------------------------------
---- Module containing PTS cores
---------------------------------------------------------
pts_core_inst: entity work.masterfip_pts
port map(
-- Clock and reset
clk_i => clk_100m_sys,
rst_i => rst_sys,
-- External synchronisation pulse transceiver
ext_sync_term_en_o => ext_sync_term_en_o,
ext_sync_dir_o => ext_sync_dir_o,
ext_sync_oe_n_o => ext_sync_oe_n_o,
ext_sync_io => ext_sync_io,
-- FielDrive
fd_rxcdn_i => fd_rxcdn_i,
fd_txer_i => fd_txer_i,
fd_wdgn_i => fd_wdgn_i,
fd_txd_corrupt_o => fd_txd_corrupt,
-- WISHBONE classic bus interface
slave_i => wbmain_slaves_ms(c_WB_SLAVE_MF_PTS_CSR),
slave_o => wbmain_slaves_sm(c_WB_SLAVE_MF_PTS_CSR)
);
---------------------------------------------------------------------------------------------------
-- SPEC front panel LEDs --
---------------------------------------------------------------------------------------------------
......
......@@ -40,6 +40,7 @@ import i2c
# addressing
import masterfip_csr;
import masterfip_pts_csr;
import carrier_addrtable;
......@@ -79,7 +80,10 @@ class fmcmasterfip:
CARRIER_CSR_ADDR = 0x00011000
# MasterFIP FMC eeprom
MASTERFIP_I2C_EEPROM = 0x00012000
MASTERFIP_I2C_EEPROM_ADDR = 0x00012000
# MasterFIP FMC eeprom
MASTERFIP_PTS_CSR_ADDR = 0x00013000
freq_options = [ 31250, 1e6, 25e5, 5e6 ]
......@@ -106,12 +110,13 @@ class fmcmasterfip:
###################################################################
# creation of interfaces to modules controlling external devices
self.fmc_sys_i2c = i2c.COpenCoresI2C(self.carrier, self.MASTERFIP_I2C_EEPROM, 199)
self.fmc_sys_i2c = i2c.COpenCoresI2C(self.carrier, self.MASTERFIP_I2C_EEPROM_ADDR, 199)
self.fmc_eeprom_24aa64 = eeprom_24aa64.C24AA64(self.fmc_sys_i2c, self.EEPROM_ADDR)
# creation of interfaces to modules controlling main functionality
self.fipcore = wbslave.wbslave(carrier, self.MASTERFIP_CORE_ADDR, masterfip_csr.addr)
self.carrier_csr = wbslave.wbslave(carrier, self.CARRIER_CSR_ADDR, carrier_addrtable.addr)
self.fippts = wbslave.wbslave(carrier, self.MASTERFIP_PTS_CSR_ADDR, masterfip_pts_csr.addr)
###################################################################
###################### firmware initialization ####################
......
......@@ -2,7 +2,7 @@
#
# * File : /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/python/regs/carrier_addrtable.py
# * Author : auto-generated by wbgen2 from /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/carrier_csr.wb
# * Created : Wed Mar 29 15:35:08 2017
# * Created : Thu Mar 30 10:54:24 2017
#
# THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/carrier_csr.wb
# DO NOT HAND-EDIT UNLESS IT'S ABSOLUTELY NECESSARY!
......
......@@ -2,7 +2,7 @@
#
# * File : /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/python/regs/masterfip_addrtable.py
# * Author : auto-generated by wbgen2 from /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/fmc_masterfip_csr.wb
# * Created : Wed Mar 29 15:35:06 2017
# * Created : Thu Mar 30 10:54:22 2017
#
# THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/fmc_masterfip_csr.wb
# DO NOT HAND-EDIT UNLESS IT'S ABSOLUTELY NECESSARY!
......
......@@ -2,7 +2,7 @@
#
# * File : /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/python/regs/masterfip_csr.py
# * Author : auto-generated by wbgen2 from /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/ip_cores/gw-masterfip/rtl/wbgen/masterfip_csr.wb
# * Created : Wed Mar 29 15:35:09 2017
# * Created : Thu Mar 30 10:54:24 2017
#
# THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/ip_cores/gw-masterfip/rtl/wbgen/masterfip_csr.wb
# DO NOT HAND-EDIT UNLESS IT'S ABSOLUTELY NECESSARY!
......
......@@ -36,9 +36,9 @@
<span style="margin-left: 0px; ">3. <A href="#sect_3_0">Register description</a></span><br/>
<span style="margin-left: 20px; ">3.1. <A href="#sect_3_1">rst</a></span><br/>
<span style="margin-left: 20px; ">3.2. <A href="#sect_3_2">ext sync</a></span><br/>
<span style="margin-left: 20px; ">3.3. <A href="#sect_3_3">ext sync raw input</a></span><br/>
<span style="margin-left: 20px; ">3.4. <A href="#sect_3_4">PTS options</a></span><br/>
<span style="margin-left: 20px; ">3.5. <A href="#sect_3_5">fieldrive status</a></span><br/>
<span style="margin-left: 20px; ">3.3. <A href="#sect_3_3">PTS options</a></span><br/>
<span style="margin-left: 20px; ">3.4. <A href="#sect_3_4">fieldrive status</a></span><br/>
<span style="margin-left: 20px; ">3.5. <A href="#sect_3_5">fieldrive rx not carrier detect counter</a></span><br/>
<span style="margin-left: 20px; ">3.6. <A href="#sect_3_6">fieldrive tx error counter</a></span><br/>
<h3><a name="sect_1_0">1. Memory map summary</a></h3>
<table cellpadding=0 cellspacing=0 border=0>
......@@ -101,13 +101,13 @@ EXT_SYNC
REG
</td>
<td >
<A href="#EXT_SYNC_RAW_INPUT">ext sync raw input</a>
<A href="#TX_CORRUPT">PTS options</a>
</td>
<td class="td_code">
mfpts_ext_sync_raw_input
mfpts_tx_corrupt
</td>
<td class="td_code">
EXT_SYNC_RAW_INPUT
TX_CORRUPT
</td>
</tr>
<tr class="tr_even">
......@@ -118,13 +118,13 @@ EXT_SYNC_RAW_INPUT
REG
</td>
<td >
<A href="#TX_CORRUPT">PTS options</a>
<A href="#FD">fieldrive status</a>
</td>
<td class="td_code">
mfpts_tx_corrupt
mfpts_fd
</td>
<td class="td_code">
TX_CORRUPT
FD
</td>
</tr>
<tr class="tr_odd">
......@@ -135,13 +135,13 @@ TX_CORRUPT
REG
</td>
<td >
<A href="#FD">fieldrive status</a>
<A href="#FD_RXCDN_CNT">fieldrive rx not carrier detect counter</a>
</td>
<td class="td_code">
mfpts_fd
mfpts_fd_rxcdn_cnt
</td>
<td class="td_code">
FD
FD_RXCDN_CNT
</td>
</tr>
<tr class="tr_even">
......@@ -312,7 +312,7 @@ wb_we_i
</td>
<td class="td_pblock_right">
mfpts_ext_sync_p_cnt_rst_o
mfpts_ext_sync_fpga_io_dir_o
</td>
<td class="td_arrow_right">
&rarr;
......@@ -329,10 +329,10 @@ wb_ack_o
</td>
<td class="td_pblock_right">
mfpts_ext_sync_fpga_io_dir_o
mfpts_ext_sync_raw_input_i
</td>
<td class="td_arrow_right">
&rarr;
&larr;
</td>
</tr>
<tr>
......@@ -363,7 +363,7 @@ wb_stall_o
</td>
<td class="td_pblock_right">
<b>ext sync raw input:</b>
<b>PTS options:</b>
</td>
<td class="td_arrow_right">
......@@ -380,10 +380,10 @@ wb_stall_o
</td>
<td class="td_pblock_right">
mfpts_ext_sync_raw_input_i
mfpts_tx_corrupt_enable_o
</td>
<td class="td_arrow_right">
&larr;
&rarr;
</td>
</tr>
<tr>
......@@ -414,7 +414,7 @@ mfpts_ext_sync_raw_input_i
</td>
<td class="td_pblock_right">
<b>PTS options:</b>
<b>fieldrive status:</b>
</td>
<td class="td_arrow_right">
......@@ -431,10 +431,10 @@ mfpts_ext_sync_raw_input_i
</td>
<td class="td_pblock_right">
mfpts_tx_corrupt_enable_o
mfpts_fd_wdgn_i
</td>
<td class="td_arrow_right">
&rarr;
&larr;
</td>
</tr>
<tr>
......@@ -445,13 +445,13 @@ mfpts_tx_corrupt_enable_o
</td>
<td class="td_sym_center">
&nbsp;
</td>
<td class="td_pblock_right">
mfpts_fd_wdgn_latch_i
</td>
<td class="td_arrow_right">
&larr;
</td>
</tr>
<tr>
......@@ -465,10 +465,10 @@ mfpts_tx_corrupt_enable_o
</td>
<td class="td_pblock_right">
<b>fieldrive status:</b>
mfpts_fd_cd_n_i
</td>
<td class="td_arrow_right">
&larr;
</td>
</tr>
<tr>
......@@ -482,7 +482,7 @@ mfpts_tx_corrupt_enable_o
</td>
<td class="td_pblock_right">
mfpts_fd_wdgn_i
mfpts_fd_txer_i
</td>
<td class="td_arrow_right">
&larr;
......@@ -496,13 +496,13 @@ mfpts_fd_wdgn_i
</td>
<td class="td_sym_center">
&nbsp;
</td>
<td class="td_pblock_right">
mfpts_fd_wdgn_latch_i
</td>
<td class="td_arrow_right">
&larr;
</td>
</tr>
<tr>
......@@ -516,10 +516,10 @@ mfpts_fd_wdgn_latch_i
</td>
<td class="td_pblock_right">
mfpts_fd_cd_n_i
<b>fieldrive rx not carrier detect counter:</b>
</td>
<td class="td_arrow_right">
&larr;
</td>
</tr>
<tr>
......@@ -533,10 +533,10 @@ mfpts_fd_cd_n_i
</td>
<td class="td_pblock_right">
mfpts_fd_txer_i
mfpts_fd_rxcdn_cnt_i[31:0]
</td>
<td class="td_arrow_right">
&larr;
&lArr;
</td>
</tr>
<tr>
......@@ -1044,11 +1044,11 @@ EXT_SYNC
<td class="td_unused">
-
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
FPGA_IO_DIR
<td class="td_unused">
-
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
P_CNT_RST
<td class="td_unused">
-
</td>
</tr>
</table>
......@@ -1086,11 +1086,11 @@ P_CNT_RST
<td class="td_unused">
-
</td>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=1 class="td_field">
RAW_INPUT
</td>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=1 class="td_field">
FPGA_IO_DIR
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
OUTPUT_VALUE
......@@ -1124,23 +1124,23 @@ OUTPUT_VALUE
</b>[<i>read/write</i>]: External sync output value (when buffer is switched)
<br>Value outputted then sync is set to output direction
<li><b>
P_CNT_RST
</b>[<i>read/write</i>]: pulses counter reset
<br>resets the pulses counter
<li><b>
FPGA_IO_DIR
</b>[<i>read/write</i>]: FPGA IO direction
<br>Direction of FPGA IO
<li><b>
RAW_INPUT
</b>[<i>read-only</i>]: raw_input
<br>External sync input value. Only valid when direction is set to input
</ul>
<a name="EXT_SYNC_RAW_INPUT"></a>
<h3><a name="sect_3_3">3.3. ext sync raw input</a></h3>
<a name="TX_CORRUPT"></a>
<h3><a name="sect_3_3">3.3. PTS options</a></h3>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td >
<b>HW prefix: </b>
</td>
<td class="td_code">
mfpts_ext_sync_raw_input
mfpts_tx_corrupt
</td>
</tr>
<tr>
......@@ -1156,7 +1156,7 @@ mfpts_ext_sync_raw_input
<b>C prefix: </b>
</td>
<td class="td_code">
EXT_SYNC_RAW_INPUT
TX_CORRUPT
</td>
</tr>
<tr>
......@@ -1380,25 +1380,25 @@ EXT_SYNC_RAW_INPUT
-
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
EXT_SYNC_RAW_INPUT
ENABLE
</td>
</tr>
</table>
<ul>
<li><b>
EXT_SYNC_RAW_INPUT
</b>[<i>read-only</i>]: ext_sync_raw_input
<br>External sync input value. Only valid whrn direction is set to input
ENABLE
</b>[<i>read/write</i>]: enable
<br>When corrupt is set to 1 serial tx data is forced to 0.
</ul>
<a name="TX_CORRUPT"></a>
<h3><a name="sect_3_4">3.4. PTS options</a></h3>
<a name="FD"></a>
<h3><a name="sect_3_4">3.4. fieldrive status</a></h3>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td >
<b>HW prefix: </b>
</td>
<td class="td_code">
mfpts_tx_corrupt
mfpts_fd
</td>
</tr>
<tr>
......@@ -1414,7 +1414,7 @@ mfpts_tx_corrupt
<b>C prefix: </b>
</td>
<td class="td_code">
TX_CORRUPT
FD
</td>
</tr>
<tr>
......@@ -1628,35 +1628,47 @@ TX_CORRUPT
<td class="td_unused">
-
</td>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=1 class="td_field">
TXER
</td>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=1 class="td_field">
CD_N
</td>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=1 class="td_field">
WDGN_LATCH
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
ENABLE
WDGN
</td>
</tr>
</table>
<ul>
<li><b>
ENABLE
</b>[<i>read/write</i>]: enable
<br>When corrupt is set to 1 serial tx data is forced to 0.
WDGN
</b>[<i>read-only</i>]: fd watchdog
<br>fd_wdgn input from the fieldrive chip
<li><b>
WDGN_LATCH
</b>[<i>read-only</i>]: fd watchdog latched
<br>Active watchdog state is latched. Register is reseted by reset core and reset fd
<li><b>
CD_N
</b>[<i>read-only</i>]: fd carrier detect
<br>CDn input from the fieldrive chip
<li><b>
TXER
</b>[<i>read-only</i>]: fd transmitter error
<br>fd_txer input from the fieldrive chip
</ul>
<a name="FD"></a>
<h3><a name="sect_3_5">3.5. fieldrive status</a></h3>
<a name="FD_RXCDN_CNT"></a>
<h3><a name="sect_3_5">3.5. fieldrive rx not carrier detect counter</a></h3>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td >
<b>HW prefix: </b>
</td>
<td class="td_code">
mfpts_fd
mfpts_fd_rxcdn_cnt
</td>
</tr>
<tr>
......@@ -1672,7 +1684,7 @@ mfpts_fd
<b>C prefix: </b>
</td>
<td class="td_code">
FD
FD_RXCDN_CNT
</td>
</tr>
<tr>
......@@ -1712,29 +1724,29 @@ FD
</td>
</tr>
<tr>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=8 class="td_field">
FD_RXCDN_CNT[31:24]
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
</tr>
</table>
......@@ -1766,29 +1778,29 @@ FD
</td>
</tr>
<tr>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=8 class="td_field">
FD_RXCDN_CNT[23:16]
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
</tr>
</table>
......@@ -1820,29 +1832,29 @@ FD
</td>
</tr>
<tr>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=8 class="td_field">
FD_RXCDN_CNT[15:8]
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
</tr>
</table>
......@@ -1874,49 +1886,37 @@ FD
</td>
</tr>
<tr>
<td class="td_unused">
-
<td style="border: solid 1px black;" colspan=8 class="td_field">
FD_RXCDN_CNT[7:0]
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td class="td_unused">
-
<td >
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
TXER
<td >
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
CD_N
<td >
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
WDGN_LATCH
<td >
</td>
<td style="border: solid 1px black;" colspan=1 class="td_field">
WDGN
<td >
</td>
</tr>
</table>
<ul>
<li><b>
WDGN
</b>[<i>read-only</i>]: fd watchdog
<br>fd_wdgn input from the fieldrive chip
<li><b>
WDGN_LATCH
</b>[<i>read-only</i>]: fd watchdog latched
<br>Active watchdog state is latched. Register is reseted by reset core and reset fd
<li><b>
CD_N
</b>[<i>read-only</i>]: fd carrier detect
<br>CDn input from the fieldrive chip
<li><b>
TXER
</b>[<i>read-only</i>]: fd transmitter error
<br>fd_txer input from the fieldrive chip
FD_RXCDN_CNT
</b>[<i>read-only</i>]: fieldrive rx not carrier detect counter
<br>Number of RX NOT carrier detect periods. Counter is reset by macrocycle, core reset and fd reset
</ul>
<a name="FD_TXERR_CNT"></a>
<h3><a name="sect_3_6">3.6. fieldrive tx error counter</a></h3>
......
......@@ -2,7 +2,7 @@
#
# * File : /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/python/regs/masterfip_pts_csr.py
# * Author : auto-generated by wbgen2 from /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/masterfip_pts_csr.wb
# * Created : Wed Mar 29 15:35:11 2017
# * Created : Thu Mar 30 10:54:26 2017
#
# THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE /home/gumas/projects/cti/pts_masterfip/pts/fmcmasterfip/gateware/rtl/wbgen/masterfip_pts_csr.wb
# DO NOT HAND-EDIT UNLESS IT'S ABSOLUTELY NECESSARY!
......@@ -17,18 +17,18 @@ addr = {
'ext_sync.dir' : [ 0x1, 0x2, "rw"],
'ext_sync.oe' : [ 0x1, 0x4, "rw"],
'ext_sync.output_value' : [ 0x1, 0x8, "rw"],
'ext_sync.p_cnt_rst' : [ 0x1, 0x100, "rw"],
'ext_sync.fpga_io_dir' : [ 0x1, 0x200, "rw"],
'ext_sync.fpga_io_dir' : [ 0x1, 0x10, "rw"],
'ext_sync.raw_input' : [ 0x1, 0x20, "rw"],
'ext_sync_raw_input' : [ 0x2, 0xffffffff, "r"],
'tx_corrupt' : [ 0x2, 0xffffffff, "rw"],
'tx_corrupt' : [ 0x3, 0xffffffff, "rw"],
'fd' : [ 0x3, 0xffffffff, "r"],
'fd.wdgn' : [ 0x3, 0x1, "r"],
'fd.wdgn_latch' : [ 0x3, 0x2, "r"],
'fd.cd_n' : [ 0x3, 0x4, "r"],
'fd.txer' : [ 0x3, 0x8, "r"],
'fd' : [ 0x4, 0xffffffff, "r"],
'fd.wdgn' : [ 0x4, 0x1, "r"],
'fd.wdgn_latch' : [ 0x4, 0x2, "r"],
'fd.cd_n' : [ 0x4, 0x4, "r"],
'fd.txer' : [ 0x4, 0x8, "r"],
'fd_rxcdn_cnt' : [ 0x4, 0xffffffff, "r"],
'fd_txerr_cnt' : [ 0x5, 0xffffffff, "r"],
'':[0,0]
......
......@@ -26,21 +26,21 @@ def test_sync_input( dut, box ):
util.info_msg("Setting synchronisation line to input")
dut.fipcore.write_regname('ext_sync.dir', 0)
dut.fipcore.write_regname('ext_sync.fpga_io_dir', 0)
dut.fippts.write_regname('ext_sync.dir', 0)
dut.fippts.write_regname('ext_sync.fpga_io_dir', 0)
util.info_msg("Enabling buffer")
dut.fipcore.write_regname('ext_sync.oe', 1)
dut.fippts.write_regname('ext_sync.oe', 1)
util.info_msg("Disabling termination")
dut.fipcore.write_regname('ext_sync.term_en', 0)
dut.fippts.write_regname('ext_sync.term_en', 0)
util.info_msg("Connecting synchronisation line to low voltage in relay box")
box.trigger_input_low()
time.sleep(DEL)
if dut.fipcore.read_regname('ext_sync_raw_input') == 0:
if dut.fippts.read_regname('ext_sync.raw_input') == 0:
result['Input low'] = 1
util.info_msg("Read low input value")
else :
......@@ -55,7 +55,7 @@ def test_sync_input( dut, box ):
time.sleep(DEL)
if dut.fipcore.read_regname('ext_sync_raw_input') == 1:
if dut.fippts.read_regname('ext_sync.raw_input') == 1:
result['Input high'] = 1
util.info_msg("Read high input value")
else :
......@@ -76,21 +76,21 @@ def test_termination( dut, box ):
util.info_msg("Setting synchronisation line to input")
dut.fipcore.write_regname('ext_sync.dir', 0)
dut.fipcore.write_regname('ext_sync.fpga_io_dir', 0)
dut.fippts.write_regname('ext_sync.dir', 0)
dut.fippts.write_regname('ext_sync.fpga_io_dir', 0)
util.info_msg("Enabling buffer")
dut.fipcore.write_regname('ext_sync.oe', 1)
dut.fippts.write_regname('ext_sync.oe', 1)
util.info_msg("Disabling termination")
dut.fipcore.write_regname('ext_sync.term_en', 0)
dut.fippts.write_regname('ext_sync.term_en', 0)
util.info_msg("Connecting synchronisation line to high voltage in relay box")
box.trigger_input_high()
time.sleep(DEL)
if dut.fipcore.read_regname('ext_sync_raw_input') == 1:
if dut.fippts.read_regname('ext_sync.raw_input') == 1:
result['Termination disabled'] = 1
util.info_msg("Read high input value")
else :
......@@ -101,12 +101,12 @@ def test_termination( dut, box ):
util.info_msg("Enabling termination (pulldown)")
dut.fipcore.write_regname('ext_sync.term_en', 1)
dut.fippts.write_regname('ext_sync.term_en', 1)
time.sleep(DEL)
if dut.fipcore.read_regname('ext_sync_raw_input') == 0:
if dut.fippts.read_regname('ext_sync.raw_input') == 0:
result['Termination enabled'] = 1
util.info_msg("Read low input value")
else :
......@@ -115,7 +115,7 @@ def test_termination( dut, box ):
###############################################################################
dut.fipcore.write_regname('ext_sync.term_en', 0)
dut.fippts.write_regname('ext_sync.term_en', 0)
box.trigger_input_low()
return result
......@@ -131,21 +131,21 @@ def test_oen( dut, box ):
util.info_msg("Setting synchronisation line to input")
dut.fipcore.write_regname('ext_sync.dir', 0)
dut.fipcore.write_regname('ext_sync.fpga_io_dir', 0)
dut.fippts.write_regname('ext_sync.dir', 0)
dut.fippts.write_regname('ext_sync.fpga_io_dir', 0)
util.info_msg("Disabling buffer")
dut.fipcore.write_regname('ext_sync.oe', 0)
dut.fippts.write_regname('ext_sync.oe', 0)
util.info_msg("Disabling termination")
dut.fipcore.write_regname('ext_sync.term_en', 0)
dut.fippts.write_regname('ext_sync.term_en', 0)
util.info_msg("Connecting synchronisation line to low voltage in relay box")
box.trigger_input_low()
time.sleep(DEL)
lowinput = dut.fipcore.read_regname('ext_sync_raw_input')
lowinput = dut.fippts.read_regname('ext_sync.raw_input')
if lowinput == 0:
util.info_msg("Read low input value")
......@@ -160,7 +160,7 @@ def test_oen( dut, box ):
time.sleep(DEL)
highinput = dut.fipcore.read_regname('ext_sync_raw_input')
highinput = dut.fippts.read_regname('ext_sync.raw_input')
if highinput == 0:
util.info_msg("Read low input value")
......@@ -194,23 +194,23 @@ def test_dir( dut, box ):
util.info_msg("Setting synchronisation line buffer to OUTPUT")
dut.fipcore.write_regname('ext_sync.dir', 1)
dut.fippts.write_regname('ext_sync.dir', 1)
util.info_msg("Setting synchronisation IO in FPGA to INPUT")
dut.fipcore.write_regname('ext_sync.fpga_io_dir', 0)
dut.fippts.write_regname('ext_sync.fpga_io_dir', 0)
util.info_msg("Enabling buffer")
dut.fipcore.write_regname('ext_sync.oe', 1)
dut.fippts.write_regname('ext_sync.oe', 1)
util.info_msg("Disabling termination")
dut.fipcore.write_regname('ext_sync.term_en', 0)
dut.fippts.write_regname('ext_sync.term_en', 0)
util.info_msg("Connecting synchronisation line to low voltage in relay box")
box.trigger_input_low()
time.sleep(DEL)
lowinput = dut.fipcore.read_regname('ext_sync_raw_input')
lowinput = dut.fippts.read_regname('ext_sync.raw_input')
if lowinput == 0:
util.info_msg("Read low input value")
......@@ -225,7 +225,7 @@ def test_dir( dut, box ):
time.sleep(DEL)
highinput = dut.fipcore.read_regname('ext_sync_raw_input')
highinput = dut.fippts.read_regname('ext_sync.raw_input')
if highinput == 0:
util.info_msg("Read low input value")
......@@ -233,7 +233,7 @@ def test_dir( dut, box ):
util.info_msg("Read high input value" )
box.trigger_input_low()
dut.fipcore.write_regname('ext_sync.dir', 0)
dut.fippts.write_regname('ext_sync.dir', 0)
time.sleep(DEL)
###############################################################################
......
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