Commit 6ead92d5 authored by egousiou's avatar egousiou

units rearranged; general timeout added in wf_engine_control; deglitcher changed

git-svn-id: http://svn.ohwr.org/cern-fip/trunk/hdl/design@163 7f0067c9-7624-46c7-bd39-3fb5400c0213
parent 481c9121
......@@ -94,12 +94,12 @@ entity DualClkRAM is
-- OUTPUTS
-- Output concerning port A
DOUTA : out std_logic_vector (7 downto 0);--! data out A
DOUTA : out std_logic_vector (7 downto 0); --! data out A
-- Output concerning port B
DOUTB : out std_logic_vector (7 downto 0) --! data out B
);
end DualClkRAM;
end DualClkRAM;
--=================================================================================================
......@@ -137,7 +137,7 @@ architecture RAM4K9 of DualClkRAM is
--! pass-through behavior where the data being written will appear on the output immediately.
component RAM4K9
generic (MEMORYFILE:string := "");
generic (MEMORYFILE : string := "");
port(
ADDRA11, ADDRA10, ADDRA9, ADDRA8, ADDRA7, ADDRA6,
......@@ -153,7 +153,7 @@ architecture RAM4K9 of DualClkRAM is
BLKA, BLKB,
WENA, WENB,
CLKA, CLKB,
RESET : in std_logic:= 'U';
RESET : in std_logic := 'U';
DOUTA8, DOUTA7, DOUTA6, DOUTA5, DOUTA4, DOUTA3, DOUTA2, DOUTA1, DOUTA0,
DOUTB8, DOUTB7, DOUTB6, DOUTB5, DOUTB4, DOUTB3, DOUTB2, DOUTB1, DOUTB0 : out std_logic
......@@ -176,7 +176,7 @@ architecture RAM4K9 of DualClkRAM is
---------------------------------------------------------------------------------------------------
signal POWER, GROUND : std_logic ;
signal POWER, GROUND : std_logic;
--=================================================================================================
......@@ -197,7 +197,7 @@ begin
--! o WMODEA, WMODEB : GND (in write mode the output retains the data from the previous read)
A9D8DualClkRAM_R0C0 : RAM4K9
port map(
port map (
-- INPUTS
-- INPUTS concerning port A
......@@ -276,7 +276,7 @@ begin
-- Oututs
-- output concerning port A
-- data out A (1 byte)
DOUTA8 => OPEN,
DOUTA8 => open,
DOUTA7 => DOUTA(7),
DOUTA6 => DOUTA(6),
DOUTA5 => DOUTA(5),
......@@ -288,7 +288,7 @@ begin
-- output concerning port B
-- data out B (1 byte)
DOUTB8 => OPEN,
DOUTB8 => open,
DOUTB7 => DOUTB(7),
DOUTB6 => DOUTB(6),
DOUTB5 => DOUTB(5),
......@@ -299,7 +299,7 @@ begin
DOUTB0 => DOUTB(0)
);
end RAM4K9;
end RAM4K9;
--=================================================================================================
-- architecture end
--=================================================================================================
......
This diff is collapsed.
......@@ -66,11 +66,6 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier D-2009.12 Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- No Warnings --
---------------------------------------------------------------------------------------------------
--=================================================================================================
......@@ -78,24 +73,24 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--=================================================================================================
entity WF_DualClkRAM_clka_rd_clkb_wr is
generic (C_RAM_DATA_LGTH : integer; -- length of data word
c_RAM_ADDR_LGTH : integer); -- memory depth
generic (g_ram_data_lgth : integer; -- length of data word
g_ram_addr_lgth : integer); -- memory depth
port (
-- INPUTS
-- Inputs concerning port A
clk_porta_i : in std_logic;
addr_porta_i : in std_logic_vector (C_RAM_ADDR_LGTH - 1 downto 0);
addr_porta_i : in std_logic_vector (g_ram_addr_lgth - 1 downto 0);
-- Inputs concerning port B
clk_portb_i : in std_logic;
addr_portb_i : in std_logic_vector (C_RAM_ADDR_LGTH - 1 downto 0);
data_portb_i : in std_logic_vector (C_RAM_DATA_LGTH - 1 downto 0);
addr_portb_i : in std_logic_vector (g_ram_addr_lgth - 1 downto 0);
data_portb_i : in std_logic_vector (g_ram_data_lgth - 1 downto 0);
write_en_portb_i : in std_logic;
-- OUTPUT
-- Output concerning port A
data_porta_o : out std_logic_vector (C_RAM_DATA_LGTH -1 downto 0)
data_porta_o : out std_logic_vector (g_ram_data_lgth -1 downto 0)
);
end WF_DualClkRAM_clka_rd_clkb_wr;
......
......@@ -70,11 +70,6 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- No Warnings --
---------------------------------------------------------------------------------------------------
--=================================================================================================
......@@ -82,8 +77,6 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--=================================================================================================
entity WF_bits_to_txd is
generic (c_TX_CLK_BUFF_LGTH: natural := 4); --! length of the clk buffer used for
--! the transmission synchronization
port (
-- INPUTS
-- nanoFIP User Interface, General signals
......
......@@ -98,11 +98,6 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- No Warnings --
---------------------------------------------------------------------------------------------------
--=================================================================================================
......@@ -112,7 +107,7 @@ entity WF_cons_bytes_processor is
port (
-- INPUTS
-- nanoFIP User Interface, General signals (synchronized with uclk)
-- nanoFIP User Interface, General signals
uclk_i : in std_logic; --! 40 MHz clock
slone_i : in std_logic; --! stand-alone mode (active high)
......@@ -164,8 +159,8 @@ signal s_slone_data : std_logic_vector (15 downto 0);
signal s_addr : std_logic_vector (8 downto 0);
signal s_mem_data_out, s_cons_lgth_byte : std_logic_vector (7 downto 0);
signal s_slone_write_byte_p : std_logic_vector (1 downto 0);
signal two : unsigned(7 downto 0);
signal s_base_addr : unsigned(8 downto 0);
signal two : unsigned (7 downto 0);
signal s_base_addr : unsigned (8 downto 0);
signal s_write_byte_to_mem_p : std_logic;
--=================================================================================================
......@@ -183,13 +178,13 @@ begin
--! (for both the consumed and consumed broadcast variables)
Consumed_Bytes_To_RAM: WF_DualClkRAM_clka_rd_clkb_wr
generic map(
c_RAM_DATA_LGTH => 8, -- 8 bits: length of data word
c_RAM_ADDR_LGTH => 9) -- 2^9: depth of consumed RAM
generic map (
g_ram_data_lgth => 8, -- 8 bits: length of data word
g_ram_addr_lgth => 9) -- 2^9: depth of consumed RAM
-- first 2 bits: identification of the memory block
-- remaining 7 bits: address of a byte inside the block
-- port A: WISHBONE that reads from the Consumed RAM; port B: nanoFIP that writes
port map(
port map (
clk_porta_i => wb_clk_i, -- WISHBONE clock
addr_porta_i => wb_adr_i(8 downto 0), -- address of byte to be read
-----------------------------------------------------------------------------
......@@ -209,7 +204,7 @@ begin
--! to DAT_O;
Consumed_Bytes_To_DATO: WF_cons_bytes_to_dato
port map(
port map (
uclk_i => uclk_i,
nfip_rst_i => nfip_rst_i,
transfer_byte_p_i => s_slone_write_byte_p,
......@@ -258,17 +253,18 @@ begin
--! If the consumed variable is the reset one the process latches the first and second data bytes.
Bytes_Processing: process (var_i, byte_index_i, slone_i, byte_i, two,
byte_ready_p_i, s_base_addr, s_cons_lgth_byte)
begin
s_addr <= std_logic_vector (unsigned(byte_index_i)+s_base_addr - 1); -- memory address of
-- the byte to be written
-- (-1 bc the Ctrl
-- byte is not written)
Bytes_Processing: process (var_i, byte_index_i, slone_i, byte_i, two,
byte_ready_p_i, s_base_addr, s_cons_lgth_byte)
begin
case var_i is
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
......
......@@ -87,7 +87,7 @@ entity WF_cons_bytes_to_dato is
port (
-- INPUTS
-- nanoFIP User Interface, General signals (synchronized with uclk)
-- nanoFIP User Interface, General signals
uclk_i : in std_logic; --! 40 MHz clock
-- Signal from the WF_reset_unit unit
......
......@@ -81,13 +81,6 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier D-2009.12 Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- "W CL246 Input port bits 0, 2, 5, 6 of var_i(0 to 6) are unused" --
-- var_i is one-hot encoded and has 7 values. --
-- The unit is treating only the consumed variables var_1, var_2 and var_rst. --
---------------------------------------------------------------------------------------------------
--=================================================================================================
......@@ -107,6 +100,8 @@ entity WF_cons_frame_validator is
rx_fss_crc_fes_manch_ok_p_i: in std_logic; --! indication of a frame with correct FSS, FES, CRC
--! and manch. encoding
rx_crc_or_manch_wrong_p_i : in std_logic; --! indication .................
-- Signals from the WF_engine_control unit
rx_byte_index_i : in std_logic_vector (7 downto 0); --! index of byte being received
var_i : in t_var; --! variable type that is being treated
......@@ -145,7 +140,7 @@ begin
--! the checks of the FSS, CRC, FES and of the manch. encoding.
Consumed_Frame_Validator: process (var_i, cons_ctrl_byte_i, rx_byte_index_i, cons_pdu_byte_i,
rx_fss_crc_fes_manch_ok_p_i, cons_lgth_byte_i)
rx_fss_crc_fes_manch_ok_p_i, cons_lgth_byte_i, rx_crc_or_manch_wrong_p_i)
begin
case var_i is
......@@ -170,8 +165,10 @@ begin
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
if rx_fss_crc_fes_manch_ok_p_i = '1' then -- checking the RP_DAT.Data.Length
-- byte, when the FES arrives.
if rx_fss_crc_fes_manch_ok_p_i = '1' or rx_crc_or_manch_wrong_p_i = '1' then -- checking the
-- RP_DAT.Data.Length byte,
-- when the FES arrives
if unsigned(rx_byte_index_i ) = (unsigned(cons_lgth_byte_i) + 5) then
s_cons_lgth_byte_ok <= '1'; -- rx_byte_index starts counting
-- from 0 and apart from the
......
......@@ -89,12 +89,12 @@ entity WF_cons_outcome is
port (
-- INPUTS
-- nanoFIP User Interface, General signals (synchronized with uclk)
-- nanoFIP User Interface, General signals
uclk_i : in std_logic; --! 40 MHz clock
slone_i : in std_logic; --! stand-alone mode
-- nanoFIP WorldFIP Settings (synchronized with uclk)
subs_i : in std_logic_vector(7 downto 0);--! subscriber number coding
-- nanoFIP WorldFIP Settings
subs_i : in std_logic_vector (7 downto 0);--! subscriber number coding
-- Signal from the WF_reset_unit
nfip_rst_i : in std_logic; --! nanoFIP internal reset
......@@ -106,8 +106,8 @@ entity WF_cons_outcome is
var_i : in t_var; --! variable type that is being treated
-- Signals from the WF_cons_bytes_processor
cons_var_rst_byte_1_i : in std_logic_vector(7 downto 0);--! 1st data-byte of a received var_rst
cons_var_rst_byte_2_i : in std_logic_vector(7 downto 0);--! 2nd data-byte of a received var_rst
cons_var_rst_byte_1_i : in std_logic_vector (7 downto 0);--! 1st data-byte of a received var_rst
cons_var_rst_byte_2_i : in std_logic_vector (7 downto 0);--! 2nd data-byte of a received var_rst
-- OUTPUTS
......
This diff is collapsed.
......@@ -67,18 +67,12 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--!
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier D-2009.12 Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- No Warnings --
---------------------------------------------------------------------------------------------------
--=================================================================================================
--! Entity declaration for WF_crc
--=================================================================================================
entity WF_crc is
generic (c_GENERATOR_POLY_length : natural := 16); --! default value
port (
-- INPUTS
-- nanoFIP User Interface, General signals
......@@ -98,7 +92,7 @@ port (
crc_ok_p : out std_logic; --! signals a correct received CRC syndrome
-- Signal to the WF_tx_serializer unit
crc_o : out std_logic_vector (c_GENERATOR_POLY_length-1 downto 0)--!calculated CRC
crc_o : out std_logic_vector (c_CRC_GENER_POLY_LGTH-1 downto 0)--!calculated CRC
);
end entity WF_crc;
......@@ -110,7 +104,7 @@ end entity WF_crc;
architecture rtl of WF_crc is
signal s_crc_bit_ready_p : std_logic;
signal s_q, s_q_nx, s_q_check_mask : std_logic_vector (c_GENERATOR_POLY_length - 1 downto 0);
signal s_q, s_q_nx, s_q_check_mask : std_logic_vector (c_CRC_GENER_POLY_LGTH - 1 downto 0);
--=================================================================================================
-- architecture begin
......@@ -124,14 +118,14 @@ begin
Gen_16_bit_Register_and_Interconnections:
for I in 0 to c_GENERATOR_POLY'left generate
for I in 0 to c_CRC_GENER_POLY'left generate
iteration_0: if I = 0 generate
s_q_nx(I) <= ((data_bit_i) xor s_q(s_q'left));
end generate;
next_iterations: if I > 0 generate
s_q_nx(I) <= s_q(I-1) xor (c_GENERATOR_POLY(I) and (data_bit_i xor s_q(s_q'left)));
s_q_nx(I) <= s_q(I-1) xor (c_CRC_GENER_POLY(I) and (data_bit_i xor s_q(s_q'left)));
end generate;
end generate;
......@@ -171,15 +165,15 @@ crc_o <= not s_q;
---------------------------------------------------------------------------------------------------
--!@brief Combinatorial process Syndrome_Verification: On the reception, the CRC is being
--! calculated as data is arriving (same as in the transmission) and it is being compared to the
--! predefined c_VERIFICATION_MASK. When the CRC calculated from the received data matches the
--! c_VERIFICATION_MASK, it is implied that a correct CRC word has been received for the preceded
--! predefined c_CRC_VERIFIC_MASK. When the CRC calculated from the received data matches the
--! c_CRC_VERIFIC_MASK, it is implied that a correct CRC word has been received for the preceded
--! data and the signal crc_ok_p gives a 1 uclk-wide pulse.
Syndrome_Verification: process (s_q, s_crc_bit_ready_p)
begin
s_q_check_mask <= s_q xor c_VERIFICATION_MASK;
s_q_check_mask <= s_q xor c_CRC_VERIFIC_MASK;------------
if (unsigned(not s_q_check_mask)) = 0 then
crc_ok_p <= s_crc_bit_ready_p;
......
......@@ -55,11 +55,6 @@ use IEEE.NUMERIC_STD.all; --! conversion functions
--
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier D-2009.12 Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- No Warnings --
---------------------------------------------------------------------------------------------------
--=================================================================================================
......@@ -95,7 +90,7 @@ end entity WF_decr_counter;
--=================================================================================================
architecture rtl of WF_decr_counter is
signal s_counter : unsigned(g_counter_lgth-1 downto 0);
signal s_counter : unsigned (g_counter_lgth-1 downto 0);
--=================================================================================================
-- architecture begin
......@@ -126,7 +121,7 @@ begin
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- Concurrent assignments for output signals
-- Concurrent assignments for the output signals
counter_o <= s_counter;
counter_is_zero_o <= '1' when s_counter = to_unsigned(0,s_counter'length) else '0';
......
This diff is collapsed.
This diff is collapsed.
......@@ -68,9 +68,6 @@ entity WF_incr_counter is
-- nanoFIP User Interface general signal
uclk_i : in std_logic; --! 40 MHz clock
-- Signal from the WF_reset_unit
nfip_rst_i : in std_logic; --! nanoFIP internal reset
-- Signals from any unit
incr_counter_i : in std_logic; --! increment enable
reinit_counter_i : in std_logic; --! reinitializes counter to 0
......@@ -90,8 +87,8 @@ end entity WF_incr_counter;
--=================================================================================================
architecture rtl of WF_incr_counter is
constant c_COUNTER_FULL : unsigned(g_counter_lgth-1 downto 0) := (others => '1');
signal s_counter : unsigned(g_counter_lgth-1 downto 0);
constant c_COUNTER_FULL : unsigned (g_counter_lgth-1 downto 0) := (others => '1');
signal s_counter : unsigned (g_counter_lgth-1 downto 0);
--=================================================================================================
-- architecture begin
......@@ -105,11 +102,7 @@ begin
Incr_Counter: process (uclk_i)
begin
if rising_edge (uclk_i) then
if nfip_rst_i = '1' then
s_counter <= (others => '0');
elsif reinit_counter_i = '1' then
if reinit_counter_i = '1' then
s_counter <= (others => '0');
elsif incr_counter_i = '1' then
......
......@@ -69,11 +69,6 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier D-2009.12 Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- No Warnings --
---------------------------------------------------------------------------------------------------
--=================================================================================================
......@@ -86,29 +81,10 @@ entity WF_inputs_synchronizer is
-- INPUTS
-- nanoFIP User Interface, General signals
uclk_i : in std_logic; --! 40 MHz clock
nostat_a_i : in std_logic;
rstin_a_i : in std_logic;
slone_a_i : in std_logic;
-- Signal from the WF_reset_unit
nfip_rst_i : in std_logic; --! nanoFIP internal reset
-- nanoFIP WorldFIP Settings
c_id_a_i : in std_logic_vector(3 downto 0);
m_id_a_i : in std_logic_vector(3 downto 0);
p3_lgth_a_i : in std_logic_vector(2 downto 0);
rate_a_i : in std_logic_vector(1 downto 0);
subs_a_i : in std_logic_vector(7 downto 0);
-- nanoFIP User Interface, WISHBONE Slave
wb_clk_i : in std_logic; --! WISHBONE clock
wb_rst_i : in std_logic; --! WISHBONE reset, includes also the PowerOnReset
--! Note: wb_rst is not registered, to comply
--! with WISHBONE rule 3.15
wb_cyc_a_i : in std_logic;
wb_stb_a_i : in std_logic;
wb_we_a_i : in std_logic;
-- nanoFIP User Interface, NON WISHBONE
dat_a_i : in std_logic_vector(15 downto 0);
var1_access_a_i : in std_logic;
......@@ -124,22 +100,7 @@ entity WF_inputs_synchronizer is
-- OUTPUTS
-- nanoFIP User Interface, General signals
nostat_o : out std_logic;
rstin_o : out std_logic;
slone_o : out std_logic;
-- nanoFIP WorldFIP Settings
c_id_o : out std_logic_vector(3 downto 0);
m_id_o : out std_logic_vector(3 downto 0);
p3_lgth_o : out std_logic_vector(2 downto 0);
rate_o : out std_logic_vector(1 downto 0);
subs_o : out std_logic_vector(7 downto 0);
-- nanoFIP User Interface, WISHBONE Slave
wb_cyc_o : out std_logic;
wb_stb_o : out std_logic;
wb_stb_r_edge_p_o : out std_logic; --! 1 wb_clk-wide pulse on the rising edge of a STB_I
wb_we_o : out std_logic;
-- nanoFIP User Interface, NON WISHBONE
slone_dati_o : out std_logic_vector(15 downto 0);
......@@ -178,74 +139,13 @@ architecture rtl of WF_inputs_synchronizer is
signal s_slone_dati_d1, s_slone_dati_d3, s_slone_dati_d2 :std_logic_vector(15 downto 0);
--=================================================================================================
-- architecture begin
--=================================================================================================
begin
---------------------------------------------------------------------------------------------------
RSTIN_synchronization_with_uclk: process (uclk_i)
begin
if rising_edge (uclk_i) then
s_u_rst_d3 <= s_u_rst_d3 (1 downto 0) & rstin_a_i;
end if;
end process;
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
rstin_o <= s_u_rst_d3(2);
---------------------------------------------------------------------------------------------------
User_interf_general_signals_synchronization: process (uclk_i)
begin
if rising_edge (uclk_i) then
if nfip_rst_i = '1' then
s_slone_d3 <= (others => '0');
s_nostat_d3 <= (others => '0');
else
s_slone_d3 <= s_slone_d3 (1 downto 0) & slone_a_i;
s_nostat_d3 <= s_nostat_d3(1 downto 0) & nostat_a_i;
end if;
end if;
end process;
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
slone_o <= s_slone_d3(2);
nostat_o <= s_nostat_d3(2);
---------------------------------------------------------------------------------------------------
FIELDRIVE_inputs_synchronization: process (uclk_i)
begin
if rising_edge (uclk_i) then
if nfip_rst_i = '1' then
s_fd_rxd_d3 <= (others => '0');
s_fd_wdgn_d3 <= (others => '0');
s_fd_txer_d3 <= (others => '0');
else
s_fd_rxd_d3 <= s_fd_rxd_d3 (1 downto 0) & fd_rxd_a_i;
s_fd_wdgn_d3 <= s_fd_wdgn_d3(1 downto 0) & fd_wdgn_a_i;
s_fd_txer_d3 <= s_fd_txer_d3(1 downto 0) & fd_txer_a_i;
s_fd_rxcdn_d3 <= s_fd_rxcdn_d3(1 downto 0) & fd_rxcdn_a_i;
end if;
end if;
end process;
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
fd_wdgn_o <= s_fd_wdgn_d3(2);
fd_txer_o <= s_fd_txer_d3(2);
fd_rxd_o <= s_fd_rxd_d3 (2) and (not s_fd_rxcdn_d3(2)); -- to clean rxd from txd
s_fd_rxd_r_edge <= (not s_fd_rxd_d3(2)) and (s_fd_rxd_d3(1)) and (not s_fd_rxcdn_d3(2));
s_fd_rxd_f_edge <= (s_fd_rxd_d3(2)) and (not s_fd_rxd_d3(1)) and (not s_fd_rxcdn_d3(2));
fd_rxd_r_edge_p_o <= s_fd_rxd_r_edge;
fd_rxd_f_edge_p_o <= s_fd_rxd_f_edge;
fd_rxd_edge_p_o <= s_fd_rxd_r_edge or s_fd_rxd_f_edge;
---------------------------------------------------------------------------------------------------
VAR_ACC_synchronization: process (uclk_i)
begin
......@@ -283,117 +183,12 @@ begin
var3_access_o <= s_var3_access_d3;
---------------------------------------------------------------------------------------------------
WISHBONE_inputs_synchronization: process (wb_clk_i)
begin
if rising_edge (wb_clk_i) then
if wb_rst_i = '1' then -- wb_rst is not buffered to comply with WISHBONE rule 3.15
s_wb_stb_d1 <= '0';
s_wb_stb_d2 <= '0';
s_wb_stb_d3 <= '0';
s_wb_we_d1 <= '0';
s_wb_we_d2 <= '0';
s_wb_we_d3 <= '0';
s_wb_cyc_d1 <= '0';
s_wb_cyc_d2 <= '0';
s_wb_cyc_d3 <= '0';
else
s_wb_stb_d1 <= wb_stb_a_i;
s_wb_stb_d2 <= s_wb_stb_d1;
s_wb_stb_d3 <= s_wb_stb_d2;
s_wb_stb_d4 <= s_wb_stb_d3;
s_wb_we_d1 <= wb_we_a_i;
s_wb_we_d2 <= s_wb_we_d1;
s_wb_we_d3 <= s_wb_we_d2;
s_wb_cyc_d1 <= wb_cyc_a_i;
s_wb_cyc_d2 <= s_wb_cyc_d1;
s_wb_cyc_d3 <= s_wb_cyc_d2;
end if;
end if;
end process;
-- -- -- -- -- -- -- -- -- -- -- -- -- --
wb_cyc_o <= s_wb_cyc_d3;
wb_we_o <= s_wb_we_d3;
wb_stb_o <= s_wb_stb_d3;
wb_stb_r_edge_p_o <= (not s_wb_stb_d4) and s_wb_stb_d3;
--------------------------------------------------------------------------------------------------
Slone_dat_i_synchronization: process (uclk_i)
begin
if rising_edge (uclk_i) then
if nfip_rst_i = '1' then
s_slone_dati_d1 <= (others => '0');
s_slone_dati_d2 <= (others => '0');
s_slone_dati_d3 <= (others => '0');
else
s_slone_dati_d3 <= s_slone_dati_d2;
s_slone_dati_d2 <= s_slone_dati_d1;
s_slone_dati_d1 <= dat_a_i (15 downto 0);
end if;
end if;
end process;
-- -- -- -- -- -- -- -- -- -- -- -- --
slone_dati_o <= s_slone_dati_d3;
--------------------------------------------------------------------------------------------------
WorldFIP_Settings_synchronization: process (uclk_i)
begin
if rising_edge (uclk_i) then
if nfip_rst_i = '1' then
s_rate_d1 <= (others => '0');
s_rate_d2 <= (others => '0');
s_rate_d3 <= (others => '0');
s_subs_d1 <= (others => '0');
s_subs_d2 <= (others => '0');
s_subs_d3 <= (others => '0');
s_mid_d1 <= (others => '0');
s_mid_d2 <= (others => '0');
s_mid_d3 <= (others => '0');
s_cid_d1 <= (others => '0');
s_cid_d2 <= (others => '0');
s_cid_d3 <= (others => '0');
s_p3_lgth_d1 <= (others => '0');
s_p3_lgth_d2 <= (others => '0');
s_p3_lgth_d3 <= (others => '0');
else
s_rate_d1 <= rate_a_i;
s_rate_d2 <= s_rate_d1;
s_rate_d3 <= s_rate_d2;
s_subs_d1 <= subs_a_i;
s_subs_d2 <= s_subs_d1;
s_subs_d3 <= s_subs_d2;
s_mid_d1 <= m_id_a_i;
s_mid_d2 <= s_mid_d1;
s_mid_d3 <= s_mid_d2;
s_cid_d1 <= c_id_a_i;
s_cid_d2 <= s_cid_d1;
s_cid_d3 <= s_cid_d2;
s_p3_lgth_d1 <= p3_lgth_a_i;
s_p3_lgth_d2 <= s_p3_lgth_d1;
s_p3_lgth_d3 <= s_p3_lgth_d2;
end if;
end if;
end process;
-- -- -- -- -- -- -- -- -- --
rate_o <= s_rate_d3;
subs_o <= s_subs_d3;
m_id_o <= s_mid_d3;
c_id_o <= s_cid_d3;
p3_lgth_o <= s_p3_lgth_d3;
......
......@@ -75,11 +75,6 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier D-2009.12 Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- No Warnings --
---------------------------------------------------------------------------------------------------
--=================================================================================================
......@@ -182,11 +177,10 @@ begin
--!@brief Instantiation of a counter WF_incr_counter
Free_Counter: WF_incr_counter
generic map(g_counter_lgth => 2)
port map(
generic map (g_counter_lgth => 2)
port map (
uclk_i => uclk_i,
nfip_rst_i => nfip_rst_i,
reinit_counter_i => '0',
reinit_counter_i => nfip_rst_i,
incr_counter_i => '1',
-----------------------------------------
counter_o => s_counter,
......
This diff is collapsed.
......@@ -129,7 +129,7 @@ entity WF_prod_bytes_retriever is
port (
-- INPUTS
-- nanoFIP User Interface, General signals (synchronized with uclk)
-- nanoFIP User Interface, General signals
uclk_i : in std_logic; --! 40 MHz clock
nostat_i : in std_logic; --! if negated, nFIP status is sent
slone_i : in std_logic; --! stand-alone mode
......@@ -139,23 +139,23 @@ entity WF_prod_bytes_retriever is
-- nanoFIP User Interface, WISHBONE Slave
wb_clk_i : in std_logic; --! WISHBONE clock
wb_adr_i : in std_logic_vector(8 downto 0); --! WISHBONE address to memory
wb_data_i : in std_logic_vector(7 downto 0); --! WISHBONE data bus
wb_adr_i : in std_logic_vector (8 downto 0); --! WISHBONE address to memory
wb_data_i : in std_logic_vector (7 downto 0); --! WISHBONE data bus
-- Signal from the WF_wb_controller
wb_ack_prod_p_i : in std_logic; --! WISHBONE acknowledge
-- latching moment of wb_data_i
-- nanoFIP User Interface, NON WISHBONE (synchronized with uclk)
slone_data_i : in std_logic_vector(15 downto 0); --! input data bus for slone mode
-- nanoFIP User Interface, NON WISHBONE
slone_data_i : in std_logic_vector (15 downto 0);--! input data bus for slone mode
-- Signals from the WF_engine_control unit
byte_index_i : in std_logic_vector(7 downto 0); --!index of the byte to be retrieved
byte_index_i : in std_logic_vector (7 downto 0); --!index of the byte to be retrieved
byte_being_sent_p_i : in std_logic; --! pulse on the beginning of the
--! delivery of a new byte
data_length_i : in std_logic_vector(7 downto 0); --! # bytes of the Conrol&Data fields
data_length_i : in std_logic_vector (7 downto 0); --! # bytes of the Conrol&Data fields
-- of the RP_DAT frame; includes:
-- 1 byte RP_DAT.Control,
-- 1 byte RP_DAT.Data.PDU_type,
......@@ -172,12 +172,12 @@ entity WF_prod_bytes_retriever is
var3_rdy_i : in std_logic; --! nanoFIP output VAR3_RDY
-- Signals from the WF_status_bytes_gen
mps_status_byte_i : in std_logic_vector(7 downto 0); --! MPS status byte
nFIP_status_byte_i : in std_logic_vector(7 downto 0); --! nanoFIP status byte
mps_status_byte_i : in std_logic_vector (7 downto 0); --! MPS status byte
nFIP_status_byte_i : in std_logic_vector (7 downto 0); --! nanoFIP status byte
-- Signals from the WF_model_constr_dec unit
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
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
-- OUTPUTS
......@@ -187,7 +187,7 @@ entity WF_prod_bytes_retriever is
--! the delivery of the last one (MPS)
-- Signal to the WF_tx_serializer
byte_o : out std_logic_vector(7 downto 0) --! output byte to be serialized
byte_o : out std_logic_vector (7 downto 0) --! output byte to be serialized
);
end entity WF_prod_bytes_retriever;
......@@ -198,7 +198,7 @@ end entity WF_prod_bytes_retriever;
--=================================================================================================
architecture rtl of WF_prod_bytes_retriever is
signal s_base_addr, s_mem_addr_offset : unsigned(8 downto 0);
signal s_base_addr, s_mem_addr_offset : unsigned (8 downto 0);
signal s_byte_index_d_aux : integer range 0 to 15;
signal s_lgth_byte, s_mem_byte, s_slone_byte : std_logic_vector (7 downto 0);
signal s_byte_index_d : std_logic_vector (7 downto 0);
......@@ -218,13 +218,13 @@ begin
--!@brief Instantiation of a Produced Dual Port RAM
Produced_Bytes_From_RAM: WF_DualClkRAM_clka_rd_clkb_wr
generic map(
c_RAM_DATA_LGTH => 8, -- 8 bits: length of data word
c_RAM_ADDR_LGTH => 9) -- 2^9: depth of produced ram
generic map (
g_ram_data_lgth => 8, -- 8 bits: length of data word
g_ram_addr_lgth => 9) -- 2^9: depth of produced ram
-- first 2 bits : identification of memory block
-- remaining 7 : address of a byte inside the blck
-- port A corresponds to: nanoFIP that reads from the Produced ram & B to: WISHBONE that writes
port map(
port map (
clk_porta_i => uclk_i, -- 40 MHz clock
addr_porta_i => s_mem_addr_A, -- address of byte to be read from memory
------------------------------------------------------------------------------------
......@@ -245,7 +245,7 @@ begin
--! has been de-asserted.
Produced_Bytes_From_DATI: WF_prod_bytes_from_dati
port map(
port map (
uclk_i => uclk_i,
nfip_rst_i => nfip_rst_i,
slone_data_i => slone_data_i,
......@@ -271,8 +271,7 @@ begin
Bytes_Generation: process (var_i, s_byte_index_d, data_length_i, constr_id_dec_i, model_id_dec_i,
nFIP_status_byte_i, mps_status_byte_i, s_slone_byte, s_byte_index_d_aux,
s_mem_byte, s_byte_index_d_aux, nostat_i, byte_being_sent_p_i,
s_lgth_byte, slone_i)
s_mem_byte, nostat_i, byte_being_sent_p_i, s_lgth_byte, slone_i)
begin
......
......@@ -90,7 +90,7 @@ entity WF_prod_bytes_from_dati is
-- nanoFIP User Interface, NON-WISHBONE
slone_data_i : in std_logic_vector (15 downto 0); --! input data bus for stand-alone mode
-- (synchronized with uclk)
-- Signals from the WF_engine_control unit
byte_index_i : in std_logic_vector (7 downto 0); --! index of the byte to be produced
......
......@@ -84,11 +84,6 @@ use work.WF_PACKAGE.all; --! definitions of types, constants, entities
--
---------------------------------------------------------------------------------------------------
---/!\----------------------------/!\----------------------------/!\-------------------------/!\---
-- Synplify Premier D-2009.12 Warnings --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- No Warnings --
---------------------------------------------------------------------------------------------------
--=================================================================================================
......@@ -99,10 +94,10 @@ entity WF_prod_data_lgth_calc is
port (
-- INPUTS
-- nanoFIP WorldFIP Settings (synchronized with uclk)
-- nanoFIP WorldFIP Settings
p3_lgth_i : in std_logic_vector (2 downto 0); --! produced var user-data length
-- User Interface, General signals (synchronized with uclk)
-- User Interface, General signals
nostat_i : in std_logic; --! if negated, nFIP status is sent
slone_i : in std_logic; --! stand-alone mode
......@@ -112,7 +107,7 @@ entity WF_prod_data_lgth_calc is
-- OUTPUT
-- Signal to the WF_engine_control and WF_production units
prod_data_length_o : out std_logic_vector(7 downto 0)
prod_data_length_o : out std_logic_vector (7 downto 0)
);
end entity WF_prod_data_lgth_calc;
......@@ -123,7 +118,7 @@ end entity WF_prod_data_lgth_calc;
--=================================================================================================
architecture rtl of WF_prod_data_lgth_calc is
signal s_prod_data_length, s_p3_length_decoded : unsigned(7 downto 0);
signal s_prod_data_length, s_p3_length_decoded : unsigned (7 downto 0);
--=================================================================================================
-- architecture begin
......
......@@ -79,7 +79,7 @@ entity WF_prod_permit is
port (
-- INPUTS
-- nanoFIP User Interface, General signals (synchronized with uclk)
-- nanoFIP User Interface, General signals
uclk_i : in std_logic; --! 40 MHz clock
-- Signal from the WF_reset_unit
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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