Commit e91158c9 authored by egousiou's avatar egousiou

LGPL header added to all source files

git-svn-id: http://svn.ohwr.org/cern-fip/trunk/hdl/design@230 7f0067c9-7624-46c7-bd39-3fb5400c0213
parent d24b13cd
......@@ -4,58 +4,58 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File DualClkRAM.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- ProASIC3 library
library PROASIC3; -- component specific library
-- ProASIC3 packages
use PROASIC3.all;
---------------------------------------------------------------------------------------------------
-- --
-- DualClkRAM --
-- --
---------------------------------------------------------------------------------------------------
--
-- File DualClkRAM.vhd
--
-- Description Instantiation of a template ProAsic3 RAM4K9 memory component with
-- o word width : 8 bits and
-- o depth : 512 bytes.
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 15/12/2010
--
--
-- Version v0.02
--
-- Depends on ProASIC3 lib
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 08/2010 v0.01 EG pepeline not used! data appears in output 1 clock cycle after the
-- address is given (otherwise it was 2 clock cycles later) slack
-- checked and is ok! code cleaned-up and commented
-- ->15/12/2010 v0.02 EG comments for BLKA, BLKB; cleaning-up
-- 08/2010 v0.01 EG pepeline not used! data appears in output 1 clock cycle after the
-- address is given (otherwise it was 2 clock cycles later) slack
-- checked and is ok! code cleaned-up and commented
-- 15/12/2010 v0.02 EG comments for BLKA, BLKB; cleaning-up
--
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......
This diff is collapsed.
......@@ -6,25 +6,12 @@
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_DualClkRAM_clka_rd_clkb_wr.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_DualClkRAM_clka_rd_clkb_wr --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_DualClkRAM_clka_rd_clkb_wr.vhd
--
-- Description The unit provides the memory triplication, transparently to the outside world.
-- The component DualClkRam (512 bytes) is triplicated: each incoming byte is written
......@@ -37,24 +24,40 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 10/12/2010
--
--
-- Version v0.02
--
--
-- Depends on DualClkRAM.vhd
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 12/2010 v0.02 EG code cleaned-up+commented
--
-- 12/2010 v0.02 EG code cleaned-up+commented
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......
......@@ -4,59 +4,62 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_bits_to_txd.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_bits_to_txd --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_bits_to_txd.vhd
--
-- Description According to the state of the FSM of the WF_tx_serializer, the unit is responsible
-- for putting in nanoFIP's output FD_TXD one by one all the bits required for the
-- formation of the RP_DAT frame (that is: manch. encoded FSS, data, CRC and FES bits).
-- The unit also manages the output FD_TXENA.
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 07/01/2011
--
--
-- Version v0.03
--
--
-- Depends on WF_reset_unit
-- WF_tx_osc
-- WF_tx_serializer
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 8/2010 v0.02 EG tx_enable has to be synched with txd! sending_fss not enough;
-- need for tx_sched_p_buff signal
-- -> 7/1/2011 v0.03 EG tx_enable now starts 1 uclk tick earlier, at the same moment as txd
-- becomes 1 for the 1st bit of preamble
-- signals s_tx_enable & s_start_tx_enable removed for simplification
-- 8/2010 v0.02 EG tx_enable has to be synched with txd! sending_fss not enough;
-- need for tx_sched_p_buff signal
-- 7/1/2011 v0.03 EG tx_enable now starts 1 uclk tick earlier, at the same moment as txd
-- becomes 1 for the 1st bit of preamble
-- signals s_tx_enable & s_start_tx_enable removed for simplification
--
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_cons_bytes_processor.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_cons_bytes_processor --
-- --
-- |
-- WF_cons_bytes_processor |
-- |
---------------------------------------------------------------------------------------------------
--
-- File WF_cons_bytes_processor.vhd
--
-- Description The unit is consuming the RP_DAT data bytes that are arriving from the
-- WF_fd_receiver, according to the following:
......@@ -59,38 +45,52 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- |-----to DAT_O-----|
-- |---to Reset Unit--|
--
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 15/12/2010
--
--
-- Version v0.03
--
--
-- Depends on WF_reset_unit
-- WF_fd_receiver
-- WF_engine_control
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 11/09/2009 v0.01 EB First version
-- -> 09/2010 v0.02 EG Treatment of reset variable added; Bytes_Transfer_To_DATO unit
-- creation for simplification; Signals renamed;
-- Ctrl, PDU_TYPE, Length bytes registered;
-- Code cleaned-up & commented.
-- -> 15/12/2010 v0.03 EG Unit renamed from WF_cons_bytes_from_rx to WF_cons_bytes_processor
-- byte_ready_p comes from the rx_deserializer (no need to pass from
-- the engine) Code cleaned-up & commented (more!)
--
-- 11/09/2009 v0.01 EB First version
-- 09/2010 v0.02 EG Treatment of reset variable added; Bytes_Transfer_To_DATO unit
-- creation for simplification; Signals renamed;
-- Ctrl, PDU_TYPE, Length bytes registered;
-- Code cleaned-up & commented.
-- 15/12/2010 v0.03 EG Unit renamed from WF_cons_bytes_from_rx to WF_cons_bytes_processor
-- byte_ready_p comes from the rx_deserializer (no need to pass from
-- the engine) Code cleaned-up & commented (more!)
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_cons_bytes_processor
......@@ -122,7 +122,7 @@ port (
var_i : in t_var; -- variable type that is being treated
-- Signals from the WF_jtag_player unit
-- Signals from the WF_jtag_controller unit
jc_mem_adr_rd_i : in std_logic_vector (8 downto 0);
......@@ -130,7 +130,7 @@ port (
-- nanoFIP User Interface, WISHBONE Slave output
data_o : out std_logic_vector (15 downto 0); -- data out bus
-- Signals to the WF_jtag_player unit
-- Signals to the WF_jtag_controller unit
jc_mem_data_o : out std_logic_vector (7 downto 0);
-- Signals to the WF_cons_outcome unit
......@@ -140,7 +140,6 @@ port (
cons_var_rst_byte_1_o : out std_logic_vector (7 downto 0); -- received var_rst RP_DAT, 1st data byte
cons_var_rst_byte_2_o : out std_logic_vector (7 downto 0) -- received var_rst RP_DAT, 2nd data byte
);
end entity WF_cons_bytes_processor;
......@@ -193,7 +192,7 @@ begin
---------------------------------------------------------------------------------------------------
-- JTAG Consumed RAM --
-- Storage (by this unit) & retreival (by the JTAG_player unit) of consumed bytes --
-- Storage (by this unit) & retreival (by the JTAG_controller unit) of consumed bytes --
---------------------------------------------------------------------------------------------------
-- Instantiation of a Dual Port Consumed RAM (for both the consumed and consumed broadcast vars).
-- Port A is connected to the WISHBONE interface for the readings from the user and
......@@ -491,7 +490,7 @@ end process;
s_cons_lgth_byte <= (others => '0');
else
if (var_i = var_1) or (var_i = var_2) or (var_i = var_rst) or (var_i = var_jc1) then -- only for consumed vars
if (var_i = var_1) or (var_i = var_2) or (var_i = var_rst) or (var_i = var_jc1)then -- only for consumed vars
if (byte_index_i = c_CTRL_BYTE_INDEX) and (byte_ready_p_i='1') then
cons_ctrl_byte_o <= byte_i;
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_cons_outcome.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_cons_outcome --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_cons_outcome.vhd
--
-- Description The unit starts by validating a consumed RP_DAT frame with respect to the
-- correctness of:
......@@ -55,37 +41,53 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 22/02/2011
--
--
-- Version v0.05
--
--
-- Depends on WF_reset_unit
-- WF_engine_control
-- WF_fd_receiver
-- WF_consumption
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 10/2010 v0.01 EG First version
-- -> 11/2010 v0.02 EG Treatment of reset vars added to the unit
-- Correction on var1_rdy, var2_rdy for slone
-- -> 12/2010 v0.03 EG Finally no broadcast in slone, cleanning-up+commenting
-- -> 01/2010 v0.04 EG Unit WF_var_rdy_generator separated in WF_cons_outcome
-- (for var1_rdy,var2_rdy+var_rst outcome) & WF_prod_permit (for var3)
-- -> 02/2010 v0.05 EG Added here functionality of wf_cons_frame_validator
-- Bug on var1_rdy, var2_rdy generation corrected (the s_varX_received
-- was always set to 1!)
-- Added check of Ctrl byte for rtler
-- Added cons_bytes_excess_i for tracking of too long RP_DATs
--
-- 10/2010 v0.01 EG First version
-- 11/2010 v0.02 EG Treatment of reset vars added to the unit
-- Correction on var1_rdy, var2_rdy for slone
-- 12/2010 v0.03 EG Finally no broadcast in slone, cleanning-up+commenting
-- 01/2010 v0.04 EG Unit WF_var_rdy_generator separated in WF_cons_outcome
-- (for var1_rdy,var2_rdy+var_rst outcome) & WF_prod_permit (for var3)
-- 02/2010 v0.05 EG Added here functionality of wf_cons_frame_validator
-- Bug on var1_rdy, var2_rdy generation corrected (the s_varX_received
-- was always set to 1!)
-- Added check of Ctrl byte for rtler
-- Added cons_bytes_excess_i for tracking of too long RP_DATs
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......@@ -131,7 +133,7 @@ entity WF_cons_outcome is
var1_rdy_o : out std_logic; -- signals new data is received and can safely be read
var2_rdy_o : out std_logic; -- signals new data is received and can safely be read
-- Signal to the WF_JTAG_player unit
-- Signal to the WF_jtag_controller unit
jc_start_p_o : out std_logic;
-- Signal to the WF_status_bytes_gen unit
......@@ -317,7 +319,7 @@ begin
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- JTAG_player -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- JTAG_controller -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
if (var_i = var_jc1) and (s_cons_frame_ok_p = '1') then
jc_start_p_o <= '1';
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_consumption.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_consumption --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_consumption.vhd
--
-- Description The unit groups the main actions that regard data consumption.
-- It instantiates the units:
......@@ -72,26 +58,42 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 11/01/2011
--
--
-- Version v0.01
--
--
-- Depends on WF_reset_unit
-- WF_fd_receiver
-- WF_engine_control
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- ->
--
-- 01/2011 EG v0.01 first version
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......@@ -161,7 +163,7 @@ entity WF_consumption is
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- Signal from the WF_jtag_player unit
-- Signal from the WF_jtag_controller unit
jc_mem_adr_rd_i : in std_logic_vector (8 downto 0);
......@@ -172,7 +174,7 @@ entity WF_consumption is
var1_rdy_o : out std_logic;
var2_rdy_o : out std_logic;
-- Signals to the WF_JTAG_player
-- Signals to the WF_jtag_controller
jc_start_p_o : out std_logic;
-- nanoFIP User Interface, WISHBONE Slave outputs
......@@ -185,7 +187,7 @@ entity WF_consumption is
assert_rston_p_o : out std_logic;
rst_nfip_and_fd_p_o : out std_logic;
-- Signals to the WF_jtag_player unit
-- Signals to the WF_jtag_controller unit
jc_mem_data_o : out std_logic_vector (7 downto 0)
);
......
......@@ -4,61 +4,61 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_crc.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_crc --
-- --
---------------------------------------------------------------------------------------------------
--
--
-- File WF_crc.vhd
-- Description The unit creates the modules for:
-- o the generation of the CRC of serial data,
-- o the verification of an incoming CRC syndrome.
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
--
--
-- Date 23/02/2011
--
--
-- Version v0.04
--
--
-- Depends on WF_reset_unit
-- WF_rx_deserializer
-- WF_tx_serializer
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 07/08/2009 v0.02 PAS Entity Ports added, start of architecture content
-- -> 08/2010 v0.03 EG Data_FCS_select and crc_ready_p_o signals removed,
-- variable v_q_check_mask replaced with a signal,
-- code cleaned-up+commented
-- -> 02/2011 v0.04 EG s_q_check_mask was not in Syndrome_Verification sensitivity list!
-- xor replaced with if(Syndrome_Verification); processes rewritten;
-- delay on data_bit_ready_p_i removed.
--
-- 07/08/2009 v0.02 PAS Entity Ports added, start of architecture content
-- 08/2010 v0.03 EG Data_FCS_select and crc_ready_p_o signals removed,
-- variable v_q_check_mask replaced with a signal,
-- code cleaned-up+commented
-- 02/2011 v0.04 EG s_q_check_mask was not in Syndrome_Verification sensitivity list!
-- xor replaced with if(Syndrome_Verification); processes rewritten;
-- delay on data_bit_ready_p_i removed.
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_crc
......
......@@ -4,49 +4,52 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- file WF_decr_counter.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
---------------------------------------------------------------------------------------------------
-- --
-- WF_decr_counter --
-- --
---------------------------------------------------------------------------------------------------
--
--
-- Description Decreasing counter with synchronous reset, load enable and decrease enable.
--
--
-- File WF_decr_counter.vhd
-- Description Decreasing counter with synchronous reset, load enable and decrease enable
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 10/2010
--
--
-- Version v0.01
--
--
-- Depends on WF_reset_unit
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
--
-- 10/2010 EG v0.01 first version
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_decr_counter
--=================================================================================================
......
This diff is collapsed.
......@@ -5,25 +5,12 @@
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_fd_receiver.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_fd_receiver --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_fd_receiver.vhd
--
-- Description The unit groups the main actions that regard FIELDRIVE data reception.
-- It instantiates the units:
......@@ -65,27 +52,43 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 15/02/2011
--
--
-- Version v0.01
--
--
-- Depends on WF_reset_unit
-- WF_engine_control
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- ->
--
-- 02/2011 v0.01 EG First version
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_fd_receiver
--=================================================================================================
......@@ -120,16 +123,9 @@ entity WF_fd_receiver is
rx_crc_wrong_p_o : out std_logic; -- indication of a frame (ID_DAT or RP_DAT) with
-- wrong CRC; pulse upon FES detection
TP14 : out std_logic;
TP15 : out std_logic;
TP16 : out std_logic;
TP39 : out std_logic;
-- Signals to the WF_engine_control
rx_fss_received_p_o : out std_logic -- pulse upon FSS detection (ID/ RP_DAT)
);
end entity WF_fd_receiver;
......@@ -210,12 +206,6 @@ begin
fss_crc_fes_ok_p_o => rx_fss_crc_fes_ok_p_o,
rx_osc_rst_o => s_rx_osc_rst,
fss_received_p_o => rx_fss_received_p_o,
TP14 => TP14,
TP15 => TP15,
TP16 => TP16,
TP39 => TP39,
crc_wrong_p_o => rx_crc_wrong_p_o);
------------------------------------------------------
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_fd_transmitter.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_fd_transmitter --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_fd_transmitter.vhd
--
-- Description The unit groups the main actions that regard FIELDRIVE data transmission.
-- It instantiates the units:
......@@ -62,32 +48,45 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- 0_____________________________FIELDBUS______________________________O
--
--
--
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 11/01/2011
--
--
-- Version v0.01
--
--
-- Depends on WF_reset_unit
-- WF_production
-- WF_engine_control
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- ->
--
-- 01/2011 EG v0.01 first version
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_fd_transmitter
......
......@@ -4,50 +4,52 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_incr_counter.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
---------------------------------------------------------------------------------------------------
-- --
-- WF_incr_counter --
-- --
---------------------------------------------------------------------------------------------------
--
--
-- Description Increasing counter with synchronous reset, reinitialise and increase enable.
--
--
-- File WF_incr_counter.vhd
-- Description Increasing counter with synchronous reset, reinitialise and increase enable
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 10/2010
--
--
-- Version v0.01
--
--
-- Depends on
--
--
---------------------------------------------------------------------------------------------------
--
-- Date 01/2011
-- Version v0.011
----------------
-- Last changes
-- -> 01/2011 EG v0.011 counter_full became a constant
--
-- 10/2010 EG v0.01 first version
-- 01/2011 EG v0.011 counter_full became a constant
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_incr_counter
--=================================================================================================
......
This diff is collapsed.
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_model_constr_decoder.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_model_constr_decoder --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_model_constr_decoder.vhd
--
-- Description Generation of the nanoFIP output S_ID and decoding of the inputs C_ID and M_ID.
-- The output S_ID0 is a clock with period the double of uclk's period and the S_ID1
......@@ -36,32 +22,48 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- S_ID1 10
-- Vcc 11
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
-- Date 21/01/2011
--
--
-- Version v0.03
--
--
-- Depends on WF_reset_unit
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 11/09/2009 v0.01 PAS First version
-- -> 20/08/2010 v0.02 EG S_ID corrected so that S_ID0 is always the opposite of S_ID1
-- "for" loop replaced with signals concatenation;
-- Counter is of c_RELOAD_MID_CID bits; Code cleaned-up
-- -> 06/10/2010 v0.03 EG generic c_RELOAD_MID_CID removed;
-- counter unit instantiated
-- -> 01/2011 v0.031 EG loading aftern the 2nd cycle (no need for 3)
--
-- 11/09/2009 v0.01 PAS First version
-- 20/08/2010 v0.02 EG S_ID corrected so that S_ID0 is always the opposite of S_ID1
-- "for" loop replaced with signals concatenation;
-- Counter is of c_RELOAD_MID_CID bits; Code cleaned-up
-- 06/10/2010 v0.03 EG generic c_RELOAD_MID_CID removed;
-- counter unit instantiated
-- 01/2011 v0.031 EG loading aftern the 2nd cycle (no need for 3)
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......
......@@ -4,53 +4,55 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_package.vhd |
---------------------------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;
---------------------------------------------------------------------------------------------------
-- --
-- WF_package --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_package.vhd
--
-- Description Definitions of constants, types, entities, functions
--
--
-- Author Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 11/01/2011
--
--
-- Version v0.04
--
--
-- Depends on
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 8/2010 v0.01 EG byte_array of all vars cleaned_up (ex: subs_i removed)
-- -> 10/2010 v0.02 EG base_addr unsigned(8 downto 0) instead of
-- std_logic_vector (9 downto 0) to simplify calculations; cleaning-up
-- -> 1/2011 v0.03 EG turnaround times & broadcast var (91h) updated following new specs
-- added DualClkRam
-- -> 2/2011 v0.04 EG function for manch_encoder; cleaning up of constants+generics
-- added Ctrl bytes for RP_DAT_MSG and RP_DAT_RQ and RP_DAT_RQ_MSG
-- 8/2010 v0.01 EG byte_array of all vars cleaned_up (ex: subs_i removed)
-- 10/2010 v0.02 EG base_addr unsigned(8 downto 0) instead of
-- std_logic_vector (9 downto 0) to simplify calculations; cleaning-up
-- 1/2011 v0.03 EG turnaround times & broadcast var (91h) updated following new specs
-- added DualClkRam
-- 2/2011 v0.04 EG function for manch_encoder; cleaning up of constants+generics
-- added Ctrl bytes for RP_DAT_MSG and RP_DAT_RQ and RP_DAT_RQ_MSG
--
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
--=================================================================================================
......@@ -67,6 +69,15 @@ package WF_package is
constant c_DEGLITCH_THRESHOLD : natural := 4;
---------------------------------------------------------------------------------------------------
-- Constant regarding the frame structure --
---------------------------------------------------------------------------------------------------
constant c_MAX_FRAME_BYTES : natural := 130; -- maximum number of bytes in a frame after the
-- FSS (counting starts from 0!)
---------------------------------------------------------------------------------------------------
-- Constants regarding the CRC calculation --
---------------------------------------------------------------------------------------------------
......@@ -119,6 +130,20 @@ package WF_package is
---------------------------------------------------------------------------------------------------
-- Constant regarding the JTAG controller --
---------------------------------------------------------------------------------------------------
constant c_MAX_FRAME_BITS : natural := 976; -- maximum number of TMS/ TDI bits that can be sent in
-- one frame : 122 bytes * 8 bits
constant c_JC_TCK_DIV : unsigned (3 downto 0) := "1000"; -- JC_TCK is created by a frequency
-- division of the 40 MHz uclk.
-- c_JC_TCK_div = 8 gives a JC_TCK of 5 MHz
constant c_FOUR_JC_TCK_C_LGTH : integer := 5; -- length of a counter
-- counting 4 JC_TCK periods
---------------------------------------------------------------------------------------------------
-- Constant regarding the Model & Constructor decoding --
---------------------------------------------------------------------------------------------------
......@@ -387,12 +412,6 @@ package WF_package is
crc_wrong_p_o : out std_logic;
fss_crc_fes_ok_p_o : out std_logic;
fss_received_p_o : out std_logic;
TP14 : out std_logic;
TP15 : out std_logic;
TP16 : out std_logic;
TP39 : out std_logic;
rx_osc_rst_o : out std_logic);
-----------------------------------------------------------------
end component WF_rx_deserializer;
......@@ -479,7 +498,7 @@ package WF_package is
---------------------------------------------------------------------------------------------------
component WF_jtag_player is
component WF_jtag_controller is
port (
uclk_i : in std_logic;
nfip_rst_i : in std_logic;
......@@ -493,7 +512,7 @@ package WF_package is
jc_tdo_byte_o : out std_logic_vector (7 downto 0);
jc_mem_adr_rd_o : out std_logic_vector (8 downto 0));
-----------------------------------------------------------------
end component WF_jtag_player;
end component WF_jtag_controller;
......@@ -510,12 +529,6 @@ package WF_package is
rx_byte_ready_p_o : out std_logic;
rx_fss_crc_fes_ok_p_o : out std_logic;
rx_fss_received_p_o : out std_logic;
TP14 : out std_logic;
TP15 : out std_logic;
TP16 : out std_logic;
TP39 : out std_logic;
rx_crc_wrong_p_o : out std_logic );
-----------------------------------------------------------------
end component WF_fd_receiver;
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_prod_bytes_retriever.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_prod_bytes_retriever --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_prod_bytes_retriever.vhd
--
-- Description After an ID_DAT frame requesting for a variable to be produced, the unit provides
-- to the WF_tx_serializer unit one by one, all the bytes of data needed for the
......@@ -66,39 +52,55 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 04/01/2011
--
--
-- Version v0.05
--
--
-- Depends on WF_reset_unit
-- WF_wb_controller
-- WF_engine_control
-- WF_prod_permit
-- WF_status_bytes_gen
-- WF_model_constr_dec
--
--
---------------------------------------------------------------------------------------------------
----------------
-- Last changes
-- -> 06/2010 v0.02 EG subs_i is not sent in the RP_DAT frames
-- signal s_wb_we includes the wb_stb_r_edge_p_i
-- cleaner structure
-- -> 06/2010 v0.03 EG signal s_mem_byte was not in sensitivity list in v0.01! by adding it
-- changes were essential in the timing of the tx (WF_osc, WF_tx,
-- WF_engine_control and the configuration of the memory needed changes)
-- -> 11/2010 v0.04 EG for simplification, new unit Slone_Data_Sampler created
-- -> 4/1/2011 v0.05 EG unit renamed from WF_prod_bytes_to_tx to WF_prod_bytes_retriever;
-- input byte_being_sent_p_i added, so that the reseting of status bytes
-- does not pass from the engine; clening-up+commenting
-- -> 2/2011 v0.051 EG WF_prod_bytes_from_dati unit removed.
--
--
-- 06/2010 v0.02 EG subs_i is not sent in the RP_DAT frames
-- signal s_wb_we includes the wb_stb_r_edge_p_i
-- cleaner structure
-- 06/2010 v0.03 EG signal s_mem_byte was not in sensitivity list in v0.01! by adding it
-- changes were essential in the timing of the tx (WF_osc, WF_tx,
-- WF_engine_control and the configuration of the memory needed changes)
-- 11/2010 v0.04 EG for simplification, new unit Slone_Data_Sampler created
-- 4/1/2011 v0.05 EG unit renamed from WF_prod_bytes_to_tx to WF_prod_bytes_retriever;
-- input byte_being_sent_p_i added, so that the reseting of status bytes
-- does not pass from the engine; clening-up+commenting
-- 2/2011 v0.051 EG WF_prod_bytes_from_dati unit removed.
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......@@ -159,7 +161,7 @@ entity WF_prod_bytes_retriever is
constr_id_dec_i : in std_logic_vector (7 downto 0); -- decoded constructor id settings
model_id_dec_i : in std_logic_vector (7 downto 0); -- decoded model id settings
-- Signals from the WF_jtag_player unit
-- Signals from the WF_jtag_controller unit
jc_tdo_byte_i : in std_logic_vector (7 downto 0); -- 8 last JC_TDO bits
-- OUTPUTS
......@@ -442,7 +444,7 @@ begin
-- MPS byte to the WF_tx_serializer.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- The other byte comes from the JATG_player
-- The other byte comes from the JATG_controller
else
byte_o <= jc_tdo_byte_i;
rst_status_bytes_p_o <= '0';
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_prod_data_lgth_calc.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_prod_data_lgth_calc --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_prod_data_lgth_calc.vhd
--
-- Description Calculation of the number of bytes, after the FSS and before the FCS, that have
-- to be transferred when a variable is produced (var_pres, var_identif, var_3, var_jc3).
......@@ -49,31 +35,44 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- |-----P3_LGTH-----|
--
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 09/12/2010
--
--
-- Version v0.02
--
--
-- Depends on WF_engine_control
--
--
----------------
-- Last changes
-- 12/2010 v0.02 EG code cleaned-up+commented
---------------------------------------------------------------------------------------------------
--
---------------------------------------------------------------------------------------------------
--
-- Last changes
-- -> 12/2010 v0.02 EG code cleaned-up+commented
--
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_prod_data_lgth_calc
--=================================================================================================
......@@ -96,7 +95,6 @@ entity WF_prod_data_lgth_calc is
-- OUTPUT
-- Signal to the WF_engine_control and WF_production units
prod_data_lgth_o : out std_logic_vector (7 downto 0)
);
end entity WF_prod_data_lgth_calc;
......@@ -181,7 +179,7 @@ begin
when var_jc3 =>
-- data length calculation regardless of the operational mode, the P3_LGTH and the NOSTAT
-- 1 byte of data from the JTAG_player
-- 1 byte of data from the JTAG_controller
-- to these there should be added: 1 byte Control
-- 1 byte PDU_TYPE
-- 1 byte Length
......
......@@ -4,53 +4,54 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_prod_permit.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_prod_permit --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_prod_permit.vhd
--
-- Description Generation of the "nanoFIP User Interface, NON_WISHBONE" output signal VAR3_RDY,
-- according to the variable (var_i) that is being treated.
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 14/1/2011
--
--
-- Version v0.01
--
--
-- Depends on WF_engine_control
-- WF_reset_unit
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 1/2011 v0.01 EG First version
--
-- 1/2011 v0.01 EG First version
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_production.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_production --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_production.vhd
--
-- Description The unit groups the main actions that regard data production.
-- It instantiates the units:
......@@ -73,31 +59,46 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- which of the instantiated units needs it.
--
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 11/01/2011
--
--
-- Version v0.02
--
--
-- Depends on WF_reset_unit
-- WF_consumption
-- WF_engine_control
-- WF_wb_controller
-- WF_model_constr_decoder
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 2/2011 v0.02 EG WF_serializer removed from this unit
--
-- 2/2011 v0.02 EG WF_serializer removed from this unit
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......@@ -194,7 +195,7 @@ entity WF_production is
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- Signals from the WF_jtag_player unit
-- Signals from the WF_jtag_controller unit
jc_tdo_byte_i : in std_logic_vector (7 downto 0);
......
......@@ -4,28 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_reset_unit.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_reset_unit --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_reset_unit.vhd
--
-- Description The unit is responsible for the generation of the:
--
......@@ -112,25 +97,13 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- and one for resets coming from a var_rst.
--
--
--
--
--
-- Authors Erik van der Bij (Erik.van.der.Bij@cern.ch)
-- Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 21/01/2011
--
--
-- Version v0.03
--
--
-- Depends on WF_cons_bytes_processor
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- 07/2009 v0.01 EB First version
-- 08/2010 v0.02 EG checking of bytes1 and 2 of reset var added
......@@ -139,9 +112,34 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- treated in the wf_cons_outcome; 2 state machines created; clean-up
-- PoR also for internal WISHBONE resets
-- 02/2011 v0.031 EG state nfip_off_fd_off added
--
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......
......@@ -4,54 +4,56 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_rx_deglitcher.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_rx_deglitcher --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_rx_deglitcher.vhd
--
-- Description The unit applies a glitch filter to the nanoFIP FIELDRIVE input FD_RXD.
-- It is capable of cleaning glitches up to c_DEGLITCH_THRESHOLD uclk ticks long.
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 14/02/2011
--
--
-- Date 14/02/2011
-- Version v0.03
--
--
-- Depends on WF_reset_unit
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 07/08/2009 v0.01 PAS Entity Ports added, start of architecture content
-- -> 23/08/2010 v0.02 EG code cleaned-up+commented
-- -> 14/02/2011 v0.03 EG complete change, no dependency on osc;
-- fd_rxd deglitched right at reception
--
-- 07/08/2009 v0.01 PAS Entity Ports added, start of architecture content
-- 23/08/2010 v0.02 EG code cleaned-up+commented
-- 14/02/2011 v0.03 EG complete change, no dependency on osc;
-- fd_rxd deglitched right at reception
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_rx_deserializer.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_rx_deserializer --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_rx_deserializer.vhd
--
-- Description De-serialization of the "nanoFIP FIELDRIVE" input signal FD_RXD and construction
-- of bytes of data to be provided to:
......@@ -63,58 +49,71 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- sample_bit_p : ^ ^ (this sampling will give the 0 and the 1)
--
--
-- Reminder:
--
-- Consumed RP_DAT frame structure :
-- Reminder of the consumed RP_DAT frame structure:
-- _______ _______ ______ _______ ______ ________________ _______ ___________ _______
-- |__PRE__|__FSD__|_Ctrl_||__PDU__|_LGTH_|_..ApplicData.._|__MPS__||____FCS____|__FES__|
--
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 15/02/2011
--
--
-- Version v0.05
--
--
-- Depends on WF_reset_unit
-- WF_rx_osc
-- WF_rx_deglitcher
-- WF_engine_control
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 09/2009 v0.01 PAS First version
-- -> 10/2010 v0.02 EG state switch_to_deglitched added;
-- output signal rx_osc_rst_o added; signals renamed;
-- state machine rewritten (moore style);
-- units WF_rx_manch_code_check and Incoming_Bits_Index created;
-- each manch bit of FES checked (bf was just each bit, so any D5 was FES)
-- code cleaned-up + commented.
-- -> 12/2010 v0.03 EG CRC_ok pulse transfered 16 bits later to match the FES;
-- like this we confirm that the CRC_ok_p arrived just before the FES,
-- and any 2 bytes that could by chanche be seen as CRC, are neglected.
-- FSM data_field_byte state: redundant code removed:
-- "s_fes_wrong_bit = '1' and s_manch_code_viol_p = '1' then idle"
-- code(more!)cleaned-up
-- -> 01/2011 v0.04 EG changed way of detecting the FES to be able to detect a FES even if
-- bytes with size different than 8 have preceeded.
-- crc_wrong_p_o replaced the crc_wrong_p_o.
-- -> 02/2011 v0.05 EG changed crc pulse transfer; removed switch to deglitch state
-- s_fes_detected removed and s_byte_ready_p_d1; if bytes arrive with
-- bits not x8, the fss_crc_fes_ok_p_o stays 0 (bc of s_byte_ready_p_d1)
-- and the crc_wrong_p_o is asserted (bc of s_sample_manch_bit_p_d1);
-- unit reset during production;
-- check for code vilations completely removed!
--
-- 09/2009 v0.01 PAS First version
-- 10/2010 v0.02 EG state switch_to_deglitched added;
-- output signal rx_osc_rst_o added; signals renamed;
-- state machine rewritten (moore style);
-- units WF_rx_manch_code_check and Incoming_Bits_Index created;
-- each manch bit of FES checked (bf was just each bit, so any D5 was FES)
-- code cleaned-up + commented.
-- 12/2010 v0.03 EG CRC_ok pulse transfered 16 bits later to match the FES;
-- like this we confirm that the CRC_ok_p arrived just before the FES,
-- and any 2 bytes that could by chanche be seen as CRC, are neglected.
-- FSM data_field_byte state: redundant code removed:
-- "s_fes_wrong_bit = '1' and s_manch_code_viol_p = '1' then idle"
-- code(more!)cleaned-up
-- 01/2011 v0.04 EG changed way of detecting the FES to be able to detect a FES even if
-- bytes with size different than 8 have preceeded.
-- crc_wrong_p_o replaced the crc_wrong_p_o.
-- 02/2011 v0.05 EG changed crc pulse transfer; removed switch to deglitch state
-- s_fes_detected removed and s_byte_ready_p_d1; if bytes arrive with
-- bits not x8, the fss_crc_fes_ok_p_o stays 0 (bc of s_byte_ready_p_d1)
-- and the crc_wrong_p_o is asserted (bc of s_sample_manch_bit_p_d1);
-- unit reset during production;
-- check for code vilations completely removed!
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......@@ -163,17 +162,9 @@ entity WF_rx_deserializer is
-- Signal to the WF_engine_control unit
fss_received_p_o : out std_logic; -- pulse upon reception of a correct FSS (ID/RP)
TP14 : out std_logic;
TP15 : out std_logic;
TP16 : out std_logic;
TP39 : out std_logic;
-- Signal to the WF_rx_osc unit
rx_osc_rst_o : out std_logic -- resets the clk recovery procedure
);
);
end entity WF_rx_deserializer;
......@@ -652,10 +643,6 @@ begin
-- with number of bits not multiple of 8, but with correct FES, can be detected.
crc_wrong_p_o <= s_fes_detected and s_sample_manch_bit_p_d1 and (not s_CRC_ok_p_d);
TP14 <= fd_rxd_i;
TP15 <= s_CRC_ok_p_d;
TP16 <= s_sample_manch_bit_p_d1;
TP39 <= s_byte_ready_p_d1;
end architecture rtl;
--=================================================================================================
......
......@@ -4,26 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_rx_osc.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_rx_osc --
-- --
---------------------------------------------------------------------------------------------------
-- File WF_rx_osc.vhd
--
-- Description Generation of the clock signals needed for the FIELDRIVE reception
--
......@@ -39,36 +26,51 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- may not result in an edge (eg. a 0 followed by a 0 will give an edge _|-|_|-,
-- but a 0 followed by a 1 will not _|--|_ ).
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 14/02/2011
--
--
-- Version v0.04
--
--
-- Depends on WF_reset_unit
-- WF_deglitcher
-- WF_rx_deserializer
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 08/2009 v0.01 PS Entity Ports added, start of architecture content
-- -> 07/2010 v0.02 EG rx counter changed from 20 bits signed, to 11 bits unsigned;
-- rx clk generation depends on edge detection;code cleanedup+commented
-- rst_rx_osc signal clearified
-- -> 12/2010 v0.03 EG code cleaned-up
-- -> 01/2011 v0.031 EG rxd_edge_i became fd_rxd_edge_p_i; small correctiond on comments
-- -> 02/2011 v0.04 EG 2 units WF_rx_osc and WF_tx_osc; process replaced by WF_incr_counter
-- check for code violations removed completely
--
-- 08/2009 v0.01 PS Entity Ports added, start of architecture content
-- 07/2010 v0.02 EG rx counter changed from 20 bits signed, to 11 bits unsigned;
-- rx clk generation depends on edge detection;code cleanedup+commented
-- rst_rx_osc signal clearified
-- 12/2010 v0.03 EG code cleaned-up
-- 01/2011 v0.031 EG rxd_edge_i became fd_rxd_edge_p_i; small correctiond on comments
-- 02/2011 v0.04 EG 2 units WF_rx_osc and WF_tx_osc; process replaced by WF_incr_counter
-- check for code violations removed completely
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......@@ -108,7 +110,6 @@ entity WF_rx_osc is
rx_adjac_bits_window_o : out std_logic -- time window where a transition between adjacent
-- bits is expected
);
end entity WF_rx_osc;
......
This diff is collapsed.
......@@ -4,26 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_tx_osc.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_tx_osc --
-- --
---------------------------------------------------------------------------------------------------
-- File WF_tx_osc.vhd
--
-- Description Generation of the clock signals needed for the FIELDRIVE transmission
--
......@@ -37,35 +24,48 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- tx_sched_p_buff(1) : 0 1 0 0 0 1 0 0
-- tx_sched_p_buff(0) : 1 0 0 0 1 0 0 0
--
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 14/02/2011
--
--
-- Date 14/02/2011
-- Version v0.04
--
--
-- Depends on WF_reset_unit
-- WF_engine_control
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 08/2009 v0.01 PS Entity Ports added, start of architecture content
-- -> 07/2010 v0.02 EG tx counter changed from 20 bits signed, to 11 bits unsigned;
-- c_TX_SCHED_BUFF_LGTH got 1 bit more
-- -> 12/2010 v0.03 EG code cleaned-up
-- -> 01/2011 v0.04 EG WF_tx_osc as different unit; use of WF_incr_counter;added tx_osc_rst_p_i
--
-- 08/2009 v0.01 PS Entity Ports added, start of architecture content
-- 07/2010 v0.02 EG tx counter changed from 20 bits signed, to 11 bits unsigned;
-- c_TX_SCHED_BUFF_LGTH got 1 bit more
-- 12/2010 v0.03 EG code cleaned-up
-- 01/2011 v0.04 EG WF_tx_osc as different unit; use of WF_incr_counter;added tx_osc_rst_p_i
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_tx_osc
--=================================================================================================
......@@ -93,7 +93,6 @@ entity WF_tx_osc is
-- buffer of pulses used for the scheduling
-- of the actions of the WF_tx_serializer
);
end entity WF_tx_osc;
......
......@@ -4,27 +4,13 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_tx_serializer.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_tx_serializer --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_tx_serializer.vhd
--
-- Description The unit is generating the nanoFIP FIELDRIVE outputs FD_TXD and FD_TXENA. It is
-- retreiving bytes of data from:
......@@ -41,47 +27,60 @@ use work.WF_PACKAGE.all; -- definitions of types, constants, entities
-- be transmitted, the WF_engine_control asserts the last_byte_p_i which signals the
-- unit to proceed with the transmission of the CRC bytes and the FES.
--
--
-- Reminder:
--
-- Produced RP_DAT frame structure :
-- Reminder of the Produced RP_DAT frame structure :
-- ___________ ______ _______ ______ _________________ _______ _______ ___________ _______
-- |____FSS____|_Ctrl_||__PDU__|_LGTH_|__..User-Data..__|_nstat_|__MPS__||____FCS____|__FES__|
--
-- |------------- Bytes from the WF_production -------------|
--
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 21/01/2011
--
--
-- Version v0.04
--
-- Depends on WF_engine_control
-- WF_production
-- WF_tx_osc
-- WF_reset_unit
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> v0.02 2009 PAS Entity Ports added, start of architecture content
-- -> v0.03 07/2010 EG timing changes; tx_sched_p_buff_i got 1 more bit
-- briefly byte_index_i needed to arrive 1 clock tick earlier
-- renamed from tx to tx_serializer;
-- stop_transmission state added for the synch of txena
-- -> v0.04 01/2011 EG sync_to_txck state added to start always with the bits 1,2,3 of the
-- clock buffer available(tx_start_p_i may arrive at any time)
-- tx_completed_p_o signal added
--
-- v0.02 2009 PAS Entity Ports added, start of architecture content
-- v0.03 07/2010 EG timing changes; tx_sched_p_buff_i got 1 more bit
-- briefly byte_index_i needed to arrive 1 clock tick earlier
-- renamed from tx to tx_serializer;
-- stop_transmission state added for the synch of txena
-- v0.04 01/2011 EG sync_to_txck state added to start always with the bits 1,2,3 of the
-- clock buffer available(tx_start_p_i may arrive at any time)
-- tx_completed_p_o signal added
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
-- Entity declaration for WF_tx_serializer
......
......@@ -4,52 +4,53 @@
-- |
-- CERN,BE/CO-HT |
--________________________________________________________________________________________________|
--________________________________________________________________________________________________|
---------------------------------------------------------------------------------------------------
-- File WF_wb_controller.vhd |
---------------------------------------------------------------------------------------------------
-- Standard library
library IEEE;
-- Standard packages
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific packages
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
---------------------------------------------------------------------------------------------------
-- --
-- WF_wb_controller --
-- --
---------------------------------------------------------------------------------------------------
--
-- File WF_wb_controller.vhd
--
-- Description The unit generates the "User Interface WISHBONE" signal ACK, nanoFIP's answer to
-- the user's STBs.
--
--
-- Authors Pablo Alvarez Sanchez (Pablo.Alvarez.Sanchez@cern.ch)
-- Evangelia Gousiou (Evangelia.Gousiou@cern.ch)
--
--
-- Date 21/01/2011
--
--
-- Version v0.01
--
--
-- Depends on WF_production
--
--
---------------------------------------------------------------------------------------------------
--
----------------
-- Last changes
-- -> 21/01/2011 v0.011 EG changed registering
--
-- 21/01/2011 v0.011 EG changed registering
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- 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 |
---------------------------------------------------------------------------------------------------
--=================================================================================================
-- Libraries & Packages
--=================================================================================================
-- Standard library
library IEEE;
use IEEE.STD_LOGIC_1164.all; -- std_logic definitions
use IEEE.NUMERIC_STD.all; -- conversion functions
-- Specific library
library work;
use work.WF_PACKAGE.all; -- definitions of types, constants, entities
--=================================================================================================
......
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