repo_name
stringlengths
6
79
path
stringlengths
6
236
copies
int64
1
472
size
int64
137
1.04M
content
stringlengths
137
1.04M
license
stringclasses
15 values
hash
stringlengths
32
32
alpha_frac
float64
0.25
0.96
ratio
float64
1.51
17.5
autogenerated
bool
1 class
config_or_test
bool
2 classes
has_no_keywords
bool
1 class
has_few_assignments
bool
1 class
SKravitsky/ECEC412
ALU.vhd
1
1,309
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity ALU is generic( n: natural := 32 ); port( a, b: in std_logic_vector(n-1 downto 0); Oper: in std_logic_vector(3 downto 0); Result: buffer std_logic_vector(n-1 downto 0); Zero, CarryOut, Overflow: buffer std_logic ); end ALU; architecture Structural of ALU is signal carry: std_logic := '0'; signal ovf: std_logic := '0'; signal temp: std_logic_vector(n-1 downto 0) := ( others => '0' ); begin Zero <= '1' when temp = x"00000000" else '0'; Result <= temp; CarryOut <= carry; Overflow <= ovf; process(a, b, Oper) begin carry <= '0'; ovf <= '0'; case Oper(2 downto 0) is when "000" => temp <= a and b; when "001" => temp <= a or b; when "111" => if signed(a) < signed(b) then temp <= (0 => '1', others => '0'); else temp <= (others => '0'); end if; when others => if oper(2) = '0' then temp <= std_logic_vector(signed(a) + signed(b)); else temp <= std_logic_vector(signed(a) - signed(b)); end if; if (a(n-1) = b(n-1)) and (not a(n-1) = temp(n-1)) then ovf <= '1'; end if; end case; end process; end Structural;
apache-2.0
733c440752e8c0c7c7e99ebbcb50c93a
0.524064
3.146635
false
false
false
false
Wynjones1/gbvhdl
src/alu_logic.vhd
1
7,219
library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use IEEE.std_logic_misc.all; use work.types.all; use work.common.all; use work.interfaces.all; use std.textio.all; entity alu_logic is port( clk : in std_logic; reset : in std_logic; input : in alu_logic_in_if; output : out alu_logic_out_if); end entity; architecture rtl of alu_logic is component alu is port( input : in alu_in_if; output : out alu_out_if); end component; type state_t is (state_idle, state_register, state_indirect, state_load_mem, state_cb_0, state_cb_reg, state_inc, state_dec, state_cb_store_reg, state_cb_store_indirect, state_store_flags, state_cb_indirect, state_store); signal alu_in : alu_in_if; signal alu_out : alu_out_if; signal state : state_t; signal temp_flag : byte_t; signal alu_op : alu_op_t; begin alu0 : alu port map(alu_in, alu_out); alu_in.op <= alu_op; alu_in.flags <= input.reg.f; main_proc: process(clk, reset) variable out_reg : register_t; begin if reset = '1' then state <= state_idle; output.reg.we <= '0'; output.mem.we <= '0'; elsif rising_edge(clk) then output.reg.we <= '0'; output.mem.we <= '0'; output.done <= '0'; case state is when state_idle => if input.en = '1' then output.reg.wsel <= register_a; if input.op = alu_op_inc then state <= state_inc; output.reg.rsel0 <= input.rsel; output.reg.wsel <= input.rsel; elsif input.op = alu_op_dec then state <= state_dec; output.reg.rsel0 <= input.rsel; output.reg.wsel <= input.rsel; elsif input.mode = alu_mode_register then state <= state_register; output.reg.rsel0 <= register_a; output.reg.rsel1 <= input.rsel; elsif input.mode = alu_mode_immediate then state <= state_load_mem; output.mem.address <= std_logic_vector(unsigned(input.reg.pc) + 1); elsif input.mode = alu_mode_indirect then state <= state_indirect; output.reg.rsel0 <= register_hl; elsif input.mode = alu_mode_cb then state <= state_cb_0; output.mem.address <= std_logic_vector(unsigned(input.reg.pc) + 1); end if; else state <= state_idle; end if; when state_inc => state <= state_store; alu_in.i0 <= input.reg.d0(LO_BYTE); alu_in.i1 <= x"01"; alu_op <= alu_op_add; when state_dec => state <= state_store; alu_in.i0 <= input.reg.d0(LO_BYTE); alu_in.i1 <= x"01"; alu_op <= alu_op_sub; when state_register => state <= state_store; alu_op <= input.op; alu_in.i0 <= input.reg.d0(LO_BYTE); alu_in.i1 <= input.reg.d1(LO_BYTE); when state_indirect => state <= state_load_mem; alu_op <= input.op; output.mem.address <= input.reg.d0; when state_load_mem => state <= state_store; alu_op <= input.op; alu_in.i0 <= input.reg.d0(LO_BYTE); alu_in.i1 <= input.mem.data; when state_cb_0 => case input.mem.data(7 downto 6) is when "00" => -- logic alu_op <= l_table(input.mem.data(5 downto 3)); when "01" => -- bit alu_op <= alu_op_bit; alu_in.i1 <= "00000" & input.mem.data(5 downto 3); when "10" => -- set alu_op <= alu_op_set; alu_in.i1 <= "00000" & input.mem.data(5 downto 3); when "11" => -- reset alu_op <= alu_op_reset; alu_in.i1 <= "00000" & input.mem.data(5 downto 3); when others => alu_op <= (others => 'U'); end case; if input.mem.data(2 downto 0) = "110" then -- (HL) output.mem.address <= input.reg.hl; state <= state_cb_indirect; else out_reg := r_table(input.mem.data(2 downto 0)); output.reg.rsel0 <= out_reg; state <= state_cb_reg; end if; when state_cb_reg => alu_in.i0 <= input.reg.d0(LO_BYTE); if alu_op = alu_op_bit then state <= state_store_flags; else state <= state_cb_store_reg; end if; when state_cb_store_reg => state <= state_store_flags; output.reg.we <= '1'; output.reg.wsel <= out_reg; output.reg.data(LO_BYTE) <= alu_out.q; when state_cb_indirect => alu_in.i0 <= input.mem.data; if alu_op = alu_op_bit then state <= state_store_flags; else state <= state_cb_store_indirect; end if; when state_cb_store_indirect => state <= state_store_flags; output.mem.we <= '1'; output.mem.address <= input.reg.hl; output.mem.data <= alu_out.q; when state_store => state <= state_store_flags; output.reg.we <= '1'; output.reg.wsel <= input.rsel; output.reg.data(LO_BYTE) <= alu_out.q; when state_store_flags => state <= state_idle; output.done <= '1'; output.reg.we <= '1'; output.reg.wsel <= register_f; output.reg.data(LO_BYTE) <= alu_out.flags; end case; end if; end process; end rtl;
mit
fdfa8c59a10495d70b1e51d27c9818e9
0.398947
4.291914
false
false
false
false
AndyMcC0/UVVM_All
uvvm_vvc_framework/src/ti_generic_queue_pkg.vhd
1
9,697
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; package ti_generic_queue_pkg is generic (type t_generic_element; GC_QUEUE_COUNT_MAX : natural := 1000; GC_QUEUE_COUNT_THRESHOLD : natural := 950); -- A generic queue for verification type t_generic_queue is protected procedure put( constant element : in t_generic_element); impure function get( constant dummy : in t_void) return t_generic_element; impure function is_empty( constant dummy : in t_void) return boolean; impure function is_not_empty( constant dummy : in t_void) return boolean; procedure set_scope( constant scope : in string); impure function get_scope( constant dummy : in t_void) return string; impure function get_count( constant dummy : in t_void) return natural; procedure set_queue_count_threshold( constant queue_count_alert_level : in natural); impure function get_queue_count_threshold( constant dummy : in t_void) return natural; impure function get_queue_count_threshold_severity( constant dummy : in t_void) return t_alert_level; procedure set_queue_count_threshold_severity( constant alert_level : in t_alert_level); impure function get_queue_count_max( constant dummy : in t_void) return natural; procedure set_queue_count_max( constant queue_count_max : in natural); procedure flush( void : t_void ); end protected; end package ti_generic_queue_pkg; package body ti_generic_queue_pkg is type t_generic_queue is protected body -- Types and control variables for the linked list implementation type t_element; type t_element_ptr is access t_element; type t_element is record next_element : t_element_ptr; element_data : t_generic_element; end record; variable vr_last_element_ptr : t_element_ptr; variable vr_first_element_ptr : t_element_ptr; variable vr_num_elements_in_queue : natural := 0; -- Scope variables variable vr_scope : string(1 to 30) := (others => NUL); variable vr_scope_is_defined : boolean := false; variable vr_queue_count_max : natural := GC_QUEUE_COUNT_MAX; variable vr_queue_count_threshold : natural := GC_QUEUE_COUNT_THRESHOLD; variable vr_queue_count_threshold_severity : t_alert_level := TB_WARNING; -- Fill level alert type t_queue_count_threshold_alert_frequency is (ALWAYS, FIRST_TIME_ONLY); constant C_ALERT_FREQUENCY : t_queue_count_threshold_alert_frequency := FIRST_TIME_ONLY; variable vr_queue_count_threshold_triggered : boolean := false; procedure put( constant element : in t_generic_element ) is variable v_previous_ptr : t_element_ptr; begin check_value(vr_scope_is_defined, TB_WARNING, "put: Scope name must be defined for this generic queue", vr_scope, ID_NEVER); if((vr_queue_count_threshold /= 0) and (vr_num_elements_in_queue >= vr_queue_count_threshold)) then if((C_ALERT_FREQUENCY = ALWAYS) or (C_ALERT_FREQUENCY = FIRST_TIME_ONLY and not vr_queue_count_threshold_triggered)) then alert(vr_queue_count_threshold_severity, "Queue is now at " & to_string(vr_queue_count_threshold) & " of " & to_string(vr_queue_count_max) & " elements.", vr_scope); vr_queue_count_threshold_triggered := true; end if; end if; check_value(vr_num_elements_in_queue < vr_queue_count_max, TB_ERROR, "put() into generic queue (of size " & to_string(vr_queue_count_max) & ") when full", vr_scope, ID_NEVER); -- Set read and write pointers when appending element to existing list if vr_num_elements_in_queue > 0 then v_previous_ptr := vr_last_element_ptr; vr_last_element_ptr := new t_element'(next_element => null, element_data => element); v_previous_ptr.next_element := vr_last_element_ptr; -- Insert the new element into the linked list else -- List is empty vr_last_element_ptr := new t_element'(next_element => null, element_data => element); vr_first_element_ptr := vr_last_element_ptr; -- Update read pointer, since this is the first and only element in the list. end if; -- Increment number of elements vr_num_elements_in_queue := vr_num_elements_in_queue + 1; end procedure; impure function get( constant dummy : in t_void ) return t_generic_element is variable v_element : t_generic_element; variable v_to_be_deallocated_ptr : t_element_ptr; begin check_value(vr_scope_is_defined, TB_WARNING, "get: Scope name must be defined for this generic queue", vr_scope, ID_NEVER); check_value(vr_num_elements_in_queue > 0, TB_ERROR, "get() out of generic queue when empty", vr_scope, ID_NEVER); if(vr_num_elements_in_queue < vr_queue_count_threshold) then -- reset alert trigger if set vr_queue_count_threshold_triggered := false; end if; if vr_num_elements_in_queue > 0 then v_element := vr_first_element_ptr.element_data; v_to_be_deallocated_ptr := vr_first_element_ptr; vr_first_element_ptr := vr_first_element_ptr.next_element; -- Update read pointer. If no new item in list, the read pointer will be NULL. -- Decrement number of elements vr_num_elements_in_queue := vr_num_elements_in_queue - 1; -- Memory management DEALLOCATE(v_to_be_deallocated_ptr); end if; return v_element; end function; procedure flush( void : t_void ) is variable v_to_be_deallocated_ptr : t_element_ptr; begin check_value(vr_scope_is_defined, TB_WARNING, "Scope name must be defined for this generic queue", "???", ID_NEVER); -- Deallocate all entries in the list -- Setting the last element to null and iterating over the queue until finding the null element vr_last_element_ptr := null; while vr_first_element_ptr /= null loop v_to_be_deallocated_ptr := vr_first_element_ptr; vr_first_element_ptr := vr_first_element_ptr.next_element; DEALLOCATE(v_to_be_deallocated_ptr); end loop; -- Reset the queue counter vr_num_elements_in_queue := 0; vr_queue_count_threshold_triggered := false; end procedure; impure function is_empty( constant dummy : in t_void ) return boolean is begin if vr_num_elements_in_queue = 0 then return true; else return false; end if; end function; impure function is_not_empty( constant dummy : in t_void ) return boolean is begin return not is_empty(VOID); end function; procedure set_scope( constant scope : in string) is begin vr_scope(1 to scope'length) := scope; vr_scope_is_defined := true; end procedure; impure function get_scope( constant dummy : in t_void ) return string is begin return to_string(vr_scope); end function; impure function get_count( constant dummy : in t_void ) return natural is begin return vr_num_elements_in_queue; end function; impure function get_queue_count_max( constant dummy : in t_void ) return natural is begin return vr_queue_count_max; end function; procedure set_queue_count_max( constant queue_count_max : in natural) is begin vr_queue_count_max := queue_count_max; check_value(vr_num_elements_in_queue < vr_queue_count_max, TB_ERROR, "set_queue_count_max() new queue max count (" & to_string(vr_queue_count_max) & ") is less than current queue count(" & to_string(vr_num_elements_in_queue) & ").", vr_scope, ID_NEVER); end procedure; procedure set_queue_count_threshold( constant queue_count_alert_level : in natural) is begin vr_queue_count_threshold := queue_count_alert_level; end procedure; impure function get_queue_count_threshold( constant dummy : in t_void ) return natural is begin return vr_queue_count_threshold; end function; impure function get_queue_count_threshold_severity( constant dummy : in t_void ) return t_alert_level is begin return vr_queue_count_threshold_severity; end function; procedure set_queue_count_threshold_severity( constant alert_level : in t_alert_level) is begin vr_queue_count_threshold_severity := alert_level; end procedure; end protected body; end package body ti_generic_queue_pkg;
mit
c3153e7decbfbded43dfe480e5433560
0.648757
3.835839
false
false
false
false
simoesusp/Processador-ICMC
Processor_FPGA/Processor_Template_VHDL_DE70/lpm_rom0.vhd
4
6,044
-- megafunction wizard: %ROM: 1-PORT% -- GENERATION: STANDARD -- VERSION: WM1.0 -- MODULE: altsyncram -- ============================================================ -- File Name: lpm_rom0.vhd -- Megafunction Name(s): -- altsyncram -- -- Simulation Library Files(s): -- altera_mf -- ============================================================ -- ************************************************************ -- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE! -- -- 10.1 Build 153 11/29/2010 SJ Full Version -- ************************************************************ --Copyright (C) 1991-2010 Altera Corporation --Your use of Altera Corporation's design tools, logic functions --and other software and tools, and its AMPP partner logic --functions, and any output files from any of the foregoing --(including device programming or simulation files), and any --associated documentation or information are expressly subject --to the terms and conditions of the Altera Program License --Subscription Agreement, Altera MegaCore Function License --Agreement, or other applicable license agreement, including, --without limitation, that your use is for the sole purpose of --programming logic devices manufactured by Altera and sold by --Altera or its authorized distributors. Please refer to the --applicable agreement for further details. LIBRARY ieee; USE ieee.std_logic_1164.all; LIBRARY altera_mf; USE altera_mf.all; ENTITY lpm_rom0 IS PORT ( address : IN STD_LOGIC_VECTOR (9 DOWNTO 0); clock : IN STD_LOGIC := '1'; q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0) ); END lpm_rom0; ARCHITECTURE SYN OF lpm_rom0 IS SIGNAL sub_wire0 : STD_LOGIC_VECTOR (7 DOWNTO 0); COMPONENT altsyncram GENERIC ( clock_enable_input_a : STRING; clock_enable_output_a : STRING; init_file : STRING; intended_device_family : STRING; lpm_hint : STRING; lpm_type : STRING; numwords_a : NATURAL; operation_mode : STRING; outdata_aclr_a : STRING; outdata_reg_a : STRING; widthad_a : NATURAL; width_a : NATURAL; width_byteena_a : NATURAL ); PORT ( address_a : IN STD_LOGIC_VECTOR (9 DOWNTO 0); clock0 : IN STD_LOGIC ; q_a : OUT STD_LOGIC_VECTOR (7 DOWNTO 0) ); END COMPONENT; BEGIN q <= sub_wire0(7 DOWNTO 0); altsyncram_component : altsyncram GENERIC MAP ( clock_enable_input_a => "BYPASS", clock_enable_output_a => "BYPASS", init_file => "charmap.mif", intended_device_family => "Cyclone II", lpm_hint => "ENABLE_RUNTIME_MOD=NO", lpm_type => "altsyncram", numwords_a => 1024, operation_mode => "ROM", outdata_aclr_a => "NONE", outdata_reg_a => "CLOCK0", widthad_a => 10, width_a => 8, width_byteena_a => 1 ) PORT MAP ( address_a => address, clock0 => clock, q_a => sub_wire0 ); END SYN; -- ============================================================ -- CNX file retrieval info -- ============================================================ -- Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0" -- Retrieval info: PRIVATE: AclrAddr NUMERIC "0" -- Retrieval info: PRIVATE: AclrByte NUMERIC "0" -- Retrieval info: PRIVATE: AclrOutput NUMERIC "0" -- Retrieval info: PRIVATE: BYTE_ENABLE NUMERIC "0" -- Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "8" -- Retrieval info: PRIVATE: BlankMemory NUMERIC "0" -- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "0" -- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "0" -- Retrieval info: PRIVATE: Clken NUMERIC "0" -- Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0" -- Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_A" -- Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0" -- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone II" -- Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0" -- Retrieval info: PRIVATE: JTAG_ID STRING "NONE" -- Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0" -- Retrieval info: PRIVATE: MIFfilename STRING "charmap.mif" -- Retrieval info: PRIVATE: NUMWORDS_A NUMERIC "1024" -- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0" -- Retrieval info: PRIVATE: RegAddr NUMERIC "1" -- Retrieval info: PRIVATE: RegOutput NUMERIC "1" -- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0" -- Retrieval info: PRIVATE: SingleClock NUMERIC "1" -- Retrieval info: PRIVATE: UseDQRAM NUMERIC "0" -- Retrieval info: PRIVATE: WidthAddr NUMERIC "10" -- Retrieval info: PRIVATE: WidthData NUMERIC "8" -- Retrieval info: PRIVATE: rden NUMERIC "0" -- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all -- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "BYPASS" -- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_A STRING "BYPASS" -- Retrieval info: CONSTANT: INIT_FILE STRING "charmap.mif" -- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone II" -- Retrieval info: CONSTANT: LPM_HINT STRING "ENABLE_RUNTIME_MOD=NO" -- Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram" -- Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "1024" -- Retrieval info: CONSTANT: OPERATION_MODE STRING "ROM" -- Retrieval info: CONSTANT: OUTDATA_ACLR_A STRING "NONE" -- Retrieval info: CONSTANT: OUTDATA_REG_A STRING "CLOCK0" -- Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "10" -- Retrieval info: CONSTANT: WIDTH_A NUMERIC "8" -- Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "1" -- Retrieval info: USED_PORT: address 0 0 10 0 INPUT NODEFVAL "address[9..0]" -- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT VCC "clock" -- Retrieval info: USED_PORT: q 0 0 8 0 OUTPUT NODEFVAL "q[7..0]" -- Retrieval info: CONNECT: @address_a 0 0 10 0 address 0 0 10 0 -- Retrieval info: CONNECT: @clock0 0 0 0 0 clock 0 0 0 0 -- Retrieval info: CONNECT: q 0 0 8 0 @q_a 0 0 8 0 -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0.vhd TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0.inc FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0.cmp TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0.bsf TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_rom0_inst.vhd FALSE -- Retrieval info: LIB_FILE: altera_mf
gpl-3.0
462b5f3bab8ed2f2c7e3ef6e367954be
0.668101
3.540715
false
false
false
false
SKravitsky/ECEC412
ALUControl.vhd
1
990
library ieee; use ieee.std_logic_1164.all; entity ALUControl is port( ALUOp : in std_logic_vector(1 downto 0); Funct : in std_logic_vector(5 downto 0); Operation : out std_logic_vector(3 downto 0) ); end ALUControl; architecture Structural of ALUControl is begin process(ALUOp, Funct) variable functTemp : std_logic_vector(3 downto 0); begin functTemp := Funct(3 downto 0); case ALUOp is when "00" => Operation <= "0010"; when "01" => Operation <= "0110"; when "10" => case functTemp is when "0000" => Operation <= "0010"; when "0010" => Operation <= "0110"; when "0100" => Operation <= "0000"; when "0101" => Operation <= "0001"; when "1010" => Operation <= "0111"; when others => null; end case; when "11" => case functTemp is when "0010" => Operation <= "0110"; when "1010" => Operation <= "0111"; when others => null; end case; when others => null; end case; end process; end Structural;
apache-2.0
38fb6242ae702de980e6f7f4d26062fb
0.614141
3.027523
false
false
false
false
jsloan256/ecp3-versa
wiggle/wiggle.vhd
1
436
LIBRARY ieee; USE ieee.std_logic_1164.ALL; ENTITY wiggle IS PORT( clk : IN STD_LOGIC; rstn : IN STD_LOGIC; gpio : OUT INTEGER RANGE 0 TO 128 ); END wiggle; ARCHITECTURE wiggle_arch OF wiggle IS SIGNAL count : INTEGER RANGE 0 TO 128; BEGIN PROCESS (clk, rstn) BEGIN IF rstn = '0' THEN count <= 0; ELSIF (clk'EVENT AND clk = '1') THEN count <= count + 1; END IF; END PROCESS; gpio <= count; END wiggle_arch;
bsd-3-clause
c784b58b3046906b8f8e26a53293ff0f
0.655963
2.759494
false
false
false
false
AndyMcC0/UVVM_All
uvvm_vvc_framework/src/ti_data_queue_pkg.vhd
1
25,923
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; package ti_data_queue_pkg is -- Declaration of storage subtype t_data_buffer is std_logic_vector(C_TOTAL_NUMBER_OF_BITS_IN_DATA_BUFFER - 1 downto 0); shared variable shared_data_buffer : t_data_buffer; type t_buffer_natural_array is array (C_NUMBER_OF_DATA_BUFFERS-1 downto 0) of natural; type t_buffer_boolean_array is array (C_NUMBER_OF_DATA_BUFFERS-1 downto 0) of boolean; type t_data_queue is protected ------------------------------------------ -- init_queue ------------------------------------------ -- This function allocates space in the buffer and returns an index that -- must be used to access the queue. -- -- - Parameters: -- - queue_size_in_bits (natural) - The size of the queue -- - scope - Log scope for all alerts/logs -- -- - Returns: The index of the initiated queue (natural). -- Returns 0 on error. -- impure function init_queue( queue_size_in_bits : natural; scope : string := "data_queue" ) return natural; ------------------------------------------ -- init_queue ------------------------------------------ -- This procedure allocates space in the buffer at the given queue_idx. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- that shall be initialized. -- - queue_size_in_bits (natural) - The size of the queue -- - scope - Log scope for all alerts/logs -- procedure init_queue( queue_idx : natural; queue_size_in_bits : natural; scope : string := "data_queue" ); ------------------------------------------ -- flush ------------------------------------------ -- This procedure empties the queue given -- by queue_idx. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- that shall be flushed. -- procedure flush( queue_idx : natural ); ------------------------------------------ -- push_back ------------------------------------------ -- This procedure pushes data to the end of a queue. -- The size of the data is unconstrained, meaning that -- it can be any size. Pushing data with a size that is -- larger than the queue size results in wrapping, i.e., -- that when reaching the end the data remaining will over- -- write the data that was written first. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- that shall be pushed to. -- - data - The data that shall be pushed (slv) -- procedure push_back( queue_idx : natural; data : std_logic_vector ); ------------------------------------------ -- peek_front ------------------------------------------ -- This function returns the data from the front -- of the queue without popping it. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- that shall be read. -- - entry_size_in_bits - The size of the returned slv (natural) -- -- - Returns: The data from the front of the queue (slv). The size of the -- return data is given by the entry_size_in_bits parameter. -- Attempting to peek from an empty queue is allowed but triggers a -- TB_WARNING and returns garbage. -- Attempting to peek a larger value than the queue size is allowed -- but triggers a TB_WARNING. Will wrap. -- -- impure function peek_front( queue_idx : natural; entry_size_in_bits : natural ) return std_logic_vector; ------------------------------------------ -- peek_back ------------------------------------------ -- This function returns the data from the back -- of the queue without popping it. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- that shall be read. -- - entry_size_in_bits - The size of the returned slv (natural) -- -- - Returns: The data from the back of the queue (slv). The size of the -- return data is given by the entry_size_in_bits parameter. -- Attempting to peek from an empty queue is allowed but triggers a -- TB_WARNING and returns garbage. -- Attempting to peek a larger value than the queue size is allowed -- but triggers a TB_WARNING. Will wrap. -- -- impure function peek_back( queue_idx : natural; entry_size_in_bits : natural ) return std_logic_vector; ------------------------------------------ -- pop_back ------------------------------------------ -- This function returns the data from the back -- and removes the returned data from the queue. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- that shall be read. -- - entry_size_in_bits - The size of the returned slv (natural) -- -- - Returns: The data from the back of the queue (slv). The size of the -- return data is given by the entry_size_in_bits parameter. -- Attempting to pop from an empty queue is allowed but triggers a -- TB_WARNING and returns garbage. -- Attempting to pop a larger value than the queue size is allowed -- but triggers a TB_WARNING. -- -- impure function pop_back( queue_idx : natural; entry_size_in_bits : natural ) return std_logic_vector; ------------------------------------------ -- pop_front ------------------------------------------ -- This function returns the data from the front -- and removes the returned data from the queue. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- that shall be read. -- - entry_size_in_bits - The size of the returned slv (natural) -- -- - Returns: The data from the front of the queue (slv). The size of the -- return data is given by the entry_size_in_bits parameter. -- Attempting to pop from an empty queue is allowed but triggers a -- TB_WARNING and returns garbage. -- Attempting to pop a larger value than the queue size is allowed -- but triggers a TB_WARNING. -- -- impure function pop_front( queue_idx : natural; entry_size_in_bits : natural ) return std_logic_vector; ------------------------------------------ -- get_count ------------------------------------------ -- This function returns a natural indicating the number of elements -- currently occupying the buffer given by queue_idx. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- -- - Returns: The number of elements occupying the queue (natural). -- -- impure function get_count( queue_idx : natural ) return natural; ------------------------------------------ -- get_queue_count_max ------------------------------------------ -- This function returns a natural indicating the maximum number -- of elements that can occupy the buffer given by queue_idx. -- -- - Parameters: -- - queue_idx - The index of the queue (natural) -- -- - Returns: The maximum number of elements that can be placed -- in the queue (natural). -- -- impure function get_queue_count_max( queue_idx : natural ) return natural; ------------------------------------------ -- deallocate_buffer ------------------------------------------ -- This procedure resets the entire std_logic_vector and all -- variable arrays related to the buffer, effectively removing all queues. -- -- - Parameters: -- - dummy - VOID -- procedure deallocate_buffer( dummy : t_void ); end protected; end package ti_data_queue_pkg; package body ti_data_queue_pkg is type t_data_queue is protected body -- Internal variables for the data queue -- The buffer is one large std_logic_vector of size C_TOTAL_NUMBER_OF_BITS_IN_DATA_BUFFER. -- There are several queues that can be instantiated in the slv. -- There is one set of variables per queue. variable v_queue_initialized : t_buffer_boolean_array := (others => false); variable v_queue_size_in_bits : t_buffer_natural_array := (others => 0); variable v_count : t_buffer_natural_array := (others => 0); -- min_idx/max idx: These variables set the upper and lower limit of each queue in the buffer. -- This is how the large slv buffer is divided into several smaller queues. -- After a queue has been instantiated, all queue operations in the buffer -- for a given idx will happen within the v_min_idx and v_max_idx boundary. -- These variables will be set when a queue is instantiated, and will not -- change afterwards. variable v_min_idx : t_buffer_natural_array := (others => 0); variable v_max_idx : t_buffer_natural_array := (others => 0); variable v_next_available_idx : natural := 0; -- Where the v_min_idx of the next queue initialized shall be set. -- first_idx/last_idx: These variables set the current indices within a queue, i.e., within -- the min_idx/max_idx boundary. These variables will change every time -- a given queue has data pushed or popped. variable v_first_idx : t_buffer_natural_array := (others => 0); variable v_last_idx : t_buffer_natural_array := (others => 0); type t_string_pointer is access string; variable v_scope : t_string_pointer := NULL; ------------------------------------------ -- init_queue ------------------------------------------ impure function init_queue( queue_size_in_bits : natural; scope : string := "data_queue" ) return natural is variable vr_queue_idx : natural; variable vr_queue_idx_found : boolean := false; begin if v_scope = NULL then v_scope := new string'(scope); end if; if not check_value(v_next_available_idx < C_TOTAL_NUMBER_OF_BITS_IN_DATA_BUFFER, TB_ERROR, "init_queue called, but no more space in buffer!", v_scope.all, ID_NEVER) then return 0; end if; -- Find first available queue -- and tag as initialized for i in t_buffer_boolean_array'range loop if not v_queue_initialized(i) then -- Save queue idx vr_queue_idx := i; vr_queue_idx_found := true; -- Tag this queue as initialized v_queue_initialized(vr_queue_idx) := true; exit; -- exit loop end if; end loop; -- Verify that an available queue idx was found, else trigger alert and return 0 if not check_value(vr_queue_idx_found, TB_ERROR, "init_queue called, but all queues have already been initialized!", v_scope.all, ID_NEVER) then return 0; end if; -- Set buffer size for this buffer to queue_size_in_bits if queue_size_in_bits <= (C_TOTAL_NUMBER_OF_BITS_IN_DATA_BUFFER - 1) - (v_next_available_idx - 1) then -- less than or equal to the remaining total buffer space available v_queue_size_in_bits(vr_queue_idx) := queue_size_in_bits; else alert(TB_ERROR, "queue_size_in_bits larger than maximum allowed!", v_scope.all); v_queue_size_in_bits(vr_queue_idx) := (C_TOTAL_NUMBER_OF_BITS_IN_DATA_BUFFER - 1) - v_next_available_idx; -- Set to remaining available bits end if; -- Set starting and ending indices for this queue_idx v_min_idx(vr_queue_idx) := v_next_available_idx; v_max_idx(vr_queue_idx) := v_min_idx(vr_queue_idx) + v_queue_size_in_bits(vr_queue_idx) - 1; v_first_idx(vr_queue_idx) := v_min_idx(vr_queue_idx); v_last_idx(vr_queue_idx) := v_min_idx(vr_queue_idx); v_next_available_idx := v_max_idx(vr_queue_idx) + 1; log(ID_UVVM_DATA_QUEUE, "Queue " & to_string(vr_queue_idx) & " initialized with buffer size " & to_string(v_queue_size_in_bits(vr_queue_idx)) & ".", v_scope.all); -- Clear the buffer just to be sure flush(vr_queue_idx); -- Return the index of the buffer return vr_queue_idx; end function; ------------------------------------------ -- init_queue ------------------------------------------ procedure init_queue( queue_idx : natural; queue_size_in_bits : natural; scope : string := "data_queue" ) is begin if v_scope = NULL then v_scope := new string'(scope); end if; if not v_queue_initialized(queue_idx) then -- Set buffer size for this buffer to queue_size_in_bits if queue_size_in_bits <= (C_TOTAL_NUMBER_OF_BITS_IN_DATA_BUFFER - 1) - (v_next_available_idx - 1) then -- less than or equal to the remaining total buffer space available v_queue_size_in_bits(queue_idx) := queue_size_in_bits; else alert(TB_ERROR, "queue_size_in_bits larger than maximum allowed!", v_scope.all); v_queue_size_in_bits(queue_idx) := (C_TOTAL_NUMBER_OF_BITS_IN_DATA_BUFFER - 1) - v_next_available_idx; -- Set to remaining available bits end if; -- Set starting and ending indices for this queue_idx v_min_idx(queue_idx) := v_next_available_idx; v_max_idx(queue_idx) := v_min_idx(queue_idx) + v_queue_size_in_bits(queue_idx) - 1; v_first_idx(queue_idx) := v_min_idx(queue_idx); v_last_idx(queue_idx) := v_min_idx(queue_idx); v_next_available_idx := v_max_idx(queue_idx) + 1; -- Tag this buffer as initialized v_queue_initialized(queue_idx) := true; log(ID_UVVM_DATA_QUEUE, "Queue " & to_string(queue_idx) & " initialized with buffer size " & to_string(v_queue_size_in_bits(queue_idx)) & ".", v_scope.all); -- Clear the buffer just to be sure flush(queue_idx); else alert(TB_ERROR, "init_queue called, but the desired buffer index is already in use! No action taken.", v_scope.all); return; end if; end procedure; ------------------------------------------ -- push_back ------------------------------------------ procedure push_back( queue_idx : natural; data : std_logic_vector ) is alias a_data : std_logic_vector(data'length - 1 downto 0) is data; begin if check_value(v_queue_initialized(queue_idx), TB_ERROR, "push_back called, but queue " & to_string(queue_idx) & " not initialized.", v_scope.all, ID_NEVER) then for i in a_data'right to a_data'left loop -- From right to left since LSB shall be first in the queue. shared_data_buffer(v_last_idx(queue_idx)) := a_data(i); if v_last_idx(queue_idx) /= v_max_idx(queue_idx) then v_last_idx(queue_idx) := v_last_idx(queue_idx) + 1; else v_last_idx(queue_idx) := v_min_idx(queue_idx); end if; v_count(queue_idx) := v_count(queue_idx) + 1; end loop; log(ID_UVVM_DATA_QUEUE, "Data " & to_string(data, HEX) & " pushed to back of queue " & to_string(queue_idx) & " (index " & to_string(v_last_idx(queue_idx)) & "). Fill level is " & to_string(v_count(queue_idx)) & "/" & to_string(v_queue_size_in_bits(queue_idx)) & ".", v_scope.all); end if; end procedure; ------------------------------------------ -- flush ------------------------------------------ procedure flush( queue_idx : natural ) is begin check_value(v_queue_initialized(queue_idx), TB_WARNING, "flush called, but queue " & to_string(queue_idx) & " not initialized.", v_scope.all, ID_NEVER); shared_data_buffer(v_max_idx(queue_idx) downto v_min_idx(queue_idx)) := (others => '0'); v_first_idx(queue_idx) := v_min_idx(queue_idx); v_last_idx(queue_idx) := v_min_idx(queue_idx); v_count(queue_idx) := 0; end procedure; ------------------------------------------ -- peek_front ------------------------------------------ impure function peek_front( queue_idx : natural; entry_size_in_bits : natural ) return std_logic_vector is variable v_return_entry : std_logic_vector(entry_size_in_bits - 1 downto 0) := (others => '0'); variable v_current_idx : natural; begin check_value(v_queue_initialized(queue_idx), TB_ERROR, "peek_front() called, but queue " & to_string(queue_idx) & " not initialized.", v_scope.all, ID_NEVER); check_value(v_count(queue_idx) > 0, TB_WARNING, "peek_front() when queue " & to_string(queue_idx) & " is empty. Return value will be garbage.", v_scope.all, ID_NEVER); check_value(entry_size_in_bits <= v_queue_size_in_bits(queue_idx), TB_WARNING, "peek_front called, but entry size is larger than buffer size!", v_scope.all, ID_NEVER); v_current_idx := v_first_idx(queue_idx); -- Generate return value for i in 0 to v_return_entry'length - 1 loop v_return_entry(i) := shared_data_buffer(v_current_idx); if v_current_idx < v_max_idx(queue_idx) then v_current_idx := v_current_idx + 1; else v_current_idx := v_min_idx(queue_idx); end if; end loop; return v_return_entry; end function; ------------------------------------------ -- peek_back ------------------------------------------ impure function peek_back( queue_idx : natural; entry_size_in_bits : natural ) return std_logic_vector is variable v_return_entry : std_logic_vector(entry_size_in_bits - 1 downto 0) := (others => '0'); variable v_current_idx : natural; begin check_value(v_queue_initialized(queue_idx), TB_ERROR, "peek_back called, but queue not initialized.", v_scope.all, ID_NEVER); check_value(v_count(queue_idx) > 0, TB_WARNING, "peek_back() when queue " & to_string(queue_idx) & " is empty. Return value will be garbage.", v_scope.all, ID_NEVER); check_value(entry_size_in_bits <= v_queue_size_in_bits(queue_idx), TB_WARNING, "peek_back called, but entry size is larger than buffer size!", v_scope.all, ID_NEVER); if v_last_idx(queue_idx) > 0 then v_current_idx := v_last_idx(queue_idx) - 1; else v_current_idx := v_max_idx(queue_idx); end if; -- Generate return value for i in v_return_entry'length - 1 downto 0 loop v_return_entry(i) := shared_data_buffer(v_current_idx); if v_current_idx > v_min_idx(queue_idx) then v_current_idx := v_current_idx - 1; else v_current_idx := v_max_idx(queue_idx); end if; end loop; return v_return_entry; end function; ------------------------------------------ -- pop_back ------------------------------------------ impure function pop_back( queue_idx : natural; entry_size_in_bits : natural ) return std_logic_vector is variable v_return_entry : std_logic_vector(entry_size_in_bits-1 downto 0); variable v_current_idx : natural; begin check_value(v_queue_initialized(queue_idx), TB_ERROR, "pop_back called, but queue " & to_string(queue_idx) & " not initialized.", v_scope.all, ID_NEVER); check_value(entry_size_in_bits <= v_queue_size_in_bits(queue_idx), TB_WARNING, "pop_back called, but entry size is larger than buffer size!", v_scope.all, ID_NEVER); if v_queue_initialized(queue_idx) then v_return_entry := peek_back(queue_idx, entry_size_in_bits); if v_count(queue_idx) > 0 then if v_last_idx(queue_idx) > v_min_idx(queue_idx) then v_current_idx := v_last_idx(queue_idx) - 1; else v_current_idx := v_max_idx(queue_idx); end if; -- Clear fields that belong to the return value for i in 0 to entry_size_in_bits - 1 loop shared_data_buffer(v_current_idx) := '0'; if v_current_idx > v_min_idx(queue_idx) then v_current_idx := v_current_idx - 1; else v_current_idx := v_max_idx(queue_idx); end if; v_count(queue_idx) := v_count(queue_idx) - 1; end loop; -- Set last idx if v_current_idx < v_max_idx(queue_idx) then v_last_idx(queue_idx) := v_current_idx + 1; else v_last_idx(queue_idx) := v_min_idx(queue_idx); end if; end if; end if; return v_return_entry; end function; ------------------------------------------ -- pop_front ------------------------------------------ impure function pop_front( queue_idx : natural; entry_size_in_bits : natural ) return std_logic_vector is variable v_return_entry : std_logic_vector(entry_size_in_bits-1 downto 0); variable v_current_idx : natural := v_first_idx(queue_idx); begin check_value(entry_size_in_bits <= v_queue_size_in_bits(queue_idx), TB_WARNING, "pop_front called, but entry size is larger than buffer size!", v_scope.all, ID_NEVER); if check_value(v_queue_initialized(queue_idx), TB_ERROR, "pop_front called, but queue " & to_string(queue_idx) & " not initialized.", v_scope.all, ID_NEVER) then v_return_entry := peek_front(queue_idx, entry_size_in_bits); if v_count(queue_idx) > 0 then -- v_first_idx points to the idx PREVIOUS to the first element in the buffer. -- Therefore must correct if at max_idx. v_current_idx := v_first_idx(queue_idx); -- Clear fields that belong to the return value for i in 0 to entry_size_in_bits - 1 loop shared_data_buffer(v_current_idx) := '0'; if v_current_idx < v_max_idx(queue_idx) then v_current_idx := v_current_idx + 1; else v_current_idx := v_min_idx(queue_idx); end if; v_count(queue_idx) := v_count(queue_idx) - 1; end loop; v_first_idx(queue_idx) := v_current_idx; end if; return v_return_entry; end if; v_return_entry := (others => '0'); return v_return_entry; end function; ------------------------------------------ -- get_count ------------------------------------------ impure function get_count( queue_idx : natural ) return natural is begin check_value(v_queue_initialized(queue_idx), TB_WARNING, "get_count called, but queue " & to_string(queue_idx) & " not initialized.", v_scope.all, ID_NEVER); return v_count(queue_idx); end function; ------------------------------------------ -- get_queue_count_max ------------------------------------------ impure function get_queue_count_max( queue_idx : natural ) return natural is begin check_value(v_queue_initialized(queue_idx), TB_WARNING, "get_queue_count_max called, but queue " & to_string(queue_idx) & " not initialized.", v_scope.all, ID_NEVER); return v_queue_size_in_bits(queue_idx); end function; ------------------------------------------ -- deallocate_buffer ------------------------------------------ procedure deallocate_buffer( dummy : t_void ) is begin shared_data_buffer := (others => '0'); v_queue_initialized := (others => false); v_queue_size_in_bits := (others => 0); v_count := (others => 0); v_min_idx := (others => 0); v_max_idx := (others => 0); v_first_idx := (others => 0); v_last_idx := (others => 0); v_next_available_idx := 0; log(ID_UVVM_DATA_QUEUE, "Buffer has been deallocated, i.e., all queues removed.", v_scope.all); end procedure; end protected body; end package body ti_data_queue_pkg;
mit
fbef93f03a1492b0c23cc6a5bd4187de
0.539791
3.955294
false
false
false
false
AndyMcC0/UVVM_All
uvvm_util/src/adaptations_pkg.vhd
1
14,984
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use std.textio.all; use work.types_pkg.all; package adaptations_pkg is constant C_ALERT_FILE_NAME : string := "_Alert.txt"; constant C_LOG_FILE_NAME : string := "_Log.txt"; constant C_SHOW_UVVM_UTILITY_LIBRARY_INFO : boolean := true; -- Set this to false when you no longer need the initial info constant C_SHOW_UVVM_UTILITY_LIBRARY_RELEASE_INFO : boolean := true; -- Set this to false when you no longer need the release info ------------------------------------------------------------------------------- -- Log format ------------------------------------------------------------------------------- --UVVM: [<ID>] <time> <Scope> Msg --PPPPPPPPIIIIII TTTTTTTT SSSSSSSSSSSSSS MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM constant C_LOG_PREFIX : string := "UVVM: "; -- Note: ': ' is recommended as final characters constant C_LOG_PREFIX_WIDTH : natural := C_LOG_PREFIX'length; constant C_LOG_MSG_ID_WIDTH : natural := 24; constant C_LOG_TIME_WIDTH : natural := 16; -- 3 chars used for unit eg. " ns" constant C_LOG_TIME_BASE : time := ns; -- Unit in which time is shown in log (ns | ps) constant C_LOG_TIME_DECIMALS : natural := 1; -- Decimals to show for given C_LOG_TIME_BASE constant C_LOG_SCOPE_WIDTH : natural := 20; constant C_LOG_LINE_WIDTH : natural := 175; constant C_LOG_INFO_WIDTH : natural := C_LOG_LINE_WIDTH - C_LOG_PREFIX_WIDTH; constant C_USE_BACKSLASH_N_AS_LF : boolean := true; -- If true interprets '\n' as Line feed constant C_USE_BACKSLASH_R_AS_LF : boolean := true; -- If true, inserts an empty line if '\r' -- is the first character of the string. -- All others '\r' will be printed as is. constant C_SINGLE_LINE_ALERT : boolean := false; -- If true prints alerts on a single line. constant C_SINGLE_LINE_LOG : boolean := false; -- If true prints log messages on a single line. constant C_TB_SCOPE_DEFAULT : string := "TB seq."; -- Default scope in test sequencer constant C_LOG_TIME_TRUNC_WARNING : boolean := true; -- Yields a single TB_WARNING if time stamp truncated. Otherwise none constant C_SHOW_LOG_ID : boolean := true; -- This constant has replaced the global_show_log_id constant C_SHOW_LOG_SCOPE : boolean := true; -- This constant has replaced the global_show_log_scope constant C_WARNING_ON_LOG_ALERT_FILE_RUNTIME_RENAME : boolean := false; shared variable shared_default_log_destination : t_log_destination := CONSOLE_AND_LOG; ------------------------------------------------------------------------------- -- Verbosity control -- NOTE: Do not enter new IDs without proper evaluation: -- 1. Is it - or could it be covered by an existing ID -- 2. Could it be combined with other needs for a more general new ID -- Feel free to suggest new ID for future versions of UVVM Utility Library ([email protected]) ------------------------------------------------------------------------------- type t_msg_id is ( -- Bitvis utility methods NO_ID, -- Used as default prior to setting actual ID when transfering ID as a field in a record ID_UTIL_BURIED, -- Used for buried log messages where msg and scope cannot be modified from outside ID_BITVIS_DEBUG, -- Bitvis internal ID used for UVVM debugging ID_UTIL_SETUP, -- Used for Utility setup ID_LOG_MSG_CTRL, -- Used inside Utility library only - when enabling/disabling msg IDs. ID_ALERT_CTRL, -- Used inside Utility library only - when setting IGNORE or REGARD on various alerts. ID_NEVER, -- Used for avoiding log entry. Cannot be enabled. ID_FINISH_OR_STOP, -- Used when terminating the complete simulation - independent of why ID_CLOCK_GEN, -- Used for logging when clock generators are enabled or disabled ID_GEN_PULSE, -- Used for logging when a gen_pulse procedure starts pulsing a signal ID_BLOCKING, -- Used for logging when using synchronisation flags -- General ID_POS_ACK, -- To write a positive acknowledge on a check -- Directly inside test sequencers ID_LOG_HDR, -- ONLY allowed in test sequencer, Log section headers ID_LOG_HDR_LARGE, -- ONLY allowed in test sequencer, Large log section headers ID_LOG_HDR_XL, -- ONLY allowed in test sequencer, Extra large log section headers ID_SEQUENCER, -- ONLY allowed in test sequencer, Normal log (not log headers) ID_SEQUENCER_SUB, -- ONLY allowed in test sequencer, Subprograms defined in sequencer -- BFMs ID_BFM, -- Used inside a BFM (to log BFM access) ID_BFM_WAIT, -- Used inside a BFM to indicate that it is waiting for something (e.g. for ready) ID_BFM_POLL, -- Used inside a BFM when polling until reading a given value. I.e. to show all reads until expected value found (e.g. for sbi_poll_until()) ID_BFM_POLL_SUMMARY, -- Used inside a BFM when showing the summary of data that has been received while waiting for expected data. ID_TERMINATE_CMD, -- Typically used inside a loop in a procedure to end the loop (e.g. for sbi_poll_until() or any looped generation of random stimuli -- Packet related data Ids with three levels of granularity, for differentiating between frames, packets and segments. -- Segment Ids, finest granularity of packet data ID_SEGMENT_INITIATE, -- Notify that a packet is about to be transmitted or received ID_SEGMENT_COMPLETE, -- Notify that a packet has been transmitted or received ID_SEGMENT_HDR, -- AS ID_SEGMENT_COMPLETE, but also writes header info ID_SEGMENT_DATA, -- AS ID_SEGMENT_COMPLETE, but also writes packet data (could be huge) -- Packet Ids, medium granularity of packet data ID_PACKET_INITIATE, -- Notify that a packet is about to be transmitted or received ID_PACKET_COMPLETE, -- Notify that a packet has been transmitted or received ID_PACKET_HDR, -- AS ID_PACKET_COMPLETED, but also writes header info ID_PACKET_DATA, -- AS ID_PACKET_COMPLETED, but also writes packet data (could be huge) -- Frame Ids, roughest granularity of packet data ID_FRAME_INITIATE, -- Notify that a packet is about to be transmitted or received ID_FRAME_COMPLETE, -- Notify that a packet has been transmitted or received ID_FRAME_HDR, -- AS ID_FRAME_COMPLETE, but also writes header info ID_FRAME_DATA, -- AS ID_FRAME_COMPLETE, but also writes packet data (could be huge) -- OSVVM Ids ID_COVERAGE_MAKEBIN, -- Log messages from MakeBin (IllegalBin/GenBin/IgnoreBin) ID_COVERAGE_ADDBIN, -- Log messages from AddBin/AddCross ID_COVERAGE_ICOVER, -- ICover logging, NB: Very low level debugging. Can result in large amount of data. ID_COVERAGE_CONFIG, -- Logging of configuration in the coverage package ID_COVERAGE_SUMMARY, -- Report logging : Summary of coverage, with both covered bins and holes ID_COVERAGE_HOLES, -- Report logging : Holes only -- Distributed command systems ID_UVVM_SEND_CMD, ID_UVVM_CMD_ACK, ID_UVVM_CMD_RESULT, ID_CMD_INTERPRETER, -- Message from VVC interpreter about correctly received and queued/issued command ID_CMD_INTERPRETER_WAIT, -- Message from VVC interpreter that it is actively waiting for a command ID_IMMEDIATE_CMD, -- Message from VVC interpreter that an IMMEDIATE command has been executed ID_IMMEDIATE_CMD_WAIT, -- Message from VVC interpreter that an IMMEDIATE command is waiting for command to complete ID_CMD_EXECUTOR, -- Message from VVC executor about correctly received command - prior to actual execution ID_CMD_EXECUTOR_WAIT, -- Message from VVC executor that it is actively waiting for a command ID_INSERTED_DELAY, -- Message from VVC executor that it is waiting a given delay -- Distributed data ID_UVVM_DATA_QUEUE, -- Information about UVVM data FIFO/stack (initialization, put, get, etc) -- VVC system ID_CONSTRUCTOR, -- Constructor message from VVCs (or other components/process when needed) ID_CONSTRUCTOR_SUB, -- Constructor message for lower level constructor messages (like Queue-information and other limitations) -- Special purpose - Not really IDs ALL_MESSAGES -- Applies to ALL message ID apart from ID_NEVER ); type t_msg_id_panel is array (t_msg_id'left to t_msg_id'right) of t_enabled; -- Default message Id panel to be used for all message Id panels, except: -- - VVC message Id panels, see constant C_VVC_MSG_ID_PANEL_DEFAULT constant C_MSG_ID_PANEL_DEFAULT : t_msg_id_panel := ( ID_NEVER => DISABLED, ID_UTIL_BURIED => DISABLED, ID_BITVIS_DEBUG => DISABLED, ID_COVERAGE_MAKEBIN => DISABLED, ID_COVERAGE_ADDBIN => DISABLED, ID_COVERAGE_ICOVER => DISABLED, others => ENABLED ); -- If false, OSVVM uses the default message id panel. If true, it uses a separate message id panel. constant C_USE_LOCAL_OSVVM_MSG_ID_PANELS : boolean := TRUE; type t_msg_id_indent is array (t_msg_id'left to t_msg_id'right) of string(1 to 4); constant C_MSG_ID_INDENT : t_msg_id_indent := ( ID_IMMEDIATE_CMD_WAIT => " ..", ID_CMD_INTERPRETER => " " & NUL & NUL, ID_CMD_INTERPRETER_WAIT => " ..", ID_CMD_EXECUTOR => " " & NUL & NUL, ID_CMD_EXECUTOR_WAIT => " ..", ID_UVVM_SEND_CMD => "->" & NUL & NUL, ID_UVVM_CMD_ACK => " ", others => "" & NUL & NUL & NUL & NUL ); constant C_MSG_DELIMITER : character := '''; ------------------------------------------------------------------------- -- Alert counters ------------------------------------------------------------------------- -- Default values. These can be overwritten in each sequencer by using -- set_alert_attention or set_alert_stop_limit (see quick ref). constant C_DEFAULT_ALERT_ATTENTION : t_alert_attention := (others => REGARD); -- 0 = Never stop constant C_DEFAULT_STOP_LIMIT : t_alert_counters := (note to manual_check => 0, others => 1); ------------------------------------------------------------------------- -- Hierarchical alerts ------------------------------------------------------------------------- constant C_ENABLE_HIERARCHICAL_ALERTS : boolean := false; constant C_BASE_HIERARCHY_LEVEL : string(1 to 5) := "Total"; constant C_EMPTY_NODE : t_hierarchy_node := (" ", (others => (others => 0)), (others => 0), (others => true)); ------------------------------------------------------------------------- -- Deprecate ------------------------------------------------------------------------- -- These values are used to indicate outdated sub-programs constant C_DEPRECATE_SETTING : t_deprecate_setting := DEPRECATE_ONCE; shared variable deprecated_subprogram_list : t_deprecate_list := (others=>(others => ' ')); ------------------------------------------------------------------------ -- UVVM VVC Framework adaptations ------------------------------------------------------------------------ constant C_SCOPE : string := C_TB_SCOPE_DEFAULT & "(uvvm)"; signal global_show_msg_for_uvvm_cmd : boolean := true; constant C_CMD_QUEUE_COUNT_MAX : natural := 20; -- (VVC Command queue) May be overwritten for dedicated VVC constant C_CMD_QUEUE_COUNT_THRESHOLD_SEVERITY : t_alert_level := WARNING; constant C_CMD_QUEUE_COUNT_THRESHOLD : natural := 18; constant C_RESULT_QUEUE_COUNT_MAX : natural := 20; -- (VVC Result queue) May be overwritten for dedicated VVC constant C_RESULT_QUEUE_COUNT_THRESHOLD_SEVERITY : t_alert_level := WARNING; constant C_RESULT_QUEUE_COUNT_THRESHOLD : natural := 18; constant C_MAX_VVC_INSTANCE_NUM : natural := 8; constant C_MAX_NUM_SEQUENCERS : natural := 10; -- Max number of sequencers constant C_TOTAL_NUMBER_OF_BITS_IN_DATA_BUFFER : natural := 2048; constant C_NUMBER_OF_DATA_BUFFERS : natural := 10; -- Default message Id panel intended for use in the VVCs constant C_VVC_MSG_ID_PANEL_DEFAULT : t_msg_id_panel := ( ID_NEVER => DISABLED, ID_UTIL_BURIED => DISABLED, others => ENABLED ); type t_data_source is ( -- May add more types of random ++ later NA, FROM_BUFFER, RANDOM, RANDOM_TO_BUFFER ); type t_error_injection is ( -- May add more controlled error injection later NA, RANDOM_BIT_ERROR, RANDOM_DATA_ERROR, RANDOM_ADDRESS_ERROR ); constant C_CMD_IDX_PREFIX : string := " ["; constant C_CMD_IDX_SUFFIX : string := "]"; type t_channel is ( -- NOTE: Add more types of channels when needed for a VVC NA, -- When channel is not relevant ALL_CHANNELS, -- When command shall be received by all channels RX, TX); constant C_VVCT_ALL_INSTANCES : integer := -2; constant C_NUM_SEMAPHORE_LOCK_TRIES : natural := 500; end package adaptations_pkg; package body adaptations_pkg is end package body adaptations_pkg;
mit
de26a5fd4662ca75247d76d2a510b5ff
0.592232
4.40188
false
false
false
false
elainemielas/CVUT_BI-PNO
aut/obalka.vhd
1
1,403
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity obalka is port ( KEY_F : in std_logic; -- high for one clock when key 'f' pressed KEY_U : in std_logic; -- high for one clock when key 'u' pressed KEY_L : in std_logic; -- high for one clock when key 'l' pressed KEY_PRESS : in std_logic; -- high for one clock when any key pressed CLK : in std_logic; -- standard 50MHz clock RESET : in std_logic; JCHYBA : out std_logic; -- detekovano s 1 chybou SHODA : out std_logic; -- detekovana uplna shoda VYSTUP : out std_logic_vector ( 0 to 8 ) ); end obalka; architecture Behavioral of obalka is COMPONENT AUTOMAT PORT( KEY_F : IN std_logic; KEY_U : IN std_logic; KEY_L : IN std_logic; KEY_PRESS : IN std_logic; CLK : IN std_logic; RESET : IN std_logic; JCHYBA : OUT std_logic; SHODA : OUT std_logic; VYSTUP : OUT std_logic_vector(0 to 8) ); END COMPONENT; signal regd : std_logic_vector (2 downto 0); signal blah : std_logic; begin Inst_AUTOMAT: AUTOMAT PORT MAP( KEY_F => KEY_F, KEY_U => KEY_U, KEY_L => KEY_L, KEY_PRESS => blah, CLK => CLK, RESET => RESET, JCHYBA => JCHYBA, SHODA => SHODA, VYSTUP => VYSTUP ); regd <= regd (1 downto 0) & KEY_PRESS when rising_edge(CLK); blah <= '1' when regd(2) = '0' and regd(1) = '1' else '0'; end Behavioral;
mit
db5069faaba775ea35b09b6e010053a9
0.603706
2.828629
false
false
false
false
FlatTargetInk/Spartan-HW
led_increment.vhd
1
1,483
---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 11:06:33 04/28/2017 -- Design Name: -- Module Name: led_increment - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity led_increment is generic(count_width : INTEGER := 8); Port( INPUT : in STD_LOGIC; EN : in STD_LOGIC; RST : in STD_LOGIC; LEDS : out STD_LOGIC_VECTOR); end led_increment; architecture Behavioral of led_increment is signal COUNTER : STD_LOGIC_VECTOR(count_width-1 downto 0) := (OTHERS => '0'); signal ZEROS : STD_LOGIC_VECTOR(count_width-1 downto 0) := (OTHERS => '0'); begin LEDS <= COUNTER; incrementer: process(RST,EN,INPUT) begin if (RST = '1') then COUNTER <= ZEROS; elsif (INPUT'event and INPUT = '1' and EN = '1') then COUNTER <= COUNTER + '1'; end if; end process; end Behavioral;
mit
f9ad03158b2208ea14416827a522f43f
0.600135
3.564904
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/With_checkers/flit_tracker.vhd
3
2,619
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; use std.textio.all; use IEEE.NUMERIC_STD.all; use ieee.std_logic_misc.all; entity flit_tracker is generic ( DATA_WIDTH: integer := 32; tracker_file: string :="track.txt" ); port ( clk: in std_logic; RX: in std_logic_vector (DATA_WIDTH-1 downto 0); valid_in : in std_logic ); end; architecture behavior of flit_tracker is begin process(clk) variable source_id, destination_id, Packet_length, packet_id: integer; variable LINEVARIABLE : line; variable xor_check : std_logic; file trace_file : text is out tracker_file; begin Packet_length := 0; destination_id := 0; source_id := 0; packet_id := 0; if clk'event and clk = '1' then if unsigned(RX) /= to_unsigned(0, RX'length) and valid_in = '1' then if RX(DATA_WIDTH-1 downto DATA_WIDTH-3) = "001" then Packet_length := to_integer(unsigned(RX(28 downto 17))); destination_id := to_integer(unsigned(RX(16 downto 13))); source_id := to_integer(unsigned(RX(12 downto 9))); packet_id := to_integer(unsigned(RX(8 downto 1))); xor_check := XOR_REDUCE(RX(DATA_WIDTH-1 downto 1)); if xor_check = RX(0) then write(LINEVARIABLE, "H flit at " & time'image(now) & " From " & integer'image(source_id) & " to " & integer'image(destination_id) & " with length: " & integer'image(Packet_length) & " id: " & integer'image(packet_id)); else write(LINEVARIABLE, "H flit at " & time'image(now) & " From " & integer'image(source_id) & " to " & integer'image(destination_id) & " with length: " & integer'image(Packet_length) & " id: " & integer'image(packet_id) & " FAULTY "); end if; writeline(trace_file, LINEVARIABLE); elsif RX(DATA_WIDTH-1 downto DATA_WIDTH-3) = "010" then xor_check := XOR_REDUCE(RX(DATA_WIDTH-1 downto 1)); if xor_check = RX(0) then write(LINEVARIABLE, "B flit at " & time'image(now)); else write(LINEVARIABLE, "B flit at " & time'image(now) & " FAULTY "); end if; writeline(trace_file, LINEVARIABLE); elsif RX(DATA_WIDTH-1 downto DATA_WIDTH-3) = "100" then xor_check := XOR_REDUCE(RX(DATA_WIDTH-1 downto 1)); if xor_check = RX(0) then write(LINEVARIABLE, "T flit at " & time'image(now)); else write(LINEVARIABLE, "T flit at " & time'image(now) & " FAULTY "); end if; writeline(trace_file, LINEVARIABLE); end if; end if; end if; end process; end;
gpl-3.0
812868f8f48a4d1c3a25c2b84ae932e7
0.607866
3.20563
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/control.vhd
9
16,953
--------------------------------------------------------------------- -- TITLE: Controller / Opcode Decoder -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 2/8/01 -- FILENAME: control.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- NOTE: MIPS(tm) is a registered trademark of MIPS Technologies. -- MIPS Technologies does not endorse and is not associated with -- this project. -- DESCRIPTION: -- Controls the CPU by decoding the opcode and generating control -- signals to the rest of the CPU. -- This entity decodes the MIPS(tm) opcode into a -- Very-Long-Word-Instruction. -- The 32-bit opcode is converted to a -- 6+6+6+16+4+2+4+3+2+2+3+2+4 = 60 bit VLWI opcode. -- Based on information found in: -- "MIPS RISC Architecture" by Gerry Kane and Joe Heinrich -- and "The Designer's Guide to VHDL" by Peter J. Ashenden -- modified by: Siavoosh Payandeh Azad -- Change logs: -- * EPC register have been changed! It used to be R0, now it is R26 --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use work.mlite_pack.all; entity control is port(opcode : in std_logic_vector(31 downto 0); -- not opcode, but the whole instruction !!! (opcode is the first 6 most significant bits of the instruction.) intr_signal : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; rs_index : out std_logic_vector(5 downto 0); rt_index : out std_logic_vector(5 downto 0); rd_index : out std_logic_vector(5 downto 0); imm_out : out std_logic_vector(15 downto 0); alu_func : out alu_function_type; shift_func : out shift_function_type; mult_func : out mult_function_type; branch_func : out branch_function_type; a_source_out : out a_source_type; b_source_out : out b_source_type; c_source_out : out c_source_type; pc_source_out: out pc_source_type; mem_source_out:out mem_source_type; exception_out: out std_logic); end; --entity control architecture logic of control is begin control_proc: process(opcode, intr_signal) variable op, func : std_logic_vector(5 downto 0); variable rs, rt, rd : std_logic_vector(5 downto 0); variable rtx : std_logic_vector(4 downto 0); variable imm : std_logic_vector(15 downto 0); variable alu_function : alu_function_type; variable shift_function : shift_function_type; variable mult_function : mult_function_type; variable a_source : a_source_type; variable b_source : b_source_type; variable c_source : c_source_type; variable pc_source : pc_source_type; variable branch_function: branch_function_type; variable mem_source : mem_source_type; variable is_syscall : std_logic; begin alu_function := ALU_NOTHING; shift_function := SHIFT_NOTHING; mult_function := MULT_NOTHING; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_REG_TARGET; c_source := C_FROM_NULL; pc_source := FROM_INC4; branch_function := BRANCH_EQ; mem_source := MEM_FETCH; op := opcode(31 downto 26); rs := '0' & opcode(25 downto 21); rt := '0' & opcode(20 downto 16); rtx := opcode(20 downto 16); rd := '0' & opcode(15 downto 11); func := opcode(5 downto 0); imm := opcode(15 downto 0); is_syscall := '0'; case op is when "000000" => --SPECIAL case func is when "000000" => --SLL r[rd]=r[rt]<<re; -- This is overlapping with NOP instruction in which all bits are zero, so opcode is zero and the last 6 bits (funct) are also zero, -- does this mean that NOP acts as SLL ??? a_source := A_FROM_IMM10_6; c_source := C_FROM_SHIFT; shift_function := SHIFT_LEFT_UNSIGNED; when "000010" => --SRL r[rd]=u[rt]>>re; a_source := A_FROM_IMM10_6; c_source := C_FROM_shift; shift_function := SHIFT_RIGHT_UNSIGNED; when "000011" => --SRA r[rd]=r[rt]>>re; a_source := A_FROM_IMM10_6; c_source := C_FROM_SHIFT; shift_function := SHIFT_RIGHT_SIGNED; when "000100" => --SLLV r[rd]=r[rt]<<r[rs]; c_source := C_FROM_SHIFT; shift_function := SHIFT_LEFT_UNSIGNED; when "000110" => --SRLV r[rd]=u[rt]>>r[rs]; c_source := C_FROM_SHIFT; shift_function := SHIFT_RIGHT_UNSIGNED; when "000111" => --SRAV r[rd]=r[rt]>>r[rs]; c_source := C_FROM_SHIFT; shift_function := SHIFT_RIGHT_SIGNED; when "001000" => --JR s->pc_next=r[rs]; pc_source := FROM_BRANCH; alu_function := ALU_ADD; branch_function := BRANCH_YES; when "001001" => --JALR r[rd]=s->pc_next; s->pc_next=r[rs]; c_source := C_FROM_PC_PLUS4; pc_source := FROM_BRANCH; alu_function := ALU_ADD; branch_function := BRANCH_YES; --when "001010" => --MOVZ if(!r[rt]) r[rd]=r[rs]; /*IV*/ --when "001011" => --MOVN if(r[rt]) r[rd]=r[rs]; /*IV*/ when "001100" => --SYSCALL is_syscall := '1'; when "001101" => --BREAK s->wakeup=1; is_syscall := '1'; --when "001111" => --SYNC s->wakeup=1; when "010000" => --MFHI r[rd]=s->hi; c_source := C_FROM_MULT; mult_function := MULT_READ_HI; when "010001" => --MTHI s->hi=r[rs]; mult_function := MULT_WRITE_HI; when "010010" => --MFLO r[rd]=s->lo; c_source := C_FROM_MULT; mult_function := MULT_READ_LO; when "010011" => --MTLO s->lo=r[rs]; mult_function := MULT_WRITE_LO; when "011000" => --MULT s->lo=r[rs]*r[rt]; s->hi=0; mult_function := MULT_SIGNED_MULT; when "011001" => --MULTU s->lo=r[rs]*r[rt]; s->hi=0; mult_function := MULT_MULT; when "011010" => --DIV s->lo=r[rs]/r[rt]; s->hi=r[rs]%r[rt]; mult_function := MULT_SIGNED_DIVIDE; when "011011" => --DIVU s->lo=r[rs]/r[rt]; s->hi=r[rs]%r[rt]; mult_function := MULT_DIVIDE; when "100000" => --ADD r[rd]=r[rs]+r[rt]; c_source := C_FROM_ALU; alu_function := ALU_ADD; when "100001" => --ADDU r[rd]=r[rs]+r[rt]; c_source := C_FROM_ALU; alu_function := ALU_ADD; when "100010" => --SUB r[rd]=r[rs]-r[rt]; c_source := C_FROM_ALU; alu_function := ALU_SUBTRACT; when "100011" => --SUBU r[rd]=r[rs]-r[rt]; c_source := C_FROM_ALU; alu_function := ALU_SUBTRACT; when "100100" => --AND r[rd]=r[rs]&r[rt]; c_source := C_FROM_ALU; alu_function := ALU_AND; when "100101" => --OR r[rd]=r[rs]|r[rt]; c_source := C_FROM_ALU; alu_function := ALU_OR; when "100110" => --XOR r[rd]=r[rs]^r[rt]; c_source := C_FROM_ALU; alu_function := ALU_XOR; when "100111" => --NOR r[rd]=~(r[rs]|r[rt]); c_source := C_FROM_ALU; alu_function := ALU_NOR; when "101010" => --SLT r[rd]=r[rs]<r[rt]; c_source := C_FROM_ALU; alu_function := ALU_LESS_THAN_SIGNED; when "101011" => --SLTU r[rd]=u[rs]<u[rt]; c_source := C_FROM_ALU; alu_function := ALU_LESS_THAN; when "101101" => --DADDU r[rd]=r[rs]+u[rt]; c_source := C_FROM_ALU; alu_function := ALU_ADD; --when "110001" => --TGEU --when "110010" => --TLT --when "110011" => --TLTU --when "110100" => --TEQ --when "110110" => --TNE when others => end case; when "000001" => --REGIMM rt := "000000"; rd := "011111"; a_source := A_FROM_PC; b_source := B_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_GTZ; --if(test) pc=pc+imm*4 case rtx is when "10000" => --BLTZAL r[31]=s->pc_next; branch=r[rs]<0; c_source := C_FROM_PC_PLUS4; branch_function := BRANCH_LTZ; when "00000" => --BLTZ branch=r[rs]<0; branch_function := BRANCH_LTZ; when "10001" => --BGEZAL r[31]=s->pc_next; branch=r[rs]>=0; c_source := C_FROM_PC_PLUS4; branch_function := BRANCH_GEZ; when "00001" => --BGEZ branch=r[rs]>=0; branch_function := BRANCH_GEZ; --when "10010" => --BLTZALL r[31]=s->pc_next; lbranch=r[rs]<0; --when "00010" => --BLTZL lbranch=r[rs]<0; --when "10011" => --BGEZALL r[31]=s->pc_next; lbranch=r[rs]>=0; --when "00011" => --BGEZL lbranch=r[rs]>=0; when others => end case; when "000011" => --JAL r[31]=s->pc_next; s->pc_next=(s->pc&0xf0000000)|target; c_source := C_FROM_PC_PLUS4; rd := "011111"; pc_source := FROM_OPCODE25_0; when "000010" => --J s->pc_next=(s->pc&0xf0000000)|target; pc_source := FROM_OPCODE25_0; when "000100" => --BEQ branch=r[rs]==r[rt]; a_source := A_FROM_PC; b_source := B_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_EQ; when "000101" => --BNE branch=r[rs]!=r[rt]; a_source := A_FROM_PC; b_source := B_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_NE; when "000110" => --BLEZ branch=r[rs]<=0; a_source := A_FROM_PC; b_source := b_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_LEZ; when "000111" => --BGTZ branch=r[rs]>0; a_source := A_FROM_PC; b_source := B_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_GTZ; when "001000" => --ADDI r[rt]=r[rs]+(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_ADD; when "001001" => --ADDIU u[rt]=u[rs]+(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_ADD; when "001010" => --SLTI r[rt]=r[rs]<(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_LESS_THAN_SIGNED; when "001011" => --SLTIU u[rt]=u[rs]<(unsigned long)(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_LESS_THAN; when "001100" => --ANDI r[rt]=r[rs]&imm; b_source := B_FROM_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_AND; when "001101" => --ORI r[rt]=r[rs]|imm; b_source := B_FROM_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_OR; when "001110" => --XORI r[rt]=r[rs]^imm; b_source := B_FROM_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_XOR; when "001111" => --LUI r[rt]=(imm<<16); c_source := C_FROM_IMM_SHIFT16; rd := rt; when "010000" => --COP0 alu_function := ALU_OR; c_source := C_FROM_ALU; if opcode(23) = '0' then --move from CP0 rs := '1' & opcode(15 downto 11); rt := "000000"; rd := '0' & opcode(20 downto 16); else --move to CP0 rs := "000000"; rd(5) := '1'; pc_source := FROM_BRANCH; --delay possible interrupt branch_function := BRANCH_NO; end if; --when "010001" => --COP1 --when "010010" => --COP2 --when "010011" => --COP3 --when "010100" => --BEQL lbranch=r[rs]==r[rt]; --when "010101" => --BNEL lbranch=r[rs]!=r[rt]; --when "010110" => --BLEZL lbranch=r[rs]<=0; --when "010111" => --BGTZL lbranch=r[rs]>0; when "011010" => -- SUBI r[rt]=r[rs]-(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_SUBTRACT; when "100000" => --LB r[rt]=*(signed char*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ8S; --address=(short)imm+r[rs]; when "100001" => --LH r[rt]=*(signed short*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ16S; --address=(short)imm+r[rs]; when "100010" => --LWL //Not Implemented a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ32; when "100011" => --LW r[rt]=*(long*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ32; when "100100" => --LBU r[rt]=*(unsigned char*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ8; --address=(short)imm+r[rs]; when "100101" => --LHU r[rt]=*(unsigned short*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ16; --address=(short)imm+r[rs]; --when "100110" => --LWR //Not Implemented when "101000" => --SB *(char*)ptr=(char)r[rt]; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; mem_source := MEM_WRITE8; --address=(short)imm+r[rs]; when "101001" => --SH *(short*)ptr=(short)r[rt]; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; mem_source := MEM_WRITE16; when "101010" => --SWL //Not Implemented a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; mem_source := MEM_WRITE32; --address=(short)imm+r[rs]; when "101011" => --SW *(long*)ptr=r[rt]; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; mem_source := MEM_WRITE32; --address=(short)imm+r[rs]; --when "101110" => --SWR //Not Implemented --when "101111" => --CACHE --when "110000" => --LL r[rt]=*(long*)ptr; --when "110001" => --LWC1 --when "110010" => --LWC2 --when "110011" => --LWC3 --when "110101" => --LDC1 --when "110110" => --LDC2 --when "110111" => --LDC3 --when "111000" => --SC *(long*)ptr=r[rt]; r[rt]=1; --when "111001" => --SWC1 --when "111010" => --SWC2 --when "111011" => --SWC3 --when "111101" => --SDC1 --when "111110" => --SDC2 --when "111111" => --SDC3 when others => end case; if c_source = C_FROM_NULL then rd := "000000"; end if; if intr_signal = '1' or is_syscall = '1' then rs := "111111"; --interrupt vector rt := "000000"; rd := "101110"; --save PC in EPC alu_function := ALU_OR; shift_function := SHIFT_NOTHING; mult_function := MULT_NOTHING; branch_function := BRANCH_YES; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_REG_TARGET; c_source := C_FROM_PC; pc_source := FROM_LBRANCH; -- "11" mem_source := MEM_FETCH; exception_out <= '1'; else exception_out <= '0'; end if; rs_index <= rs; rt_index <= rt; rd_index <= rd; imm_out <= imm; alu_func <= alu_function; shift_func <= shift_function; mult_func <= mult_function; branch_func <= branch_function; a_source_out <= a_source; b_source_out <= b_source; c_source_out <= c_source; pc_source_out <= pc_source; mem_source_out <= mem_source; end process; end; --logic
gpl-3.0
18a97b1ca801feab31d8931ea00844e5
0.51283
3.202304
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/Checkers/Control_Part_Checkers/Allocator_checkers/Arbiter_out_one_hot_checkers/RTL/Arbiter_out_one_hot_pseudo.vhd
3
4,663
--Copyright (C) 2016 Siavoosh Payandeh Azad and Behrad Niazmand library ieee; use ieee.std_logic_1164.all; entity Arbiter_out_one_hot_pseudo is port ( credit: in std_logic_vector(1 downto 0); req_X_N, req_X_E, req_X_W, req_X_S, req_X_L :in std_logic; -- From LBDR modules state: in std_logic_vector (5 downto 0); -- 6 states for Arbiter_out's FSM grant_Y_N, grant_Y_E, grant_Y_W, grant_Y_S, grant_Y_L : out std_logic; -- Grants given to LBDR requests (encoded as one-hot) state_in: out std_logic_vector (5 downto 0) -- 6 states for Arbiter's FSM ); end Arbiter_out_one_hot_pseudo; architecture behavior of Arbiter_out_one_hot_pseudo is CONSTANT IDLE: std_logic_vector (5 downto 0) := "000001"; CONSTANT Local: std_logic_vector (5 downto 0) := "000010"; CONSTANT North: std_logic_vector (5 downto 0) := "000100"; CONSTANT East: std_logic_vector (5 downto 0) := "001000"; CONSTANT West: std_logic_vector (5 downto 0) := "010000"; CONSTANT South: std_logic_vector (5 downto 0) := "100000"; begin --process (clk, reset)begin -- if reset = '0' then -- state <= IDLE; -- elsif clk'event and clk ='1'then -- state <= state_in; -- end if; --end process; -- anything below here is pure combinational process(state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, credit) begin grant_Y_N <= '0'; grant_Y_E <= '0'; grant_Y_W <= '0'; grant_Y_S <= '0'; grant_Y_L <= '0'; -- Arbiter_out's prioritization is N,E,W,S and L (N: highest priority) case state is when IDLE => if req_X_N ='1' then state_in <= North; elsif req_X_E = '1' then state_in <= East; elsif req_X_W = '1' then state_in <= West; elsif req_X_S = '1' then state_in <= South; elsif req_X_L = '1' then state_in <= Local; else state_in <= IDLE; end if; when North => if credit /= "00" and req_X_N = '1' then grant_Y_N <= '1'; end if; if req_X_N ='1' then state_in <= North; elsif req_X_E = '1' then state_in <= East; elsif req_X_W = '1' then state_in <= West; elsif req_X_S = '1' then state_in <= South; elsif req_X_L = '1' then state_in <= Local; else state_in <= IDLE; end if; when East => if credit /= "00" and req_X_E = '1' then grant_Y_E <= '1'; end if; if req_X_E = '1' then state_in <= East; elsif req_X_W = '1' then state_in <= West; elsif req_X_S = '1' then state_in <= South; elsif req_X_L = '1' then state_in <= Local; elsif req_X_N ='1' then state_in <= North; else state_in <= IDLE; end if; when West => if credit /= "00" and req_X_W = '1' then grant_Y_W <= '1'; end if; if req_X_W = '1' then state_in <= West; elsif req_X_S = '1' then state_in <= South; elsif req_X_L = '1' then state_in <= Local; elsif req_X_N ='1' then state_in <= North; elsif req_X_E = '1' then state_in <= East; else state_in <= IDLE; end if; when South => if credit /= "00" and req_X_S = '1' then grant_Y_S <= '1'; end if; if req_X_S = '1' then state_in <= South; elsif req_X_L = '1' then state_in <= Local; elsif req_X_N ='1' then state_in <= North; elsif req_X_E = '1' then state_in <= East; elsif req_X_W = '1' then state_in <= West; else state_in <= IDLE; end if; when others => -- Includes Local state and invalid state(s) if credit /= "00" and req_X_L = '1' then grant_Y_L <= '1'; end if; if req_X_L = '1' then state_in <= Local; elsif req_X_N ='1' then state_in <= North; elsif req_X_E = '1' then state_in <= East; elsif req_X_W = '1' then state_in <= West; elsif req_X_S = '1' then state_in <= South; else state_in <= IDLE; end if; end case; end process; end;
gpl-3.0
625342c804b63dbf5cf10b3a90747e7a
0.466009
3.381436
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/Checkers/Control_Part_Checkers/FIFO_one_hot_credit_based_packet_drop_classifier_support_checkers/RTL/FIFO_one_hot_credit_based_packet_drop_classifier_support_pseudo.vhd
3
18,041
--Copyright (C) 2016 Siavoosh Payandeh Azad and Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_misc.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity FIFO_credit_based_pseudo is port ( valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; read_pointer: in std_logic_vector(3 downto 0); write_pointer: in std_logic_vector(3 downto 0); state_out: in std_logic_vector(4 downto 0); faulty_packet_out: in std_logic; fake_credit_counter: in std_logic_vector(1 downto 0); flit_type: in std_logic_vector(2 downto 0); fault_out: in std_logic; credit_out: out std_logic; -- credit_in removed due to creation of pseudo-combinational register, credit_out directly taken to the output interface. empty_out: out std_logic; full_out: out std_logic; fault_info: out std_logic; health_info: out std_logic; read_en_out: out std_logic; write_en_out: out std_logic; read_pointer_in: out std_logic_vector(3 downto 0); write_pointer_in: out std_logic_vector(3 downto 0); state_in: out std_logic_vector(4 downto 0); faulty_packet_in: out std_logic; fake_credit_out: out std_logic; write_fake_flit_out: out std_logic; fake_credit_counter_in: out std_logic_vector(1 downto 0) ); end FIFO_credit_based_pseudo; architecture behavior of FIFO_credit_based_pseudo is CONSTANT Idle: std_logic_vector (4 downto 0) := "00001"; CONSTANT Header_flit: std_logic_vector (4 downto 0) := "00010"; CONSTANT Body_flit: std_logic_vector (4 downto 0) := "00100"; CONSTANT Tail_flit: std_logic_vector (4 downto 0) := "01000"; CONSTANT Packet_drop: std_logic_vector (4 downto 0) := "10000"; signal full, empty: std_logic; signal read_en, write_en: std_logic; --alias flit_type : std_logic_vector(2 downto 0) is RX(DATA_WIDTH-1 downto DATA_WIDTH-3); -- Related to data-path checkers! Taken to input interface. --signal xor_all, fault_out: std_logic; -- Related to data-path checkers! signal fake_credit, write_fake_flit: std_logic; begin -------------------------------------------------------------------------------------------- -- block diagram of the FIFO! -------------------------------------------------------------------------------------------- -- circular buffer structure -- <--- WriteP -- --------------------------------- -- | 3 | 2 | 1 | 0 | -- --------------------------------- -- <--- readP -------------------------------------------------------------------------------------------- -- Packet drop state machine -- +---+ No +---+ No -- | | Flit | | Flit -- | v | v -- healthy +--------+ +--------+ -- +---header-->| | | |-------------------+ -- | +->| Header |---Healthy body-->| Body |------------+ | -- | | +--------+ +--------+ | | -- | | | ^ | Healthy | ^ Healthy | -- | | | | | body | | Tail | -- | | | | | +---+ | | -- | | | | | v | -- +--------+ | | | | +--------+ | -- No +-->| | | | | +-----------------Healthy Tail------>| | | -- Flit| | IDLE | | | | | Tail |--)--+ -- +---| | | | +-----------Healthy Header--------------| | | | -- +--------+ | | +--------+ | | -- ^ | ^ | Faulty No Faulty | | -- | | | | Flit Flit Flit | | -- | | | | +------------+ +---+ +---+ | | -- | | | + --Healthy------+ | | | | | | | -- | | | header | v | v | v | | -- | | | +------------------+ | | -- | | +----Healthy Tail-----| Packet | | | -- | +-------Faulty Flit----->| Drop |<-----------------------+ | -- | +------------------+ | -- +-------------------------------------------------No Flit------------------+ -- ------------------------------------------------------------------------------------------------ --process (clk, reset)begin -- if reset = '0' then -- read_pointer <= "0001"; -- write_pointer <= "0001"; -- FIFO_MEM_1 <= (others=>'0'); -- FIFO_MEM_2 <= (others=>'0'); -- FIFO_MEM_3 <= (others=>'0'); -- FIFO_MEM_4 <= (others=>'0'); -- fake_credit_counter <= (others=>'0'); -- faulty_packet_out <= '0'; -- credit_out <= '0'; -- state_out <= Idle; -- elsif clk'event and clk = '1' then -- write_pointer <= write_pointer_in; -- read_pointer <= read_pointer_in; -- state_out <= state_in; -- faulty_packet_out <= faulty_packet_in; -- credit_out <= credit_in; -- fake_credit_counter <= fake_credit_counter_in; -- if write_en = '1' then -- --write into the memory -- FIFO_MEM_1 <= FIFO_MEM_1_in; -- FIFO_MEM_2 <= FIFO_MEM_2_in; -- FIFO_MEM_3 <= FIFO_MEM_3_in; -- FIFO_MEM_4 <= FIFO_MEM_4_in; -- end if; -- end if; -- end process; -- anything below here is pure combinational read_en <= (read_en_N or read_en_E or read_en_W or read_en_S or read_en_L) and not empty; empty_out <= empty; read_en_out <= read_en; write_en_out <= write_en; full_out <= full; fake_credit_out <= fake_credit; write_fake_flit_out <= write_fake_flit; -- combinatorial part process(fake_credit, read_en, fake_credit_counter) begin fake_credit_counter_in <= fake_credit_counter; credit_out <= '0'; if fake_credit = '1' and read_en = '1' then fake_credit_counter_in <= fake_credit_counter + 1 ; end if; if fake_credit = '1' or read_en ='1' then credit_out <= '1'; end if; if fake_credit = '0' and read_en = '0' and fake_credit_counter > 0 then fake_credit_counter_in <= fake_credit_counter - 1 ; credit_out <= '1'; end if; end process; -- These are data-path related checkers, thus commented. Correct ?? --process(valid_in, RX) begin -- if valid_in = '1' then -- xor_all <= XOR_REDUCE(RX(DATA_WIDTH-1 downto 1)); -- else -- xor_all <= '0'; -- end if; --end process; -- Shall this also be removed, because it is related to part of data-path (RX(0)) (parity checking) ?? --process(valid_in, RX, xor_all)begin -- fault_out <= '0'; -- if valid_in = '1' and xor_all /= RX(0) then -- fault_out <= '1'; -- end if; --end process; -- Valid input pattern : valid_in = '0', but fault_out = '1' ! -- These are data-path related checkers, thus commented. Correct ?? process(faulty_packet_out, fault_out, state_out, flit_type, valid_in) begin -- this is the default value of the memory! --case( write_pointer ) is -- when "0001" => FIFO_MEM_1_in <= RX; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= RX; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= RX; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= RX; -- when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; --end case ; --some defaults fault_info <= '0'; health_info <= '0'; fake_credit <= '0'; write_fake_flit <= '0'; state_in <= state_out; faulty_packet_in <= faulty_packet_out; case(state_out) is when Idle => if fault_out = '0' then if valid_in = '1' then state_in <= Header_flit; else state_in <= state_out; end if; else fake_credit <= '1'; --FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; state_in <= Packet_drop; fault_info <= '1'; faulty_packet_in <= '1'; end if; when Header_flit => if valid_in = '1' then if fault_out = '0' then if flit_type = "010" then state_in <= Body_flit; elsif flit_type ="100" then state_in <= Tail_flit; else -- we should not be here! state_in <= state_out; end if; else write_fake_flit <= '1'; --case( write_pointer ) is -- when "0001" => FIFO_MEM_1_in <= fake_tail; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= fake_tail; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= fake_tail; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= fake_tail; -- when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; --end case ; state_in <= Packet_drop; fault_info <= '1'; faulty_packet_in <= '1'; end if; else state_in <= state_out; end if; when Body_flit => if valid_in = '1' then if fault_out = '0' then if flit_type = "010" then state_in <= state_out; elsif flit_type = "100" then state_in <= Tail_flit; health_info <= '1'; else -- we should not be here! state_in <= state_out; end if; else write_fake_flit <= '1'; --case( write_pointer ) is -- when "0001" => FIFO_MEM_1_in <= fake_tail; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= fake_tail; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= fake_tail; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= fake_tail; -- when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; --end case ; state_in <= Packet_drop; fault_info <= '1'; faulty_packet_in <= '1'; end if; else state_in <= state_out; end if; when Tail_flit => if valid_in = '1' then if fault_out = '0' then if flit_type = "001" then state_in <= Header_flit; else state_in <= state_out; end if; else fake_credit <= '1'; --FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; state_in <= Packet_drop; fault_info <= '1'; faulty_packet_in <= '1'; end if; else state_in <= Idle; end if; when Packet_drop => if faulty_packet_out = '1' then if valid_in = '1' and flit_type = "001" and fault_out = '0' then faulty_packet_in <= '0'; state_in <= Header_flit; write_fake_flit <= '1'; --case( write_pointer ) is -- when "0001" => FIFO_MEM_1_in <= RX; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= RX; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= RX; FIFO_MEM_4_in <= FIFO_MEM_4; -- when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= RX; -- when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; --end case ; elsif valid_in = '1' and flit_type = "100" and fault_out = '0' then --FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; faulty_packet_in <= '0'; state_in <= Idle; fake_credit <= '1'; else if valid_in = '1' then fake_credit <= '1'; end if; --FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; state_in <= state_out; end if; else -- we should not be here! state_in <= state_out; end if; when others => state_in <= state_out; end case; end process; --process(read_pointer, FIFO_MEM_1, FIFO_MEM_2, FIFO_MEM_3, FIFO_MEM_4)begin -- case( read_pointer ) is -- when "0001" => Data_out <= FIFO_MEM_1; -- when "0010" => Data_out <= FIFO_MEM_2; -- when "0100" => Data_out <= FIFO_MEM_3; -- when "1000" => Data_out <= FIFO_MEM_4; -- when others => Data_out <= FIFO_MEM_1; -- end case ; --end process; -- Checkers for the lines below are more or less similar (some of them) to the normal FIFO for credit-based router. process(write_en, write_pointer)begin if write_en = '1' then write_pointer_in <= write_pointer(2 downto 0)&write_pointer(3); else write_pointer_in <= write_pointer; end if; end process; process(read_en, empty, read_pointer)begin if (read_en = '1' and empty = '0') then read_pointer_in <= read_pointer(2 downto 0)&read_pointer(3); else read_pointer_in <= read_pointer; end if; end process; process(full, valid_in, write_fake_flit, faulty_packet_out, fault_out) begin if valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full ='0' then write_en <= '1'; else write_en <= '0'; end if; end process; process(write_pointer, read_pointer) begin if read_pointer = write_pointer then empty <= '1'; else empty <= '0'; end if; -- if write_pointer = read_pointer>>1 then if write_pointer = read_pointer(0)&read_pointer(3 downto 1) then full <= '1'; else full <= '0'; end if; end process; end;
gpl-3.0
f73104468fe1082330576f9e06eb1a0e
0.411673
3.67359
false
false
false
false
AndyMcC0/UVVM_All
bitvis_vip_uart/src/vvc_methods_pkg.vhd
2
12,802
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_vvc_framework_support_pkg.all; use work.uart_bfm_pkg.all; use work.vvc_cmd_pkg.all; use work.td_target_support_pkg.all; --================================================================================================= --================================================================================================= --================================================================================================= package vvc_methods_pkg is constant C_VVC_NAME : string := "UART_VVC"; constant C_EXECUTOR_RESULT_ARRAY_DEPTH : natural := 3; signal UART_VVCT : t_vvc_target_record := set_vvc_target_defaults(C_VVC_NAME); alias THIS_VVCT : t_vvc_target_record is UART_VVCT; alias t_bfm_config is t_uart_bfm_config; -- Type found in UVVM-Util types_pkg constant C_UART_INTER_BFM_DELAY_DEFAULT : t_inter_bfm_delay := ( delay_type => NO_DELAY, delay_in_time => 0 ns, inter_bfm_delay_violation_severity => WARNING ); type t_vvc_config is record inter_bfm_delay : t_inter_bfm_delay; -- Minimum delay between BFM accesses from the VVC. If parameter delay_type is set to NO_DELAY, BFM accesses will be back to back, i.e. no delay. cmd_queue_count_max : natural; -- Maximum pending number in command queue before queue is full. Adding additional commands will result in an ERROR. cmd_queue_count_threshold : natural; -- An alert with severity 'cmd_queue_count_threshold_severity' will be issued if command queue exceeds this count. Used for early warning if command queue is almost full. Will be ignored if set to 0. cmd_queue_count_threshold_severity : t_alert_level; -- Severity of alert to be initiated if exceeding cmd_queue_count_threshold result_queue_count_max : natural; -- Maximum number of unfetched results before result_queue is full. result_queue_count_threshold_severity : t_alert_level; -- An alert with severity 'result_queue_count_threshold_severity' will be issued if command queue exceeds this count. Used for early warning if result queue is almost full. Will be ignored if set to 0. result_queue_count_threshold : natural; -- Severity of alert to be initiated if exceeding result_queue_count_threshold bfm_config : t_uart_bfm_config; -- Configuration for the BFM. See BFM quick reference msg_id_panel : t_msg_id_panel; -- VVC dedicated message ID panel end record; type t_vvc_config_array is array (t_channel range <>, natural range <>) of t_vvc_config; constant C_UART_VVC_CONFIG_DEFAULT : t_vvc_config := ( inter_bfm_delay => C_UART_INTER_BFM_DELAY_DEFAULT, cmd_queue_count_max => C_CMD_QUEUE_COUNT_MAX, -- from adaptation package cmd_queue_count_threshold => C_CMD_QUEUE_COUNT_THRESHOLD, cmd_queue_count_threshold_severity => C_CMD_QUEUE_COUNT_THRESHOLD_SEVERITY, result_queue_count_max => C_RESULT_QUEUE_COUNT_MAX, result_queue_count_threshold_severity => C_RESULT_QUEUE_COUNT_THRESHOLD_SEVERITY, result_queue_count_threshold => C_RESULT_QUEUE_COUNT_THRESHOLD, bfm_config => C_UART_BFM_CONFIG_DEFAULT, msg_id_panel => C_VVC_MSG_ID_PANEL_DEFAULT ); type t_vvc_status is record current_cmd_idx : natural; previous_cmd_idx : natural; pending_cmd_cnt : natural; end record; type t_vvc_status_array is array (t_channel range <>, natural range <>) of t_vvc_status; constant C_VVC_STATUS_DEFAULT : t_vvc_status := ( current_cmd_idx => 0, previous_cmd_idx => 0, pending_cmd_cnt => 0 ); -- Transaction information to include in the wave view during simulation type t_transaction_info is record operation : t_operation; data : std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0); msg : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); end record; type t_transaction_info_array is array (t_channel range <>, natural range <>) of t_transaction_info; constant C_TRANSACTION_INFO_DEFAULT : t_transaction_info := ( operation => NO_OPERATION, data => (others => '0'), msg => (others => ' ') ); shared variable shared_uart_vvc_config : t_vvc_config_array(t_channel'left to t_channel'right, 0 to C_MAX_VVC_INSTANCE_NUM) := (others => (others => C_UART_VVC_CONFIG_DEFAULT)); shared variable shared_uart_vvc_status : t_vvc_status_array(t_channel'left to t_channel'right, 0 to C_MAX_VVC_INSTANCE_NUM) := (others => (others => C_VVC_STATUS_DEFAULT)); shared variable shared_uart_transaction_info : t_transaction_info_array(t_channel'left to t_channel'right, 0 to C_MAX_VVC_INSTANCE_NUM) := (others => (others => C_TRANSACTION_INFO_DEFAULT)); --============================================================================== -- Methods dedicated to this VVC -- - These procedures are called from the testbench in order to queue BFM calls -- in the VVC command queue. The VVC will store and forward these calls to the -- UART BFM when the command is at the from of the VVC command queue. -- - For details on how the BFM procedures work, see uart_bfm_pkg.vhd. --============================================================================== procedure uart_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant channel : in t_channel; constant data : in std_logic_vector; constant msg : in string ); procedure uart_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant channel : in t_channel; constant msg : in string; constant alert_level : in t_alert_level := ERROR ); procedure uart_expect( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant channel : in t_channel; constant data : in std_logic_vector; constant msg : in string; constant max_receptions : in natural := 1; constant timeout : in time := -1 ns; constant alert_level : in t_alert_level := ERROR ); end package vvc_methods_pkg; package body vvc_methods_pkg is procedure uart_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant channel : in t_channel; constant data : in std_logic_vector; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx, channel) -- First part common for all & ", " & to_string(data, HEX, AS_IS, INCL_RADIX) & ")"; variable v_normalised_data : std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0) := normalize_and_check(data, shared_vvc_cmd.data, ALLOW_WIDER_NARROWER, "data", "shared_vvc_cmd.data", proc_call & " called with to wide data. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, channel, proc_call, msg, QUEUED, TRANSMIT); shared_vvc_cmd.operation := TRANSMIT; shared_vvc_cmd.data := v_normalised_data; send_command_to_vvc(VVCT); end procedure; procedure uart_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant channel : in t_channel; constant msg : in string; constant alert_level : in t_alert_level := ERROR ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx, channel) -- First part common for all & ")"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, channel, proc_call, msg, QUEUED, RECEIVE); shared_vvc_cmd.operation := RECEIVE; shared_vvc_cmd.alert_level := alert_level; send_command_to_vvc(VVCT); end procedure; procedure uart_expect( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant channel : in t_channel; constant data : in std_logic_vector; constant msg : in string; constant max_receptions : in natural := 1; constant timeout : in time := -1 ns; constant alert_level : in t_alert_level := ERROR ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx, channel) -- First part common for all & ", " & to_string(data, HEX, AS_IS, INCL_RADIX) & ")"; variable v_normalised_data : std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0) := normalize_and_check(data, shared_vvc_cmd.data, ALLOW_WIDER_NARROWER, "data", "shared_vvc_cmd.data", proc_call & " called with to wide data. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, channel, proc_call, msg, QUEUED, EXPECT); shared_vvc_cmd.operation := EXPECT; shared_vvc_cmd.data := v_normalised_data; shared_vvc_cmd.alert_level := alert_level; shared_vvc_cmd.max_receptions := max_receptions; if timeout = -1 ns then shared_vvc_cmd.timeout := shared_uart_vvc_config(RX,vvc_instance_idx).bfm_config.timeout; else shared_vvc_cmd.timeout := timeout; end if; send_command_to_vvc(VVCT); end procedure; end package body vvc_methods_pkg;
mit
a82748ad3c08bae0d59f5413bb3aeef8
0.589283
4.170033
false
true
false
false
Wynjones1/gbvhdl
synth/ssd.vhd
1
2,220
library IEEE; use IEEE.numeric_std.all; use IEEE.std_logic_1164.all; entity ssd is port( clk : in std_logic; reset : in std_logic; input : in std_logic_vector(15 downto 0); an_sel : out std_logic_vector(3 downto 0); output : out std_logic_vector(6 downto 0)); end entity; architecture rtl of ssd is signal cur : std_logic_vector(3 downto 0); signal an_sel_s : std_logic_vector(3 downto 0) := "1110"; begin process(cur) begin case cur is when x"0" => output <= "1000000"; when x"1" => output <= "1111001"; when x"2" => output <= "0100100"; when x"3" => output <= "0110000"; when x"4" => output <= "0011001"; when x"5" => output <= "0010010"; when x"6" => output <= "0000010"; when x"7" => output <= "1111000"; when x"8" => output <= "0000000"; when x"9" => output <= "0010000"; when x"A" => output <= "0001000"; when x"B" => output <= "0000011"; when x"C" => output <= "1000110"; when x"D" => output <= "0100001"; when x"E" => output <= "0000110"; when others => output <= "0001110"; end case; end process; process(clk, reset) begin if reset = '1' then an_sel_s <= "1110"; elsif rising_edge(clk) then case an_sel_s is when "1110"=> an_sel_s <= "1101"; cur <= input( 7 downto 4); when "1101" => an_sel_s <= "1011"; cur <= input(11 downto 8); when "1011" => an_sel_s <= "0111"; cur <= input(15 downto 12); when "0111" => an_sel_s <= "1110"; cur <= input( 3 downto 0); when others => an_sel_s <= "1110"; cur <= input( 3 downto 0); end case; end if; end process; an_sel <= "1111" when reset = '1' else an_sel_s; end rtl;
mit
6d3a457febe6fbaa8547e76cb4f9d2fb
0.427477
3.80137
false
false
false
false
AndyMcC0/UVVM_All
bitvis_vip_uart/src/vvc_cmd_pkg.vhd
2
6,665
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_vvc_framework_support_pkg.all; --================================================================================================= --================================================================================================= --================================================================================================= package vvc_cmd_pkg is --=============================================================================================== -- t_operation -- - Bitvis defined BFM operations --=============================================================================================== type t_operation is ( NO_OPERATION, AWAIT_COMPLETION, AWAIT_ANY_COMPLETION, ENABLE_LOG_MSG, DISABLE_LOG_MSG, FLUSH_COMMAND_QUEUE, FETCH_RESULT, INSERT_DELAY, TERMINATE_CURRENT_COMMAND, TRANSMIT, RECEIVE, EXPECT); constant C_VVC_CMD_DATA_MAX_LENGTH : natural := 9; constant C_VVC_CMD_STRING_MAX_LENGTH : natural := 300; --=============================================================================================== -- t_vvc_cmd_record -- - Record type used for communication with the VVC --=============================================================================================== type t_vvc_cmd_record is record -- Common VVC fields operation : t_operation; proc_call : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); msg : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); cmd_idx : natural; command_type : t_immediate_or_queued; msg_id : t_msg_id; gen_integer_array : t_integer_array(0 to 1); -- Increase array length if needed gen_boolean : boolean; -- Generic boolean timeout : time; alert_level : t_alert_level; delay : time; quietness : t_quietness; -- VVC dedicated fields data : std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0); max_receptions : integer; end record; constant C_VVC_CMD_DEFAULT : t_vvc_cmd_record := ( operation => FETCH_RESULT, -- Default unless overwritten by a common operation data => (others => '0'), max_receptions => 1, alert_level => failure, proc_call => (others => NUL), msg => (others => NUL), cmd_idx => 0, command_type => NO_command_type, msg_id => NO_ID, gen_integer_array => (others => -1), gen_boolean => false, timeout => 0 ns, delay => 0 ns, quietness => NON_QUIET ); --=============================================================================================== -- shared_vvc_cmd -- - Shared variable used for transmitting VVC commands --=============================================================================================== shared variable shared_vvc_cmd : t_vvc_cmd_record := C_VVC_CMD_DEFAULT; --=============================================================================================== -- t_vvc_result, t_vvc_result_queue_element, t_vvc_response and shared_vvc_response : -- -- - Used for storing the result of a BFM procedure called by the VVC, -- so that the result can be transported from the VVC to for example a sequencer via -- fetch_result() as described in VVC_Framework_common_methods_QuickRef -- -- - t_vvc_result includes the return value of the procedure in the BFM. -- It can also be defined as a record if multiple values shall be transported from the BFM --=============================================================================================== subtype t_vvc_result is std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0); type t_vvc_result_queue_element is record cmd_idx : natural; -- from UVVM handshake mechanism result : t_vvc_result; end record; type t_vvc_response is record fetch_is_accepted : boolean; transaction_result : t_transaction_result; result : t_vvc_result; end record; shared variable shared_vvc_response : t_vvc_response; --=============================================================================================== -- t_last_received_cmd_idx : -- - Used to store the last queued cmd in vvc interpreter. --=============================================================================================== type t_last_received_cmd_idx is array (t_channel range <>,natural range <>) of integer; --=============================================================================================== -- shared_vvc_last_received_cmd_idx -- - Shared variable used to get last queued index from vvc to sequencer --=============================================================================================== shared variable shared_vvc_last_received_cmd_idx : t_last_received_cmd_idx(t_channel'left to t_channel'right, 0 to C_MAX_VVC_INSTANCE_NUM) := (others => (others => -1)); end package vvc_cmd_pkg; package body vvc_cmd_pkg is end package body vvc_cmd_pkg;
mit
28fcde84a76b2a264046844c652415a3
0.447262
5.19081
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/network_files/component_pack.vhd
3
83,820
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; package component_pack is -- constant definitions CONSTANT IDLE: std_logic_vector (5 downto 0) := "000001"; CONSTANT Local: std_logic_vector (5 downto 0) := "000010"; CONSTANT North: std_logic_vector (5 downto 0) := "000100"; CONSTANT East: std_logic_vector (5 downto 0) := "001000"; CONSTANT West: std_logic_vector (5 downto 0) := "010000"; CONSTANT South: std_logic_vector (5 downto 0) := "100000"; constant fake_tail : std_logic_vector := "10000000000000000000000000000001"; component router_NW_credit_based_PD_C_SHMU is --fault classifier plus packet-dropping generic ( DATA_WIDTH: integer := 32; current_address : integer := 0; Rxy_rst : integer := 10; Cx_rst : integer := 10; healthy_counter_threshold : integer := 8; faulty_counter_threshold: integer := 2; counter_depth: integer := 4; NoC_size: integer := 4 ); port ( reset, clk: in std_logic; RX_E, RX_S, RX_L : in std_logic_vector (DATA_WIDTH-1 downto 0); credit_in_E, credit_in_S, credit_in_L: in std_logic; valid_in_E, valid_in_S, valid_in_L : in std_logic; valid_out_E, valid_out_S, valid_out_L : out std_logic; credit_out_E, credit_out_S, credit_out_L: out std_logic; TX_E, TX_S, TX_L: out std_logic_vector (DATA_WIDTH-1 downto 0); Faulty_E_in, Faulty_S_in: in std_logic; Faulty_E_out, Faulty_S_out: out std_logic; -- should be connected to NI (Outputs for classified fault information) link_faults: out std_logic_vector(4 downto 0); turn_faults: out std_logic_vector(19 downto 0); Rxy_reconf_PE: in std_logic_vector(7 downto 0); Cx_reconf_PE: in std_logic_vector(3 downto 0); Reconfig_command : in std_logic; -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output ---- Outputs for non-classified fault information link_faults_async: out std_logic_vector(4 downto 0); turn_faults_async: out std_logic_vector(19 downto 0) ); end component; component router_NE_credit_based_PD_C_SHMU is --fault classifier plus packet-dropping generic ( DATA_WIDTH: integer := 32; current_address : integer := 0; Rxy_rst : integer := 10; Cx_rst : integer := 10; healthy_counter_threshold : integer := 8; faulty_counter_threshold: integer := 2; counter_depth: integer := 4; NoC_size: integer := 4 ); port ( reset, clk: in std_logic; RX_W, RX_S, RX_L : in std_logic_vector (DATA_WIDTH-1 downto 0); credit_in_W, credit_in_S, credit_in_L: in std_logic; valid_in_W, valid_in_S, valid_in_L : in std_logic; valid_out_W, valid_out_S, valid_out_L : out std_logic; credit_out_W, credit_out_S, credit_out_L: out std_logic; TX_W, TX_S, TX_L: out std_logic_vector (DATA_WIDTH-1 downto 0); Faulty_W_in, Faulty_S_in: in std_logic; Faulty_W_out, Faulty_S_out: out std_logic; -- should be connected to NI (Outputs for classified fault information) link_faults: out std_logic_vector(4 downto 0); turn_faults: out std_logic_vector(19 downto 0); Rxy_reconf_PE: in std_logic_vector(7 downto 0); Cx_reconf_PE: in std_logic_vector(3 downto 0); Reconfig_command : in std_logic; -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output ---- Outputs for non-classified fault information link_faults_async: out std_logic_vector(4 downto 0); turn_faults_async: out std_logic_vector(19 downto 0) ); end component; component router_SW_credit_based_PD_C_SHMU is --fault classifier plus packet-dropping generic ( DATA_WIDTH: integer := 32; current_address : integer := 0; Rxy_rst : integer := 10; Cx_rst : integer := 10; healthy_counter_threshold : integer := 8; faulty_counter_threshold: integer := 2; counter_depth: integer := 4; NoC_size: integer := 4 ); port ( reset, clk: in std_logic; RX_N, RX_E, RX_L : in std_logic_vector (DATA_WIDTH-1 downto 0); credit_in_N, credit_in_E, credit_in_L: in std_logic; valid_in_N, valid_in_E, valid_in_L : in std_logic; valid_out_N, valid_out_E, valid_out_L : out std_logic; credit_out_N, credit_out_E, credit_out_L: out std_logic; TX_N, TX_E, TX_L: out std_logic_vector (DATA_WIDTH-1 downto 0); Faulty_N_in, Faulty_E_in : in std_logic; Faulty_N_out, Faulty_E_out : out std_logic; -- should be connected to NI (Outputs for classified fault information) link_faults: out std_logic_vector(4 downto 0); turn_faults: out std_logic_vector(19 downto 0); Rxy_reconf_PE: in std_logic_vector(7 downto 0); Cx_reconf_PE: in std_logic_vector(3 downto 0); Reconfig_command : in std_logic; -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output ---- Outputs for non-classified fault information link_faults_async: out std_logic_vector(4 downto 0); turn_faults_async: out std_logic_vector(19 downto 0) ); end component; component router_SE_credit_based_PD_C_SHMU is --fault classifier plus packet-dropping generic ( DATA_WIDTH: integer := 32; current_address : integer := 0; Rxy_rst : integer := 10; Cx_rst : integer := 10; healthy_counter_threshold : integer := 8; faulty_counter_threshold: integer := 2; counter_depth: integer := 4; NoC_size: integer := 4 ); port ( reset, clk: in std_logic; RX_N, RX_W, RX_L : in std_logic_vector (DATA_WIDTH-1 downto 0); credit_in_N, credit_in_W, credit_in_L: in std_logic; valid_in_N, valid_in_W, valid_in_L : in std_logic; valid_out_N, valid_out_W, valid_out_L : out std_logic; credit_out_N, credit_out_W, credit_out_L: out std_logic; TX_N, TX_W, TX_L: out std_logic_vector (DATA_WIDTH-1 downto 0); Faulty_N_in, Faulty_W_in : in std_logic; Faulty_N_out, Faulty_W_out : out std_logic; -- should be connected to NI (Outputs for classified fault information) link_faults: out std_logic_vector(4 downto 0); turn_faults: out std_logic_vector(19 downto 0); Rxy_reconf_PE: in std_logic_vector(7 downto 0); Cx_reconf_PE: in std_logic_vector(3 downto 0); Reconfig_command : in std_logic; -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output ---- Outputs for non-classified fault information link_faults_async: out std_logic_vector(4 downto 0); turn_faults_async: out std_logic_vector(19 downto 0) ); end component; -- component declarations component network_2x2 is generic (DATA_WIDTH: integer := 32; DATA_WIDTH_LV: integer := 11); port (reset: in std_logic; clk: in std_logic; -------------- -------------- RX_L_0: in std_logic_vector (DATA_WIDTH-1 downto 0); credit_out_L_0, valid_out_L_0: out std_logic; credit_in_L_0, valid_in_L_0: in std_logic; TX_L_0: out std_logic_vector (DATA_WIDTH-1 downto 0); -------------- RX_L_1: in std_logic_vector (DATA_WIDTH-1 downto 0); credit_out_L_1, valid_out_L_1: out std_logic; credit_in_L_1, valid_in_L_1: in std_logic; TX_L_1: out std_logic_vector (DATA_WIDTH-1 downto 0); -------------- RX_L_2: in std_logic_vector (DATA_WIDTH-1 downto 0); credit_out_L_2, valid_out_L_2: out std_logic; credit_in_L_2, valid_in_L_2: in std_logic; TX_L_2: out std_logic_vector (DATA_WIDTH-1 downto 0); -------------- RX_L_3: in std_logic_vector (DATA_WIDTH-1 downto 0); credit_out_L_3, valid_out_L_3: out std_logic; credit_in_L_3, valid_in_L_3: in std_logic; TX_L_3: out std_logic_vector (DATA_WIDTH-1 downto 0); -------------- link_faults_0: out std_logic_vector(4 downto 0); turn_faults_0: out std_logic_vector(19 downto 0); Rxy_reconf_PE_0: in std_logic_vector(7 downto 0); Cx_reconf_PE_0: in std_logic_vector(3 downto 0); Reconfig_command_0 : in std_logic; -------------- link_faults_1: out std_logic_vector(4 downto 0); turn_faults_1: out std_logic_vector(19 downto 0); Rxy_reconf_PE_1: in std_logic_vector(7 downto 0); Cx_reconf_PE_1: in std_logic_vector(3 downto 0); Reconfig_command_1 : in std_logic; -------------- link_faults_2: out std_logic_vector(4 downto 0); turn_faults_2: out std_logic_vector(19 downto 0); Rxy_reconf_PE_2: in std_logic_vector(7 downto 0); Cx_reconf_PE_2: in std_logic_vector(3 downto 0); Reconfig_command_2 : in std_logic; -------------- link_faults_3: out std_logic_vector(4 downto 0); turn_faults_3: out std_logic_vector(19 downto 0); Rxy_reconf_PE_3: in std_logic_vector(7 downto 0); Cx_reconf_PE_3: in std_logic_vector(3 downto 0); Reconfig_command_3 : in std_logic; -- IJTAG network for fault injection and checker status monitoring TCK : in std_logic; RST : in std_logic; SEL : in std_logic; SI : in std_logic; SE : in std_logic; UE : in std_logic; CE : in std_logic; SO : out std_logic; toF : out std_logic; toC : out std_logic ); end component; component NoC_Node is generic( current_address : integer := 0; stim_file: string :="code.txt"; log_file : string := "output.txt"; memory_type : string := "TRI_PORT_X" -- "DUAL_PORT_" -- "ALTERA_LPM" -- "XILINX_16X" ); port( reset : in std_logic; clk : in std_logic; uart_write : out std_logic; uart_read : in std_logic; credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(19 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); -- if you are not going to update Cx you should write all ones! (it will be and will the current Cx bits) Reconfig_command : out std_logic; GPIO_out: out std_logic_vector(15 downto 0); GPIO_in: in std_logic_vector(21 downto 0); -- remove this part if you are using behavioral ram IJTAG_select : in std_logic; IJTAG_clk : in std_logic; IJTAG_reset : in std_logic; IJTAG_enable : in std_logic; IJTAG_write_byte_enable : in std_logic_vector(3 downto 0); IJTAG_address : in std_logic_vector(31 downto 2); IJTAG_data_write : in std_logic_vector(31 downto 0); IJTAG_data_read : out std_logic_vector(31 downto 0) ); end component; --entity NoC_Node COMPONENT counter_threshold_classifier is generic ( counter_depth: integer := 8; healthy_counter_threshold: integer := 4; faulty_counter_threshold: integer := 4 ); port ( reset: in std_logic; clk: in std_logic; faulty_packet, Healthy_packet: in std_logic; Healthy, intermittent, Faulty: out std_logic ); end COMPONENT; --COMPONENT checkers_counter_threshold_classifier is -- generic ( -- counter_depth: integer := 8; -- healthy_counter_threshold: integer := 4; -- faulty_counter_threshold: integer := 4 -- ); -- port ( reset: in std_logic; -- clk: in std_logic; -- data_input: in std_logic; -- Healthy, Intermittent, Faulty: out std_logic -- ); --end COMPONENT; component LBDR_packet_drop_routing_part_pseudo_checkers is generic ( cur_addr_rst: integer := 8; Rxy_rst: integer := 8; Cx_rst: integer := 8; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; dst_addr: in std_logic_vector(NoC_size-1 downto 0); faulty: in std_logic; Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; N1_out, E1_out, W1_out, S1_out: in std_logic; Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: in std_logic; grants: in std_logic; packet_drop_order: in std_logic; packet_drop_in: in std_logic; -- Checker outputs err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order : out std_logic ); end component; component Cx_Reconf_pseudo_checkers is port ( reconfig_cx: in std_logic; -- * flit_type: in std_logic_vector(2 downto 0); -- * empty: in std_logic; -- * grants: in std_logic; -- * Cx_in: in std_logic_vector(3 downto 0); -- * Temp_Cx: in std_logic_vector(3 downto 0); -- * reconfig_cx_in: in std_logic; -- * Cx: in std_logic_vector(3 downto 0); -- * Cx_reconf_PE: in std_logic_vector(3 downto 0); -- newly added Reconfig_command : in std_logic; -- newly added Faulty_C_N: in std_logic; -- * Faulty_C_E: in std_logic; -- * Faulty_C_W: in std_logic; -- * Faulty_C_S: in std_logic; -- * Temp_Cx_in: in std_logic_vector(3 downto 0); -- * -- Checker Outputs err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal : out std_logic -- Added ); end component; component Rxy_Reconf_pseudo_checkers is port ( ReConf_FF_out: in std_logic; Rxy: in std_logic_vector(7 downto 0); Rxy_tmp: in std_logic_vector(7 downto 0); Reconfig_command : in std_logic; flit_type: in std_logic_vector(2 downto 0); grants: in std_logic; empty: in std_logic; Rxy_reconf_PE: in std_logic_vector(7 downto 0); Rxy_in: in std_logic_vector(7 downto 0); Rxy_tmp_in: in std_logic_vector(7 downto 0); ReConf_FF_in: in std_logic; err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal : out std_logic ); end component; component FIFO_credit_based_control_part_checkers is port ( valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; read_pointer: in std_logic_vector(3 downto 0); read_pointer_in: in std_logic_vector(3 downto 0); write_pointer: in std_logic_vector(3 downto 0); write_pointer_in: in std_logic_vector(3 downto 0); credit_out: in std_logic; empty_out: in std_logic; full_out: in std_logic; read_en_out: in std_logic; write_en_out: in std_logic; fake_credit: in std_logic; fake_credit_counter: in std_logic_vector(1 downto 0); fake_credit_counter_in: in std_logic_vector(1 downto 0); state_out: in std_logic_vector(4 downto 0); state_in: in std_logic_vector(4 downto 0); fault_info: in std_logic; fault_info_out: in std_logic; fault_info_in: in std_logic; health_info: in std_logic; faulty_packet_out: in std_logic; faulty_packet_in: in std_logic; flit_type: in std_logic_vector(2 downto 0); fault_out: in std_logic; write_fake_flit: in std_logic; -- Functional checkers err_empty_full, err_empty_read_en, err_full_write_en, err_state_in_onehot, err_read_pointer_in_onehot, err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer, err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full, err_read_pointer_increment, err_read_pointer_not_increment, err_write_en, err_not_write_en, err_not_write_en1, err_not_write_en2, err_read_en_mismatch, err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in : out std_logic ); end component; COMPONENT FIFO_credit_based is generic ( DATA_WIDTH: integer := 32 ); port ( reset: in std_logic; clk: in std_logic; RX: in std_logic_vector(DATA_WIDTH-1 downto 0); valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; credit_out: out std_logic; empty_out: out std_logic; Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0); fault_info, health_info: out std_logic; -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output -- Checker outputs -- Functional checkers err_empty_full, err_empty_read_en, err_full_write_en, err_state_in_onehot, err_read_pointer_in_onehot, err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer, err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full, err_read_pointer_increment, err_read_pointer_not_increment, err_write_en, err_not_write_en, err_not_write_en1, err_not_write_en2, err_read_en_mismatch, err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in : out std_logic ); end COMPONENT; COMPONENT parity_checker_for_LBDR is generic(DATA_WIDTH : integer := 32); port( RX: in std_logic_vector(DATA_WIDTH-1 downto 0); empty: in std_logic; faulty: out std_logic ); end COMPONENT; COMPONENT LBDR_packet_drop is generic ( cur_addr_rst: integer := 8; Rxy_rst: integer := 8; Cx_rst: integer := 8; NoC_size: integer := 4 ); port ( reset: in std_logic; clk: in std_logic; Faulty_C_N, Faulty_C_E, Faulty_C_W, Faulty_C_S: in std_logic; empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); faulty: in std_logic; packet_drop_order: out std_logic; grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N, Req_E, Req_W, Req_S, Req_L:out std_logic; Rxy_reconf_PE: in std_logic_vector(7 downto 0); Cx_reconf_PE: in std_logic_vector(3 downto 0); Reconfig_command : in std_logic; -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output -- Checker outputs -- Routing part checkers err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order, -- Cx_Reconf checkers err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added -- Rxy_Reconf checkers err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal : out std_logic ); end COMPONENT; COMPONENT XBAR is generic ( DATA_WIDTH: integer := 32 ); port ( North_in: in std_logic_vector(DATA_WIDTH-1 downto 0); East_in: in std_logic_vector(DATA_WIDTH-1 downto 0); West_in: in std_logic_vector(DATA_WIDTH-1 downto 0); South_in: in std_logic_vector(DATA_WIDTH-1 downto 0); Local_in: in std_logic_vector(DATA_WIDTH-1 downto 0); sel: in std_logic_vector (4 downto 0); Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0) ); end COMPONENT; component fault_injector generic( DATA_WIDTH : integer := 32; ADDRESS_WIDTH : integer := 5 ); port( data_in: in std_logic_vector (DATA_WIDTH-1 downto 0); address: in std_logic_vector (ADDRESS_WIDTH-1 downto 0); sta_0: in std_logic; sta_1: in std_logic; data_out: out std_logic_vector (DATA_WIDTH-1 downto 0) ); end component; component shift_register_serial_in generic ( REG_WIDTH: integer := 32 ); port ( TCK, reset : in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output data_out_parallel: out std_logic_vector(REG_WIDTH-1 downto 0) ); end component; component Arbiter_in port ( reset: in std_logic; clk: in std_logic; Req_X_N, Req_X_E, Req_X_W, Req_X_S, Req_X_L: in std_logic; -- From LBDR modules X_N, X_E, X_W, X_S, X_L: out std_logic; -- Grants given to LBDR requests (encoded as one-hot) -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_Req_N, err_IDLE_grant_N,err_North_Req_N, err_North_grant_N, err_East_Req_E, err_East_grant_E, err_West_Req_W, err_West_grant_W, err_South_Req_S,err_South_grant_S,err_Local_Req_L, err_Local_grant_L, err_IDLE_Req_E, err_IDLE_grant_E, err_North_Req_E, err_North_grant_E, err_East_Req_W, err_East_grant_W, err_West_Req_S, err_West_grant_S, err_South_Req_L, err_South_grant_L, err_Local_Req_N, err_Local_grant_N, err_IDLE_Req_W, err_IDLE_grant_W, err_North_Req_W, err_North_grant_W, err_East_Req_S, err_East_grant_S, err_West_Req_L, err_West_grant_L, err_South_Req_N, err_South_grant_N, err_Local_Req_E, err_Local_grant_E, err_IDLE_Req_S, err_IDLE_grant_S, err_North_Req_S, err_North_grant_S, err_East_Req_L, err_East_grant_L, err_West_Req_N, err_West_grant_N, err_South_Req_E, err_South_grant_E, err_Local_Req_W, err_Local_grant_W, err_IDLE_Req_L, err_IDLE_grant_L, err_North_Req_L, err_North_grant_L, err_East_Req_N, err_East_grant_N, err_West_Req_E, err_West_grant_E, err_South_Req_W, err_South_grant_W, err_Local_Req_S, err_Local_grant_S, err_state_in_onehot, err_no_request_grants, err_request_no_grants, err_no_Req_N_grant_N, err_no_Req_E_grant_E, err_no_Req_W_grant_W, err_no_Req_S_grant_S, err_no_Req_L_grant_L : out std_logic ); end component; component Arbiter_in_one_hot_checkers port ( req_X_N, req_X_E, req_X_W, req_X_S, req_X_L :in std_logic; state: in std_logic_vector (5 downto 0); state_in: in std_logic_vector (5 downto 0); X_N, X_E, X_W, X_S, X_L :in std_logic; -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_Req_N, err_IDLE_grant_N,err_North_Req_N, err_North_grant_N, err_East_Req_E, err_East_grant_E, err_West_Req_W, err_West_grant_W, err_South_Req_S,err_South_grant_S,err_Local_Req_L, err_Local_grant_L, err_IDLE_Req_E, err_IDLE_grant_E, err_North_Req_E, err_North_grant_E, err_East_Req_W, err_East_grant_W, err_West_Req_S, err_West_grant_S, err_South_Req_L, err_South_grant_L, err_Local_Req_N, err_Local_grant_N, err_IDLE_Req_W, err_IDLE_grant_W, err_North_Req_W, err_North_grant_W, err_East_Req_S, err_East_grant_S, err_West_Req_L, err_West_grant_L, err_South_Req_N, err_South_grant_N, err_Local_Req_E, err_Local_grant_E, err_IDLE_Req_S, err_IDLE_grant_S, err_North_Req_S, err_North_grant_S, err_East_Req_L, err_East_grant_L, err_West_Req_N, err_West_grant_N, err_South_Req_E, err_South_grant_E, err_Local_Req_W, err_Local_grant_W, err_IDLE_Req_L, err_IDLE_grant_L, err_North_Req_L, err_North_grant_L, err_East_Req_N, err_East_grant_N, err_West_Req_E, err_West_grant_E, err_South_Req_W, err_South_grant_W, err_Local_Req_S, err_Local_grant_S, err_state_in_onehot, err_no_request_grants, err_request_no_grants, err_no_Req_N_grant_N, err_no_Req_E_grant_E, err_no_Req_W_grant_W, err_no_Req_S_grant_S, err_no_Req_L_grant_L : out std_logic ); end component; component Arbiter_out_one_hot_pseudo_checkers port ( credit: in std_logic_vector(1 downto 0); req_X_N, req_X_E, req_X_W, req_X_S, req_X_L :in std_logic; -- From LBDR modules state: in std_logic_vector (5 downto 0); -- 6 states for Arbiter_out's FSM grant_Y_N, grant_Y_E, grant_Y_W, grant_Y_S, grant_Y_L : in std_logic; -- Grants given to LBDR requests (encoded as one-hot) state_in: in std_logic_vector (5 downto 0); -- 6 states for Arbiter's FSM -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_req_X_N, err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E, err_North_req_X_E, err_East_req_X_W, err_West_req_X_S, err_South_req_X_L, err_Local_req_X_N, err_IDLE_req_X_W, err_North_req_X_W, err_East_req_X_S, err_West_req_X_L, err_South_req_X_N, err_Local_req_X_E, err_IDLE_req_X_S, err_North_req_X_S, err_East_req_X_L, err_West_req_X_N, err_South_req_X_E, err_Local_req_X_W, err_IDLE_req_X_L, err_North_req_X_L, err_East_req_X_N, err_West_req_X_E, err_South_req_X_W, err_Local_req_X_S, err_state_in_onehot, err_no_request_grants, err_request_IDLE_state, err_request_IDLE_not_Grants, err_state_North_Invalid_Grant, err_state_East_Invalid_Grant, err_state_West_Invalid_Grant, err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero : out std_logic ); end component; component arbiter_out port ( reset: in std_logic; clk: in std_logic; X_N_Y, X_E_Y, X_W_Y, X_S_Y, X_L_Y :in std_logic; -- From LBDR modules credit: in std_logic_vector(1 downto 0); grant_Y_N, grant_Y_E, grant_Y_W, grant_Y_S, grant_Y_L : out std_logic; -- Grants given to LBDR requests (encoded as one-hot) -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_req_X_N, err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E, err_North_req_X_E, err_East_req_X_W, err_West_req_X_S, err_South_req_X_L, err_Local_req_X_N, err_IDLE_req_X_W, err_North_req_X_W, err_East_req_X_S, err_West_req_X_L, err_South_req_X_N, err_Local_req_X_E, err_IDLE_req_X_S, err_North_req_X_S, err_East_req_X_L, err_West_req_X_N, err_South_req_X_E, err_Local_req_X_W, err_IDLE_req_X_L, err_North_req_X_L, err_East_req_X_N, err_West_req_X_E, err_South_req_X_W, err_Local_req_X_S, err_state_in_onehot, err_no_request_grants, err_request_IDLE_state, err_request_IDLE_not_Grants, err_state_North_Invalid_Grant, err_state_East_Invalid_Grant, err_state_West_Invalid_Grant, err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero : out std_logic ); end component; component allocator_logic_pseudo_checkers port ( -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; grant_N_N_sig, grant_N_E_sig, grant_N_W_sig, grant_N_S_sig, grant_N_L_sig: in std_logic; grant_E_N_sig, grant_E_E_sig, grant_E_W_sig, grant_E_S_sig, grant_E_L_sig: in std_logic; grant_W_N_sig, grant_W_E_sig, grant_W_W_sig, grant_W_S_sig, grant_W_L_sig: in std_logic; grant_S_N_sig, grant_S_E_sig, grant_S_W_sig, grant_S_S_sig, grant_S_L_sig: in std_logic; grant_L_N_sig, grant_L_E_sig, grant_L_W_sig, grant_L_S_sig, grant_L_L_sig: in std_logic; valid_N, valid_E, valid_W, valid_S, valid_L : in std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: in std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: in std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: in std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: in std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: in std_logic; grant_N, grant_E, grant_W, grant_S, grant_L : in std_logic; -- Checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match : out std_logic ); end component; component allocator_credit_counter_logic_pseudo_checkers port ( -- flow control credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; credit_counter_N_out, credit_counter_E_out, credit_counter_W_out, credit_counter_S_out, credit_counter_L_out : in std_logic_vector(1 downto 0); valid_N, valid_E, valid_W, valid_S, valid_L: in std_logic; -- ?? Not sure yet ! grant or valid ! credit_counter_N_in, credit_counter_E_in, credit_counter_W_in, credit_counter_S_in, credit_counter_L_in : in std_logic_vector(1 downto 0); -- Checker outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_N_credit_counter_N_out_increment, err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change, err_grant_N_credit_counter_N_out_decrement, err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change, err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_E_credit_counter_E_out_increment, err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change, err_grant_E_credit_counter_E_out_decrement, err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change, err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_W_credit_counter_W_out_increment, err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change, err_grant_W_credit_counter_W_out_decrement, err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change, err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_S_credit_counter_S_out_increment, err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change, err_grant_S_credit_counter_S_out_decrement, err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change, err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal, err_credit_in_L_credit_counter_L_out_increment, err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change, err_grant_L_credit_counter_L_out_decrement, err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change, err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal : out std_logic ); end component; component allocator port ( reset: in std_logic; clk: in std_logic; -- flow control credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; req_N_N, req_N_E, req_N_W, req_N_S, req_N_L: in std_logic; req_E_N, req_E_E, req_E_W, req_E_S, req_E_L: in std_logic; req_W_N, req_W_E, req_W_W, req_W_S, req_W_L: in std_logic; req_S_N, req_S_E, req_S_W, req_S_S, req_S_L: in std_logic; req_L_N, req_L_E, req_L_W, req_L_S, req_L_L: in std_logic; empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! valid_N, valid_E, valid_W, valid_S, valid_L : out std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: out std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: out std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: out std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: out std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: out std_logic; -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output -- Allocator logic checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match, -- Allocator credit counter logic checker outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_N_credit_counter_N_out_increment, err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change, err_grant_N_credit_counter_N_out_decrement, err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change, err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_E_credit_counter_E_out_increment, err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change, err_grant_E_credit_counter_E_out_decrement, err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change, err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_W_credit_counter_W_out_increment, err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change, err_grant_W_credit_counter_W_out_decrement, err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change, err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_S_credit_counter_S_out_increment, err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change, err_grant_S_credit_counter_S_out_decrement, err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change, err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal, err_credit_in_L_credit_counter_L_out_increment, err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change, err_grant_L_credit_counter_L_out_decrement, err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change, err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal, -- Arbiter_in checker outputs -- North Arbiter_in checker outputs N_err_Requests_state_in_state_not_equal, N_err_IDLE_Req_N, N_err_IDLE_grant_N, N_err_North_Req_N, N_err_North_grant_N, N_err_East_Req_E, N_err_East_grant_E, N_err_West_Req_W, N_err_West_grant_W, N_err_South_Req_S,N_err_South_grant_S,N_err_Local_Req_L, N_err_Local_grant_L, N_err_IDLE_Req_E, N_err_IDLE_grant_E, N_err_North_Req_E, N_err_North_grant_E, N_err_East_Req_W, N_err_East_grant_W, N_err_West_Req_S, N_err_West_grant_S, N_err_South_Req_L, N_err_South_grant_L, N_err_Local_Req_N, N_err_Local_grant_N, N_err_IDLE_Req_W, N_err_IDLE_grant_W, N_err_North_Req_W, N_err_North_grant_W, N_err_East_Req_S, N_err_East_grant_S, N_err_West_Req_L, N_err_West_grant_L, N_err_South_Req_N, N_err_South_grant_N, N_err_Local_Req_E, N_err_Local_grant_E, N_err_IDLE_Req_S, N_err_IDLE_grant_S, N_err_North_Req_S, N_err_North_grant_S, N_err_East_Req_L, N_err_East_grant_L, N_err_West_Req_N, N_err_West_grant_N, N_err_South_Req_E, N_err_South_grant_E, N_err_Local_Req_W, N_err_Local_grant_W, N_err_IDLE_Req_L, N_err_IDLE_grant_L, N_err_North_Req_L, N_err_North_grant_L, N_err_East_Req_N, N_err_East_grant_N, N_err_West_Req_E, N_err_West_grant_E, N_err_South_Req_W, N_err_South_grant_W, N_err_Local_Req_S, N_err_Local_grant_S, N_err_state_in_onehot, N_err_no_request_grants, N_err_request_no_grants, N_err_no_Req_N_grant_N, N_err_no_Req_E_grant_E, N_err_no_Req_W_grant_W, N_err_no_Req_S_grant_S, N_err_no_Req_L_grant_L, -- East Arbiter_in checker outputs E_err_Requests_state_in_state_not_equal, E_err_IDLE_Req_N, E_err_IDLE_grant_N, E_err_North_Req_N, E_err_North_grant_N, E_err_East_Req_E, E_err_East_grant_E, E_err_West_Req_W, E_err_West_grant_W, E_err_South_Req_S, E_err_South_grant_S, E_err_Local_Req_L, E_err_Local_grant_L, E_err_IDLE_Req_E, E_err_IDLE_grant_E, E_err_North_Req_E, E_err_North_grant_E, E_err_East_Req_W, E_err_East_grant_W, E_err_West_Req_S, E_err_West_grant_S, E_err_South_Req_L, E_err_South_grant_L, E_err_Local_Req_N, E_err_Local_grant_N, E_err_IDLE_Req_W, E_err_IDLE_grant_W, E_err_North_Req_W, E_err_North_grant_W, E_err_East_Req_S, E_err_East_grant_S, E_err_West_Req_L, E_err_West_grant_L, E_err_South_Req_N, E_err_South_grant_N, E_err_Local_Req_E, E_err_Local_grant_E, E_err_IDLE_Req_S, E_err_IDLE_grant_S, E_err_North_Req_S, E_err_North_grant_S, E_err_East_Req_L, E_err_East_grant_L, E_err_West_Req_N, E_err_West_grant_N, E_err_South_Req_E, E_err_South_grant_E, E_err_Local_Req_W, E_err_Local_grant_W, E_err_IDLE_Req_L, E_err_IDLE_grant_L, E_err_North_Req_L, E_err_North_grant_L, E_err_East_Req_N, E_err_East_grant_N, E_err_West_Req_E, E_err_West_grant_E, E_err_South_Req_W, E_err_South_grant_W, E_err_Local_Req_S, E_err_Local_grant_S, E_err_state_in_onehot, E_err_no_request_grants, E_err_request_no_grants, E_err_no_Req_N_grant_N, E_err_no_Req_E_grant_E, E_err_no_Req_W_grant_W, E_err_no_Req_S_grant_S, E_err_no_Req_L_grant_L, -- West Arbiter_in checker outputs W_err_Requests_state_in_state_not_equal, W_err_IDLE_Req_N, W_err_IDLE_grant_N, W_err_North_Req_N, W_err_North_grant_N, W_err_East_Req_E, W_err_East_grant_E, W_err_West_Req_W, W_err_West_grant_W, W_err_South_Req_S, W_err_South_grant_S, W_err_Local_Req_L, W_err_Local_grant_L, W_err_IDLE_Req_E, W_err_IDLE_grant_E, W_err_North_Req_E, W_err_North_grant_E, W_err_East_Req_W, W_err_East_grant_W, W_err_West_Req_S, W_err_West_grant_S, W_err_South_Req_L, W_err_South_grant_L, W_err_Local_Req_N, W_err_Local_grant_N, W_err_IDLE_Req_W, W_err_IDLE_grant_W, W_err_North_Req_W, W_err_North_grant_W, W_err_East_Req_S, W_err_East_grant_S, W_err_West_Req_L, W_err_West_grant_L, W_err_South_Req_N, W_err_South_grant_N, W_err_Local_Req_E, W_err_Local_grant_E, W_err_IDLE_Req_S, W_err_IDLE_grant_S, W_err_North_Req_S, W_err_North_grant_S, W_err_East_Req_L, W_err_East_grant_L, W_err_West_Req_N, W_err_West_grant_N, W_err_South_Req_E, W_err_South_grant_E, W_err_Local_Req_W, W_err_Local_grant_W, W_err_IDLE_Req_L, W_err_IDLE_grant_L, W_err_North_Req_L, W_err_North_grant_L, W_err_East_Req_N, W_err_East_grant_N, W_err_West_Req_E, W_err_West_grant_E, W_err_South_Req_W, W_err_South_grant_W, W_err_Local_Req_S, W_err_Local_grant_S, W_err_state_in_onehot, W_err_no_request_grants, W_err_request_no_grants, W_err_no_Req_N_grant_N, W_err_no_Req_E_grant_E, W_err_no_Req_W_grant_W, W_err_no_Req_S_grant_S, W_err_no_Req_L_grant_L, -- South Arbiter_in checker outputs S_err_Requests_state_in_state_not_equal, S_err_IDLE_Req_N, S_err_IDLE_grant_N, S_err_North_Req_N, S_err_North_grant_N, S_err_East_Req_E, S_err_East_grant_E, S_err_West_Req_W, S_err_West_grant_W, S_err_South_Req_S,S_err_South_grant_S,S_err_Local_Req_L, S_err_Local_grant_L, S_err_IDLE_Req_E, S_err_IDLE_grant_E, S_err_North_Req_E, S_err_North_grant_E, S_err_East_Req_W, S_err_East_grant_W, S_err_West_Req_S, S_err_West_grant_S, S_err_South_Req_L, S_err_South_grant_L, S_err_Local_Req_N, S_err_Local_grant_N, S_err_IDLE_Req_W, S_err_IDLE_grant_W, S_err_North_Req_W, S_err_North_grant_W, S_err_East_Req_S, S_err_East_grant_S, S_err_West_Req_L, S_err_West_grant_L, S_err_South_Req_N, S_err_South_grant_N, S_err_Local_Req_E, S_err_Local_grant_E, S_err_IDLE_Req_S, S_err_IDLE_grant_S, S_err_North_Req_S, S_err_North_grant_S, S_err_East_Req_L, S_err_East_grant_L, S_err_West_Req_N, S_err_West_grant_N, S_err_South_Req_E, S_err_South_grant_E, S_err_Local_Req_W, S_err_Local_grant_W, S_err_IDLE_Req_L, S_err_IDLE_grant_L, S_err_North_Req_L, S_err_North_grant_L, S_err_East_Req_N, S_err_East_grant_N, S_err_West_Req_E, S_err_West_grant_E, S_err_South_Req_W, S_err_South_grant_W, S_err_Local_Req_S, S_err_Local_grant_S, S_err_state_in_onehot, S_err_no_request_grants, S_err_request_no_grants, S_err_no_Req_N_grant_N, S_err_no_Req_E_grant_E, S_err_no_Req_W_grant_W, S_err_no_Req_S_grant_S, S_err_no_Req_L_grant_L, -- Local Arbiter_in checker outputs L_err_Requests_state_in_state_not_equal, L_err_IDLE_Req_N, L_err_IDLE_grant_N, L_err_North_Req_N, L_err_North_grant_N, L_err_East_Req_E, L_err_East_grant_E, L_err_West_Req_W, L_err_West_grant_W, L_err_South_Req_S, L_err_South_grant_S, L_err_Local_Req_L, L_err_Local_grant_L, L_err_IDLE_Req_E, L_err_IDLE_grant_E, L_err_North_Req_E, L_err_North_grant_E, L_err_East_Req_W, L_err_East_grant_W, L_err_West_Req_S, L_err_West_grant_S, L_err_South_Req_L, L_err_South_grant_L, L_err_Local_Req_N, L_err_Local_grant_N, L_err_IDLE_Req_W, L_err_IDLE_grant_W, L_err_North_Req_W, L_err_North_grant_W, L_err_East_Req_S, L_err_East_grant_S, L_err_West_Req_L, L_err_West_grant_L, L_err_South_Req_N, L_err_South_grant_N, L_err_Local_Req_E, L_err_Local_grant_E, L_err_IDLE_Req_S, L_err_IDLE_grant_S, L_err_North_Req_S, L_err_North_grant_S, L_err_East_Req_L, L_err_East_grant_L, L_err_West_Req_N, L_err_West_grant_N, L_err_South_Req_E, L_err_South_grant_E, L_err_Local_Req_W, L_err_Local_grant_W, L_err_IDLE_Req_L, L_err_IDLE_grant_L, L_err_North_Req_L, L_err_North_grant_L, L_err_East_Req_N, L_err_East_grant_N, L_err_West_Req_E, L_err_West_grant_E, L_err_South_Req_W, L_err_South_grant_W, L_err_Local_Req_S, L_err_Local_grant_S, L_err_state_in_onehot, L_err_no_request_grants, L_err_request_no_grants, L_err_no_Req_N_grant_N, L_err_no_Req_E_grant_E, L_err_no_Req_W_grant_W, L_err_no_Req_S_grant_S, L_err_no_Req_L_grant_L, -- Arbiter_out checker outputs -- North Arbiter_out checker outputs N_arbiter_out_err_Requests_state_in_state_not_equal, N_err_IDLE_req_X_N, N_err_North_req_X_N, N_err_North_credit_not_zero_req_X_N_grant_N, N_err_North_credit_zero_or_not_req_X_N_not_grant_N, N_err_East_req_X_E, N_err_East_credit_not_zero_req_X_E_grant_E, N_err_East_credit_zero_or_not_req_X_E_not_grant_E, N_err_West_req_X_W, N_err_West_credit_not_zero_req_X_W_grant_W, N_err_West_credit_zero_or_not_req_X_W_not_grant_W, N_err_South_req_X_S, N_err_South_credit_not_zero_req_X_S_grant_S, N_err_South_credit_zero_or_not_req_X_S_not_grant_S, N_err_Local_req_X_L, N_err_Local_credit_not_zero_req_X_L_grant_L, N_err_Local_credit_zero_or_not_req_X_L_not_grant_L, N_err_IDLE_req_X_E, N_err_North_req_X_E, N_err_East_req_X_W, N_err_West_req_X_S, N_err_South_req_X_L, N_err_Local_req_X_N, N_err_IDLE_req_X_W, N_err_North_req_X_W, N_err_East_req_X_S, N_err_West_req_X_L, N_err_South_req_X_N, N_err_Local_req_X_E, N_err_IDLE_req_X_S, N_err_North_req_X_S, N_err_East_req_X_L, N_err_West_req_X_N, N_err_South_req_X_E, N_err_Local_req_X_W, N_err_IDLE_req_X_L, N_err_North_req_X_L, N_err_East_req_X_N, N_err_West_req_X_E, N_err_South_req_X_W, N_err_Local_req_X_S, N_arbiter_out_err_state_in_onehot, N_arbiter_out_err_no_request_grants, N_err_request_IDLE_state, N_err_request_IDLE_not_Grants, N_err_state_North_Invalid_Grant, N_err_state_East_Invalid_Grant, N_err_state_West_Invalid_Grant, N_err_state_South_Invalid_Grant, N_err_state_Local_Invalid_Grant, N_err_Grants_onehot_or_all_zero, -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal, E_err_IDLE_req_X_N, E_err_North_req_X_N, E_err_North_credit_not_zero_req_X_N_grant_N, E_err_North_credit_zero_or_not_req_X_N_not_grant_N, E_err_East_req_X_E, E_err_East_credit_not_zero_req_X_E_grant_E, E_err_East_credit_zero_or_not_req_X_E_not_grant_E, E_err_West_req_X_W, E_err_West_credit_not_zero_req_X_W_grant_W, E_err_West_credit_zero_or_not_req_X_W_not_grant_W, E_err_South_req_X_S, E_err_South_credit_not_zero_req_X_S_grant_S, E_err_South_credit_zero_or_not_req_X_S_not_grant_S, E_err_Local_req_X_L, E_err_Local_credit_not_zero_req_X_L_grant_L, E_err_Local_credit_zero_or_not_req_X_L_not_grant_L, E_err_IDLE_req_X_E, E_err_North_req_X_E, E_err_East_req_X_W, E_err_West_req_X_S, E_err_South_req_X_L, E_err_Local_req_X_N, E_err_IDLE_req_X_W, E_err_North_req_X_W, E_err_East_req_X_S, E_err_West_req_X_L, E_err_South_req_X_N, E_err_Local_req_X_E, E_err_IDLE_req_X_S, E_err_North_req_X_S, E_err_East_req_X_L, E_err_West_req_X_N, E_err_South_req_X_E, E_err_Local_req_X_W, E_err_IDLE_req_X_L, E_err_North_req_X_L, E_err_East_req_X_N, E_err_West_req_X_E, E_err_South_req_X_W, E_err_Local_req_X_S, E_arbiter_out_err_state_in_onehot, E_arbiter_out_err_no_request_grants, E_err_request_IDLE_state, E_err_request_IDLE_not_Grants, E_err_state_North_Invalid_Grant,E_err_state_East_Invalid_Grant, E_err_state_West_Invalid_Grant, E_err_state_South_Invalid_Grant, E_err_state_Local_Invalid_Grant, E_err_Grants_onehot_or_all_zero, -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal, W_err_IDLE_req_X_N, W_err_North_req_X_N, W_err_North_credit_not_zero_req_X_N_grant_N, W_err_North_credit_zero_or_not_req_X_N_not_grant_N, W_err_East_req_X_E, W_err_East_credit_not_zero_req_X_E_grant_E, W_err_East_credit_zero_or_not_req_X_E_not_grant_E, W_err_West_req_X_W, W_err_West_credit_not_zero_req_X_W_grant_W, W_err_West_credit_zero_or_not_req_X_W_not_grant_W, W_err_South_req_X_S, W_err_South_credit_not_zero_req_X_S_grant_S, W_err_South_credit_zero_or_not_req_X_S_not_grant_S, W_err_Local_req_X_L, W_err_Local_credit_not_zero_req_X_L_grant_L, W_err_Local_credit_zero_or_not_req_X_L_not_grant_L, W_err_IDLE_req_X_E, W_err_North_req_X_E, W_err_East_req_X_W, W_err_West_req_X_S, W_err_South_req_X_L, W_err_Local_req_X_N, W_err_IDLE_req_X_W, W_err_North_req_X_W, W_err_East_req_X_S, W_err_West_req_X_L, W_err_South_req_X_N, W_err_Local_req_X_E, W_err_IDLE_req_X_S, W_err_North_req_X_S, W_err_East_req_X_L, W_err_West_req_X_N, W_err_South_req_X_E, W_err_Local_req_X_W, W_err_IDLE_req_X_L, W_err_North_req_X_L, W_err_East_req_X_N, W_err_West_req_X_E, W_err_South_req_X_W, W_err_Local_req_X_S, W_arbiter_out_err_state_in_onehot, W_arbiter_out_err_no_request_grants, W_err_request_IDLE_state, W_err_request_IDLE_not_Grants, W_err_state_North_Invalid_Grant, W_err_state_East_Invalid_Grant, W_err_state_West_Invalid_Grant, W_err_state_South_Invalid_Grant, W_err_state_Local_Invalid_Grant, W_err_Grants_onehot_or_all_zero, -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal, S_err_IDLE_req_X_N, S_err_North_req_X_N, S_err_North_credit_not_zero_req_X_N_grant_N, S_err_North_credit_zero_or_not_req_X_N_not_grant_N, S_err_East_req_X_E, S_err_East_credit_not_zero_req_X_E_grant_E, S_err_East_credit_zero_or_not_req_X_E_not_grant_E, S_err_West_req_X_W, S_err_West_credit_not_zero_req_X_W_grant_W, S_err_West_credit_zero_or_not_req_X_W_not_grant_W, S_err_South_req_X_S, S_err_South_credit_not_zero_req_X_S_grant_S, S_err_South_credit_zero_or_not_req_X_S_not_grant_S, S_err_Local_req_X_L, S_err_Local_credit_not_zero_req_X_L_grant_L, S_err_Local_credit_zero_or_not_req_X_L_not_grant_L, S_err_IDLE_req_X_E, S_err_North_req_X_E, S_err_East_req_X_W, S_err_West_req_X_S, S_err_South_req_X_L, S_err_Local_req_X_N, S_err_IDLE_req_X_W, S_err_North_req_X_W, S_err_East_req_X_S, S_err_West_req_X_L, S_err_South_req_X_N, S_err_Local_req_X_E, S_err_IDLE_req_X_S, S_err_North_req_X_S, S_err_East_req_X_L, S_err_West_req_X_N, S_err_South_req_X_E, S_err_Local_req_X_W, S_err_IDLE_req_X_L, S_err_North_req_X_L, S_err_East_req_X_N, S_err_West_req_X_E, S_err_South_req_X_W, S_err_Local_req_X_S, S_arbiter_out_err_state_in_onehot, S_arbiter_out_err_no_request_grants, S_err_request_IDLE_state, S_err_request_IDLE_not_Grants, S_err_state_North_Invalid_Grant, S_err_state_East_Invalid_Grant, S_err_state_West_Invalid_Grant, S_err_state_South_Invalid_Grant, S_err_state_Local_Invalid_Grant, S_err_Grants_onehot_or_all_zero, -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal, L_err_IDLE_req_X_N, L_err_North_req_X_N, L_err_North_credit_not_zero_req_X_N_grant_N, L_err_North_credit_zero_or_not_req_X_N_not_grant_N, L_err_East_req_X_E, L_err_East_credit_not_zero_req_X_E_grant_E, L_err_East_credit_zero_or_not_req_X_E_not_grant_E, L_err_West_req_X_W, L_err_West_credit_not_zero_req_X_W_grant_W, L_err_West_credit_zero_or_not_req_X_W_not_grant_W, L_err_South_req_X_S, L_err_South_credit_not_zero_req_X_S_grant_S, L_err_South_credit_zero_or_not_req_X_S_not_grant_S, L_err_Local_req_X_L, L_err_Local_credit_not_zero_req_X_L_grant_L, L_err_Local_credit_zero_or_not_req_X_L_not_grant_L, L_err_IDLE_req_X_E, L_err_North_req_X_E, L_err_East_req_X_W, L_err_West_req_X_S, L_err_South_req_X_L, L_err_Local_req_X_N, L_err_IDLE_req_X_W, L_err_North_req_X_W, L_err_East_req_X_S, L_err_West_req_X_L, L_err_South_req_X_N, L_err_Local_req_X_E, L_err_IDLE_req_X_S, L_err_North_req_X_S, L_err_East_req_X_L, L_err_West_req_X_N, L_err_South_req_X_E, L_err_Local_req_X_W, L_err_IDLE_req_X_L, L_err_North_req_X_L, L_err_East_req_X_N, L_err_West_req_X_E, L_err_South_req_X_W, L_err_Local_req_X_S, L_arbiter_out_err_state_in_onehot, L_arbiter_out_err_no_request_grants, L_err_request_IDLE_state, L_err_request_IDLE_not_Grants, L_err_state_North_Invalid_Grant, L_err_state_East_Invalid_Grant, L_err_state_West_Invalid_Grant, L_err_state_South_Invalid_Grant, L_err_state_Local_Invalid_Grant, L_err_Grants_onehot_or_all_zero : out std_logic ); end component; end; --package body
gpl-3.0
4f477c629a12d6c3ea6c349135ccb77b
0.62392
2.734301
false
false
false
false
kiwih/subleq-vhdl
hex_lcd_driver.vhd
1
2,796
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.ALL; entity hex_lcd_driver is port( CLK: in std_logic; DIG0: in std_logic_vector(3 downto 0); DIG1: in std_logic_vector(3 downto 0); DIG2: in std_logic_vector(3 downto 0); DIG3: in std_logic_vector(3 downto 0); SEVENSEG_SELECT: out std_logic_vector(3 downto 0); SEVENSEG_DATA: out std_logic_vector(0 to 7) ); end entity; architecture beh of hex_lcd_driver is --values in 7seg are are A, B, C, D, E, F, G, DP begin process(clk) variable dignum: integer range 0 to 7 := 0; variable currentdigit: std_logic_vector(3 downto 0); variable clk_div: integer range 0 to 31 := 31; begin if rising_edge(clk) then if clk_div = 31 then --clk_divider is required because 50MHz is too fast to drive seven segment displays. if dignum = 7 then dignum := 0; else dignum := dignum + 1; end if; if dignum = 0 then SEVENSEG_SELECT <= "1110"; currentdigit := DIG0; elsif dignum = 2 then SEVENSEG_SELECT <= "1101"; currentdigit := DIG1; elsif dignum = 4 then SEVENSEG_SELECT <= "1011"; currentdigit := DIG2; elsif dignum = 6 then SEVENSEG_SELECT <= "0111"; currentdigit := DIG3; else SEVENSEG_SELECT <= "1111"; --this is required so that all digits are "off" during the crossover. Without it, we will have blur across digits end if; clk_div := 0; else clk_div := clk_div + 1; end if; case currentdigit is when "0000" => SEVENSEG_DATA <= "00000011"; --on on on on on on off when "0001" => SEVENSEG_DATA <= "10011111"; --off on on off off off off when "0010" => SEVENSEG_DATA <= "00100101"; --on on off on on off on when "0011" => SEVENSEG_DATA <= "00001101"; --on on on on off off on when "0100" => SEVENSEG_DATA <= "10011001"; --off on on off off on on when "0101" => SEVENSEG_DATA <= "01001001"; --on off on on off on on when "0110" => SEVENSEG_DATA <= "01000001"; --on off on on on on on when "0111" => SEVENSEG_DATA <= "00011111"; --on on on off off off off when "1000" => SEVENSEG_DATA <= "00000001"; --on on on on on on on when "1001" => SEVENSEG_DATA <= "00001001"; --on on on on off on on when "1010" => SEVENSEG_DATA <= "00010001"; --on on on off on on on when "1011" => SEVENSEG_DATA <= "11000001"; --off off on on on on on when "1100" => SEVENSEG_DATA <= "01100011"; --on off off on on on off when "1101" => SEVENSEG_DATA <= "10000101"; --off on on on on off on when "1110" => SEVENSEG_DATA <= "01100001"; --on off off on on on on when others => SEVENSEG_DATA <= "01110001"; --on off off off on on on end case; end if; end process; end architecture;
mit
c0c428f1faafe0a7618ec0d4f5047e81
0.622318
2.864754
false
false
false
false
elainemielas/CVUT_BI-PNO
cvika/had/decoder.vhd
1
670
library IEEE; use IEEE.std_logic_1164.all; entity DECODER is port ( BIN_VALUE : in std_logic_vector (2 downto 0); ONE_HOT : out std_logic_vector (7 downto 0) ); end entity DECODER; architecture DECODER_BODY of DECODER is begin DECODE : process (BIN_VALUE) begin case BIN_VALUE is when "000" => ONE_HOT <= "00000001"; when "001" => ONE_HOT <= "00000010"; when "010" => ONE_HOT <= "00000100"; when "011" => ONE_HOT <= "00001000"; when "100" => ONE_HOT <= "00010000"; when "101" => ONE_HOT <= "00100000"; when "110" => ONE_HOT <= "01000000"; when others => ONE_HOT <= "10000000"; end case; end process; end architecture;
mit
22d8ad5df19b15079f1ed54f611cba53
0.616418
2.900433
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/Router_32_bit_credit_based_parity.vhd
3
16,261
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; --use IEEE.STD_LOGIC_ARITH.ALL; --use IEEE.STD_LOGIC_UNSIGNED.ALL; entity router_credit_based_parity is generic ( DATA_WIDTH: integer := 32; current_address : integer := 0; Cx_rst : integer := 10; NoC_size: integer := 4 ); port ( reset, clk: in std_logic; Rxy_reconf: in std_logic_vector(7 downto 0); Reconfig : in std_logic; RX_N, RX_E, RX_W, RX_S, RX_L : in std_logic_vector (DATA_WIDTH-1 downto 0); credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; valid_in_N, valid_in_E, valid_in_W, valid_in_S, valid_in_L : in std_logic; valid_out_N, valid_out_E, valid_out_W, valid_out_S, valid_out_L : out std_logic; credit_out_N, credit_out_E, credit_out_W, credit_out_S, credit_out_L: out std_logic; TX_N, TX_E, TX_W, TX_S, TX_L: out std_logic_vector (DATA_WIDTH-1 downto 0); faulty_packet_N, faulty_packet_E, faulty_packet_W, faulty_packet_S, faulty_packet_L:out std_logic; healthy_packet_N, healthy_packet_E, healthy_packet_W, healthy_packet_S, healthy_packet_L:out std_logic ); end router_credit_based_parity; architecture behavior of router_credit_based_parity is COMPONENT parity_checker_packet_detector is generic(DATA_WIDTH : integer := 32 ); port( reset: in std_logic; clk: in std_logic; RX: in std_logic_vector(DATA_WIDTH-1 downto 0); valid_in: in std_logic; faulty_packet, healthy_packet: out std_logic ); end COMPONENT; COMPONENT FIFO_credit_based generic ( DATA_WIDTH: integer := 32 ); port ( reset: in std_logic; clk: in std_logic; RX: in std_logic_vector(DATA_WIDTH-1 downto 0); valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; credit_out: out std_logic; empty_out: out std_logic; Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0) ); end COMPONENT; COMPONENT allocator is port ( reset: in std_logic; clk: in std_logic; -- flow control credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; req_N_N, req_N_E, req_N_W, req_N_S, req_N_L: in std_logic; req_E_N, req_E_E, req_E_W, req_E_S, req_E_L: in std_logic; req_W_N, req_W_E, req_W_W, req_W_S, req_W_L: in std_logic; req_S_N, req_S_E, req_S_W, req_S_S, req_S_L: in std_logic; req_L_N, req_L_E, req_L_W, req_L_S, req_L_L: in std_logic; empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! valid_N, valid_E, valid_W, valid_S, valid_L : out std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: out std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: out std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: out std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: out std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: out std_logic ); end COMPONENT; COMPONENT LBDR is generic ( cur_addr_rst: integer := 0; Cx_rst: integer := 8; NoC_size: integer := 4 ); port ( reset: in std_logic; clk: in std_logic; Rxy_reconf: in std_logic_vector(7 downto 0); Reconfig : in std_logic; empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N, Req_E, Req_W, Req_S, Req_L:out std_logic ); end COMPONENT; COMPONENT XBAR is generic ( DATA_WIDTH: integer := 32 ); port ( North_in: in std_logic_vector(DATA_WIDTH-1 downto 0); East_in: in std_logic_vector(DATA_WIDTH-1 downto 0); West_in: in std_logic_vector(DATA_WIDTH-1 downto 0); South_in: in std_logic_vector(DATA_WIDTH-1 downto 0); Local_in: in std_logic_vector(DATA_WIDTH-1 downto 0); sel: in std_logic_vector (4 downto 0); Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0) ); end COMPONENT; signal FIFO_D_out_N, FIFO_D_out_E, FIFO_D_out_W, FIFO_D_out_S, FIFO_D_out_L: std_logic_vector(DATA_WIDTH-1 downto 0); -- Grant_XY : Grant signal generated from Arbiter for output X connected to FIFO of input Y signal Grant_NN, Grant_NE, Grant_NW, Grant_NS, Grant_NL: std_logic; signal Grant_EN, Grant_EE, Grant_EW, Grant_ES, Grant_EL: std_logic; signal Grant_WN, Grant_WE, Grant_WW, Grant_WS, Grant_WL: std_logic; signal Grant_SN, Grant_SE, Grant_SW, Grant_SS, Grant_SL: std_logic; signal Grant_LN, Grant_LE, Grant_LW, Grant_LS, Grant_LL: std_logic; signal Req_NN, Req_EN, Req_WN, Req_SN, Req_LN: std_logic; signal Req_NE, Req_EE, Req_WE, Req_SE, Req_LE: std_logic; signal Req_NW, Req_EW, Req_WW, Req_SW, Req_LW: std_logic; signal Req_NS, Req_ES, Req_WS, Req_SS, Req_LS: std_logic; signal Req_NL, Req_EL, Req_WL, Req_SL, Req_LL: std_logic; signal empty_N, empty_E, empty_W, empty_S, empty_L: std_logic; signal Xbar_sel_N, Xbar_sel_E, Xbar_sel_W, Xbar_sel_S, Xbar_sel_L: std_logic_vector(4 downto 0); begin -- all the parity_checkers PC_N: parity_checker_packet_detector generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP(reset => reset, clk => clk, RX => RX_N, valid_in =>valid_in_N, faulty_packet => faulty_packet_N , healthy_packet => healthy_packet_N); PC_E: parity_checker_packet_detector generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP(reset => reset, clk => clk, RX => RX_E, valid_in =>valid_in_E, faulty_packet => faulty_packet_E , healthy_packet => healthy_packet_E); PC_W: parity_checker_packet_detector generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP(reset => reset, clk => clk, RX => RX_W, valid_in =>valid_in_W, faulty_packet => faulty_packet_W , healthy_packet => healthy_packet_W); PC_S: parity_checker_packet_detector generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP(reset => reset, clk => clk, RX => RX_S, valid_in =>valid_in_S, faulty_packet => faulty_packet_S , healthy_packet => healthy_packet_S); PC_L: parity_checker_packet_detector generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP(reset => reset, clk => clk, RX => RX_L, valid_in =>valid_in_L, faulty_packet => faulty_packet_L , healthy_packet => healthy_packet_L); -- all the FIFOs FIFO_N: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_N, valid_in => valid_in_N, read_en_N => '0', read_en_E =>Grant_EN, read_en_W =>Grant_WN, read_en_S =>Grant_SN, read_en_L =>Grant_LN, credit_out => credit_out_N, empty_out => empty_N, Data_out => FIFO_D_out_N); FIFO_E: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_E, valid_in => valid_in_E, read_en_N => Grant_NE, read_en_E =>'0', read_en_W =>Grant_WE, read_en_S =>Grant_SE, read_en_L =>Grant_LE, credit_out => credit_out_E, empty_out => empty_E, Data_out => FIFO_D_out_E); FIFO_W: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_W, valid_in => valid_in_W, read_en_N => Grant_NW, read_en_E =>Grant_EW, read_en_W =>'0', read_en_S =>Grant_SW, read_en_L =>Grant_LW, credit_out => credit_out_W, empty_out => empty_W, Data_out => FIFO_D_out_W); FIFO_S: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_S, valid_in => valid_in_S, read_en_N => Grant_NS, read_en_E =>Grant_ES, read_en_W =>Grant_WS, read_en_S =>'0', read_en_L =>Grant_LS, credit_out => credit_out_S, empty_out => empty_S, Data_out => FIFO_D_out_S); FIFO_L: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_L, valid_in => valid_in_L, read_en_N => Grant_NL, read_en_E =>Grant_EL, read_en_W =>Grant_WL, read_en_S => Grant_SL, read_en_L =>'0', credit_out => credit_out_L, empty_out => empty_L, Data_out => FIFO_D_out_L); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the LBDRs LBDR_N: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_N, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_N(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_N(NoC_size downto 1) , grant_N => '0', grant_E =>Grant_EN, grant_W => Grant_WN, grant_S=>Grant_SN, grant_L =>Grant_LN, Req_N=> Req_NN, Req_E=>Req_NE, Req_W=>Req_NW, Req_S=>Req_NS, Req_L=>Req_NL); LBDR_E: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_E, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_E(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_E(NoC_size downto 1) , grant_N => Grant_NE, grant_E =>'0', grant_W => Grant_WE, grant_S=>Grant_SE, grant_L =>Grant_LE, Req_N=> Req_EN, Req_E=>Req_EE, Req_W=>Req_EW, Req_S=>Req_ES, Req_L=>Req_EL); LBDR_W: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_W, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_W(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_W(NoC_size downto 1) , grant_N => Grant_NW, grant_E =>Grant_EW, grant_W =>'0' ,grant_S=>Grant_SW, grant_L =>Grant_LW, Req_N=> Req_WN, Req_E=>Req_WE, Req_W=>Req_WW, Req_S=>Req_WS, Req_L=>Req_WL); LBDR_S: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_S, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_S(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_S(NoC_size downto 1) , grant_N => Grant_NS, grant_E =>Grant_ES, grant_W =>Grant_WS ,grant_S=>'0', grant_L =>Grant_LS, Req_N=> Req_SN, Req_E=>Req_SE, Req_W=>Req_SW, Req_S=>Req_SS, Req_L=>Req_SL); LBDR_L: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_L, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_L(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_L(NoC_size downto 1) , grant_N => Grant_NL, grant_E =>Grant_EL, grant_W => Grant_WL,grant_S=>Grant_SL, grant_L =>'0', Req_N=> Req_LN, Req_E=>Req_LE, Req_W=>Req_LW, Req_S=>Req_LS, Req_L=>Req_LL); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- switch allocator allocator_unit: allocator port map ( reset => reset, clk => clk, -- flow control credit_in_N => credit_in_N, credit_in_E => credit_in_E, credit_in_W => credit_in_W, credit_in_S => credit_in_S, credit_in_L => credit_in_L, -- requests from the LBDRS req_N_N => '0', req_N_E => Req_NE, req_N_W => Req_NW, req_N_S => Req_NS, req_N_L => Req_NL, req_E_N => Req_EN, req_E_E => '0', req_E_W => Req_EW, req_E_S => Req_ES, req_E_L => Req_EL, req_W_N => Req_WN, req_W_E => Req_WE, req_W_W => '0', req_W_S => Req_WS, req_W_L => Req_WL, req_S_N => Req_SN, req_S_E => Req_SE, req_S_W => Req_SW, req_S_S => '0', req_S_L => Req_SL, req_L_N => Req_LN, req_L_E => Req_LE, req_L_W => Req_LW, req_L_S => Req_LS, req_L_L => '0', empty_N => empty_N, empty_E => empty_E, empty_w => empty_W, empty_S => empty_S, empty_L => empty_L, valid_N => valid_out_N, valid_E => valid_out_E, valid_W => valid_out_W, valid_S => valid_out_S, valid_L => valid_out_L, -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! grant_N_N => Grant_NN, grant_N_E => Grant_NE, grant_N_W => Grant_NW, grant_N_S => Grant_NS, grant_N_L => Grant_NL, grant_E_N => Grant_EN, grant_E_E => Grant_EE, grant_E_W => Grant_EW, grant_E_S => Grant_ES, grant_E_L => Grant_EL, grant_W_N => Grant_WN, grant_W_E => Grant_WE, grant_W_W => Grant_WW, grant_W_S => Grant_WS, grant_W_L => Grant_WL, grant_S_N => Grant_SN, grant_S_E => Grant_SE, grant_S_W => Grant_SW, grant_S_S => Grant_SS, grant_S_L => Grant_SL, grant_L_N => Grant_LN, grant_L_E => Grant_LE, grant_L_W => Grant_LW, grant_L_S => Grant_LS, grant_L_L => Grant_LL ); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Xbar select_signals Xbar_sel_N <= '0' & Grant_NE & Grant_NW & Grant_NS & Grant_NL; Xbar_sel_E <= Grant_EN & '0' & Grant_EW & Grant_ES & Grant_EL; Xbar_sel_W <= Grant_WN & Grant_WE & '0' & Grant_WS & Grant_WL; Xbar_sel_S <= Grant_SN & Grant_SE & Grant_SW & '0' & Grant_SL; Xbar_sel_L <= Grant_LN & Grant_LE & Grant_LW & Grant_LS & '0'; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Xbars XBAR_N: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_N, Data_out=> TX_N); XBAR_E: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_E, Data_out=> TX_E); XBAR_W: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_W, Data_out=> TX_W); XBAR_S: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_S, Data_out=> TX_S); XBAR_L: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_L, Data_out=> TX_L); end;
gpl-3.0
e558dac6c0f344e886b18899eb1963dc
0.536806
2.990254
false
false
false
false
Wynjones1/gbvhdl
testing/cpu_tb.vhd
1
775
library IEEE; use IEEE.numeric_std.all; use IEEE.std_logic_1164.all; use std.textio.all; use work.types.all; entity cpu_tb is end; architecture rtl of cpu_tb is component cpu is port(clk : in std_logic; reset : in std_logic); end component; signal clk : std_logic := '0'; signal reset : std_logic := '1'; begin reset_gen : process begin reset <= '1'; wait for 40 ns; reset <= '0'; wait; end process; clk_gen: process begin if clk = '1' then clk <= '0'; wait for 10 ns; else clk <= '1'; wait for 10 ns; end if; end process; cpu_0 : cpu port map (clk, reset); end rtl;
mit
1e68ac90e4ac32245cdd47194eebc74f
0.498065
3.555046
false
false
false
false
ashtonchase/logic_analyzer
target_hardware/ZedBoard/zed_top_uart_test.vhd
1
10,973
------------------------------------------------------------------------------- -- Title : Zybo Board Top Level -- Project : fpga_logic_analyzer ------------------------------------------------------------------------------- -- File : zybo_top_capture_cotnrol_test.vhd -- Created : 2016-02-22 -- Last update: 2016-03-25 -- Standard : VHDL'08 ------------------------------------------------------------------------------- -- Description: Xilinx Zynq 7000 on a Digilent Zybo Board Top Level Module, ------------------------------------------------------------------------------- -- Copyright (c) 2016 Ashton Johnson, Paul Henny, Ian Swepston, David Hurt ------------------------------------------------------------------------------- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program 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 General Public License for more details. -- -- You should have received a copy of the GNU General Public License along -- with this program; if not, write to the Free Software Foundation, Inc., -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ------------------------------------------------------------------------------- -- Revisions : -- Date Version Author Description -- 2016-02-22 1.0 ashton Created ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity zed_uart_top is port ( --Clock Source GCLK : in std_logic; -- 100 MHz clock --LED Outputs LD0, LD1, LD2, LD3, LD4, LD5, LD6, LD7 : out std_logic; --Buttons BTNC, BTND, BTNL, BTNR, BTNU : in std_logic; --Temporary Data Ouput (JA10-JA7, JA4-JA1) JA10, JA9, JA8, JA7, JA4, JA3, JA2, JA1 : out std_logic; --UART SIGNALS JB4 : in std_logic := 'H'; --RX JB1 : out std_logic; --TX --Switches SW7, SW6, SW5, SW4, SW3, SW2, SW1, SW0 : in std_logic --Fixed Zync Signals --DDR_addr : INOUT STD_LOGIC_VECTOR (14 DOWNTO 0); --DDR_ba : INOUT STD_LOGIC_VECTOR (2 DOWNTO 0); --DDR_cas_n : INOUT STD_LOGIC; --DDR_ck_n : INOUT STD_LOGIC; --DDR_ck_p : INOUT STD_LOGIC; --DDR_cke : INOUT STD_LOGIC; --DDR_cs_n : INOUT STD_LOGIC; --DDR_dm : INOUT STD_LOGIC_VECTOR (3 DOWNTO 0); --DDR_dq : INOUT STD_LOGIC_VECTOR (31 DOWNTO 0); --DDR_dqs_n : INOUT STD_LOGIC_VECTOR (3 DOWNTO 0); --DDR_dqs_p : INOUT STD_LOGIC_VECTOR (3 DOWNTO 0); --DDR_odt : INOUT STD_LOGIC; --DDR_ras_n : INOUT STD_LOGIC; --DDR_reset_n : INOUT STD_LOGIC; --DDR_we_n : INOUT STD_LOGIC; --FIXED_IO_ddr_vrn : INOUT STD_LOGIC; --FIXED_IO_ddr_vrp : INOUT STD_LOGIC; --FIXED_IO_mio : INOUT STD_LOGIC_VECTOR (53 DOWNTO 0); --FIXED_IO_ps_clk : INOUT STD_LOGIC; --FIXED_IO_ps_porb : INOUT STD_LOGIC; --FIXED_IO_ps_srstb : INOUT STD_LOGIC; ); end entity zed_uart_top; architecture top of zed_uart_top is ----------------------------------------------------------------------------- -- Components ----------------------------------------------------------------------------- component Zynq_BD_wrapper is port ( DDR_addr : inout std_logic_vector (14 downto 0); DDR_ba : inout std_logic_vector (2 downto 0); DDR_cas_n : inout std_logic; DDR_ck_n : inout std_logic; DDR_ck_p : inout std_logic; DDR_cke : inout std_logic; DDR_cs_n : inout std_logic; DDR_dm : inout std_logic_vector (3 downto 0); DDR_dq : inout std_logic_vector (31 downto 0); DDR_dqs_n : inout std_logic_vector (3 downto 0); DDR_dqs_p : inout std_logic_vector (3 downto 0); DDR_odt : inout std_logic; DDR_ras_n : inout std_logic; DDR_reset_n : inout std_logic; DDR_we_n : inout std_logic; FIXED_IO_ddr_vrn : inout std_logic; FIXED_IO_ddr_vrp : inout std_logic; FIXED_IO_mio : inout std_logic_vector (53 downto 0); FIXED_IO_ps_clk : inout std_logic; FIXED_IO_ps_porb : inout std_logic; FIXED_IO_ps_srstb : inout std_logic; UART_rxd : in std_logic; UART_txd : out std_logic ); end component; ----------------------------------------------------------------------------- -- Constants ----------------------------------------------------------------------------- constant DATA_WIDTH : positive := 32; ----------------------------------------------------------------------------- -- Signals ----------------------------------------------------------------------------- signal reset, reset_clk_gen : std_logic := '1'; -- reset (async high, sync low) signal run_clk : std_logic := '0'; -- clock output of the clocking wizard signal clk_locked : std_logic := '0'; -- indicator if the clocking wizard has locked signal din : std_logic_vector(DATA_WIDTH-1 downto 0); signal armed : std_logic; signal triggered : std_logic; signal rst_cmd : std_logic := '0'; signal arm_cmd : std_logic; signal sample_enable : std_logic := '1'; signal sample_cnt_rst : std_logic; signal delay_cnt_4x : std_logic_vector(16-1 downto 0) := (others => '0'); signal read_cnt_4x : std_logic_vector(16-1 downto 0) := std_logic_vector(to_unsigned(1000, 16)); signal par_trig_msk : std_logic_vector(32-1 downto 0) := X"00_00_00_03"; signal par_trig_val : std_logic_vector(32-1 downto 0) := (others => '1'); signal capture_rdy : std_logic; signal in_fifo_tdata : std_logic_vector(31 downto 0); signal in_fifo_tvalid : std_logic; signal in_fifo_tlast : std_logic; signal in_fifo_tready : std_logic; signal in_fifo_tfull : std_logic; signal in_fifo_tempty : std_logic; signal in_fifo_tflush : std_logic; -- signal out_fifo_tdata : std_logic_vector(7 downto 0); signal out_fifo_tvalid : std_logic; signal out_fifo_tlast : std_logic; signal out_fifo_tready : std_logic; -- signal rx_get_more_data : std_logic; signal rx_data_ready : std_logic; signal rx : std_logic; signal tx_data_sent : std_logic; ----------------------------------------------------------------------------- -- Aliases ----------------------------------------------------------------------------- alias reset_btn : std_logic is BTND; alias CLK : std_logic is GCLK; alias UART_RX : std_logic is JB4; alias UART_TX : std_logic is JB1; begin -- ARCHITECTURE top LD7 <= out_fifo_tdata(7); LD6<= out_fifo_tdata(6); LD5<= out_fifo_tdata(5); LD4<= out_fifo_tdata(4); LD3<= out_fifo_tdata(3); LD2<= out_fifo_tdata(2); LD1<= out_fifo_tdata(1); LD0<= out_fifo_tdata(0); --LED to indicate that the clock is locked uart_comms_test_blk : entity work.uart_comms generic map ( baud_rate => 115_200, clock_freq => 10_000_000) port map ( clk => run_clk, rst => reset_clk_gen, rx_get_more_data => '1', rx => UART_RX, tx_data_ready => BTNU, tx => UART_TX, data_in => SW7& SW6& SW5& SW4& SW3& SW2& SW1& SW0, data_out =>out_fifo_tdata); ----------------------------------------------------------------------------- -- Component Instatiations ----------------------------------------------------------------------------- -- purpose: this component will generate the desired system clock based on -- the 125 MHz input clock. Not the output is already downstream of a global -- clock buffer -- inputs : clk, reset -- outputs: clk_locked run_clk_component : entity work.clock_gen port map ( -- Clock in ports clk_in1 => clk, -- Clock out ports clk_out1 => run_clk, -- Status and control signals reset => reset_clk_gen, locked => clk_locked ); -- purpose: this process will reset the system when btn0 is pressed -- type : combinational -- inputs : reset_btn, clk, clk_locked -- outputs: reset run_clk_reset_proc : process (reset_btn, run_clk) is variable reset_dly_v : std_logic; begin -- PROCESS reset_proc if reset_btn = '1' then reset <= '1'; reset_dly_v := '1'; elsif rising_edge(run_clk) then if clk_locked = '1' then reset <= reset_dly_v; reset_dly_v := '0'; else reset <= '1'; reset_dly_v := '1'; end if; end if; end process run_clk_reset_proc; reset_proc : process (reset_btn, clk) is variable reset_dly_v : std_logic; begin -- PROCESS reset_proc if reset_btn = '1' then reset_clk_gen <= '1'; elsif rising_edge(clk) then reset_clk_gen <= reset_dly_v; reset_dly_v := '0'; end if; end process reset_proc; --zynq : ENTITY work.Zynq_BD_wrapper -- PORT MAP ( -- DDR_addr => DDR_addr, -- DDR_ba => DDR_ba, -- DDR_cas_n => DDR_cas_n, -- DDR_ck_n => DDR_ck_n, -- DDR_ck_p => DDR_ck_p, -- DDR_cke => DDR_cke, -- DDR_cs_n => DDR_cs_n, -- DDR_dm => DDR_dm, -- DDR_dq => DDR_dq, -- DDR_dqs_n => DDR_dqs_n, -- DDR_dqs_p => DDR_dqs_p, -- DDR_odt => DDR_odt, -- DDR_ras_n => DDR_ras_n, -- DDR_reset_n => DDR_reset_n, -- DDR_we_n => DDR_we_n, -- FIXED_IO_ddr_vrn => FIXED_IO_ddr_vrn, -- FIXED_IO_ddr_vrp => FIXED_IO_ddr_vrp, -- FIXED_IO_mio => FIXED_IO_mio, -- FIXED_IO_ps_clk => FIXED_IO_ps_clk, -- FIXED_IO_ps_porb => FIXED_IO_ps_porb, -- FIXED_IO_ps_srstb => FIXED_IO_ps_srstb, -- UART_rxd => UART_rxd, -- UART_txd => UART_txd); end architecture top;
gpl-2.0
8322fcef00c0b8bb9680ffd4d73af0da
0.473799
3.74889
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/IJTAG_files/immortal_slack_monitor_instrument.vhd
3
6,301
--Copyright (C) 2017 Konstantin Shibin ------------------------------------------------------------ -- File name: immortal_slack_monitor_instrument.vhd ------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; USE ieee.numeric_std.ALL; entity immortal_slack_monitor_instrument is port ( -- IJTAG connection TCK : in std_logic; RST : in std_logic; SEL : in std_logic; SI : in std_logic; SE : in std_logic; UE : in std_logic; CE : in std_logic; SO : out std_logic; toF : out std_logic; toC : out std_logic; -- Monitor connections control : out std_logic_vector(2 downto 0); data : in std_logic_vector(31 downto 0) ); end immortal_slack_monitor_instrument; architecture rtl of immortal_slack_monitor_instrument is component SReg is Generic ( Size : positive := 32); Port ( -- Scan Interface scan_client ---------- SI : in STD_LOGIC; -- ScanInPort SO : out STD_LOGIC; -- ScanOutPort SEL : in STD_LOGIC; -- SelectPort ---------------------------------------- SE : in STD_LOGIC; -- ShiftEnPort CE : in STD_LOGIC; -- CaptureEnPort UE : in STD_LOGIC; -- UpdateEnPort RST : in STD_LOGIC; -- ResetPort TCK : in STD_LOGIC; -- TCKPort DI : in STD_LOGIC_VECTOR (Size-1 downto 0); --DataInPort DO : out STD_LOGIC_VECTOR (Size-1 downto 0)); --DataOutPort end component; signal update_strobe : std_logic; signal shiftreg_update : std_logic_vector (31 downto 0); signal threshold_H : std_logic_vector (4 downto 0); signal threshold_L : std_logic_vector (4 downto 0); signal monitor_controls : std_logic_vector (2 downto 0); signal threshold_compare_dir : std_logic; signal f_output_enable : std_logic; signal threshold_H_active : std_logic; signal threshold_L_active : std_logic; signal threshold_H_GT : std_logic; signal threshold_H_LE : std_logic; signal threshold_L_GT : std_logic; signal threshold_L_LE : std_logic; signal data_sync, data_sync_first : std_logic_vector (31 downto 0); signal xored_edges : std_logic_vector (30 downto 0); signal edge_loc_binary : std_logic_vector (4 downto 0); signal UE_prev : std_logic; function one_hot_to_binary (onehot : std_logic_vector; size : natural) return std_logic_vector is variable binary_vector : std_logic_vector (size-1 downto 0); begin binary_vector := (others => '0'); for i in onehot'range loop if onehot(i) = '1' then binary_vector := std_logic_vector(to_unsigned(i, size)); end if ; end loop; return binary_vector; end function; begin -- Shift register for capturing data from monitor and updating control and compare threshold shiftreg : SReg Generic map ( Size => 32) Port map ( -- Scan Interface scan_client ---------- SI => SI, -- Input Port SI = SI SO => SO, SEL => SEL, SE => SE, CE => CE, UE => UE, RST => RST, TCK => TCK, DI => data_sync, DO => shiftreg_update); -- shiftreg_update description: -- [4:0] threshold H -- [9:5] threshold L -- [10] threshold comparison direction: 0: slack >= threshold; 1: slack < threshold -- [11] F flag output enabled -- [12] threshold value update enable -- [30:28] control signals -- [31] control signals update enable synchronizer_data : process(TCK,RST) begin if RST = '1' then data_sync_first <= (others => '0'); data_sync <= (others => '0'); elsif TCK'event and TCK = '1' then data_sync_first <= data; data_sync <= data_sync_first; end if ; end process ; -- synchronizer update_strobes: process(TCK) begin if TCK'event and TCK = '0' then UE_prev <= UE; update_strobe <= not UE_prev and UE and SEL; end if; end process; threshold_controls_set: process(TCK, RST) begin if RST = '1' then threshold_H <= (others => '0'); threshold_L <= (others => '0'); threshold_compare_dir <= '0'; f_output_enable <= '0'; monitor_controls <= (others => '0'); elsif TCK'event and TCK = '0' then if update_strobe = '1' then if shiftreg_update(12) = '1' then -- update thresholds only when bit 12 allows it threshold_H <= shiftreg_update(4 downto 0); threshold_L <= shiftreg_update(9 downto 5); threshold_compare_dir <= shiftreg_update(10); f_output_enable <= shiftreg_update(11); end if; if shiftreg_update(31) = '1' then -- update controls only when bit 31 allows it monitor_controls <= shiftreg_update(30 downto 28); end if; end if; end if; end process; control <= monitor_controls; xor_edge_detector: for i in 0 to 30 generate xored_edges(i) <= data_sync(i) xnor data_sync(i+1); end generate; edge_loc_binary <= one_hot_to_binary(xored_edges, edge_loc_binary'length); threshold_H_GT <= '1' when (to_integer(unsigned(threshold_H)) > to_integer(unsigned(edge_loc_binary))) else '0'; threshold_H_LE <= '1' when (to_integer(unsigned(threshold_H)) <= to_integer(unsigned(edge_loc_binary))) else '0'; threshold_L_GT <= '1' when (to_integer(unsigned(threshold_L)) > to_integer(unsigned(edge_loc_binary))) else '0'; threshold_L_LE <= '1' when (to_integer(unsigned(threshold_L)) <= to_integer(unsigned(edge_loc_binary))) else '0'; threshold_H_active <= (threshold_H_GT and threshold_compare_dir) or (threshold_H_LE and not threshold_compare_dir); threshold_L_active <= (threshold_L_GT and threshold_compare_dir) or (threshold_L_LE and not threshold_compare_dir); toF <= (threshold_H_active or threshold_L_active) and f_output_enable; toC <= not (threshold_H_active and f_output_enable); end;
gpl-3.0
9056c545dbe4a43b9194572ea3dc1d14
0.566101
3.676196
false
false
false
false
AndyMcC0/UVVM_All
bitvis_vip_spi/src/vvc_methods_pkg.vhd
1
22,971
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_vvc_framework_support_pkg.all; use work.spi_bfm_pkg.all; use work.vvc_cmd_pkg.all; use work.td_vvc_framework_common_methods_pkg.all; use work.td_target_support_pkg.all; --================================================================================================= --================================================================================================= --================================================================================================= package vvc_methods_pkg is --=============================================================================================== -- Types and constants for the SPI VVC --=============================================================================================== constant C_VVC_NAME : string := "SPI_VVC"; signal SPI_VVCT : t_vvc_target_record := set_vvc_target_defaults(C_VVC_NAME); alias THIS_VVCT : t_vvc_target_record is SPI_VVCT; alias t_bfm_config is t_spi_bfm_config; constant C_SPI_INTER_BFM_DELAY_DEFAULT : t_inter_bfm_delay := ( delay_type => NO_DELAY, delay_in_time => 0 ns, inter_bfm_delay_violation_severity => WARNING ); type t_vvc_config is record inter_bfm_delay : t_inter_bfm_delay; -- Minimum delay between BFM accesses from the VVC. If parameter delay_type is set to NO_DELAY, BFM accesses will be back to back, i.e. no delay. cmd_queue_count_max : natural; -- Maximum pending number in command queue before queue is full. Adding additional commands will result in an ERROR. cmd_queue_count_threshold : natural; -- An alert with severity 'cmd_queue_count_threshold_severity' will be issued if command queue exceeds this count. Used for early warning if command queue is almost full. Will be ignored if set to 0. cmd_queue_count_threshold_severity : t_alert_level; -- Severity of alert to be initiated if exceeding cmd_queue_count_threshold result_queue_count_max : natural; -- Maximum number of unfetched results before result_queue is full. result_queue_count_threshold_severity : t_alert_level; -- An alert with severity 'result_queue_count_threshold_severity' will be issued if command queue exceeds this count. Used for early warning if result queue is almost full. Will be ignored if set to 0. result_queue_count_threshold : natural; -- Severity of alert to be initiated if exceeding result_queue_count_threshold bfm_config : t_spi_bfm_config; -- Configuration for the BFM. See BFM quick reference msg_id_panel : t_msg_id_panel; -- VVC dedicated message ID panel end record; type t_vvc_config_array is array (natural range <>) of t_vvc_config; constant C_SPI_VVC_CONFIG_DEFAULT : t_vvc_config := ( inter_bfm_delay => C_SPI_INTER_BFM_DELAY_DEFAULT, cmd_queue_count_max => C_CMD_QUEUE_COUNT_MAX, cmd_queue_count_threshold_severity => C_CMD_QUEUE_COUNT_THRESHOLD_SEVERITY, cmd_queue_count_threshold => C_CMD_QUEUE_COUNT_THRESHOLD, result_queue_count_max => C_RESULT_QUEUE_COUNT_MAX, result_queue_count_threshold_severity => C_RESULT_QUEUE_COUNT_THRESHOLD_SEVERITY, result_queue_count_threshold => C_RESULT_QUEUE_COUNT_THRESHOLD, bfm_config => C_SPI_BFM_CONFIG_DEFAULT, msg_id_panel => C_VVC_MSG_ID_PANEL_DEFAULT ); type t_vvc_status is record current_cmd_idx : natural; previous_cmd_idx : natural; pending_cmd_cnt : natural; end record; type t_vvc_status_array is array (natural range <>) of t_vvc_status; constant C_VVC_STATUS_DEFAULT : t_vvc_status := ( current_cmd_idx => 0, previous_cmd_idx => 0, pending_cmd_cnt => 0 ); -- Transaction information for the wave view during simulation type t_transaction_info is record operation : t_operation; msg : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); tx_data : std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0); rx_data : std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0); data_exp : std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0); end record; type t_transaction_info_array is array (natural range <>) of t_transaction_info; constant C_TRANSACTION_INFO_DEFAULT : t_transaction_info := ( tx_data => (others => '0'), rx_data => (others => '0'), data_exp => (others => '0'), operation => NO_OPERATION, msg => (others => ' ') ); shared variable shared_spi_vvc_config : t_vvc_config_array(0 to C_MAX_VVC_INSTANCE_NUM) := (others => C_SPI_VVC_CONFIG_DEFAULT); shared variable shared_spi_vvc_status : t_vvc_status_array(0 to C_MAX_VVC_INSTANCE_NUM) := (others => C_VVC_STATUS_DEFAULT); shared variable shared_spi_transaction_info : t_transaction_info_array(0 to C_MAX_VVC_INSTANCE_NUM) := (others => C_TRANSACTION_INFO_DEFAULT); --============================================================================== -- Methods dedicated to this VVC -- - These procedures are called from the testbench in order to queue BFM calls -- in the VVC command queue. The VVC will store and forward these calls to the -- SPI BFM when the command is at the from of the VVC command queue. -- - For details on how the BFM procedures work, see spi_bfm_pkg.vhd or the -- quickref. --============================================================================== ---------------------------------------------------------- -- SPI_MASTER ---------------------------------------------------------- -- Single-byte procedure spi_master_transmit_and_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ); procedure spi_master_transmit_and_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant data_exp : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := ERROR ); procedure spi_master_transmit_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ); procedure spi_master_receive_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant msg : in string ); procedure spi_master_check_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_exp : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := ERROR ); ---------------------------------------------------------- -- SPI_SLAVE ---------------------------------------------------------- procedure spi_slave_transmit_and_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ); procedure spi_slave_transmit_and_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant data_exp : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := ERROR ); procedure spi_slave_transmit_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ); procedure spi_slave_receive_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant msg : in string ); procedure spi_slave_check_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := ERROR ); end package vvc_methods_pkg; package body vvc_methods_pkg is --============================================================================== -- Methods dedicated to this VVC -- Notes: -- - shared_vvc_cmd is initialised to C_VVC_CMD_DEFAULT, and also reset to this after every command --============================================================================== ---------------------------------------------------------- -- SPI_MASTER ---------------------------------------------------------- procedure spi_master_transmit_and_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_normalised_data : std_logic_vector(shared_vvc_cmd.data'length-1 downto 0) := normalize_and_check(data, shared_vvc_cmd.data, ALLOW_WIDER_NARROWER, "data", "shared_vvc_cmd.data", proc_call & " called with to wide data. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_TRANSMIT_AND_RECEIVE); shared_vvc_cmd.data(data'length-1 downto 0) := v_normalised_data; send_command_to_vvc(VVCT); end procedure; procedure spi_master_transmit_and_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant data_exp : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := ERROR ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_normalised_data : std_logic_vector(shared_vvc_cmd.data'length-1 downto 0) := normalize_and_check(data, shared_vvc_cmd.data, ALLOW_WIDER_NARROWER, "data", "shared_vvc_cmd.data", proc_call & " called with to wide data. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_TRANSMIT_AND_CHECK); shared_vvc_cmd.data := v_normalised_data; shared_vvc_cmd.data_exp(data_exp'length-1 downto 0) := data_exp; shared_vvc_cmd.alert_level := alert_level; send_command_to_vvc(VVCT); end procedure; procedure spi_master_transmit_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_normalised_data : std_logic_vector(shared_vvc_cmd.data'length-1 downto 0) := normalize_and_check(data, shared_vvc_cmd.data, ALLOW_WIDER_NARROWER, "data", "shared_vvc_cmd.data", proc_call & " called with to wide data. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; -- Locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_TRANSMIT_ONLY); shared_vvc_cmd.data := v_normalised_data; send_command_to_vvc(VVCT); end procedure; procedure spi_master_receive_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; -- Locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_RECEIVE_ONLY); send_command_to_vvc(VVCT); end procedure; procedure spi_master_check_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_exp : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := ERROR ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_CHECK_ONLY); shared_vvc_cmd.data_exp(data_exp'length-1 downto 0) := data_exp; shared_vvc_cmd.alert_level := alert_level; send_command_to_vvc(VVCT); end procedure; ---------------------------------------------------------- -- SPI_SLAVE ---------------------------------------------------------- procedure spi_slave_transmit_and_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_normalised_data : std_logic_vector(shared_vvc_cmd.data'length-1 downto 0) := normalize_and_check(data, shared_vvc_cmd.data, ALLOW_WIDER_NARROWER, "data", "shared_vvc_cmd.data", proc_call & " called with to wide data. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, SLAVE_TRANSMIT_AND_RECEIVE); shared_vvc_cmd.data(data'length-1 downto 0) := v_normalised_data; send_command_to_vvc(VVCT); end procedure; procedure spi_slave_transmit_and_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant data_exp : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := ERROR ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_normalised_data : std_logic_vector(shared_vvc_cmd.data'length-1 downto 0) := normalize_and_check(data, shared_vvc_cmd.data, ALLOW_WIDER_NARROWER, "data", "shared_vvc_cmd.data", proc_call & " called with to wide data. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, SLAVE_TRANSMIT_AND_CHECK); shared_vvc_cmd.data := v_normalised_data; shared_vvc_cmd.data_exp(data_exp'length-1 downto 0) := data_exp; send_command_to_vvc(VVCT); end procedure; procedure spi_slave_transmit_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_normalised_data : std_logic_vector(shared_vvc_cmd.data'length-1 downto 0) := normalize_and_check(data, shared_vvc_cmd.data, ALLOW_WIDER_NARROWER, "data", "shared_vvc_cmd.data", proc_call & " called with to wide data. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, SLAVE_TRANSMIT_ONLY); shared_vvc_cmd.data := v_normalised_data; send_command_to_vvc(VVCT); end procedure; procedure spi_slave_receive_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, SLAVE_RECEIVE_ONLY); send_command_to_vvc(VVCT); end procedure; procedure spi_slave_check_only( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := ERROR ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record shared_vvc_cmd := C_VVC_CMD_DEFAULT; set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, SLAVE_CHECK_ONLY); -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC shared_vvc_cmd.data_exp(data'length-1 downto 0) := data; shared_vvc_cmd.alert_level := alert_level; send_command_to_vvc(VVCT); end procedure; end package body vvc_methods_pkg;
mit
1b50f2995c4028a3f916d8d9f8ee4748
0.59475
4.030707
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/Router_32_bit_credit_based.vhd
3
14,588
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; --use IEEE.STD_LOGIC_ARITH.ALL; --use IEEE.STD_LOGIC_UNSIGNED.ALL; entity router_credit_based is generic ( DATA_WIDTH: integer := 32; current_address : integer := 0; Cx_rst : integer := 10; NoC_size: integer := 4 ); port ( reset, clk: in std_logic; Rxy_reconf: in std_logic_vector(7 downto 0); Reconfig : in std_logic; RX_N, RX_E, RX_W, RX_S, RX_L : in std_logic_vector (DATA_WIDTH-1 downto 0); credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; valid_in_N, valid_in_E, valid_in_W, valid_in_S, valid_in_L : in std_logic; valid_out_N, valid_out_E, valid_out_W, valid_out_S, valid_out_L : out std_logic; credit_out_N, credit_out_E, credit_out_W, credit_out_S, credit_out_L: out std_logic; TX_N, TX_E, TX_W, TX_S, TX_L: out std_logic_vector (DATA_WIDTH-1 downto 0) ); end router_credit_based; architecture behavior of router_credit_based is COMPONENT FIFO_credit_based generic ( DATA_WIDTH: integer := 32 ); port ( reset: in std_logic; clk: in std_logic; RX: in std_logic_vector(DATA_WIDTH-1 downto 0); valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; credit_out: out std_logic; empty_out: out std_logic; Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0) ); end COMPONENT; COMPONENT allocator is port ( reset: in std_logic; clk: in std_logic; -- flow control credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; req_N_N, req_N_E, req_N_W, req_N_S, req_N_L: in std_logic; req_E_N, req_E_E, req_E_W, req_E_S, req_E_L: in std_logic; req_W_N, req_W_E, req_W_W, req_W_S, req_W_L: in std_logic; req_S_N, req_S_E, req_S_W, req_S_S, req_S_L: in std_logic; req_L_N, req_L_E, req_L_W, req_L_S, req_L_L: in std_logic; empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! valid_N, valid_E, valid_W, valid_S, valid_L : out std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: out std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: out std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: out std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: out std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: out std_logic ); end COMPONENT; COMPONENT LBDR is generic ( cur_addr_rst: integer := 0; Cx_rst: integer := 8; NoC_size: integer := 4 ); port ( reset: in std_logic; clk: in std_logic; Rxy_reconf: in std_logic_vector(7 downto 0); Reconfig : in std_logic; empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N, Req_E, Req_W, Req_S, Req_L:out std_logic ); end COMPONENT; COMPONENT XBAR is generic ( DATA_WIDTH: integer := 32 ); port ( North_in: in std_logic_vector(DATA_WIDTH-1 downto 0); East_in: in std_logic_vector(DATA_WIDTH-1 downto 0); West_in: in std_logic_vector(DATA_WIDTH-1 downto 0); South_in: in std_logic_vector(DATA_WIDTH-1 downto 0); Local_in: in std_logic_vector(DATA_WIDTH-1 downto 0); sel: in std_logic_vector (4 downto 0); Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0) ); end COMPONENT; signal FIFO_D_out_N, FIFO_D_out_E, FIFO_D_out_W, FIFO_D_out_S, FIFO_D_out_L: std_logic_vector(DATA_WIDTH-1 downto 0); -- Grant_XY : Grant signal generated from Arbiter for output X connected to FIFO of input Y signal Grant_NN, Grant_NE, Grant_NW, Grant_NS, Grant_NL: std_logic; signal Grant_EN, Grant_EE, Grant_EW, Grant_ES, Grant_EL: std_logic; signal Grant_WN, Grant_WE, Grant_WW, Grant_WS, Grant_WL: std_logic; signal Grant_SN, Grant_SE, Grant_SW, Grant_SS, Grant_SL: std_logic; signal Grant_LN, Grant_LE, Grant_LW, Grant_LS, Grant_LL: std_logic; signal Req_NN, Req_EN, Req_WN, Req_SN, Req_LN: std_logic; signal Req_NE, Req_EE, Req_WE, Req_SE, Req_LE: std_logic; signal Req_NW, Req_EW, Req_WW, Req_SW, Req_LW: std_logic; signal Req_NS, Req_ES, Req_WS, Req_SS, Req_LS: std_logic; signal Req_NL, Req_EL, Req_WL, Req_SL, Req_LL: std_logic; signal empty_N, empty_E, empty_W, empty_S, empty_L: std_logic; signal Xbar_sel_N, Xbar_sel_E, Xbar_sel_W, Xbar_sel_S, Xbar_sel_L: std_logic_vector(4 downto 0); begin -- all the FIFOs FIFO_N: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_N, valid_in => valid_in_N, read_en_N => '0', read_en_E =>Grant_EN, read_en_W =>Grant_WN, read_en_S =>Grant_SN, read_en_L =>Grant_LN, credit_out => credit_out_N, empty_out => empty_N, Data_out => FIFO_D_out_N); FIFO_E: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_E, valid_in => valid_in_E, read_en_N => Grant_NE, read_en_E =>'0', read_en_W =>Grant_WE, read_en_S =>Grant_SE, read_en_L =>Grant_LE, credit_out => credit_out_E, empty_out => empty_E, Data_out => FIFO_D_out_E); FIFO_W: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_W, valid_in => valid_in_W, read_en_N => Grant_NW, read_en_E =>Grant_EW, read_en_W =>'0', read_en_S =>Grant_SW, read_en_L =>Grant_LW, credit_out => credit_out_W, empty_out => empty_W, Data_out => FIFO_D_out_W); FIFO_S: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_S, valid_in => valid_in_S, read_en_N => Grant_NS, read_en_E =>Grant_ES, read_en_W =>Grant_WS, read_en_S =>'0', read_en_L =>Grant_LS, credit_out => credit_out_S, empty_out => empty_S, Data_out => FIFO_D_out_S); FIFO_L: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_L, valid_in => valid_in_L, read_en_N => Grant_NL, read_en_E =>Grant_EL, read_en_W =>Grant_WL, read_en_S => Grant_SL, read_en_L =>'0', credit_out => credit_out_L, empty_out => empty_L, Data_out => FIFO_D_out_L); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the LBDRs LBDR_N: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_N, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_N(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_N(NoC_size downto 1) , grant_N => '0', grant_E =>Grant_EN, grant_W => Grant_WN, grant_S=>Grant_SN, grant_L =>Grant_LN, Req_N=> Req_NN, Req_E=>Req_NE, Req_W=>Req_NW, Req_S=>Req_NS, Req_L=>Req_NL); LBDR_E: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_E, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_E(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_E(NoC_size downto 1) , grant_N => Grant_NE, grant_E =>'0', grant_W => Grant_WE, grant_S=>Grant_SE, grant_L =>Grant_LE, Req_N=> Req_EN, Req_E=>Req_EE, Req_W=>Req_EW, Req_S=>Req_ES, Req_L=>Req_EL); LBDR_W: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_W, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_W(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_W(NoC_size downto 1) , grant_N => Grant_NW, grant_E =>Grant_EW, grant_W =>'0' ,grant_S=>Grant_SW, grant_L =>Grant_LW, Req_N=> Req_WN, Req_E=>Req_WE, Req_W=>Req_WW, Req_S=>Req_WS, Req_L=>Req_WL); LBDR_S: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_S, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_S(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_S(NoC_size downto 1) , grant_N => Grant_NS, grant_E =>Grant_ES, grant_W =>Grant_WS ,grant_S=>'0', grant_L =>Grant_LS, Req_N=> Req_SN, Req_E=>Req_SE, Req_W=>Req_SW, Req_S=>Req_SS, Req_L=>Req_SL); LBDR_L: LBDR generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_L, Rxy_reconf => Rxy_reconf, Reconfig => Reconfig, flit_type => FIFO_D_out_L(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_L(NoC_size downto 1) , grant_N => Grant_NL, grant_E =>Grant_EL, grant_W => Grant_WL,grant_S=>Grant_SL, grant_L =>'0', Req_N=> Req_LN, Req_E=>Req_LE, Req_W=>Req_LW, Req_S=>Req_LS, Req_L=>Req_LL); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- switch allocator allocator_unit: allocator port map ( reset => reset, clk => clk, -- flow control credit_in_N => credit_in_N, credit_in_E => credit_in_E, credit_in_W => credit_in_W, credit_in_S => credit_in_S, credit_in_L => credit_in_L, -- requests from the LBDRS req_N_N => '0', req_N_E => Req_NE, req_N_W => Req_NW, req_N_S => Req_NS, req_N_L => Req_NL, req_E_N => Req_EN, req_E_E => '0', req_E_W => Req_EW, req_E_S => Req_ES, req_E_L => Req_EL, req_W_N => Req_WN, req_W_E => Req_WE, req_W_W => '0', req_W_S => Req_WS, req_W_L => Req_WL, req_S_N => Req_SN, req_S_E => Req_SE, req_S_W => Req_SW, req_S_S => '0', req_S_L => Req_SL, req_L_N => Req_LN, req_L_E => Req_LE, req_L_W => Req_LW, req_L_S => Req_LS, req_L_L => '0', empty_N => empty_N, empty_E => empty_E, empty_w => empty_W, empty_S => empty_S, empty_L => empty_L, valid_N => valid_out_N, valid_E => valid_out_E, valid_W => valid_out_W, valid_S => valid_out_S, valid_L => valid_out_L, -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! grant_N_N => Grant_NN, grant_N_E => Grant_NE, grant_N_W => Grant_NW, grant_N_S => Grant_NS, grant_N_L => Grant_NL, grant_E_N => Grant_EN, grant_E_E => Grant_EE, grant_E_W => Grant_EW, grant_E_S => Grant_ES, grant_E_L => Grant_EL, grant_W_N => Grant_WN, grant_W_E => Grant_WE, grant_W_W => Grant_WW, grant_W_S => Grant_WS, grant_W_L => Grant_WL, grant_S_N => Grant_SN, grant_S_E => Grant_SE, grant_S_W => Grant_SW, grant_S_S => Grant_SS, grant_S_L => Grant_SL, grant_L_N => Grant_LN, grant_L_E => Grant_LE, grant_L_W => Grant_LW, grant_L_S => Grant_LS, grant_L_L => Grant_LL ); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Xbar select_signals Xbar_sel_N <= '0' & Grant_NE & Grant_NW & Grant_NS & Grant_NL; Xbar_sel_E <= Grant_EN & '0' & Grant_EW & Grant_ES & Grant_EL; Xbar_sel_W <= Grant_WN & Grant_WE & '0' & Grant_WS & Grant_WL; Xbar_sel_S <= Grant_SN & Grant_SE & Grant_SW & '0' & Grant_SL; Xbar_sel_L <= Grant_LN & Grant_LE & Grant_LW & Grant_LS & '0'; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Xbars XBAR_N: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_N, Data_out=> TX_N); XBAR_E: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_E, Data_out=> TX_E); XBAR_W: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_W, Data_out=> TX_W); XBAR_S: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_S, Data_out=> TX_S); XBAR_L: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_L, Data_out=> TX_L); end;
gpl-3.0
4de9725d76a6a6951b16cd6d62607472
0.519194
2.980184
false
false
false
false
simoesusp/Processador-ICMC
Processor_FPGA/Processor_Template_VHDL_DE70/lpm_dff2.vhd
3
3,921
-- megafunction wizard: %LPM_FF% -- GENERATION: STANDARD -- VERSION: WM1.0 -- MODULE: lpm_ff -- ============================================================ -- File Name: lpm_dff2.vhd -- Megafunction Name(s): -- lpm_ff -- -- Simulation Library Files(s): -- lpm -- ============================================================ -- ************************************************************ -- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE! -- -- 9.1 Build 222 10/21/2009 SJ Web Edition -- ************************************************************ --Copyright (C) 1991-2009 Altera Corporation --Your use of Altera Corporation's design tools, logic functions --and other software and tools, and its AMPP partner logic --functions, and any output files from any of the foregoing --(including device programming or simulation files), and any --associated documentation or information are expressly subject --to the terms and conditions of the Altera Program License --Subscription Agreement, Altera MegaCore Function License --Agreement, or other applicable license agreement, including, --without limitation, that your use is for the sole purpose of --programming logic devices manufactured by Altera and sold by --Altera or its authorized distributors. Please refer to the --applicable agreement for further details. LIBRARY ieee; USE ieee.std_logic_1164.all; LIBRARY lpm; USE lpm.all; ENTITY lpm_dff2 IS PORT ( clock : IN STD_LOGIC ; data : IN STD_LOGIC_VECTOR (20 DOWNTO 0); q : OUT STD_LOGIC_VECTOR (20 DOWNTO 0) ); END lpm_dff2; ARCHITECTURE SYN OF lpm_dff2 IS SIGNAL sub_wire0 : STD_LOGIC_VECTOR (20 DOWNTO 0); COMPONENT lpm_ff GENERIC ( lpm_fftype : STRING; lpm_type : STRING; lpm_width : NATURAL ); PORT ( clock : IN STD_LOGIC ; q : OUT STD_LOGIC_VECTOR (20 DOWNTO 0); data : IN STD_LOGIC_VECTOR (20 DOWNTO 0) ); END COMPONENT; BEGIN q <= sub_wire0(20 DOWNTO 0); lpm_ff_component : lpm_ff GENERIC MAP ( lpm_fftype => "DFF", lpm_type => "LPM_FF", lpm_width => 21 ) PORT MAP ( clock => clock, data => data, q => sub_wire0 ); END SYN; -- ============================================================ -- CNX file retrieval info -- ============================================================ -- Retrieval info: PRIVATE: ACLR NUMERIC "0" -- Retrieval info: PRIVATE: ALOAD NUMERIC "0" -- Retrieval info: PRIVATE: ASET NUMERIC "0" -- Retrieval info: PRIVATE: ASET_ALL1 NUMERIC "1" -- Retrieval info: PRIVATE: CLK_EN NUMERIC "0" -- Retrieval info: PRIVATE: DFF NUMERIC "1" -- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone II" -- Retrieval info: PRIVATE: SCLR NUMERIC "0" -- Retrieval info: PRIVATE: SLOAD NUMERIC "0" -- Retrieval info: PRIVATE: SSET NUMERIC "0" -- Retrieval info: PRIVATE: SSET_ALL1 NUMERIC "1" -- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0" -- Retrieval info: PRIVATE: UseTFFdataPort NUMERIC "0" -- Retrieval info: PRIVATE: nBit NUMERIC "21" -- Retrieval info: CONSTANT: LPM_FFTYPE STRING "DFF" -- Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_FF" -- Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "21" -- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL clock -- Retrieval info: USED_PORT: data 0 0 21 0 INPUT NODEFVAL data[20..0] -- Retrieval info: USED_PORT: q 0 0 21 0 OUTPUT NODEFVAL q[20..0] -- Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0 -- Retrieval info: CONNECT: q 0 0 21 0 @q 0 0 21 0 -- Retrieval info: CONNECT: @data 0 0 21 0 data 0 0 21 0 -- Retrieval info: LIBRARY: lpm lpm.lpm_components.all -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff2.vhd TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff2.inc FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff2.cmp TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff2.bsf TRUE FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff2_inst.vhd FALSE -- Retrieval info: LIB_FILE: lpm
gpl-3.0
c1509f99fa14f651893ff2b84f4673f7
0.638868
3.640669
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/With_checkers/Rxy_Reconf_pseudo_checkers.vhd
9
5,107
--Copyright (C) 2016 Siavoosh Payandeh Azad Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity Rxy_Reconf_pseudo_checkers is port ( ReConf_FF_out: in std_logic; Rxy: in std_logic_vector(7 downto 0); Rxy_tmp: in std_logic_vector(7 downto 0); Reconfig_command : in std_logic; flit_type: in std_logic_vector(2 downto 0); grants: in std_logic; empty: in std_logic; Rxy_reconf_PE: in std_logic_vector(7 downto 0); Rxy_in: in std_logic_vector(7 downto 0); Rxy_tmp_in: in std_logic_vector(7 downto 0); ReConf_FF_in: in std_logic; err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal : out std_logic ); end Rxy_Reconf_pseudo_checkers; architecture behavior of Rxy_Reconf_pseudo_checkers is begin process(ReConf_FF_out, flit_type, empty, grants, Rxy_in, Rxy_tmp) begin if (ReConf_FF_out = '1' and flit_type = "100" and empty = '0' and grants = '1' and Rxy_in /= Rxy_tmp) then err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp <= '1'; else err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp <= '0'; end if; end process; -- Checked (changed)! process(ReConf_FF_out, flit_type, empty, grants, ReConf_FF_in) begin if (ReConf_FF_out = '1' and flit_type = "100" and empty = '0' and grants = '1' and ReConf_FF_in /= '0') then err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in <= '1'; else err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in <= '0'; end if; end process; -- Checked (not changed)! process(ReConf_FF_out, flit_type, empty, grants, Rxy_in, Rxy) begin if ( (ReConf_FF_out = '0' or flit_type /= "100" or empty = '1' or grants = '0') and Rxy_in /= Rxy) then err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal <= '1'; else err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal <= '0'; end if; end process; -- Checked (not changed)! process(ReConf_FF_out, flit_type, empty, grants, Reconfig_command, ReConf_FF_in) begin if ( (ReConf_FF_out = '0' or flit_type /= "100" or empty = '1' or grants = '0') and Reconfig_command = '1' and ReConf_FF_in /= '1') then err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in <= '1'; else err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in <= '0'; end if; end process; -- Checked (changed)! process(ReConf_FF_out, flit_type, empty, grants, Reconfig_command, Rxy_tmp_in, Rxy_reconf_PE) begin if ( (ReConf_FF_out = '0' or flit_type /= "100" or empty = '1' or grants = '0') and Reconfig_command = '1' and Rxy_tmp_in /= Rxy_reconf_PE) then err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal <= '1'; else err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal <= '0'; end if; end process; -- Checked (Added)! process(ReConf_FF_out, flit_type, empty, grants, Reconfig_command, Rxy_tmp_in, Rxy_tmp) begin if ( (((ReConf_FF_out = '0' or flit_type /= "100" or empty = '1' or grants = '0') and Reconfig_command = '0') or (ReConf_FF_out = '1' and flit_type = "100" and empty = '0' and grants = '1')) and Rxy_tmp_in /= Rxy_tmp) then err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal <= '1'; else err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal <= '0'; end if; end process; -- Checked (Added)! process(ReConf_FF_out, flit_type, empty, grants, Reconfig_command, ReConf_FF_in, ReConf_FF_out) begin if ( (ReConf_FF_out = '0' or flit_type /= "100" or empty = '1' or grants = '0') and Reconfig_command = '0' and ReConf_FF_in /= ReConf_FF_out) then err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal <= '1'; else err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal <= '0'; end if; end process; -- Checked (updated)! end;
gpl-3.0
4c343c0d9703f7f7a365b769e0baf409
0.651655
2.845125
false
true
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/plasma_RTL/ram_xilinx_1.vhd
3
181,455
--------------------------------------------------------------------- -- TITLE: Random Access Memory for Xilinx -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 11/06/05 -- FILENAME: ram_xilinx.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Implements Plasma internal RAM as RAMB for Spartan 3x -- -- Compile the MIPS C and assembly code into "test.axf". -- Run convert.exe to change "test.axf" to "code.txt" which -- will contain the hex values of the opcodes. -- Next run "ram_image ram_xilinx.vhd code.txt ram_image.vhd", -- to create the "ram_image.vhd" file that will have the opcodes -- correctly placed inside the INIT_00 => strings. -- Then include ram_image.vhd in the simulation/synthesis. -- -- Warning: Addresses 0x1000 - 0x1FFF are reserved for the cache -- if the DDR cache is enabled. --------------------------------------------------------------------- -- UPDATED: 09/07/10 Olivier Rinaudo ([email protected]) -- new behaviour: 8KB expandable to 64KB of internal RAM -- -- MEMORY MAP -- 0000..1FFF : 8KB 8KB block0 (upper 4KB used as DDR cache) -- 2000..3FFF : 8KB 16KB block1 -- 4000..5FFF : 8KB 24KB block2 -- 6000..7FFF : 8KB 32KB block3 -- 8000..9FFF : 8KB 40KB block4 -- A000..BFFF : 8KB 48KB block5 -- C000..DFFF : 8KB 56KB block6 -- E000..FFFF : 8KB 64KB block7 --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use work.mlite_pack.all; library UNISIM; use UNISIM.vcomponents.all; entity ram_1 is generic(memory_type : string := "DEFAULT"; --Number of 8KB blocks of internal RAM, up to 64KB (1 to 8) block_count : integer := 8); port(clk : in std_logic; enable : in std_logic; reset : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0)); end; --entity ram architecture logic of ram_1 is --type type mem32_vector IS ARRAY (NATURAL RANGE<>) OF std_logic_vector(31 downto 0); --Which 8KB block alias block_sel: std_logic_vector(2 downto 0) is address(15 downto 13); --Address within a 8KB block (without lower two bits) alias block_addr : std_logic_vector(10 downto 0) is address(12 downto 2); --Block enable with 1 bit per memory block signal block_enable: std_logic_vector(7 downto 0); --Block Data Out signal block_do: mem32_vector(7 downto 0); --Remember which block was selected signal block_sel_buf: std_logic_vector(2 downto 0); begin block_enable<= "00000001" when (enable='1') and (block_sel="000") else "00000010" when (enable='1') and (block_sel="001") else "00000100" when (enable='1') and (block_sel="010") else "00001000" when (enable='1') and (block_sel="011") else "00010000" when (enable='1') and (block_sel="100") else "00100000" when (enable='1') and (block_sel="101") else "01000000" when (enable='1') and (block_sel="110") else "10000000" when (enable='1') and (block_sel="111") else "00000000"; proc_blocksel: process (clk, block_sel) is begin if rising_edge(clk) then block_sel_buf <= block_sel; end if; end process; proc_do: process (block_do, block_sel_buf) is begin data_read <= block_do(conv_integer(block_sel_buf)); end process; -- BLOCKS generation block0: if (block_count > 0) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"afafafafafafafafafafafafafafafaf2308000c241400ac273c243c243c273c", INIT_01 => X"8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f230c008c8c3caf00af00af2340afaf", INIT_02 => X"acacacac0003373cac038cac8cac8cac8c243c40034040033423038f038f8f8f", INIT_03 => X"000300ac0300000034038c8c8c8c8c8c8c8c8c8c8c8c3403acacacacacacacac", INIT_04 => X"8c343c00af03af270003278f0300ac008f34af0000000014008f8fafaf03af27", INIT_05 => X"008f000c2400142480008f0010af03afaf270003278f0300ac008f3c00103000", INIT_06 => X"008f8f0010af24af03afaf270003278f8f030000140080008f000c000080af24", INIT_07 => X"03000004008faf24008f000c0024008f0010000c0024008f00102c008faf3000", INIT_08 => X"0c000080af24008f0010af27000c8f008f002727afafaf03afaf270003278f8f", INIT_09 => X"3c03af270003278f8f030000140080008fa0248faf24008f0014248024008f00", INIT_0A => X"0000000003278f8f030000008c3c0010000c0003afaf270003278f0330008c34", INIT_0B => X"243c000c343c243c24000c343c243c24000c243c000c243c000c243c03afaf27", INIT_0C => X"24243c243c243caf243caf24000c24243c243c243caf243caf24000c243c000c", INIT_0D => X"000c343c243c243c243caf243caf24000c343c243c243c243caf243caf24000c", INIT_0E => X"243c000c000c243c000c243c000c000c243c000c243c000c000c243c000c243c", INIT_0F => X"3c000c243c0010000c243c0014008c3c000c243c000c243c000c000c243c000c", INIT_10 => X"af240010af24afaf03afaf270003278f8f0300000c24000c0024008c3c000c24", INIT_11 => X"0c8f24000010008f001400008f8faf24008f0010af001400000014008f8f0010", INIT_12 => X"24008faf240010008f8c002400008f3c000c0024008c002400008f3c000c2400", INIT_13 => X"0c243c0010ac3c24008c3c000c243c0014248f001428008faf24008f000c24af", INIT_14 => X"0087000c24000c8faf00008f870010a7afafafaf03afaf270003278f8f030000", INIT_15 => X"0087a730240097af240010008f8c00008f000087000c24000c00008c00008f00", INIT_16 => X"000c243c0010ac3c24008c3c000c243c0014248f000c8f2400000c243c001428", INIT_17 => X"87000c24000c8faf0000008f870010a7afafafafaf03afaf270003278f8f0300", INIT_18 => X"87a730240097af240010008f8c00008f000087000c24000c00008c00008f0000", INIT_19 => X"008c00008f000087000c24000c8faf0000008f2400870010a7000c2400142800", INIT_1A => X"000c240014280087a730240097af240010008f8c00008f000087000c24000c00", INIT_1B => X"000c00008c00008f0000343c87000c24000c8faf0000000014008f870010a724", INIT_1C => X"24000c240014280087a730240097af240010008f8c00008f0000343c87000c24", INIT_1D => X"0c24000c00008c00008f0000343c87000c24000c8faf00000014008f870010a7", INIT_1E => X"2400000c243c0014280087a730240097af240010008f8c00008f0000343c8700", INIT_1F => X"af270003278f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c8f", INIT_20 => X"0c24000c00008c002400008f3c000c24000c8faf00008f8f0010afafaf2403af", INIT_21 => X"008f8f0010af000c24001428008faf24008faf240010008f8c002400008f3c00", INIT_22 => X"10008f8c002400008f3c000c24000c00008c002400008f3c000c24000c8faf00", INIT_23 => X"0010ac3c24008c3c000c243c0014248f000c243c001428008faf24008faf2400", INIT_24 => X"8f0000008fa000278f0000008f0010afaf03afaf270003278f8f0300000c243c", INIT_25 => X"00af008000278f0010af001428008faf24008fac008f002700008fa400270000", INIT_26 => X"10008f8c002400008f3c000c24000c0024008c002400008f3c000c24000c8f24", INIT_27 => X"24000c0024008c002400008f3c000c24000c8f2400af0084002700008faf2400", INIT_28 => X"3c000c24000c8f2400af008c002700008faf240010008f8c002400008f3c000c", INIT_29 => X"8faf24008faf240010008f8c002400008f3c000c24000c0024008c002400008f", INIT_2A => X"8f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c243c00142800", INIT_2B => X"000c24000c00008c3c000c24000c8faf00008f8fafaf24af2403afaf27000327", INIT_2C => X"8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f8c3c", INIT_2D => X"008f8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f", INIT_2E => X"240010008f8c243c000c24000c00008c243c000c24000c8faf00008faf240010", INIT_2F => X"008faf240010008f8c243c000c24000c00008c243c000c24000c8faf24008faf", INIT_30 => X"0014248f000c243caf240010008f8c243c000c00008c243c000c24000c8faf24", INIT_31 => X"28008c3caf03af27000003278f8f0300000c243c0010ac3c24008c3c000c243c", INIT_32 => X"a324af03af270003278f0324001000ac3c24008c3cac008f0024003c8c3c0010", INIT_33 => X"14003c8c340010240010248c3c00100083a4248fa3001000102400100094008f", INIT_34 => X"af270003278f0324a4008fa30010ac3cac243cac3cac008c3c240018008c3c00", INIT_35 => X"0010240010248c3c00100083a4248fa3001000102400100094008fa324afaf03", INIT_36 => X"3cac0024003c8c248c3c001028008c3c0004008f0010008faf008c34af008c34", INIT_37 => X"af008fafaf03af270003278f0324a4008fa30010ac243cac3cac3cac3c24008c", INIT_38 => X"10afafafafaf03afaf270003278f038f00140080a00080af24008faf24008f00", INIT_39 => X"8f8faf240010af240010248f0004008fa3001428008faf24008fa02400278f00", INIT_3A => X"008f001028008faf0000000014008f8faf00000014008f8f0010af24af000000", INIT_3B => X"1000008c008f00008f240014008fa000278f0000302430008f00100000302430", INIT_3C => X"8f0010008c008fa02400278faf24008f0014248f0000100004008faf24008f00", INIT_3D => X"2700248c008f0010ac008f00008f24000c8f0000008f2700100000008f248c00", INIT_3E => X"af03af270003278f0300ac343c343cafaf03af270003278f8f0300000c8f0000", INIT_3F => X"008fafaf03af270003278f038f0014008faf00008f24008faf302c008f0010af" ) port map ( DO => block_do(0)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"b8afaeadacabaaa9a8a7a6a5a4a3a2a1bd000000a560a4a0bd1d8404a5059c1c", INIT_01 => X"b9b8afaeadacabaaa9a8a7a6a5a4a3a2a1a50086c6c406bb00bb00ba5a1abfb9", INIT_02 => X"9392919000405a1a06e0a606a606a606a6a50584e0029b401bbd60bb60bbbabf", INIT_03 => X"00e000c4e0000085a2e09f9d9c9e979695949392919002e09f9d9c9e97969594", INIT_04 => X"42420200c4a0bebd00e0bdbec0004300c302c2000007624000c2c3c5c4a0bebd", INIT_05 => X"00c20000040062024300c20000c4a0bebfbd00e0bdbec0004300c30200404200", INIT_06 => X"00c2c30000c202c4a0bebfbd00e0bdbebfc0000040004200c20000400042c343", INIT_07 => X"c000004100c2c24200c20000404200c200000000404200c200404200c2c24243", INIT_08 => X"00400042c34300c20000c2c20000c440c660c2c3c6c5c4a0bebfbd00e0bdbebf", INIT_09 => X"02a0bebd00e0bdbebfc0000040004200c24303c2c24200c2006202434200c200", INIT_0A => X"00000000e0bdbebfc002020042020040000000a0bebfbd00e0bdbec042004242", INIT_0B => X"44020000440245020600004402450206000044020000440200004402a0bebfbd", INIT_0C => X"04450246024702a24202a202000004450246024702a24202a202000044020000", INIT_0D => X"00004402450246024702a24202a20200004402450246024702a24202a2020000", INIT_0E => X"4402000000004402000044020000000044020000440200000000440200004402", INIT_0F => X"0200004402000000004402004000420200004402000044020000000044020000", INIT_10 => X"c2020000c202c0c0a0bebfbd00e0bdbebfc00000000400004005004202000044", INIT_11 => X"00c40500004000c200406200c2c3c24200c20000c000400007624000c2c30000", INIT_12 => X"4200c2c202006200c24362420300c30200004005004262420300c30200000400", INIT_13 => X"004402000043024300420200004402006202c300404200c2c24200c2000004c2", INIT_14 => X"00c20000040000c4c24300c3c20000c0c0c6c5c4a0bebfbd00e0bdbebfc00000", INIT_15 => X"00c2c2424200c2c202006200c2436200c30200c200000400004000426200c302", INIT_16 => X"00004402000043024300420200004402006202c30000c4050000004402004042", INIT_17 => X"c20000040000c4c2006200c2c30000c0c0c7c6c5c4a0bebfbd00e0bdbebfc000", INIT_18 => X"c2c2424200c2c202006200c2436200c30200c200000400004000426200c30200", INIT_19 => X"00426200c30200c20000040000c4c2006200c24300c20000c000000400404200", INIT_1A => X"00000400404200c2c2424200c2c202006200c2436200c30200c2000004000040", INIT_1B => X"00004000426200c302624202c30000040000c4c2000007624000c3c20000c202", INIT_1C => X"0200000400404200c2c2424200c2c202006200c2436200c302624202c3000004", INIT_1D => X"000400004000426200c302624202c30000040000c4c20007624000c3c20000c2", INIT_1E => X"05000000440200404200c2c2424200c2c202006200c2436200c302624202c300", INIT_1F => X"bfbd00e0bdbebfc00000004402000043024300420200004402006202c30000c4", INIT_20 => X"0004000040004262420300c3020000040000c4c26200c2c30000c0c0c202a0be", INIT_21 => X"00c2c30000c000000400404200c2c24200c2c202006200c24362420300c30200", INIT_22 => X"6200c24362420300c302000004000040004262420300c3020000040000c4c262", INIT_23 => X"000043024300420200004402006202c30000440200404200c2c24200c2c20200", INIT_24 => X"c2030200c24382c4c2030200c20000c0c0a0bebfbd00e0bdbebfc00000004402", INIT_25 => X"00c2004262c3c20000c000404200c2c24200c24300c362c30200c24382c40200", INIT_26 => X"6200c24362420300c30200000400004005004262420300c3020000040000c405", INIT_27 => X"0400004005004262420300c3020000040000c40500c2004262c30200c2c20200", INIT_28 => X"020000040000c40500c2004262c30200c2c202006200c24362420300c3020000", INIT_29 => X"c2c24200c2c202006200c24362420300c30200000400004005004262420300c3", INIT_2A => X"bebfc00000004402000043024300420200004402006202c30000440200404200", INIT_2B => X"0000040000400042020000040000c4c26200c2c3c0c202c202a0bebfbd00e0bd", INIT_2C => X"434202000004000040004242020000040000c4c26200c2c3c202006200c24302", INIT_2D => X"00c2434202000004000040004242020000040000c4c26200c2c3c202006200c2", INIT_2E => X"02006200c2434202000004000040004242020000040000c4c20200c2c2020062", INIT_2F => X"00c2c202006200c2434202000004000040004242020000040000c4c24200c2c2", INIT_30 => X"006202c300004402c202006200c2434202000040004242020000040000c4c242", INIT_31 => X"42004202c4a0bebd0000e0bdbebfc00000004402000043024300420200004402", INIT_32 => X"c202c4a0bebd00e0bdbec0020000004302430042024300c36242030243020040", INIT_33 => X"40620243020000020062024302004000c24303c2c000000043030040004200c2", INIT_34 => X"bebd00e0bdbec0024000c2c00000400243030240024300630302004000420200", INIT_35 => X"0000020062024302004000c24303c2c000000043030040004200c2c202c0c4a0", INIT_36 => X"02438242040243024402004042004202004000c2004000c2c2004202c2004202", INIT_37 => X"c200c2c5c4a0bebd00e0bdbec0024000c2c00000430302400240024302430042", INIT_38 => X"00c0c7c6c5c4a0bebfbd00e0bdbec0c200400042430063c46400c3c34300c200", INIT_39 => X"c2c3c2020000c202006202c3004100c2c000404200c2c24200c2430362c3c200", INIT_3A => X"00c200404200c2c2000007624000c3c2c20007624000c3c20000c202c2006200", INIT_3B => X"4062004200c26200c203004000c26283c4c3020242424200c200000202424242", INIT_3C => X"c20040004200c2430362c3c2c24200c2006202c3000000004100c2c24200c200", INIT_3D => X"c362034200c200004300c26200c2030000c4406200c2c30040628200c2044300", INIT_3E => X"c4a0bebd00e0bdbec0004363034202c5c4a0bebd00e0bdbebfc0000000c44062", INIT_3F => X"00c2c5c4a0bebd00e0bdbec0c2004000c2c26200c34200c2c2424200c20000c0" ) port map ( DO => block_do(0)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"00000000000000000000000000000000ff00000800ff1800350035003300b200", INIT_01 => X"000000000000000000000000000000000000072000002000d800d800ff700000", INIT_02 => X"0000000000000010000000000000000000010060006060000000000000000000", INIT_03 => X"0000000000201000000000000000000000000000000000000000000000000000", INIT_04 => X"0000200000f000ff00000000e800000000800010100000000000000000f000ff", INIT_05 => X"0000000000000000000000000000f00000ff00000000e8000000002000ff0000", INIT_06 => X"0000000000000000f00000ff0000000000e80000ff0000000000002000000000", INIT_07 => X"e80000ff000000ff000000002000000000000000200000000000000000000010", INIT_08 => X"0020000000000000000000000007002800380000000000f00000ff0000000000", INIT_09 => X"20f000ff0000000000e80000ff0000000000000000ff000000000000ff000000", INIT_0A => X"0000000000000000e8161600002000ff000100f00000ff00000000e800000000", INIT_0B => X"2a00000256922700000002561227000000002a0000002a0000002a00f00000ff", INIT_0C => X"032800280028000028000000000200280028002800002800000000002a000000", INIT_0D => X"0002230029002900290000290000000002430028002900290000290000000002", INIT_0E => X"2a00000400002a0000002a00000500002a0000002a00000300002a0000002a00", INIT_0F => X"0000002b00000000002b00000000330000002b0000002b00000200002a000000", INIT_10 => X"0000000000000000f00000ff0000000000e8000000000001200030330000002b", INIT_11 => X"010000300000000000ff10000000000000000000000000100000000000000000", INIT_12 => X"0000000000000000000010241800000000012000300010241800000000000000", INIT_13 => X"002b00000033000000330000002b000000000000ff0300000000000000000000", INIT_14 => X"0000000000000000001000000000000000000000f00000ff0000000000e80000", INIT_15 => X"000000ff00000000000000000000100000100000000000000020000010000010", INIT_16 => X"00002b00000033000000330000002b0000000000000100003000002b0000ff00", INIT_17 => X"000000000000000010000000000000000000000000f00000ff0000000000e800", INIT_18 => X"0000ff0000000000000000000010000010000000000000002000001000001000", INIT_19 => X"0000100000100000000000000000001000000001000000000000000000ff0000", INIT_1A => X"00000000ff00000000ff00000000000000000000100000100000000000000020", INIT_1B => X"00002000001000001010ff3f0000000000000000101000000000000000000000", INIT_1C => X"0000000000ff00000000ff000000000000000000001000001010ff3f00000000", INIT_1D => X"000000002000001000001010ff3f000000000000000010000000000000000000", INIT_1E => X"003000002b0000ff00000000ff000000000000000000001000001010ff3f0000", INIT_1F => X"00ff0000000000e80000002b00000033000000330000002b0000000000000100", INIT_20 => X"000000002000001029180000000000000000000010000000000000000012f000", INIT_21 => X"00000000000000000000ff000000000000000000000000000010291800000000", INIT_22 => X"00000000102a180000000000000000200000102a180000000000000000000010", INIT_23 => X"000033000000330000002b000000000000002c0000ff00000000000000000000", INIT_24 => X"001c1c0000001000001e1e000000000000f00000ff0000000000e80000002b00", INIT_25 => X"3000000010000000000000ff0000000000000000000010001000000010001000", INIT_26 => X"00000000102c18000000000000000120003000102c1800000000000000010000", INIT_27 => X"00000120003000102c1800000000000000010000300000001000100000000000", INIT_28 => X"000000000001000030000000100010000000000000000000102c180000000000", INIT_29 => X"000000000000000000000000102c18000000000000000120003000102c180000", INIT_2A => X"0000e80000002b00000033000000330000002b000000000000002c0000ff0000", INIT_2B => X"000000000020002c0000000000000000100000000000430012f00000ff000000", INIT_2C => X"002c0000000000002000002c0000000000000000100000000000000000002c00", INIT_2D => X"0000002c0000000000002000002c000000000000000010000000000000000000", INIT_2E => X"0000000000002c0000000000002000002c000000000000000010000000000000", INIT_2F => X"0000000000000000002c0000000000002000002c000000000000000000000000", INIT_30 => X"0000000000002c00000000000000002c0000002000002c0000000000000000ff", INIT_31 => X"0000330000f000ff000000000000e80000002b00000033000000330000002b00", INIT_32 => X"000000f000ff00000000e8ff0000103300000033000000001035180033000000", INIT_33 => X"0010400080000000000000320000000000000000000000000000000000000000", INIT_34 => X"00ff00000000e8000000000000ff33003300003200000035007f000000330000", INIT_35 => X"00000000000033000000000000000000000000000000000000000000000000f0", INIT_36 => X"000010352000007f330000000000330000000000000000000000008000000080", INIT_37 => X"0000000000f000ff00000000e8000000000000ff330000330032003300000033", INIT_38 => X"000000000000f00000ff00000000e80000ff0000000000000000000000000000", INIT_39 => X"000000ff0000000000000000000000000000ff00000000000000000010000000", INIT_3A => X"0000000000000000101000000000000000100000000000000000000000100000", INIT_3B => X"0010000000001800000000000000001800001616000000000000001616000000", INIT_3C => X"00000000000000000010000000ff00000000ff0000000000ff000000ff000000", INIT_3D => X"0010000000000000000000180000000006002810000000000010100000000000", INIT_3E => X"00f000ff00000000e80000fc0000200000f000ff0000000000e8000006002810", INIT_3F => X"00000000f000ff00000000e80000ff000000100000ff00000000000000000000" ) port map ( DO => block_do(0)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"4c4844403c3834302c2824201c181410980e00ac04fd2a001800b0000000f001", INIT_01 => X"504c4844403c3834302c2824201c18141000cc2410200060125c1058fc005450", INIT_02 => X"0c08040000083c0048080c440840043c006000000800000801681360115c5854", INIT_03 => X"00080c000810121900082c2824201c1814100c08040000082c2824201c181410", INIT_04 => X"00200000082504f80008100c2500000000100012100d1b020014101410250cf0", INIT_05 => X"001800980d00040a000018001318251014e80008080425000000080000fa0200", INIT_06 => X"001020001e101c2025181ce00008181014250000e90000001800982500001801", INIT_07 => X"250000e0001010fc0010009825570014000700982530001400090a0014140f06", INIT_08 => X"9825000010010010001810140016a025a42514a8a8a4a025989c60000820181c", INIT_09 => X"002504f80008a0989c250000e400000010000d1010ff001000080a00ff001000", INIT_0A => X"000000000818101425030000000000fd003c00251014e8000808042501000020", INIT_0B => X"8000008878348c0002008878340c000100ae680000ae540000ae3c0025181ce0", INIT_0C => X"2184009c00b40010d800140200e7070c0024003c00106000140100ae680000ae", INIT_0D => X"00e7450174008c00a40010c800140400e72105fc0014002c00105000140300e7", INIT_0E => X"f800008b00ae680000aee000006300ae680000aec80000fe00ae680000aea800", INIT_0F => X"0000ae5000001300ae4800000700100000ae380000ae2800001400ae680000ae", INIT_10 => X"1403004b10031c18252024d8000820181c250000980a0005250a25100000ae5c", INIT_11 => X"05100a250026001400eb2a00101414020014000b140004100d1a020014100011", INIT_12 => X"0100181c0100030010002170800018000005250a250021708000180000983a00", INIT_13 => X"ae9c00000510000100100000ae7400000d011c00b2e800101002001000982018", INIT_14 => X"001000983a00d4181807002810002c1014302c28252024d80008282024250000", INIT_15 => X"001010ff0100101401000300180021002c80001000982000d425000021002c80", INIT_16 => X"00aee400000510000100100000aed800000d01140005300a2500aec40000d120", INIT_17 => X"1000983a00d418181218002810002d101434302c28252024d800082820242500", INIT_18 => X"1010ff0100101401000300180021002c80001000982000d425000021002c8000", INIT_19 => X"000021003080001000983a00d4181812180028230010002f1000980a00d00600", INIT_1A => X"00980a00ce06001010ff0100101401000300180021003080001000982000d425", INIT_1B => X"00d42500002100348021ffff1000983a00d4181812100d1a0200281000341001", INIT_1C => X"0100980a00c90a001010ff010010140100030018002100348021ffff10009820", INIT_1D => X"982000d42500002100388021ffff1000983a00d41818100d1a02002810003310", INIT_1E => X"0a2500aef00000ca0a001010ff010010140100030018002100388021ffff1000", INIT_1F => X"24d80008282024250000aee400000510000100100000aed800000d011400053c", INIT_20 => X"982000d425000021ec8000100000983a00d41c1c21001018002b101418342520", INIT_21 => X"001018002b1000980a00d20a00101001001014010003001c0021ec8000100000", INIT_22 => X"03001c0021148000100000982000d425000021148000100000983a00d41c1c23", INIT_23 => X"000510000100100000aed800000d011400ae140000d20a001010010010140100", INIT_24 => X"10030000100c21101003000010001f1014259094680008282024250000aee400", INIT_25 => X"2518000c21101000871000de0a0010100100103c001021108000101c21104000", INIT_26 => X"030018002158800010000098200005250a250021588000100000983a0005180a", INIT_27 => X"200005250a250021588000100000983a0005180a2518001c2110400010140100", INIT_28 => X"0000983a0005180a2518003c2110800010140100030018002158800010000098", INIT_29 => X"10100100101401000300180021588000100000980a0005250a25002158800010", INIT_2A => X"9094250000aee400000510000100100000aed800000d011400ae300000760a00", INIT_2B => X"00982000d42500800000983a00d41c1c240018141018211434252024d8000898", INIT_2C => X"04800000982000d4250004800000983a00d41c1c2500181410010003001c8000", INIT_2D => X"001c08800000982000d4250008800000983a00d41c1c2600181410010003001c", INIT_2E => X"010003001c0c800000982000d425000c800000983a00d41c1c27001410010003", INIT_2F => X"001410010003001c10800000982000d4250010800000983a00d41c1c12001410", INIT_30 => X"000d011000ae400010010003001c14800000d4250014800000983a00d41c1cee", INIT_31 => X"0f002400082504f8000008282024250000aee400000510000100100000aed800", INIT_32 => X"000110250cf00008080425ff0002252400010024000000082130800024000013", INIT_33 => X"0b24000000001f01000401f0000006000000321000002a000732000600000010", INIT_34 => X"14e80008100c25030000100000d82c00280100f00000003000fc000600240000", INIT_35 => X"003401000401280000060000005d1800003f00075d0006000000180001041825", INIT_36 => X"00002170800000fc200000100f00200000160008001a00040800000004000004", INIT_37 => X"0000101410250cf00008181425030000180000c32c01002800f0002000010020", INIT_38 => X"0a104c48444025383cc00008100c250000f20000000000140100141001001000", INIT_39 => X"184018ff0003180100050a48000500402f00f30f001010010010102021101000", INIT_3A => X"0010000a0a00101c12100d1b02001c4810100d1b02001c48003e140e1c121800", INIT_3B => X"0b2a0000004c2300140f000c001c102110140300ff57ff001000080300ff30ff", INIT_3C => X"4c000b0000004c102d21101414ff0014000aff1800000200c0001414ff001400", INIT_3D => X"20230f00004c000c00004c2300140f00f844252100142000122a2300140f0000", INIT_3E => X"10250cf000080804250000180360000c082504f8000840383c250000f8442521", INIT_3F => X"00080c082504f80008100c250000f1001010240010ff001000ff010000000d00" ) port map ( DO => block_do(0)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block0 block1: if (block_count > 1) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"00008f8faf000c8faf0000008f00008fafaf03afaf270003278f030000008f00", INIT_01 => X"8f0000003c8fac008fac008fac008f30008fafafafafaf03af270003278f8f03", INIT_02 => X"0010248f001428008faf24008faf00008f0030003000008f8c008f0010afac00", INIT_03 => X"10240014008f8f001024001000008f8c008f001024001000008f8c008f001024", INIT_04 => X"03af270003278f0300008faf03af270003278f0300001024001028008c008f00", INIT_05 => X"343c000c243c000c343c34af24afaf03afafaf27000003278f030000343c8faf", INIT_06 => X"240004008c340010ac24ac343c24ae000c242424000c243cac008f343caf008c", INIT_07 => X"008fae000c242424000c24000c0024008f000c243c0014248faf000c8faf008c", INIT_08 => X"00000000000003278f8f8f0300000c00142c008fac008f24af000c8f0010af24", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000102040912000000", INIT_0F => X"fffffffffffffffffffffffffffffffffffffffffffffefcf9f2e4c992000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000606060606050000000000", INIT_13 => X"0000000000000000000000000000000000000000000000010101010101000000", INIT_14 => X"3d3d3d3d3d3d676620740a0a747320650a000000000000000000000000000000", INIT_15 => X"694c7363726d69546e616f6269546f6175206467730a00696920746c6c67730a", INIT_16 => X"4e490a007420696c54004546455000454d500a6469540030617261736d657061", INIT_17 => X"544c4c0a0a53200a4c2000454e490a0044414f4c41454e490a0044414f4c4145", INIT_18 => X"0000000000000000000054204945540a54204d0a542043422f440a2054494920", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000102040912000000000000000000000000000000", INIT_1F => X"fffffffffffffffffffffefcf9f2e4c992000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000606060606050000000000000000000000000000000000", INIT_23 => X"0000000000000000000000010101010101000000000000000000000000000000", INIT_24 => X"7566542055000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000072756570695300736e61756369670a0a727475526e2068616e", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"6200c2c3c20000c4c2430300c30200c2c5c4a0bebfbd00e0bdbec0620200c202", INIT_01 => X"c240026202c34000c24000c24300c24300c2c0c7c6c5c4a0bebd00e0bdbebfc0", INIT_02 => X"006202c300404200c2c24200c2c24300c2404202424300c24300c20000c04300", INIT_03 => X"0002006200c2c300000200404300c24300c200000200404300c24300c2000002", INIT_04 => X"a0bebd00e0bdbec00200c2c4a0bebd00e0bdbec000000002004042004200c200", INIT_05 => X"4202000044020000440205c202c5c4a0b0bebfbd0000e0bdbec002624202c3c4", INIT_06 => X"0200400042020000400243630302020000040510000044024300c34202c20042", INIT_07 => X"00c20200000405100000040000400500c200004402006202c3c20000c4c20042", INIT_08 => X"000000000000e0bdb0bebfc000000000404200c24300c302c20000c40000c242", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"00000000000000000000000000000000010204091224489123468d1a34000000", INIT_0F => X"fffffffffffffffffffffffffffffefcf9f2e4c99224489123468d1a34000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000003030303030300000000000000", INIT_12 => X"02010000000000000000000000000000010101020515100b0500fb1a150f0a05", INIT_13 => X"0000000000000000000000000000000000000000000001504f4e4d4c4b050403", INIT_14 => X"0a3d3d3d3d3d0a747369540a656d707247000000000000000000000000000000", INIT_15 => X"6e69736379656e65737470696e656e63622f6920740a006f762f69697420740a", INIT_16 => X"554d0a0073746c206f00444144410053414c0a6f6e6500306e206c206220726c", INIT_17 => X"4949540a0a45500a4546005347460a0021534e414c52554d0a0021494e414c52", INIT_18 => X"0000000000000000000020544f52200a20544f0a2054545420450a00454f562f", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"00000000010204091224489123468d1a34000000000000000000000000000000", INIT_1F => X"fffffefcf9f2e4c99224489123468d1a34000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000003030303030300000000000000000000000000000000000000", INIT_22 => X"00000000010101020515100b0500fb1a150f0a05000000000000000000000000", INIT_23 => X"0000000000000000000001504f4e4d4c4b050403020100000000000000000000", INIT_24 => X"20203a5441000000000000000000000000000000000000000000000000000000", INIT_25 => X"00000000000000206d74616e65007420746e6f6e690a006b2074542074696420", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"100000000000070000101f00001000000000f00000ff00000000e8101400001f", INIT_01 => X"001814100f000000000000000000000000000000000000f000ff0000000000e8", INIT_02 => X"0000000000ff0000000000000000100000180010001000000000000000000000", INIT_03 => X"0000000000000000000000001000000000000000000000100000000000000000", INIT_04 => X"f000ff00000000e817000000f000ff00000000e8100000000000000000000000", INIT_05 => X"00200000320000007801e100000000f0000000ff0000000000e81010ff1f0000", INIT_06 => X"7f00000000800000007f00ff0f7f00000700007f000032000000000020000000", INIT_07 => X"000000000700007f000000000120003000000032000000000000000800000000", INIT_08 => X"0000000000000000000000e810000100ff0000000000007f0000080000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0101010101010101010101010101010000000000000000000000000000000000", INIT_0B => X"0202020201010101010101010101010101010101010101010101010101010101", INIT_0C => X"0202020202020202020202020202020202020202020202020202020202020202", INIT_0D => X"0303030303030303030303030303030303030303030303030303030303030202", INIT_0E => X"0000000000000000010204091224489123468d1a3468d1a2458a152b56030303", INIT_0F => X"fffffffffffffefcf9f2e4c99224489123468d1a3468d1a2458a152b56000000", INIT_10 => X"0000000000000000000000000000000000080808080707000000000000ffffff", INIT_11 => X"000000000000000000000000000000000101039e9b9794918e0f0c0906030000", INIT_12 => X"46230000000000000000000095a8c0e00d50c1a1439e5b17d4914e4f0cc98643", INIT_13 => X"1212121212000000000000000000202429303a48619123c7a4815d3a17b08d69", INIT_14 => X"003d3d3d3d3d0069686e650073616c6165121212121212121212121212121212", INIT_15 => X"67730a65206d67730a69657467730a7474206e616954006e69206f63696d6954", INIT_16 => X"4d4550003a65656674002149215300542041006e6773003020746c73656e696c", INIT_17 => X"4f43494d0044410044410054205453000a53205443204d4550000a4c20544320", INIT_18 => X"0000000000000000000000454e414f420045524d00454f5253524100534e4920", INIT_19 => X"00000000000000000000000000000000000000000000000000001212ed515302", INIT_1A => X"0101010000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0101010101010101010101010101010101010101010101010101010101010101", INIT_1C => X"0202020202020202020202020202020202020202020202020101010101010101", INIT_1D => X"0303030303030303030303030303030303030202020202020202020202020202", INIT_1E => X"1224489123468d1a3468d1a2458a152b56030303030303030303030303030303", INIT_1F => X"9224489123468d1a3468d1a2458a152b56000000000000000000000001020409", INIT_20 => X"0000000000080808080707000000000000fffffffffffffffffffefcf9f2e4c9", INIT_21 => X"000000000101039e9b9794918e0f0c0906030000000000000000000000000000", INIT_22 => X"95a8c0e00d50c1a1439e5b17d4914e4f0cc98643000000000000000000000000", INIT_23 => X"0000202429303a48619123c7a4815d3a17b08d69462300000000000000000000", INIT_24 => X"6379204552121212121212121212121212121212121212121200000000000000", INIT_25 => X"0000000000000000622063676e000a7469696d676e4200737770205568732072", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"250014101400dc101025400020400024242025181ce000080804252500000c00", INIT_01 => X"20250224ff1000001c000018000014ff0010041c181410250cf0000820181c25", INIT_02 => X"0004010400ea080000000100000421000425ff2b010700000000140013000000", INIT_03 => X"0c04000400181c00140300042a002400001c001f0200042a0024000018002a01", INIT_04 => X"2504f80008080425420008082504f80008100c25250002050004020000002000", INIT_05 => X"500000ae6c000080407d0010013c38252c3034c80000080804254224feff0808", INIT_06 => X"fc002e000000003300fc00fffffc0000f90203fc00aea8000000143000140000", INIT_07 => X"00100000f90203fc00980a0005250a251000aecc00001a011c1c009118180000", INIT_08 => X"0b070503000008382c30342525006000ca650010000020fc20009d1800091001", INIT_09 => X"9d97958b89837f716d6b67656159534f4947433d3b352f2b29251f1d1713110d", INIT_0A => X"5b514b3d393733251b19150f0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a3", INIT_0B => X"231d0b09fdf7f3ebe7dfd3cfcdc9c1bbb7b1afa5a399918d857f7b756f67615d", INIT_0C => X"efe7e3ddd7cfc5bdb3aba5a195938d878381776b69655f5957514b413b39332d", INIT_0D => X"d1cbc7b9b3ada9a1978f8b7773716d5f5b5955473d3b37352b291d130501f9f5", INIT_0E => X"010204091224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78e5dfd7", INIT_0F => X"f9f2e4c99224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78000000", INIT_10 => X"070001020301010000000101010102030718110a03fcf5231c150e0700fffefc", INIT_11 => X"0000010303010100010059647285a0c80b90212807e6c5a483a5846342210007", INIT_12 => X"8a4500030103030001000100ae6472856dc80b90212807e6c5a483a584634221", INIT_13 => X"38373635340005010300010001005d689c8b41d117a245c8833ef9b46f5914cf", INIT_14 => X"003d3d3d3d3d006e696773007420616c6e2b2c2d2e2f30313233343d3c3b3a39", INIT_15 => X"20740073616f2074006f722020740069727367646e65000a73646e6170756e65", INIT_16 => X"422052002073646161000a4c00530020545300652074000a3168656d72756d20", INIT_17 => X"4e4150550021530021490020544948000a4550495543422052000a4546495543", INIT_18 => X"0908070605040302010000535354504900535945005352415520440054205344", INIT_19 => X"6159534f4947433d3b352f2b29251f1d1713110d0b07050300002246cb153520", INIT_1A => X"0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a39d97958b89837f716d6b6765", INIT_1B => X"cdc9c1bbb7b1afa5a399918d857f7b756f67615d5b514b3d393733251b19150f", INIT_1C => X"95938d878381776b69655f5957514b413b39332d231d0b09fdf7f3ebe7dfd3cf", INIT_1D => X"73716d5f5b5955473d3b37352b291d130501f9f5efe7e3ddd7cfc5bdb3aba5a1", INIT_1E => X"3468d1a2458a152b56ac59b367cf9e3c78e5dfd7d1cbc7b9b3ada9a1978f8b77", INIT_1F => X"3468d1a2458a152b56ac59b367cf9e3c78000000010204091224489123468d1a", INIT_20 => X"010102030718110a03fcf5231c150e0700fffefcf9f2e4c99224489123468d1a", INIT_21 => X"7285a0c80b90212807e6c5a483a5846342210007070001020301010000000101", INIT_22 => X"ae6472856dc80b90212807e6c5a483a584634221000001030301010001005964", INIT_23 => X"01005d689c8b41d117a245c8833ef9b46f5914cf8a4500030103030001000100", INIT_24 => X"616f4953542b2c2d2e2f30313233343d3c3b3a39383736353400050103000100", INIT_25 => X"0000000100000000656e6b2064000a656f636d206e6500216f756f41652c7465", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block1 block2: if (block_count > 2) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block2 block3: if (block_count > 3) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block3 block4: if (block_count > 4) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block4 block5: if (block_count > 5) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block5 block6: if (block_count > 6) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block6 block7: if (block_count > 7) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block7 end; --architecture logic
gpl-3.0
6f516a12d7aed77e33a0814010739d13
0.843311
5.637524
false
false
false
false
elainemielas/CVUT_BI-PNO
project1/tb_kitt.vhd
1
1,482
library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; entity TB_KITT is end entity TB_KITT; architecture TB_KITT_BODY of TB_KITT is component KITT port ( CLK : in std_logic; INPUT : in std_logic_vector (7 downto 0); BTN0 : in std_logic; BTN1 : in std_logic; BTN2 : in std_logic; BTN3 : in std_logic; SEG : out STD_LOGIC_VECTOR (6 downto 0); -- 7 segmentu displeje DP_K : out STD_LOGIC; -- desetinna tecka DIG : out STD_LOGIC_VECTOR (3 downto 0) -- 4 cifry displeje ); end component; signal T_INPUT : std_logic_vector (7 downto 0); signal T_BTN0, T_BTN1, T_BTN2, T_BTN3, T_DP_K, T_CLK : std_logic; signal T_SEG : std_logic_vector (6 downto 0); signal T_DIG : std_logic_vector (3 downto 0); begin UUT : KITT port map (INPUT => T_INPUT, BTN0 => T_BTN0, BTN1 => T_BTN1, BTN2 => T_BTN2, BTN3 => T_BTN3, SEG => T_SEG, DP_K => T_DP_K, DIG => T_DIG, CLK => T_CLK); NECO : process begin T_CLK <= '0'; wait for 10 ns; T_CLK <= '1'; wait for 10 ns; end process; TEST : process begin T_INPUT <= (others => '0'); T_BTN0 <= '1'; T_BTN1 <= '0'; T_BTN2 <= '0'; T_BTN3 <= '0'; wait for 100 ns; T_BTN0 <= '0'; wait for 100 ns; for I in 1 to 4 loop T_INPUT <= conv_std_logic_vector(-I*8,8); T_BTN1 <= '1'; wait for 100 ns; T_BTN1 <= '0'; wait for 100 ns; end loop; wait; end process; end architecture;
mit
89277b22899b1913b63399082b0156e5
0.571525
2.511864
false
false
false
false
SKravitsky/ECEC412
InstructionMemoryPipeline.vhd
1
1,848
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity InstructionMemoryPipeline is port ( Address : in std_logic_vector(31 downto 0); ReadData : out std_logic_vector(31 downto 0) ); end InstructionMemoryPipeline; architecture Structural of InstructionMemoryPipeline is type mem_array is array(0 to 31) of std_logic_vector(31 downto 0); signal inst_mem: mem_array := ( -- Code 1 0 => X"02959820", -- add $s3, $s4, $s5 1 => X"8d100000", -- lw $s0, 0($t0) 2 => X"8d110004", -- lw $s1, 4($t0) 3 => X"0296b822", -- sub $s7, $s4, $s6 4 => X"ad130008", -- sw $s3, 8($t0) -- Code 2 -- 0 => X"02959820", -- add $s3, $s4, $s5 -- 1 => X"8d100000", -- lw $s0, 0($t0) -- 2 => X"8d110004", -- lw $s1, 4($t0) -- 3 => X"0296b822", -- sub $s7, $s4, $s6 -- 4 => X"ad170008", -- sw $s7, 8($t0) -- Code 3 -- 0 => X"02959820", -- add $s3, $s4, $s5 -- 1 => X"8d100000", -- lw $s0, 0($t0) -- 2 => X"8d110004", -- lw $s1, 4($t0) -- 3 => X"0296b822", -- sub $s7, $s4, $s6 -- 4 => X"00000020", -- nop -- 5 => X"00000020", -- nop -- 6 => X"ad170008", -- sw $s7, 8($t0) -- Code 4 -- 0 => X"112a0005", -- beq $t1, $t2, L -- 1 => X"00000020", -- nop -- 2 => X"00000020", -- nop -- 3 => X"00000020", -- nop -- 4 => X"02955820", -- add $t3, $s4, $s5 -- 5 => X"08000008", -- j exit -- 6 => X"02956022", -- L: sub $t4, $s4, $s5 -- 7 => X"02946820", -- add $t5, $s4, $s4 -- Code 5 -- 0 => X"112a0005", -- beq $t1, $t2, L -- 1 => X"00000020", -- nop -- 2 => X"02955820", -- add $t3, $s4, $s5 -- 3 => X"08000008", -- j exit -- 4 => X"02956022", -- L: sub $t4, $s4, $s5 -- 5 => X"02946820", -- add $t5, $s4, $s4 others => X"00000000" ); begin ReadData <= inst_mem(to_integer(unsigned(Address)) / 4); end Structural;
apache-2.0
cac5869e51e276852e69fe4c38dc589b
0.503247
2.4
false
false
false
false
Wynjones1/gbvhdl
synth/new/top.vhd
1
2,543
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity nexys2_rs232 is Port (btns : in STD_LOGIC_VECTOR(3 downto 0); rx : in STD_LOGIC; lclk : in STD_LOGIC; tx : out STD_LOGIC; leds : out STD_LOGIC_VECTOR(7 downto 0)); end nexys2_rs232; architecture Behavioral of nexys2_rs232 is signal count_out: STD_LOGIC_VECTOR(12 downto 0); signal count_in: STD_LOGIC_VECTOR(12 downto 0); signal data_out: STD_LOGIC_VECTOR( 9 downto 0) := "0000000001"; signal data_in: STD_LOGIC_VECTOR( 9 downto 0) := "0000000000"; signal holding: STD_LOGIC_VECTOR( 7 downto 0) := "00000000"; signal data_ready: STD_LOGIC := '0'; signal busy_out: STD_LOGIC := '0'; signal key_down: STD_LOGIC_VECTOR(1 downto 0) := "00"; begin process(lclk) begin if rising_edge(clk) then if btns(0) = '0' then key_down <= "00"; elsif btns(0) = '1' and key_down = "00" then key_down <= "01"; end if; if busy_out = '1' then if count_out = 5208 then for i in 0 to 8 loop data_out(i) <= data_out(i+1); end loop; data_out(9) <= '0'; count_out <= "0000000000000"; else count_out <= count_out + 1; end if; else if data_ready = '1' then data_out(8 downto 1) <= holding; data_out(9) <= '1'; data_out(0) <= '0'; data_ready <= '0'; elsif key_down = "01" then key_down <= "10"; data_out <= "1010000110"; end if; count_out <= "0000000000000"; end if; if data_in(0) = '1' then if count_in = 5208 then count_in <= "0000000000000"; for i in 0 to 8 loop data_in(i) <= data_in(i+1); end loop; data_in(9) <= rx; if data_in(1) = '0' then data_ready <= '1'; holding(7 downto 0) <= data_in(9 downto 2); end if; else count_in <= count_in + 1; end if; elsif rx = '0' then count_in <= "1111000000000"; data_in <= "0111111111"; end if; end if; end process; leds(0) <= '1' when rx = '0' else '0'; leds(1) <= '1' when data_out(0) = '0' else '0'; leds(2) <= busy_out; leds(3) <= data_in(0); leds(4) <= btns(0); leds(5) <= btns(1); leds(6) <= btns(2); leds(7) <= btns(3); tx <= data_out(0); busy_out <= '0' when data_out = "0000000001" else '1'; end Behavioral;
mit
9b528a82d36848e1e3e943ac8840ac53
0.519858
3.105006
false
false
false
false
Wynjones1/gbvhdl
src/memory.vhd
1
1,927
library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use std.textio.all; use work.types.all; use work.interfaces.all; entity memory is port( clk : in std_logic; reset : in std_logic; input : in memory_in_if; output : out memory_out_if); end entity; architecture rtl of memory is type rom_t is array (0 to (2 ** 16 - 1)) of byte_t; impure function init_mem(filename : in string) return rom_t is file input_file : text open read_mode is filename; variable mif_line : line; variable temp_bv : bit_vector(7 downto 0); variable rom : rom_t; begin rom := (others => (others => '1')); read_loop: for i in rom_t'range loop exit read_loop when endfile(input_file); readline(input_file, mif_line); read(mif_line, temp_bv); for j in 0 to 7 loop if temp_bv(j) = '1' then rom(i)(j) := '1'; else rom(i)(j) := '0'; end if; end loop; end loop; return rom; end function; signal rom : rom_t := init_mem("/home/stuart/VHDL/gbvhdl/bin/DMG_ROM.mif"); signal index : integer range 0 to (2 ** 16 - 1); begin process(clk, reset) begin if reset = '1' then output.valid <= '0'; rom <= init_mem("../bin/DMG_ROM.mif"); elsif rising_edge(clk) then output.valid <= '1'; if input.we = '1' then rom(index) <= input.data; end if; end if; end process; process(reset, input.address) begin if reset = '1' then index <= 0; else index <= to_integer(unsigned(input.address)); end if; end process; output.data <= (others => 'U') when reset = '1' else rom(index); end rtl;
mit
5f13967778015806aed920b127a1cdc9
0.513233
3.608614
false
false
false
false
simoesusp/Processador-ICMC
Processor_FPGA/Processor_Template_VHDL_DE70/keyboard.vhd
4
1,566
LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.all; USE IEEE.STD_LOGIC_ARITH.all; USE IEEE.STD_LOGIC_UNSIGNED.all; ENTITY keyboard IS PORT( keyboard_clk, keyboard_data, reset, read : IN STD_LOGIC; scan_code : OUT STD_LOGIC_VECTOR(7 DOWNTO 0); scan_ready : OUT STD_LOGIC); END keyboard; ARCHITECTURE a OF keyboard IS SIGNAL INCNT : std_logic_vector(3 downto 0); SIGNAL SHIFTIN : std_logic_vector(8 downto 0); SIGNAL READ_CHAR : std_logic; SIGNAL INFLAG, ready_set : std_logic; SIGNAL filter : std_logic_vector(7 downto 0); BEGIN PROCESS (read, ready_set) BEGIN IF read = '1' THEN scan_ready <= '0'; ELSIF ready_set'EVENT and ready_set = '1' THEN scan_ready <= '1'; END IF; END PROCESS; --This process reads in serial data coming from the terminal PROCESS BEGIN WAIT UNTIL (KEYBOARD_CLK'EVENT AND KEYBOARD_CLK='1'); IF RESET='1' THEN INCNT <= "0000"; READ_CHAR <= '0'; ELSE IF KEYBOARD_DATA='0' AND READ_CHAR='0' THEN READ_CHAR<= '1'; ready_set<= '0'; ELSE -- Shift in next 8 data bits to assemble a scan code IF READ_CHAR = '1' THEN IF INCNT < "1001" THEN INCNT <= INCNT + 1; SHIFTIN(7 DOWNTO 0) <= SHIFTIN(8 DOWNTO 1); SHIFTIN(8) <= KEYBOARD_DATA; ready_set <= '0'; -- End of scan code character, so set flags and exit loop ELSE scan_code <= SHIFTIN(7 DOWNTO 0); READ_CHAR <='0'; ready_set <= '1'; INCNT <= "0000"; END IF; END IF; END IF; END IF; END PROCESS; END a;
gpl-3.0
434fb9ddcf13582e18823204232ea66d
0.607918
3.017341
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/With_checkers/FIFO_one_hot_credit_based_packet_drop_classifier_support_checkers.vhd
3
51,348
--Copyright (C) 2016 Siavoosh Payandeh Azad and Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity FIFO_credit_based_control_part_checkers is port ( valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; read_pointer: in std_logic_vector(3 downto 0); read_pointer_in: in std_logic_vector(3 downto 0); write_pointer: in std_logic_vector(3 downto 0); write_pointer_in: in std_logic_vector(3 downto 0); credit_out: in std_logic; empty_out: in std_logic; full_out: in std_logic; read_en_out: in std_logic; write_en_out: in std_logic; fake_credit: in std_logic; fake_credit_counter: in std_logic_vector(1 downto 0); fake_credit_counter_in: in std_logic_vector(1 downto 0); state_out: in std_logic_vector(4 downto 0); state_in: in std_logic_vector(4 downto 0); fault_info: in std_logic; fault_info_out: in std_logic; fault_info_in: in std_logic; health_info: in std_logic; faulty_packet_out: in std_logic; faulty_packet_in: in std_logic; flit_type: in std_logic_vector(2 downto 0); fault_out: in std_logic; write_fake_flit: in std_logic; -- Functional checkers err_empty_full, err_empty_read_en, err_full_write_en, err_state_in_onehot, err_read_pointer_in_onehot, err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer, err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full, err_read_pointer_increment, err_read_pointer_not_increment, err_write_en, err_not_write_en, err_not_write_en1, err_not_write_en2, err_read_en_mismatch, err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_fault_info_in, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in : out std_logic ); end FIFO_credit_based_control_part_checkers; architecture behavior of FIFO_credit_based_control_part_checkers is CONSTANT Idle: std_logic_vector (4 downto 0) := "00001"; CONSTANT Header_flit: std_logic_vector (4 downto 0) := "00010"; CONSTANT Body_flit: std_logic_vector (4 downto 0) := "00100"; CONSTANT Tail_flit: std_logic_vector (4 downto 0) := "01000"; CONSTANT Packet_drop: std_logic_vector (4 downto 0) := "10000"; begin -- Functional Checkers (Might cover or be covered by some of the structural checkers) -- Empty and full cannot be high at the same time! process (empty_out, full_out) begin if (empty_out = '1' and full_out = '1') then err_empty_full <= '1'; else err_empty_full <= '0'; end if; end process; -- Reading from an empty FIFO is not possible! process (empty_out, read_en_out) begin if (empty_out = '1' and read_en_out = '1') then err_empty_read_en <= '1'; else err_empty_read_en <= '0'; end if; end process; -- Writing to a full FIFO is not possible! process (full_out, write_en_out) begin if (full_out = '1' and write_en_out = '1') then err_full_write_en <= '1'; else err_full_write_en <= '0'; end if; end process; -- The states of the packet dropping FSM of FIFO must always be one-hot (state_in)! process (state_in) begin if (state_in /= Idle and state_in /= Header_flit and state_in /= Body_flit and state_in /= Tail_flit and state_in /= Packet_drop) then err_state_in_onehot <= '1'; else err_state_in_onehot <= '0'; end if; end process; -- Read pointer must always be one-hot! process (read_pointer_in) begin if (read_pointer_in /= "0001" and read_pointer_in /= "0010" and read_pointer_in /= "0100" and read_pointer_in /= "1000") then err_read_pointer_in_onehot <= '1'; else err_read_pointer_in_onehot <= '0'; end if; end process; -- Write pointer must always be one-hot! process (write_pointer_in) begin if (write_pointer_in /= "0001" and write_pointer_in /= "0010" and write_pointer_in /= "0100" and write_pointer_in /= "1000") then err_write_pointer_in_onehot <= '1'; else err_write_pointer_in_onehot <= '0'; end if; end process; --------------------------------------------------------------------------------------------------------- -- Structural Checkers -- Write pointer and Read pointer checkers process (write_en_out, write_pointer_in, write_pointer) begin if (write_en_out = '1' and write_pointer_in /= (write_pointer(2 downto 0) & write_pointer(3)) ) then err_write_en_write_pointer <= '1'; else err_write_en_write_pointer <= '0'; end if; end process; -- Checked ! process (write_en_out, write_pointer_in, write_pointer) begin if (write_en_out = '0' and write_pointer_in /= write_pointer ) then err_not_write_en_write_pointer <= '1'; else err_not_write_en_write_pointer <= '0'; end if; end process; -- Checked ! process (read_pointer, write_pointer, empty_out) begin if (read_pointer = write_pointer and empty_out = '0' ) then err_read_pointer_write_pointer_not_empty <= '1'; else err_read_pointer_write_pointer_not_empty <= '0'; end if; end process; -- Checked ! process (read_pointer, write_pointer, empty_out) begin if (read_pointer /= write_pointer and empty_out = '1' ) then err_read_pointer_write_pointer_empty <= '1'; else err_read_pointer_write_pointer_empty <= '0'; end if; end process; -- Checked ! process (write_pointer, read_pointer, full_out) begin if (write_pointer = (read_pointer(0)&read_pointer(3 downto 1)) and full_out = '0' ) then err_read_pointer_write_pointer_not_full <= '1'; else err_read_pointer_write_pointer_not_full <= '0'; end if; end process; -- Checked ! process (write_pointer, read_pointer, full_out) begin if (write_pointer /= (read_pointer(0)&read_pointer(3 downto 1)) and full_out = '1' ) then err_read_pointer_write_pointer_full <= '1'; else err_read_pointer_write_pointer_full <= '0'; end if; end process; -- Checked ! process (read_en_out, empty_out, read_pointer_in, read_pointer) begin if (read_en_out = '1' and empty_out = '0' and read_pointer_in /= (read_pointer(2 downto 0)&read_pointer(3)) ) then err_read_pointer_increment <= '1'; else err_read_pointer_increment <= '0'; end if; end process; -- Checked ! process (read_en_out, empty_out, read_pointer_in, read_pointer) begin if ( (read_en_out = '0' or empty_out = '1') and read_pointer_in /= read_pointer ) then err_read_pointer_not_increment <= '1'; else err_read_pointer_not_increment <= '0'; end if; end process; -- Checked ! process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if (valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full_out ='0' and write_en_out = '0') then err_write_en <= '1'; else err_write_en <= '0'; end if; end process; -- Updated ! process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( (valid_in = '0' or (((faulty_packet_out = '1' or fault_out = '1') and write_fake_flit = '0')) or full_out = '1') and write_en_out = '1') then err_not_write_en <= '1'; else err_not_write_en <= '0'; end if; end process; process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( valid_in = '1' and ((faulty_packet_out = '1' or fault_out = '1') and write_fake_flit = '0') and write_en_out = '1') then err_not_write_en1 <= '1'; else err_not_write_en1 <= '0'; end if; end process; process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full_out = '1' and write_en_out = '1') then err_not_write_en2 <= '1'; else err_not_write_en2 <= '0'; end if; end process; -- Updated ! process (read_en_N, read_en_E, read_en_W, read_en_S, read_en_L, empty_out, read_en_out) begin if ( (read_en_N = '1' or read_en_E = '1' or read_en_W = '1' or read_en_S = '1' or read_en_L = '1') and empty_out = '0' and read_en_out = '0' ) then err_read_en_mismatch <= '1'; else err_read_en_mismatch <= '0'; end if; end process; process (read_en_N, read_en_E, read_en_W, read_en_S, read_en_L, empty_out, read_en_out) begin if ( ((read_en_N = '0' and read_en_E = '0' and read_en_W = '0' and read_en_S = '0' and read_en_L = '0') or empty_out = '1') and read_en_out = '1' ) then err_read_en_mismatch1 <= '1'; else err_read_en_mismatch1 <= '0'; end if; end process; -- Newly added checkers for FIFO with packet drop and fault classifier support! process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '1' and read_en_out = '1' and fake_credit_counter_in /= fake_credit_counter + 1) then err_fake_credit_read_en_fake_credit_counter_in_increment <= '1'; else err_fake_credit_read_en_fake_credit_counter_in_increment <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, fake_credit_counter_in) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter > 0 and fake_credit_counter_in /= fake_credit_counter - 1 ) then err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '0' and read_en_out = '1' and fake_credit_counter_in /= fake_credit_counter) then err_not_fake_credit_read_en_fake_credit_counter_in_not_change <= '1'; else err_not_fake_credit_read_en_fake_credit_counter_in_not_change <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '1' and read_en_out = '0' and fake_credit_counter_in /= fake_credit_counter) then err_fake_credit_not_read_en_fake_credit_counter_in_not_change <= '1'; else err_fake_credit_not_read_en_fake_credit_counter_in_not_change <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, fake_credit_counter_in) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter <= 0 and fake_credit_counter_in /= fake_credit_counter) then err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change <= '0'; end if; end process; process (fake_credit, read_en_out, credit_out) begin if ((fake_credit = '1' or read_en_out ='1') and credit_out = '0') then err_fake_credit_read_en_credit_out <= '1'; else err_fake_credit_read_en_credit_out <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, credit_out) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter > 0 and credit_out = '0') then err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, credit_out) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter <= 0 and credit_out = '1') then err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -- Idle state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, fault_out, valid_in, state_in) begin if (state_out = Idle and fault_out = '0' and valid_in = '1' and state_in /= Header_flit) then err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit <= '1'; else err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit <= '0'; end if; end process; process (state_out, fault_out, valid_in, state_in, state_out) begin if (state_out = Idle and fault_out = '0' and valid_in = '0' and state_in /= state_out) then err_state_out_Idle_not_fault_out_valid_in_state_in_not_change <= '1'; else err_state_out_Idle_not_fault_out_valid_in_state_in_not_change <= '0'; end if; end process; process (state_out, fault_out, fake_credit) begin if (state_out = Idle and fault_out = '0' and fake_credit = '1') then err_state_out_Idle_not_fault_out_not_fake_credit <= '1'; else err_state_out_Idle_not_fault_out_not_fake_credit <= '0'; end if; end process; process (state_out, fault_out, fault_info_in) begin if (state_out = Idle and fault_out = '0' and fault_info_in = '1') then err_state_out_Idle_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Idle_not_fault_out_not_fault_info_in <= '0'; end if; end process; process (state_out, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Idle and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal <= '1'; else err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, fault_out, fake_credit) begin if (state_out = Idle and fault_out = '1' and fake_credit = '0') then err_state_out_Idle_fault_out_fake_credit <= '1'; else err_state_out_Idle_fault_out_fake_credit <= '0'; end if; end process; process (state_out, fault_out, state_in) begin if (state_out = Idle and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Idle_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Idle_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, fault_out, fault_info_in) begin if (state_out = Idle and fault_out = '1' and fault_info_in = '0') then err_state_out_Idle_fault_out_fault_info_in <= '1'; else err_state_out_Idle_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, fault_out, faulty_packet_in) begin if (state_out = Idle and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Idle_fault_out_faulty_packet_in <= '1'; else err_state_out_Idle_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, write_fake_flit) begin if (state_out = Idle and write_fake_flit = '1') then err_state_out_Idle_not_write_fake_flit <= '1'; else err_state_out_Idle_not_write_fake_flit <= '0'; end if; end process; -- Other properties for Idle state -------------------------------------------------------------------------------------------------- process (state_out, health_info) begin if ( (state_out = Idle or state_out = Header_flit or state_out = Tail_flit or state_out = Packet_drop) and health_info = '1') then err_state_out_Idle_not_health_info <= '1'; else err_state_out_Idle_not_health_info <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Header_flit state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and flit_type = "010" and state_in /= Body_flit) then err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and state_in /= Tail_flit) then err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and write_fake_flit = '1') then err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and write_fake_flit = '0') then err_state_out_Header_flit_valid_in_fault_out_write_fake_flit <= '1'; else err_state_out_Header_flit_valid_in_fault_out_write_fake_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Header_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Header_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, valid_in, state_in, state_out) begin if (state_out = Header_flit and valid_in = '0' and state_in /= state_out) then err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Header_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_info_in) begin if (state_out = Header_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Header_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Header_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, write_fake_flit) begin if (state_out = Header_flit and valid_in = '0' and write_fake_flit = '1') then err_state_out_Header_flit_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Header_flit_not_valid_in_not_write_fake_flit <= '0'; end if; end process; process (state_out, fake_credit) begin if ( (state_out = Header_flit or state_out = Body_flit) and fake_credit /= '0') then err_state_out_Header_flit_or_Body_flit_not_fake_credit <= '1'; else err_state_out_Header_flit_or_Body_flit_not_fake_credit <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Body_flit state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in, state_out) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "010" and state_in /= state_out) then err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and state_in /= Tail_flit) then err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and health_info = '0') then err_state_out_Body_flit_valid_in_not_fault_out_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_health_info <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type /= "100" and health_info = '1') then err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info <= '0'; end if; end process; process (state_out, valid_in, fault_out, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and health_info = '1') then err_state_out_Body_flit_valid_in_fault_out_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_fault_out_not_health_info <= '0'; end if; end process; process (state_out, valid_in, health_info) begin if (state_out = Body_flit and valid_in = '0' and health_info = '1') then err_state_out_Body_flit_valid_in_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_health_info <= '0'; end if; end process; process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and write_fake_flit = '1') then err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and write_fake_flit = '0') then err_state_out_Body_flit_valid_in_fault_out_write_fake_flit <= '1'; else err_state_out_Body_flit_valid_in_fault_out_write_fake_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Body_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Body_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, valid_in, state_in) begin if (state_out = Body_flit and valid_in = '0' and state_in /= state_out) then err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Body_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_info_in) begin if (state_out = Body_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Body_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Body_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; process (state_out, fake_credit) begin if (state_out = Body_flit and fake_credit = '1') then err_state_out_Body_flit_not_fake_credit <= '1'; else err_state_out_Body_flit_not_fake_credit <= '0'; end if; end process; process (state_out, valid_in, write_fake_flit) begin if (state_out = Body_flit and valid_in = '0' and write_fake_flit = '1') then err_state_out_Body_flit_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Body_flit_not_valid_in_not_write_fake_flit <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Tail_flit state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and flit_type = "001" and state_in /= Header_flit) then err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, fake_credit) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and fake_credit = '1') then err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, fake_credit) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and fake_credit /= '1') then err_state_out_Tail_flit_valid_in_fault_out_fake_credit <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_fake_credit <= '0'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Tail_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, valid_in, state_in) begin if (state_out = Tail_flit and valid_in = '0' and state_in /= Idle) then err_state_out_Tail_flit_not_valid_in_state_in_Idle <= '1'; else err_state_out_Tail_flit_not_valid_in_state_in_Idle <= '0'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Tail_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change <= '1'; else err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_info_in) begin if (state_out = Tail_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Tail_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Tail_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fake_credit) begin if (state_out = Tail_flit and valid_in = '0' and fake_credit /= '0') then err_state_out_Tail_flit_not_valid_in_not_fake_credit <= '1'; else err_state_out_Tail_flit_not_valid_in_not_fake_credit <= '0'; end if; end process; process (state_out, write_fake_flit) begin if (state_out = Tail_flit and write_fake_flit = '1') then err_state_out_Tail_flit_not_write_fake_flit <= '1'; else err_state_out_Tail_flit_not_write_fake_flit <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Packet_drop state -- faulty_packet_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and fake_credit /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and faulty_packet_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and state_in /= Header_flit) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and write_fake_flit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '1' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and faulty_packet_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '1' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and state_in /= Idle) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and fake_credit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and ((flit_type /= "001" and flit_type /= "100") or fault_out = '1') and fake_credit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and ( valid_in = '0' or (flit_type /= "001" and flit_type /= "100") or fault_out = '1' ) and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and ((flit_type /= "001" and flit_type /= "100") or fault_out = '1') and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and write_fake_flit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and fake_credit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit <= '0'; end if; end process; -- faulty_packet_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, faulty_packet_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '0' and state_in /= state_out) then err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, fault_info_in) begin if (state_out = Packet_drop and fault_info_in = '1') then err_state_out_Packet_drop_not_fault_info_in <= '1'; else err_state_out_Packet_drop_not_fault_info_in <= '0'; end if; end process; process (state_out, faulty_packet_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '0' and fake_credit = '1') then err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and (valid_in = '0' or flit_type /= "001" or fault_out = '1') and write_fake_flit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '0' and write_fake_flit = '1') then err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit <= '0'; end if; end process; process (fault_info, fault_info_out) begin if (fault_info /= fault_info_out) then err_fault_info_fault_info_out_equal <= '1'; else err_fault_info_fault_info_out_equal <= '0'; end if; end process; process (state_out, valid_in, state_in, state_out) begin if (state_out = Packet_drop and valid_in = '0' and state_in /= state_out) then err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal <= '1'; else err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in, state_out) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and flit_type /= "001" and state_in /= state_out) then err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal <= '0'; end if; end process; -- Added after change of design ! process (state_out, faulty_packet_out, valid_in, flit_type, fault_info_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_info_in /= '1') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fault_info_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and (valid_in = '0' or flit_type /= "001") and fault_info_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in <= '0'; end if; end process; end behavior;
gpl-3.0
f5479ddeeff0f494fb390c3dccf2d9bc
0.667757
2.701105
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/archive/IMMORTAL_Chip_2017/Router_32_bit_credit_based_packet_drop_classifier_SHMU_will_full_set_of_checkers.vhd
3
585,940
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; --use IEEE.STD_LOGIC_ARITH.ALL; --use IEEE.STD_LOGIC_UNSIGNED.ALL; entity router_credit_based_PD_C_SHMU is --fault classifier plus packet-dropping generic ( DATA_WIDTH: integer := 32; current_address : integer := 0; Rxy_rst : integer := 10; Cx_rst : integer := 10; healthy_counter_threshold : integer := 8; faulty_counter_threshold: integer := 2; counter_depth: integer := 4; NoC_size: integer := 4 ); port ( reset, clk: in std_logic; RX_N, RX_E, RX_W, RX_S, RX_L : in std_logic_vector (DATA_WIDTH-1 downto 0); credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; valid_in_N, valid_in_E, valid_in_W, valid_in_S, valid_in_L : in std_logic; valid_out_N, valid_out_E, valid_out_W, valid_out_S, valid_out_L : out std_logic; credit_out_N, credit_out_E, credit_out_W, credit_out_S, credit_out_L: out std_logic; TX_N, TX_E, TX_W, TX_S, TX_L: out std_logic_vector (DATA_WIDTH-1 downto 0); Faulty_N_in, Faulty_E_in, Faulty_W_in, Faulty_S_in: in std_logic; Faulty_N_out, Faulty_E_out, Faulty_W_out, Faulty_S_out: out std_logic; -- should be connected to NI link_faults: out std_logic_vector(4 downto 0); turn_faults: out std_logic_vector(19 downto 0); Rxy_reconf_PE: in std_logic_vector(7 downto 0); Cx_reconf_PE: in std_logic_vector(3 downto 0); Reconfig_command : in std_logic ); end router_credit_based_PD_C_SHMU; architecture behavior of router_credit_based_PD_C_SHMU is COMPONENT FIFO_credit_based is generic ( DATA_WIDTH: integer := 32 ); port ( reset: in std_logic; clk: in std_logic; RX: in std_logic_vector(DATA_WIDTH-1 downto 0); valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; credit_out: out std_logic; empty_out: out std_logic; Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0); fault_info, health_info: out std_logic; -- Checker outputs -- Functional checkers err_empty_full, err_empty_read_en, err_full_write_en, err_state_in_onehot, err_read_pointer_in_onehot, err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer, err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full, err_read_pointer_increment, err_read_pointer_not_increment, err_write_en, err_not_write_en, err_not_write_en1, err_not_write_en2, err_read_en_mismatch, err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in : out std_logic ); end COMPONENT; COMPONENT counter_threshold_classifier is generic ( counter_depth: integer := 8; healthy_counter_threshold: integer := 4; faulty_counter_threshold: integer := 4 ); port ( reset: in std_logic; clk: in std_logic; faulty_packet, Healthy_packet: in std_logic; Healthy, intermittent, Faulty: out std_logic ); end COMPONENT; COMPONENT checkers_counter_threshold_classifier is generic ( counter_depth: integer := 8; healthy_counter_threshold: integer := 4; faulty_counter_threshold: integer := 4 ); port ( reset: in std_logic; clk: in std_logic; data_input: in std_logic; Healthy, Intermittent, Faulty: out std_logic ); end COMPONENT; COMPONENT allocator is port ( reset: in std_logic; clk: in std_logic; -- flow control credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; req_N_N, req_N_E, req_N_W, req_N_S, req_N_L: in std_logic; req_E_N, req_E_E, req_E_W, req_E_S, req_E_L: in std_logic; req_W_N, req_W_E, req_W_W, req_W_S, req_W_L: in std_logic; req_S_N, req_S_E, req_S_W, req_S_S, req_S_L: in std_logic; req_L_N, req_L_E, req_L_W, req_L_S, req_L_L: in std_logic; empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! valid_N, valid_E, valid_W, valid_S, valid_L : out std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: out std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: out std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: out std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: out std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: out std_logic; -- Allocator logic checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match, -- Allocator credit counter logic checker outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_N_credit_counter_N_out_increment, err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change, err_grant_N_credit_counter_N_out_decrement, err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change, err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_E_credit_counter_E_out_increment, err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change, err_grant_E_credit_counter_E_out_decrement, err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change, err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_W_credit_counter_W_out_increment, err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change, err_grant_W_credit_counter_W_out_decrement, err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change, err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_S_credit_counter_S_out_increment, err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change, err_grant_S_credit_counter_S_out_decrement, err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change, err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal, err_credit_in_L_credit_counter_L_out_increment, err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change, err_grant_L_credit_counter_L_out_decrement, err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change, err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal, -- Arbiter_in checker outputs -- North Arbiter_in checker outputs N_err_Requests_state_in_state_not_equal, N_err_IDLE_Req_N, N_err_IDLE_grant_N, N_err_North_Req_N, N_err_North_grant_N, N_err_East_Req_E, N_err_East_grant_E, N_err_West_Req_W, N_err_West_grant_W, N_err_South_Req_S, N_err_South_grant_S, N_err_Local_Req_L, N_err_Local_grant_L, N_err_IDLE_Req_E, N_err_IDLE_grant_E, N_err_North_Req_E, N_err_North_grant_E, N_err_East_Req_W, N_err_East_grant_W, N_err_West_Req_S, N_err_West_grant_S, N_err_South_Req_L, N_err_South_grant_L, N_err_Local_Req_N, N_err_Local_grant_N, N_err_IDLE_Req_W, N_err_IDLE_grant_W, N_err_North_Req_W, N_err_North_grant_W, N_err_East_Req_S, N_err_East_grant_S, N_err_West_Req_L, N_err_West_grant_L, N_err_South_Req_N, N_err_South_grant_N, N_err_Local_Req_E, N_err_Local_grant_E, N_err_IDLE_Req_S, N_err_IDLE_grant_S, N_err_North_Req_S, N_err_North_grant_S, N_err_East_Req_L, N_err_East_grant_L, N_err_West_Req_N, N_err_West_grant_N, N_err_South_Req_E, N_err_South_grant_E, N_err_Local_Req_W, N_err_Local_grant_W, N_err_IDLE_Req_L, N_err_IDLE_grant_L, N_err_North_Req_L, N_err_North_grant_L, N_err_East_Req_N, N_err_East_grant_N, N_err_West_Req_E, N_err_West_grant_E, N_err_South_Req_W, N_err_South_grant_W, N_err_Local_Req_S, N_err_Local_grant_S, N_err_state_in_onehot, N_err_no_request_grants, N_err_request_no_grants, N_err_no_Req_N_grant_N, N_err_no_Req_E_grant_E, N_err_no_Req_W_grant_W, N_err_no_Req_S_grant_S, N_err_no_Req_L_grant_L, -- East Arbiter_in checker outputs E_err_Requests_state_in_state_not_equal, E_err_IDLE_Req_N, E_err_IDLE_grant_N, E_err_North_Req_N, E_err_North_grant_N, E_err_East_Req_E, E_err_East_grant_E, E_err_West_Req_W, E_err_West_grant_W, E_err_South_Req_S, E_err_South_grant_S, E_err_Local_Req_L, E_err_Local_grant_L, E_err_IDLE_Req_E, E_err_IDLE_grant_E, E_err_North_Req_E, E_err_North_grant_E, E_err_East_Req_W, E_err_East_grant_W, E_err_West_Req_S, E_err_West_grant_S, E_err_South_Req_L, E_err_South_grant_L, E_err_Local_Req_N, E_err_Local_grant_N, E_err_IDLE_Req_W, E_err_IDLE_grant_W, E_err_North_Req_W, E_err_North_grant_W, E_err_East_Req_S, E_err_East_grant_S, E_err_West_Req_L, E_err_West_grant_L, E_err_South_Req_N, E_err_South_grant_N, E_err_Local_Req_E, E_err_Local_grant_E, E_err_IDLE_Req_S, E_err_IDLE_grant_S, E_err_North_Req_S, E_err_North_grant_S, E_err_East_Req_L, E_err_East_grant_L, E_err_West_Req_N, E_err_West_grant_N, E_err_South_Req_E, E_err_South_grant_E, E_err_Local_Req_W, E_err_Local_grant_W, E_err_IDLE_Req_L, E_err_IDLE_grant_L, E_err_North_Req_L, E_err_North_grant_L, E_err_East_Req_N, E_err_East_grant_N, E_err_West_Req_E, E_err_West_grant_E, E_err_South_Req_W, E_err_South_grant_W, E_err_Local_Req_S, E_err_Local_grant_S, E_err_state_in_onehot, E_err_no_request_grants, E_err_request_no_grants, E_err_no_Req_N_grant_N, E_err_no_Req_E_grant_E, E_err_no_Req_W_grant_W, E_err_no_Req_S_grant_S, E_err_no_Req_L_grant_L, -- West Arbiter_in checker outputs W_err_Requests_state_in_state_not_equal, W_err_IDLE_Req_N, W_err_IDLE_grant_N, W_err_North_Req_N, W_err_North_grant_N, W_err_East_Req_E, W_err_East_grant_E, W_err_West_Req_W, W_err_West_grant_W, W_err_South_Req_S, W_err_South_grant_S, W_err_Local_Req_L, W_err_Local_grant_L, W_err_IDLE_Req_E, W_err_IDLE_grant_E, W_err_North_Req_E, W_err_North_grant_E, W_err_East_Req_W, W_err_East_grant_W, W_err_West_Req_S, W_err_West_grant_S, W_err_South_Req_L, W_err_South_grant_L, W_err_Local_Req_N, W_err_Local_grant_N, W_err_IDLE_Req_W, W_err_IDLE_grant_W, W_err_North_Req_W, W_err_North_grant_W, W_err_East_Req_S, W_err_East_grant_S, W_err_West_Req_L, W_err_West_grant_L, W_err_South_Req_N, W_err_South_grant_N, W_err_Local_Req_E, W_err_Local_grant_E, W_err_IDLE_Req_S, W_err_IDLE_grant_S, W_err_North_Req_S, W_err_North_grant_S, W_err_East_Req_L, W_err_East_grant_L, W_err_West_Req_N, W_err_West_grant_N, W_err_South_Req_E, W_err_South_grant_E, W_err_Local_Req_W, W_err_Local_grant_W, W_err_IDLE_Req_L, W_err_IDLE_grant_L, W_err_North_Req_L, W_err_North_grant_L, W_err_East_Req_N, W_err_East_grant_N, W_err_West_Req_E, W_err_West_grant_E, W_err_South_Req_W, W_err_South_grant_W, W_err_Local_Req_S, W_err_Local_grant_S, W_err_state_in_onehot, W_err_no_request_grants, W_err_request_no_grants, W_err_no_Req_N_grant_N, W_err_no_Req_E_grant_E, W_err_no_Req_W_grant_W, W_err_no_Req_S_grant_S, W_err_no_Req_L_grant_L, -- South Arbiter_in checker outputs S_err_Requests_state_in_state_not_equal, S_err_IDLE_Req_N, S_err_IDLE_grant_N, S_err_North_Req_N, S_err_North_grant_N, S_err_East_Req_E, S_err_East_grant_E, S_err_West_Req_W, S_err_West_grant_W, S_err_South_Req_S, S_err_South_grant_S, S_err_Local_Req_L, S_err_Local_grant_L, S_err_IDLE_Req_E, S_err_IDLE_grant_E, S_err_North_Req_E, S_err_North_grant_E, S_err_East_Req_W, S_err_East_grant_W, S_err_West_Req_S, S_err_West_grant_S, S_err_South_Req_L, S_err_South_grant_L, S_err_Local_Req_N, S_err_Local_grant_N, S_err_IDLE_Req_W, S_err_IDLE_grant_W, S_err_North_Req_W, S_err_North_grant_W, S_err_East_Req_S, S_err_East_grant_S, S_err_West_Req_L, S_err_West_grant_L, S_err_South_Req_N, S_err_South_grant_N, S_err_Local_Req_E, S_err_Local_grant_E, S_err_IDLE_Req_S, S_err_IDLE_grant_S, S_err_North_Req_S, S_err_North_grant_S, S_err_East_Req_L, S_err_East_grant_L, S_err_West_Req_N, S_err_West_grant_N, S_err_South_Req_E, S_err_South_grant_E, S_err_Local_Req_W, S_err_Local_grant_W, S_err_IDLE_Req_L, S_err_IDLE_grant_L, S_err_North_Req_L, S_err_North_grant_L, S_err_East_Req_N, S_err_East_grant_N, S_err_West_Req_E, S_err_West_grant_E, S_err_South_Req_W, S_err_South_grant_W, S_err_Local_Req_S, S_err_Local_grant_S, S_err_state_in_onehot, S_err_no_request_grants, S_err_request_no_grants, S_err_no_Req_N_grant_N, S_err_no_Req_E_grant_E, S_err_no_Req_W_grant_W, S_err_no_Req_S_grant_S, S_err_no_Req_L_grant_L, -- Local Arbiter_in checker outputs L_err_Requests_state_in_state_not_equal, L_err_IDLE_Req_N, L_err_IDLE_grant_N, L_err_North_Req_N, L_err_North_grant_N, L_err_East_Req_E, L_err_East_grant_E, L_err_West_Req_W, L_err_West_grant_W, L_err_South_Req_S, L_err_South_grant_S, L_err_Local_Req_L, L_err_Local_grant_L, L_err_IDLE_Req_E, L_err_IDLE_grant_E, L_err_North_Req_E, L_err_North_grant_E, L_err_East_Req_W, L_err_East_grant_W, L_err_West_Req_S, L_err_West_grant_S, L_err_South_Req_L, L_err_South_grant_L, L_err_Local_Req_N, L_err_Local_grant_N, L_err_IDLE_Req_W, L_err_IDLE_grant_W, L_err_North_Req_W, L_err_North_grant_W, L_err_East_Req_S, L_err_East_grant_S, L_err_West_Req_L, L_err_West_grant_L, L_err_South_Req_N, L_err_South_grant_N, L_err_Local_Req_E, L_err_Local_grant_E, L_err_IDLE_Req_S, L_err_IDLE_grant_S, L_err_North_Req_S, L_err_North_grant_S, L_err_East_Req_L, L_err_East_grant_L, L_err_West_Req_N, L_err_West_grant_N, L_err_South_Req_E, L_err_South_grant_E, L_err_Local_Req_W, L_err_Local_grant_W, L_err_IDLE_Req_L, L_err_IDLE_grant_L, L_err_North_Req_L, L_err_North_grant_L, L_err_East_Req_N, L_err_East_grant_N, L_err_West_Req_E, L_err_West_grant_E, L_err_South_Req_W, L_err_South_grant_W, L_err_Local_Req_S, L_err_Local_grant_S, L_err_state_in_onehot, L_err_no_request_grants, L_err_request_no_grants, L_err_no_Req_N_grant_N, L_err_no_Req_E_grant_E, L_err_no_Req_W_grant_W, L_err_no_Req_S_grant_S, L_err_no_Req_L_grant_L, -- Arbiter_out checker outputs -- North Arbiter_out checker outputs N_arbiter_out_err_Requests_state_in_state_not_equal, N_err_IDLE_req_X_N, N_err_North_req_X_N, N_err_North_credit_not_zero_req_X_N_grant_N, N_err_North_credit_zero_or_not_req_X_N_not_grant_N, N_err_East_req_X_E, N_err_East_credit_not_zero_req_X_E_grant_E, N_err_East_credit_zero_or_not_req_X_E_not_grant_E, N_err_West_req_X_W, N_err_West_credit_not_zero_req_X_W_grant_W, N_err_West_credit_zero_or_not_req_X_W_not_grant_W, N_err_South_req_X_S, N_err_South_credit_not_zero_req_X_S_grant_S, N_err_South_credit_zero_or_not_req_X_S_not_grant_S, N_err_Local_req_X_L, N_err_Local_credit_not_zero_req_X_L_grant_L, N_err_Local_credit_zero_or_not_req_X_L_not_grant_L, N_err_IDLE_req_X_E, N_err_North_req_X_E, N_err_East_req_X_W, N_err_West_req_X_S, N_err_South_req_X_L, N_err_Local_req_X_N, N_err_IDLE_req_X_W, N_err_North_req_X_W, N_err_East_req_X_S, N_err_West_req_X_L, N_err_South_req_X_N, N_err_Local_req_X_E, N_err_IDLE_req_X_S, N_err_North_req_X_S, N_err_East_req_X_L, N_err_West_req_X_N, N_err_South_req_X_E, N_err_Local_req_X_W, N_err_IDLE_req_X_L, N_err_North_req_X_L, N_err_East_req_X_N, N_err_West_req_X_E, N_err_South_req_X_W, N_err_Local_req_X_S, N_arbiter_out_err_state_in_onehot, N_arbiter_out_err_no_request_grants, N_err_request_IDLE_state, N_err_request_IDLE_not_Grants, N_err_state_North_Invalid_Grant, N_err_state_East_Invalid_Grant, N_err_state_West_Invalid_Grant, N_err_state_South_Invalid_Grant, N_err_state_Local_Invalid_Grant, N_err_Grants_onehot_or_all_zero, -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal, E_err_IDLE_req_X_N, E_err_North_req_X_N, E_err_North_credit_not_zero_req_X_N_grant_N, E_err_North_credit_zero_or_not_req_X_N_not_grant_N, E_err_East_req_X_E, E_err_East_credit_not_zero_req_X_E_grant_E, E_err_East_credit_zero_or_not_req_X_E_not_grant_E, E_err_West_req_X_W, E_err_West_credit_not_zero_req_X_W_grant_W, E_err_West_credit_zero_or_not_req_X_W_not_grant_W, E_err_South_req_X_S, E_err_South_credit_not_zero_req_X_S_grant_S, E_err_South_credit_zero_or_not_req_X_S_not_grant_S, E_err_Local_req_X_L, E_err_Local_credit_not_zero_req_X_L_grant_L, E_err_Local_credit_zero_or_not_req_X_L_not_grant_L, E_err_IDLE_req_X_E, E_err_North_req_X_E, E_err_East_req_X_W, E_err_West_req_X_S, E_err_South_req_X_L, E_err_Local_req_X_N, E_err_IDLE_req_X_W, E_err_North_req_X_W, E_err_East_req_X_S, E_err_West_req_X_L, E_err_South_req_X_N, E_err_Local_req_X_E, E_err_IDLE_req_X_S, E_err_North_req_X_S, E_err_East_req_X_L, E_err_West_req_X_N, E_err_South_req_X_E, E_err_Local_req_X_W, E_err_IDLE_req_X_L, E_err_North_req_X_L, E_err_East_req_X_N, E_err_West_req_X_E, E_err_South_req_X_W, E_err_Local_req_X_S, E_arbiter_out_err_state_in_onehot, E_arbiter_out_err_no_request_grants, E_err_request_IDLE_state, E_err_request_IDLE_not_Grants, E_err_state_North_Invalid_Grant, E_err_state_East_Invalid_Grant, E_err_state_West_Invalid_Grant, E_err_state_South_Invalid_Grant, E_err_state_Local_Invalid_Grant, E_err_Grants_onehot_or_all_zero, -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal, W_err_IDLE_req_X_N, W_err_North_req_X_N, W_err_North_credit_not_zero_req_X_N_grant_N, W_err_North_credit_zero_or_not_req_X_N_not_grant_N, W_err_East_req_X_E, W_err_East_credit_not_zero_req_X_E_grant_E, W_err_East_credit_zero_or_not_req_X_E_not_grant_E, W_err_West_req_X_W, W_err_West_credit_not_zero_req_X_W_grant_W, W_err_West_credit_zero_or_not_req_X_W_not_grant_W, W_err_South_req_X_S, W_err_South_credit_not_zero_req_X_S_grant_S, W_err_South_credit_zero_or_not_req_X_S_not_grant_S, W_err_Local_req_X_L, W_err_Local_credit_not_zero_req_X_L_grant_L, W_err_Local_credit_zero_or_not_req_X_L_not_grant_L, W_err_IDLE_req_X_E, W_err_North_req_X_E, W_err_East_req_X_W, W_err_West_req_X_S, W_err_South_req_X_L, W_err_Local_req_X_N, W_err_IDLE_req_X_W, W_err_North_req_X_W, W_err_East_req_X_S, W_err_West_req_X_L, W_err_South_req_X_N, W_err_Local_req_X_E, W_err_IDLE_req_X_S, W_err_North_req_X_S, W_err_East_req_X_L, W_err_West_req_X_N, W_err_South_req_X_E, W_err_Local_req_X_W, W_err_IDLE_req_X_L, W_err_North_req_X_L, W_err_East_req_X_N, W_err_West_req_X_E, W_err_South_req_X_W, W_err_Local_req_X_S, W_arbiter_out_err_state_in_onehot, W_arbiter_out_err_no_request_grants, W_err_request_IDLE_state, W_err_request_IDLE_not_Grants, W_err_state_North_Invalid_Grant, W_err_state_East_Invalid_Grant, W_err_state_West_Invalid_Grant, W_err_state_South_Invalid_Grant, W_err_state_Local_Invalid_Grant, W_err_Grants_onehot_or_all_zero, -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal, S_err_IDLE_req_X_N, S_err_North_req_X_N, S_err_North_credit_not_zero_req_X_N_grant_N, S_err_North_credit_zero_or_not_req_X_N_not_grant_N, S_err_East_req_X_E, S_err_East_credit_not_zero_req_X_E_grant_E, S_err_East_credit_zero_or_not_req_X_E_not_grant_E, S_err_West_req_X_W, S_err_West_credit_not_zero_req_X_W_grant_W, S_err_West_credit_zero_or_not_req_X_W_not_grant_W, S_err_South_req_X_S, S_err_South_credit_not_zero_req_X_S_grant_S, S_err_South_credit_zero_or_not_req_X_S_not_grant_S, S_err_Local_req_X_L, S_err_Local_credit_not_zero_req_X_L_grant_L, S_err_Local_credit_zero_or_not_req_X_L_not_grant_L, S_err_IDLE_req_X_E, S_err_North_req_X_E, S_err_East_req_X_W, S_err_West_req_X_S, S_err_South_req_X_L, S_err_Local_req_X_N, S_err_IDLE_req_X_W, S_err_North_req_X_W, S_err_East_req_X_S, S_err_West_req_X_L, S_err_South_req_X_N, S_err_Local_req_X_E, S_err_IDLE_req_X_S, S_err_North_req_X_S, S_err_East_req_X_L, S_err_West_req_X_N, S_err_South_req_X_E, S_err_Local_req_X_W, S_err_IDLE_req_X_L, S_err_North_req_X_L, S_err_East_req_X_N, S_err_West_req_X_E, S_err_South_req_X_W, S_err_Local_req_X_S, S_arbiter_out_err_state_in_onehot, S_arbiter_out_err_no_request_grants, S_err_request_IDLE_state, S_err_request_IDLE_not_Grants, S_err_state_North_Invalid_Grant, S_err_state_East_Invalid_Grant, S_err_state_West_Invalid_Grant, S_err_state_South_Invalid_Grant, S_err_state_Local_Invalid_Grant, S_err_Grants_onehot_or_all_zero, -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal, L_err_IDLE_req_X_N, L_err_North_req_X_N, L_err_North_credit_not_zero_req_X_N_grant_N, L_err_North_credit_zero_or_not_req_X_N_not_grant_N, L_err_East_req_X_E, L_err_East_credit_not_zero_req_X_E_grant_E, L_err_East_credit_zero_or_not_req_X_E_not_grant_E, L_err_West_req_X_W, L_err_West_credit_not_zero_req_X_W_grant_W, L_err_West_credit_zero_or_not_req_X_W_not_grant_W, L_err_South_req_X_S, L_err_South_credit_not_zero_req_X_S_grant_S, L_err_South_credit_zero_or_not_req_X_S_not_grant_S, L_err_Local_req_X_L, L_err_Local_credit_not_zero_req_X_L_grant_L, L_err_Local_credit_zero_or_not_req_X_L_not_grant_L, L_err_IDLE_req_X_E, L_err_North_req_X_E, L_err_East_req_X_W, L_err_West_req_X_S, L_err_South_req_X_L, L_err_Local_req_X_N, L_err_IDLE_req_X_W, L_err_North_req_X_W, L_err_East_req_X_S, L_err_West_req_X_L, L_err_South_req_X_N, L_err_Local_req_X_E, L_err_IDLE_req_X_S, L_err_North_req_X_S, L_err_East_req_X_L, L_err_West_req_X_N, L_err_South_req_X_E, L_err_Local_req_X_W, L_err_IDLE_req_X_L, L_err_North_req_X_L, L_err_East_req_X_N, L_err_West_req_X_E, L_err_South_req_X_W, L_err_Local_req_X_S, L_arbiter_out_err_state_in_onehot, L_arbiter_out_err_no_request_grants, L_err_request_IDLE_state, L_err_request_IDLE_not_Grants, L_err_state_North_Invalid_Grant, L_err_state_East_Invalid_Grant, L_err_state_West_Invalid_Grant, L_err_state_South_Invalid_Grant, L_err_state_Local_Invalid_Grant, L_err_Grants_onehot_or_all_zero : out std_logic ); end COMPONENT; COMPONENT parity_checker_for_LBDR is generic(DATA_WIDTH : integer := 32); port( RX: in std_logic_vector(DATA_WIDTH-1 downto 0); empty: in std_logic; faulty: out std_logic ); end COMPONENT; COMPONENT LBDR_packet_drop is generic ( cur_addr_rst: integer := 8; Rxy_rst: integer := 8; Cx_rst: integer := 8; NoC_size: integer := 4 ); port ( reset: in std_logic; clk: in std_logic; Faulty_C_N, Faulty_C_E, Faulty_C_W, Faulty_C_S: in std_logic; empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); faulty: in std_logic; packet_drop_order: out std_logic; grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N, Req_E, Req_W, Req_S, Req_L:out std_logic; Rxy_reconf_PE: in std_logic_vector(7 downto 0); Cx_reconf_PE: in std_logic_vector(3 downto 0); Reconfig_command : in std_logic; -- Checker outputs -- Routing part checkers err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order, -- Cx_Reconf checkers err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added -- Rxy_Reconf checkers err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal : out std_logic ); end COMPONENT; COMPONENT XBAR is generic ( DATA_WIDTH: integer := 32 ); port ( North_in: in std_logic_vector(DATA_WIDTH-1 downto 0); East_in: in std_logic_vector(DATA_WIDTH-1 downto 0); West_in: in std_logic_vector(DATA_WIDTH-1 downto 0); South_in: in std_logic_vector(DATA_WIDTH-1 downto 0); Local_in: in std_logic_vector(DATA_WIDTH-1 downto 0); sel: in std_logic_vector (4 downto 0); Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0) ); end COMPONENT; signal FIFO_D_out_N, FIFO_D_out_E, FIFO_D_out_W, FIFO_D_out_S, FIFO_D_out_L: std_logic_vector(DATA_WIDTH-1 downto 0); -- Grant_XY : Grant signal generated from Arbiter for output X connected to FIFO of input Y signal Grant_NN, Grant_NE, Grant_NW, Grant_NS, Grant_NL: std_logic; signal Grant_EN, Grant_EE, Grant_EW, Grant_ES, Grant_EL: std_logic; signal Grant_WN, Grant_WE, Grant_WW, Grant_WS, Grant_WL: std_logic; signal Grant_SN, Grant_SE, Grant_SW, Grant_SS, Grant_SL: std_logic; signal Grant_LN, Grant_LE, Grant_LW, Grant_LS, Grant_LL: std_logic; signal Req_NN, Req_EN, Req_WN, Req_SN, Req_LN: std_logic; signal Req_NE, Req_EE, Req_WE, Req_SE, Req_LE: std_logic; signal Req_NW, Req_EW, Req_WW, Req_SW, Req_LW: std_logic; signal Req_NS, Req_ES, Req_WS, Req_SS, Req_LS: std_logic; signal Req_NL, Req_EL, Req_WL, Req_SL, Req_LL: std_logic; signal empty_N, empty_E, empty_W, empty_S, empty_L: std_logic; signal Xbar_sel_N, Xbar_sel_E, Xbar_sel_W, Xbar_sel_S, Xbar_sel_L: std_logic_vector(4 downto 0); signal LBDR_Fault_N, LBDR_Fault_E, LBDR_Fault_W, LBDR_Fault_S, LBDR_Fault_L: std_logic; signal faulty_packet_N, faulty_packet_E, faulty_packet_W, faulty_packet_S, faulty_packet_L: std_logic; signal healthy_packet_N, healthy_packet_E, healthy_packet_W, healthy_packet_S, healthy_packet_L: std_logic; signal packet_drop_order_N, packet_drop_order_E, packet_drop_order_W, packet_drop_order_S, packet_drop_order_L: std_logic; -- Signals related to link fault classification modules signal healthy_link_N, healthy_link_E, healthy_link_W, healthy_link_S, healthy_link_L: std_logic; signal sig_Faulty_N_out, sig_Faulty_E_out, sig_Faulty_W_out, sig_Faulty_S_out, faulty_link_L: std_logic; signal intermittent_link_N, intermittent_link_E, intermittent_link_W, intermittent_link_S, intermittent_link_L: std_logic; -- Signals related to Control part checkers fault classification modules signal Healthy_N2E_turn_fault, intermittent_N2E_turn_fault, faulty_N2E_turn_fault: std_logic; signal Healthy_N2W_turn_fault, intermittent_N2W_turn_fault, faulty_N2W_turn_fault: std_logic; signal Healthy_E2N_turn_fault, intermittent_E2N_turn_fault, faulty_E2N_turn_fault: std_logic; signal Healthy_E2S_turn_fault, intermittent_E2S_turn_fault, faulty_E2S_turn_fault: std_logic; signal Healthy_W2N_turn_fault, intermittent_W2N_turn_fault, faulty_W2N_turn_fault: std_logic; signal Healthy_W2S_turn_fault, intermittent_W2S_turn_fault, faulty_W2S_turn_fault: std_logic; signal Healthy_S2E_turn_fault, intermittent_S2E_turn_fault, faulty_S2E_turn_fault: std_logic; signal Healthy_S2W_turn_fault, intermittent_S2W_turn_fault, faulty_S2W_turn_fault: std_logic; signal Healthy_N2S_path_fault, intermittent_N2S_path_fault, faulty_N2S_path_fault: std_logic; signal Healthy_S2N_path_fault, intermittent_S2N_path_fault, faulty_S2N_path_fault: std_logic; signal Healthy_E2W_path_fault, intermittent_E2W_path_fault, faulty_E2W_path_fault: std_logic; signal Healthy_W2E_path_fault, intermittent_W2E_path_fault, faulty_W2E_path_fault: std_logic; signal Healthy_L2N_fault, intermittent_L2N_fault, faulty_L2N_fault: std_logic; signal Healthy_L2E_fault, intermittent_L2E_fault, faulty_L2E_fault: std_logic; signal Healthy_L2W_fault, intermittent_L2W_fault, faulty_L2W_fault: std_logic; signal Healthy_L2S_fault, intermittent_L2S_fault, faulty_L2S_fault: std_logic; signal Healthy_N2L_fault, intermittent_N2L_fault, faulty_N2L_fault: std_logic; signal Healthy_E2L_fault, intermittent_E2L_fault, faulty_E2L_fault: std_logic; signal Healthy_W2L_fault, intermittent_W2L_fault, faulty_W2L_fault: std_logic; signal Healthy_S2L_fault, intermittent_S2L_fault, faulty_S2L_fault: std_logic; -- Signals needed for control part checkers -- Signals needed for LBDR packet drop checkers -- North signal N_err_header_empty_Requests_FF_Requests_in, N_err_tail_Requests_in_all_zero, N_err_tail_empty_Requests_FF_Requests_in, N_err_tail_not_empty_not_grants_Requests_FF_Requests_in, N_err_grants_onehot, N_err_grants_mismatch, N_err_header_tail_Requests_FF_Requests_in, N_err_dst_addr_cur_addr_N1, N_err_dst_addr_cur_addr_not_N1, N_err_dst_addr_cur_addr_E1, N_err_dst_addr_cur_addr_not_E1, N_err_dst_addr_cur_addr_W1, N_err_dst_addr_cur_addr_not_W1, N_err_dst_addr_cur_addr_S1, N_err_dst_addr_cur_addr_not_S1, N_err_dst_addr_cur_addr_Req_L_in, N_err_dst_addr_cur_addr_not_Req_L_in, N_err_header_not_empty_faulty_drop_packet_in, -- added according to new design N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design N_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --N_err_header_not_empty_Req_L_in, -- added according to new design N_err_header_not_empty_Req_N_in, N_err_header_not_empty_Req_E_in, N_err_header_not_empty_Req_W_in, N_err_header_not_empty_Req_S_in, N_err_header_empty_packet_drop_in_packet_drop_equal, N_err_tail_not_empty_packet_drop_not_packet_drop_in, N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, N_err_packet_drop_order, N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal, -- East E_err_header_empty_Requests_FF_Requests_in, E_err_tail_Requests_in_all_zero, E_err_tail_empty_Requests_FF_Requests_in, E_err_tail_not_empty_not_grants_Requests_FF_Requests_in, E_err_grants_onehot, E_err_grants_mismatch, E_err_header_tail_Requests_FF_Requests_in, E_err_dst_addr_cur_addr_N1, E_err_dst_addr_cur_addr_not_N1, E_err_dst_addr_cur_addr_E1, E_err_dst_addr_cur_addr_not_E1, E_err_dst_addr_cur_addr_W1, E_err_dst_addr_cur_addr_not_W1, E_err_dst_addr_cur_addr_S1, E_err_dst_addr_cur_addr_not_S1, E_err_dst_addr_cur_addr_Req_L_in, E_err_dst_addr_cur_addr_not_Req_L_in, E_err_header_not_empty_faulty_drop_packet_in, -- added according to new design E_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design E_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --E_err_header_not_empty_Req_L_in, -- added according to new design E_err_header_not_empty_Req_N_in, E_err_header_not_empty_Req_E_in, E_err_header_not_empty_Req_W_in, E_err_header_not_empty_Req_S_in, E_err_header_empty_packet_drop_in_packet_drop_equal, E_err_tail_not_empty_packet_drop_not_packet_drop_in, E_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, E_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, E_err_packet_drop_order, E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, E_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal, -- West W_err_header_empty_Requests_FF_Requests_in, W_err_tail_Requests_in_all_zero, W_err_tail_empty_Requests_FF_Requests_in, W_err_tail_not_empty_not_grants_Requests_FF_Requests_in, W_err_grants_onehot, W_err_grants_mismatch, W_err_header_tail_Requests_FF_Requests_in, W_err_dst_addr_cur_addr_N1, W_err_dst_addr_cur_addr_not_N1, W_err_dst_addr_cur_addr_E1, W_err_dst_addr_cur_addr_not_E1, W_err_dst_addr_cur_addr_W1, W_err_dst_addr_cur_addr_not_W1, W_err_dst_addr_cur_addr_S1, W_err_dst_addr_cur_addr_not_S1, W_err_dst_addr_cur_addr_Req_L_in, W_err_dst_addr_cur_addr_not_Req_L_in, W_err_header_not_empty_faulty_drop_packet_in, -- added according to new design W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design W_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --W_err_header_not_empty_Req_L_in, -- added according to new design W_err_header_not_empty_Req_N_in, W_err_header_not_empty_Req_E_in, W_err_header_not_empty_Req_W_in, W_err_header_not_empty_Req_S_in, W_err_header_empty_packet_drop_in_packet_drop_equal, W_err_tail_not_empty_packet_drop_not_packet_drop_in, W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, W_err_packet_drop_order, W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal, -- South S_err_header_empty_Requests_FF_Requests_in, S_err_tail_Requests_in_all_zero, S_err_tail_empty_Requests_FF_Requests_in, S_err_tail_not_empty_not_grants_Requests_FF_Requests_in, S_err_grants_onehot, S_err_grants_mismatch, S_err_header_tail_Requests_FF_Requests_in, S_err_dst_addr_cur_addr_N1, S_err_dst_addr_cur_addr_not_N1, S_err_dst_addr_cur_addr_E1, S_err_dst_addr_cur_addr_not_E1, S_err_dst_addr_cur_addr_W1, S_err_dst_addr_cur_addr_not_W1, S_err_dst_addr_cur_addr_S1, S_err_dst_addr_cur_addr_not_S1, S_err_dst_addr_cur_addr_Req_L_in, S_err_dst_addr_cur_addr_not_Req_L_in, S_err_header_not_empty_faulty_drop_packet_in, -- added according to new design S_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design S_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --S_err_header_not_empty_Req_L_in, -- added according to new design S_err_header_not_empty_Req_N_in, S_err_header_not_empty_Req_E_in, S_err_header_not_empty_Req_W_in, S_err_header_not_empty_Req_S_in, S_err_header_empty_packet_drop_in_packet_drop_equal, S_err_tail_not_empty_packet_drop_not_packet_drop_in, S_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, S_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, S_err_packet_drop_order, S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, S_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal, -- Local L_err_header_empty_Requests_FF_Requests_in, L_err_tail_Requests_in_all_zero, L_err_tail_empty_Requests_FF_Requests_in, L_err_tail_not_empty_not_grants_Requests_FF_Requests_in, L_err_grants_onehot, L_err_grants_mismatch, L_err_header_tail_Requests_FF_Requests_in, L_err_dst_addr_cur_addr_N1, L_err_dst_addr_cur_addr_not_N1, L_err_dst_addr_cur_addr_E1, L_err_dst_addr_cur_addr_not_E1, L_err_dst_addr_cur_addr_W1, L_err_dst_addr_cur_addr_not_W1, L_err_dst_addr_cur_addr_S1, L_err_dst_addr_cur_addr_not_S1, L_err_dst_addr_cur_addr_Req_L_in, L_err_dst_addr_cur_addr_not_Req_L_in, L_err_header_not_empty_faulty_drop_packet_in, -- added according to new design L_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design L_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --L_err_header_not_empty_Req_L_in, -- added according to new design L_err_header_not_empty_Req_N_in, L_err_header_not_empty_Req_E_in, L_err_header_not_empty_Req_W_in, L_err_header_not_empty_Req_S_in, L_err_header_empty_packet_drop_in_packet_drop_equal, L_err_tail_not_empty_packet_drop_not_packet_drop_in, L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, L_err_packet_drop_order, L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal: std_logic; ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------ -- Signals needed for FIFO packet drop with fault classifier support checkers -- North -- Functional checkers signal N_err_empty_full, N_err_empty_read_en, N_err_full_write_en, N_err_state_in_onehot, N_err_read_pointer_in_onehot, N_err_write_pointer_in_onehot, -- Structural checkers N_err_write_en_write_pointer, N_err_not_write_en_write_pointer, N_err_read_pointer_write_pointer_not_empty, N_err_read_pointer_write_pointer_empty, N_err_read_pointer_write_pointer_not_full, N_err_read_pointer_write_pointer_full, N_err_read_pointer_increment, N_err_read_pointer_not_increment, N_err_write_en, N_err_not_write_en, N_err_not_write_en1, N_err_not_write_en2, N_err_read_en_mismatch, N_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! N_err_fake_credit_read_en_fake_credit_counter_in_increment, N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, N_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, N_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, N_err_fake_credit_read_en_credit_out, N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO N_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, N_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, N_err_state_out_Idle_not_fault_out_not_fake_credit, N_err_state_out_Idle_not_fault_out_not_fault_info_in, N_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, N_err_state_out_Idle_fault_out_fake_credit, N_err_state_out_Idle_fault_out_state_in_Packet_drop, N_err_state_out_Idle_fault_out_fault_info_in, N_err_state_out_Idle_fault_out_faulty_packet_in, N_err_state_out_Idle_not_health_info, N_err_state_out_Idle_not_write_fake_flit, N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, N_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, N_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, N_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, N_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, N_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, N_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, N_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, N_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Header_flit_not_valid_in_not_fault_info_in, N_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, N_err_state_out_Header_flit_or_Body_flit_not_fake_credit, N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, N_err_state_out_Body_flit_valid_in_not_fault_out_health_info, N_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, N_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, N_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, N_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, N_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, N_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, N_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, N_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Body_flit_not_valid_in_not_fault_info_in, N_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, N_err_state_out_Body_flit_valid_in_fault_out_not_health_info, N_err_state_out_Body_flit_valid_in_not_health_info, N_err_state_out_Body_flit_not_fake_credit, N_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, N_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, N_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, N_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, N_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, N_err_state_out_Tail_flit_not_valid_in_state_in_Idle, N_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, N_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, N_err_state_out_Tail_flit_not_valid_in_not_fake_credit, N_err_state_out_Tail_flit_not_write_fake_flit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, N_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, N_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, N_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, N_err_fault_info_fault_info_out_equal, N_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in, -- East -- Functional checkers E_err_empty_full, E_err_empty_read_en, E_err_full_write_en, E_err_state_in_onehot, E_err_read_pointer_in_onehot, E_err_write_pointer_in_onehot, -- Structural checkers E_err_write_en_write_pointer, E_err_not_write_en_write_pointer, E_err_read_pointer_write_pointer_not_empty, E_err_read_pointer_write_pointer_empty, E_err_read_pointer_write_pointer_not_full, E_err_read_pointer_write_pointer_full, E_err_read_pointer_increment, E_err_read_pointer_not_increment, E_err_write_en, E_err_not_write_en, E_err_not_write_en1, E_err_not_write_en2, E_err_read_en_mismatch, E_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! E_err_fake_credit_read_en_fake_credit_counter_in_increment, E_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, E_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, E_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, E_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, E_err_fake_credit_read_en_credit_out, E_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, E_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO E_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, E_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, E_err_state_out_Idle_not_fault_out_not_fake_credit, E_err_state_out_Idle_not_fault_out_not_fault_info_in, E_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, E_err_state_out_Idle_fault_out_fake_credit, E_err_state_out_Idle_fault_out_state_in_Packet_drop, E_err_state_out_Idle_fault_out_fault_info_in, E_err_state_out_Idle_fault_out_faulty_packet_in, E_err_state_out_Idle_not_health_info, E_err_state_out_Idle_not_write_fake_flit, E_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, E_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, E_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, E_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, E_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, E_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, E_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, E_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, E_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, E_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, E_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, E_err_state_out_Header_flit_not_valid_in_not_fault_info_in, E_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, E_err_state_out_Header_flit_or_Body_flit_not_fake_credit, E_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, E_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, E_err_state_out_Body_flit_valid_in_not_fault_out_health_info, E_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, E_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, E_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, E_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, E_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, E_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, E_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, E_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, E_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, E_err_state_out_Body_flit_not_valid_in_not_fault_info_in, E_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, E_err_state_out_Body_flit_valid_in_fault_out_not_health_info, E_err_state_out_Body_flit_valid_in_not_health_info, E_err_state_out_Body_flit_not_fake_credit, E_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, E_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, E_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, E_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, E_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, E_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, E_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, E_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, E_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, E_err_state_out_Tail_flit_not_valid_in_state_in_Idle, E_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, E_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, E_err_state_out_Tail_flit_not_valid_in_not_fake_credit, E_err_state_out_Tail_flit_not_write_fake_flit, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, E_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, E_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, E_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, E_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, E_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, E_err_fault_info_fault_info_out_equal, E_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, E_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in, -- West -- Functional checkers W_err_empty_full, W_err_empty_read_en, W_err_full_write_en, W_err_state_in_onehot, W_err_read_pointer_in_onehot, W_err_write_pointer_in_onehot, -- Structural checkers W_err_write_en_write_pointer, W_err_not_write_en_write_pointer, W_err_read_pointer_write_pointer_not_empty, W_err_read_pointer_write_pointer_empty, W_err_read_pointer_write_pointer_not_full, W_err_read_pointer_write_pointer_full, W_err_read_pointer_increment, W_err_read_pointer_not_increment, W_err_write_en, W_err_not_write_en, W_err_not_write_en1, W_err_not_write_en2, W_err_read_en_mismatch, W_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! W_err_fake_credit_read_en_fake_credit_counter_in_increment, W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, W_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, W_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, W_err_fake_credit_read_en_credit_out, W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO W_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, W_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, W_err_state_out_Idle_not_fault_out_not_fake_credit, W_err_state_out_Idle_not_fault_out_not_fault_info_in, W_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, W_err_state_out_Idle_fault_out_fake_credit, W_err_state_out_Idle_fault_out_state_in_Packet_drop, W_err_state_out_Idle_fault_out_fault_info_in, W_err_state_out_Idle_fault_out_faulty_packet_in, W_err_state_out_Idle_not_health_info, W_err_state_out_Idle_not_write_fake_flit, W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, W_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, W_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, W_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, W_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, W_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, W_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, W_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, W_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Header_flit_not_valid_in_not_fault_info_in, W_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, W_err_state_out_Header_flit_or_Body_flit_not_fake_credit, W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, W_err_state_out_Body_flit_valid_in_not_fault_out_health_info, W_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, W_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, W_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, W_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, W_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, W_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, W_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, W_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Body_flit_not_valid_in_not_fault_info_in, W_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, W_err_state_out_Body_flit_valid_in_fault_out_not_health_info, W_err_state_out_Body_flit_valid_in_not_health_info, W_err_state_out_Body_flit_not_fake_credit, W_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, W_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, W_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, W_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, W_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, W_err_state_out_Tail_flit_not_valid_in_state_in_Idle, W_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, W_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, W_err_state_out_Tail_flit_not_valid_in_not_fake_credit, W_err_state_out_Tail_flit_not_write_fake_flit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, W_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, W_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, W_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, W_err_fault_info_fault_info_out_equal, W_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in, -- South -- Functional checkers S_err_empty_full, S_err_empty_read_en, S_err_full_write_en, S_err_state_in_onehot, S_err_read_pointer_in_onehot, S_err_write_pointer_in_onehot, -- Structural checkers S_err_write_en_write_pointer, S_err_not_write_en_write_pointer, S_err_read_pointer_write_pointer_not_empty, S_err_read_pointer_write_pointer_empty, S_err_read_pointer_write_pointer_not_full, S_err_read_pointer_write_pointer_full, S_err_read_pointer_increment, S_err_read_pointer_not_increment, S_err_write_en, S_err_not_write_en, S_err_not_write_en1, S_err_not_write_en2, S_err_read_en_mismatch, S_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! S_err_fake_credit_read_en_fake_credit_counter_in_increment, S_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, S_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, S_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, S_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, S_err_fake_credit_read_en_credit_out, S_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, S_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO S_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, S_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, S_err_state_out_Idle_not_fault_out_not_fake_credit, S_err_state_out_Idle_not_fault_out_not_fault_info_in, S_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, S_err_state_out_Idle_fault_out_fake_credit, S_err_state_out_Idle_fault_out_state_in_Packet_drop, S_err_state_out_Idle_fault_out_fault_info_in, S_err_state_out_Idle_fault_out_faulty_packet_in, S_err_state_out_Idle_not_health_info, S_err_state_out_Idle_not_write_fake_flit, S_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, S_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, S_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, S_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, S_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, S_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, S_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, S_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, S_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, S_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, S_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, S_err_state_out_Header_flit_not_valid_in_not_fault_info_in, S_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, S_err_state_out_Header_flit_or_Body_flit_not_fake_credit, S_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, S_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, S_err_state_out_Body_flit_valid_in_not_fault_out_health_info, S_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, S_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, S_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, S_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, S_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, S_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, S_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, S_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, S_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, S_err_state_out_Body_flit_not_valid_in_not_fault_info_in, S_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, S_err_state_out_Body_flit_valid_in_fault_out_not_health_info, S_err_state_out_Body_flit_valid_in_not_health_info, S_err_state_out_Body_flit_not_fake_credit, S_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, S_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, S_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, S_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, S_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, S_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, S_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, S_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, S_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, S_err_state_out_Tail_flit_not_valid_in_state_in_Idle, S_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, S_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, S_err_state_out_Tail_flit_not_valid_in_not_fake_credit, S_err_state_out_Tail_flit_not_write_fake_flit, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, S_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, S_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, S_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, S_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, S_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, S_err_fault_info_fault_info_out_equal, S_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, S_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in, -- Local -- Functional checkers L_err_empty_full, L_err_empty_read_en, L_err_full_write_en, L_err_state_in_onehot, L_err_read_pointer_in_onehot, L_err_write_pointer_in_onehot, -- Structural checkers L_err_write_en_write_pointer, L_err_not_write_en_write_pointer, L_err_read_pointer_write_pointer_not_empty, L_err_read_pointer_write_pointer_empty, L_err_read_pointer_write_pointer_not_full, L_err_read_pointer_write_pointer_full, L_err_read_pointer_increment, L_err_read_pointer_not_increment, L_err_write_en, L_err_not_write_en, L_err_not_write_en1, L_err_not_write_en2, L_err_read_en_mismatch, L_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! L_err_fake_credit_read_en_fake_credit_counter_in_increment, L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, L_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, L_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, L_err_fake_credit_read_en_credit_out, L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO L_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, L_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, L_err_state_out_Idle_not_fault_out_not_fake_credit, L_err_state_out_Idle_not_fault_out_not_fault_info_in, L_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, L_err_state_out_Idle_fault_out_fake_credit, L_err_state_out_Idle_fault_out_state_in_Packet_drop, L_err_state_out_Idle_fault_out_fault_info_in, L_err_state_out_Idle_fault_out_faulty_packet_in, L_err_state_out_Idle_not_health_info, L_err_state_out_Idle_not_write_fake_flit, L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, L_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, L_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, L_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, L_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, L_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, L_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, L_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, L_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Header_flit_not_valid_in_not_fault_info_in, L_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, L_err_state_out_Header_flit_or_Body_flit_not_fake_credit, L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, L_err_state_out_Body_flit_valid_in_not_fault_out_health_info, L_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, L_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, L_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, L_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, L_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, L_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, L_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, L_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Body_flit_not_valid_in_not_fault_info_in, L_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, L_err_state_out_Body_flit_valid_in_fault_out_not_health_info, L_err_state_out_Body_flit_valid_in_not_health_info, L_err_state_out_Body_flit_not_fake_credit, L_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, L_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, L_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, L_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, L_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, L_err_state_out_Tail_flit_not_valid_in_state_in_Idle, L_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, L_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, L_err_state_out_Tail_flit_not_valid_in_not_fake_credit, L_err_state_out_Tail_flit_not_write_fake_flit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, L_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, L_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, L_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, L_err_fault_info_fault_info_out_equal, L_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in: std_logic; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Signals needed for Allocator unit -- Allocator logic checker outputs signal err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match: std_logic; -- Allocator credit_counter logic checker outputs signal err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_N_credit_counter_N_out_increment, err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change, err_grant_N_credit_counter_N_out_decrement, err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change, err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_E_credit_counter_E_out_increment, err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change, err_grant_E_credit_counter_E_out_decrement, err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change, err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_W_credit_counter_W_out_increment, err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change, err_grant_W_credit_counter_W_out_decrement, err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change, err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_S_credit_counter_S_out_increment, err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change, err_grant_S_credit_counter_S_out_decrement, err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change, err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal, err_credit_in_L_credit_counter_L_out_increment, err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change, err_grant_L_credit_counter_L_out_decrement, err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change, err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal : std_logic; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Arbiter_in Checker signals (part of allocator unit) -- North Arbiter_in checker outputs signal N_err_Requests_state_in_state_not_equal, N_err_IDLE_Req_N, N_err_IDLE_grant_N, N_err_North_Req_N, N_err_North_grant_N, N_err_East_Req_E, N_err_East_grant_E, N_err_West_Req_W, N_err_West_grant_W, N_err_South_Req_S, N_err_South_grant_S, N_err_Local_Req_L, N_err_Local_grant_L, N_err_IDLE_Req_E, N_err_IDLE_grant_E, N_err_North_Req_E, N_err_North_grant_E, N_err_East_Req_W, N_err_East_grant_W, N_err_West_Req_S, N_err_West_grant_S, N_err_South_Req_L, N_err_South_grant_L, N_err_Local_Req_N, N_err_Local_grant_N, N_err_IDLE_Req_W, N_err_IDLE_grant_W, N_err_North_Req_W, N_err_North_grant_W, N_err_East_Req_S, N_err_East_grant_S, N_err_West_Req_L, N_err_West_grant_L, N_err_South_Req_N, N_err_South_grant_N, N_err_Local_Req_E, N_err_Local_grant_E, N_err_IDLE_Req_S, N_err_IDLE_grant_S, N_err_North_Req_S, N_err_North_grant_S, N_err_East_Req_L, N_err_East_grant_L, N_err_West_Req_N, N_err_West_grant_N, N_err_South_Req_E, N_err_South_grant_E, N_err_Local_Req_W, N_err_Local_grant_W, N_err_IDLE_Req_L, N_err_IDLE_grant_L, N_err_North_Req_L, N_err_North_grant_L, N_err_East_Req_N, N_err_East_grant_N, N_err_West_Req_E, N_err_West_grant_E, N_err_South_Req_W, N_err_South_grant_W, N_err_Local_Req_S, N_err_Local_grant_S, N_err_arbiter_state_in_onehot, N_err_no_request_grants, N_err_request_no_grants, N_err_no_Req_N_grant_N, N_err_no_Req_E_grant_E, N_err_no_Req_W_grant_W, N_err_no_Req_S_grant_S, N_err_no_Req_L_grant_L, -- East Arbiter_in checker outputs E_err_Requests_state_in_state_not_equal, E_err_IDLE_Req_N, E_err_IDLE_grant_N, E_err_North_Req_N, E_err_North_grant_N, E_err_East_Req_E, E_err_East_grant_E, E_err_West_Req_W, E_err_West_grant_W, E_err_South_Req_S, E_err_South_grant_S, E_err_Local_Req_L, E_err_Local_grant_L, E_err_IDLE_Req_E, E_err_IDLE_grant_E, E_err_North_Req_E, E_err_North_grant_E, E_err_East_Req_W, E_err_East_grant_W, E_err_West_Req_S, E_err_West_grant_S, E_err_South_Req_L, E_err_South_grant_L, E_err_Local_Req_N, E_err_Local_grant_N, E_err_IDLE_Req_W, E_err_IDLE_grant_W, E_err_North_Req_W, E_err_North_grant_W, E_err_East_Req_S, E_err_East_grant_S, E_err_West_Req_L, E_err_West_grant_L, E_err_South_Req_N, E_err_South_grant_N, E_err_Local_Req_E, E_err_Local_grant_E, E_err_IDLE_Req_S, E_err_IDLE_grant_S, E_err_North_Req_S, E_err_North_grant_S, E_err_East_Req_L, E_err_East_grant_L, E_err_West_Req_N, E_err_West_grant_N, E_err_South_Req_E, E_err_South_grant_E, E_err_Local_Req_W, E_err_Local_grant_W, E_err_IDLE_Req_L, E_err_IDLE_grant_L, E_err_North_Req_L, E_err_North_grant_L, E_err_East_Req_N, E_err_East_grant_N, E_err_West_Req_E, E_err_West_grant_E, E_err_South_Req_W, E_err_South_grant_W, E_err_Local_Req_S, E_err_Local_grant_S, E_err_arbiter_state_in_onehot, E_err_no_request_grants, E_err_request_no_grants, E_err_no_Req_N_grant_N, E_err_no_Req_E_grant_E, E_err_no_Req_W_grant_W, E_err_no_Req_S_grant_S, E_err_no_Req_L_grant_L, -- West Arbiter_in checker outputs W_err_Requests_state_in_state_not_equal, W_err_IDLE_Req_N, W_err_IDLE_grant_N, W_err_North_Req_N, W_err_North_grant_N, W_err_East_Req_E, W_err_East_grant_E, W_err_West_Req_W, W_err_West_grant_W, W_err_South_Req_S, W_err_South_grant_S, W_err_Local_Req_L, W_err_Local_grant_L, W_err_IDLE_Req_E, W_err_IDLE_grant_E, W_err_North_Req_E, W_err_North_grant_E, W_err_East_Req_W, W_err_East_grant_W, W_err_West_Req_S, W_err_West_grant_S, W_err_South_Req_L, W_err_South_grant_L, W_err_Local_Req_N, W_err_Local_grant_N, W_err_IDLE_Req_W, W_err_IDLE_grant_W, W_err_North_Req_W, W_err_North_grant_W, W_err_East_Req_S, W_err_East_grant_S, W_err_West_Req_L, W_err_West_grant_L, W_err_South_Req_N, W_err_South_grant_N, W_err_Local_Req_E, W_err_Local_grant_E, W_err_IDLE_Req_S, W_err_IDLE_grant_S, W_err_North_Req_S, W_err_North_grant_S, W_err_East_Req_L, W_err_East_grant_L, W_err_West_Req_N, W_err_West_grant_N, W_err_South_Req_E, W_err_South_grant_E, W_err_Local_Req_W, W_err_Local_grant_W, W_err_IDLE_Req_L, W_err_IDLE_grant_L, W_err_North_Req_L, W_err_North_grant_L, W_err_East_Req_N, W_err_East_grant_N, W_err_West_Req_E, W_err_West_grant_E, W_err_South_Req_W, W_err_South_grant_W, W_err_Local_Req_S, W_err_Local_grant_S, W_err_arbiter_state_in_onehot, W_err_no_request_grants, W_err_request_no_grants, W_err_no_Req_N_grant_N, W_err_no_Req_E_grant_E, W_err_no_Req_W_grant_W, W_err_no_Req_S_grant_S, W_err_no_Req_L_grant_L, -- South Arbiter_in checker outputs S_err_Requests_state_in_state_not_equal, S_err_IDLE_Req_N, S_err_IDLE_grant_N, S_err_North_Req_N, S_err_North_grant_N, S_err_East_Req_E, S_err_East_grant_E, S_err_West_Req_W, S_err_West_grant_W, S_err_South_Req_S, S_err_South_grant_S, S_err_Local_Req_L, S_err_Local_grant_L, S_err_IDLE_Req_E, S_err_IDLE_grant_E, S_err_North_Req_E, S_err_North_grant_E, S_err_East_Req_W, S_err_East_grant_W, S_err_West_Req_S, S_err_West_grant_S, S_err_South_Req_L, S_err_South_grant_L, S_err_Local_Req_N, S_err_Local_grant_N, S_err_IDLE_Req_W, S_err_IDLE_grant_W, S_err_North_Req_W, S_err_North_grant_W, S_err_East_Req_S, S_err_East_grant_S, S_err_West_Req_L, S_err_West_grant_L, S_err_South_Req_N, S_err_South_grant_N, S_err_Local_Req_E, S_err_Local_grant_E, S_err_IDLE_Req_S, S_err_IDLE_grant_S, S_err_North_Req_S, S_err_North_grant_S, S_err_East_Req_L, S_err_East_grant_L, S_err_West_Req_N, S_err_West_grant_N, S_err_South_Req_E, S_err_South_grant_E, S_err_Local_Req_W, S_err_Local_grant_W, S_err_IDLE_Req_L, S_err_IDLE_grant_L, S_err_North_Req_L, S_err_North_grant_L, S_err_East_Req_N, S_err_East_grant_N, S_err_West_Req_E, S_err_West_grant_E, S_err_South_Req_W, S_err_South_grant_W, S_err_Local_Req_S, S_err_Local_grant_S, S_err_arbiter_state_in_onehot, S_err_no_request_grants, S_err_request_no_grants, S_err_no_Req_N_grant_N, S_err_no_Req_E_grant_E, S_err_no_Req_W_grant_W, S_err_no_Req_S_grant_S, S_err_no_Req_L_grant_L, -- Local Arbiter_in checker outputs L_err_Requests_state_in_state_not_equal, L_err_IDLE_Req_N, L_err_IDLE_grant_N, L_err_North_Req_N, L_err_North_grant_N, L_err_East_Req_E, L_err_East_grant_E, L_err_West_Req_W, L_err_West_grant_W, L_err_South_Req_S, L_err_South_grant_S, L_err_Local_Req_L, L_err_Local_grant_L, L_err_IDLE_Req_E, L_err_IDLE_grant_E, L_err_North_Req_E, L_err_North_grant_E, L_err_East_Req_W, L_err_East_grant_W, L_err_West_Req_S, L_err_West_grant_S, L_err_South_Req_L, L_err_South_grant_L, L_err_Local_Req_N, L_err_Local_grant_N, L_err_IDLE_Req_W, L_err_IDLE_grant_W, L_err_North_Req_W, L_err_North_grant_W, L_err_East_Req_S, L_err_East_grant_S, L_err_West_Req_L, L_err_West_grant_L, L_err_South_Req_N, L_err_South_grant_N, L_err_Local_Req_E, L_err_Local_grant_E, L_err_IDLE_Req_S, L_err_IDLE_grant_S, L_err_North_Req_S, L_err_North_grant_S, L_err_East_Req_L, L_err_East_grant_L, L_err_West_Req_N, L_err_West_grant_N, L_err_South_Req_E, L_err_South_grant_E, L_err_Local_Req_W, L_err_Local_grant_W, L_err_IDLE_Req_L, L_err_IDLE_grant_L, L_err_North_Req_L, L_err_North_grant_L, L_err_East_Req_N, L_err_East_grant_N, L_err_West_Req_E, L_err_West_grant_E, L_err_South_Req_W, L_err_South_grant_W, L_err_Local_Req_S, L_err_Local_grant_S, L_err_arbiter_state_in_onehot, L_err_no_request_grants, L_err_request_no_grants, L_err_no_Req_N_grant_N, L_err_no_Req_E_grant_E, L_err_no_Req_W_grant_W, L_err_no_Req_S_grant_S, L_err_no_Req_L_grant_L : std_logic; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Arbiter_out Checker signals (part of allocator unit) -- North Arbiter_out checker outputs signal N_arbiter_out_err_Requests_state_in_state_not_equal, N_err_IDLE_req_X_N, N_err_North_req_X_N, N_err_North_credit_not_zero_req_X_N_grant_N, N_err_North_credit_zero_or_not_req_X_N_not_grant_N, N_err_East_req_X_E, N_err_East_credit_not_zero_req_X_E_grant_E, N_err_East_credit_zero_or_not_req_X_E_not_grant_E, N_err_West_req_X_W, N_err_West_credit_not_zero_req_X_W_grant_W, N_err_West_credit_zero_or_not_req_X_W_not_grant_W, N_err_South_req_X_S, N_err_South_credit_not_zero_req_X_S_grant_S, N_err_South_credit_zero_or_not_req_X_S_not_grant_S, N_err_Local_req_X_L, N_err_Local_credit_not_zero_req_X_L_grant_L, N_err_Local_credit_zero_or_not_req_X_L_not_grant_L, N_err_IDLE_req_X_E, N_err_North_req_X_E, N_err_East_req_X_W, N_err_West_req_X_S, N_err_South_req_X_L, N_err_Local_req_X_N, N_err_IDLE_req_X_W, N_err_North_req_X_W, N_err_East_req_X_S, N_err_West_req_X_L, N_err_South_req_X_N, N_err_Local_req_X_E, N_err_IDLE_req_X_S, N_err_North_req_X_S, N_err_East_req_X_L, N_err_West_req_X_N, N_err_South_req_X_E, N_err_Local_req_X_W, N_err_IDLE_req_X_L, N_err_North_req_X_L, N_err_East_req_X_N, N_err_West_req_X_E, N_err_South_req_X_W, N_err_Local_req_X_S, N_arbiter_out_err_state_in_onehot, N_arbiter_out_err_no_request_grants, N_err_request_IDLE_state, N_err_request_IDLE_not_Grants, N_err_state_North_Invalid_Grant, N_err_state_East_Invalid_Grant, N_err_state_West_Invalid_Grant, N_err_state_South_Invalid_Grant, N_err_state_Local_Invalid_Grant, N_err_Grants_onehot_or_all_zero, -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal, E_err_IDLE_req_X_N, E_err_North_req_X_N, E_err_North_credit_not_zero_req_X_N_grant_N, E_err_North_credit_zero_or_not_req_X_N_not_grant_N, E_err_East_req_X_E, E_err_East_credit_not_zero_req_X_E_grant_E, E_err_East_credit_zero_or_not_req_X_E_not_grant_E, E_err_West_req_X_W, E_err_West_credit_not_zero_req_X_W_grant_W, E_err_West_credit_zero_or_not_req_X_W_not_grant_W, E_err_South_req_X_S, E_err_South_credit_not_zero_req_X_S_grant_S, E_err_South_credit_zero_or_not_req_X_S_not_grant_S, E_err_Local_req_X_L, E_err_Local_credit_not_zero_req_X_L_grant_L, E_err_Local_credit_zero_or_not_req_X_L_not_grant_L, E_err_IDLE_req_X_E, E_err_North_req_X_E, E_err_East_req_X_W, E_err_West_req_X_S, E_err_South_req_X_L, E_err_Local_req_X_N, E_err_IDLE_req_X_W, E_err_North_req_X_W, E_err_East_req_X_S, E_err_West_req_X_L, E_err_South_req_X_N, E_err_Local_req_X_E, E_err_IDLE_req_X_S, E_err_North_req_X_S, E_err_East_req_X_L, E_err_West_req_X_N, E_err_South_req_X_E, E_err_Local_req_X_W, E_err_IDLE_req_X_L, E_err_North_req_X_L, E_err_East_req_X_N, E_err_West_req_X_E, E_err_South_req_X_W, E_err_Local_req_X_S, E_arbiter_out_err_state_in_onehot, E_arbiter_out_err_no_request_grants, E_err_request_IDLE_state, E_err_request_IDLE_not_Grants, E_err_state_North_Invalid_Grant, E_err_state_East_Invalid_Grant, E_err_state_West_Invalid_Grant, E_err_state_South_Invalid_Grant, E_err_state_Local_Invalid_Grant, E_err_Grants_onehot_or_all_zero, -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal, W_err_IDLE_req_X_N, W_err_North_req_X_N, W_err_North_credit_not_zero_req_X_N_grant_N, W_err_North_credit_zero_or_not_req_X_N_not_grant_N, W_err_East_req_X_E, W_err_East_credit_not_zero_req_X_E_grant_E, W_err_East_credit_zero_or_not_req_X_E_not_grant_E, W_err_West_req_X_W, W_err_West_credit_not_zero_req_X_W_grant_W, W_err_West_credit_zero_or_not_req_X_W_not_grant_W, W_err_South_req_X_S, W_err_South_credit_not_zero_req_X_S_grant_S, W_err_South_credit_zero_or_not_req_X_S_not_grant_S, W_err_Local_req_X_L, W_err_Local_credit_not_zero_req_X_L_grant_L, W_err_Local_credit_zero_or_not_req_X_L_not_grant_L, W_err_IDLE_req_X_E, W_err_North_req_X_E, W_err_East_req_X_W, W_err_West_req_X_S, W_err_South_req_X_L, W_err_Local_req_X_N, W_err_IDLE_req_X_W, W_err_North_req_X_W, W_err_East_req_X_S, W_err_West_req_X_L, W_err_South_req_X_N, W_err_Local_req_X_E, W_err_IDLE_req_X_S, W_err_North_req_X_S, W_err_East_req_X_L, W_err_West_req_X_N, W_err_South_req_X_E, W_err_Local_req_X_W, W_err_IDLE_req_X_L, W_err_North_req_X_L, W_err_East_req_X_N, W_err_West_req_X_E, W_err_South_req_X_W, W_err_Local_req_X_S, W_arbiter_out_err_state_in_onehot, W_arbiter_out_err_no_request_grants, W_err_request_IDLE_state, W_err_request_IDLE_not_Grants, W_err_state_North_Invalid_Grant, W_err_state_East_Invalid_Grant, W_err_state_West_Invalid_Grant, W_err_state_South_Invalid_Grant, W_err_state_Local_Invalid_Grant, W_err_Grants_onehot_or_all_zero, -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal, S_err_IDLE_req_X_N, S_err_North_req_X_N, S_err_North_credit_not_zero_req_X_N_grant_N, S_err_North_credit_zero_or_not_req_X_N_not_grant_N, S_err_East_req_X_E, S_err_East_credit_not_zero_req_X_E_grant_E, S_err_East_credit_zero_or_not_req_X_E_not_grant_E, S_err_West_req_X_W, S_err_West_credit_not_zero_req_X_W_grant_W, S_err_West_credit_zero_or_not_req_X_W_not_grant_W, S_err_South_req_X_S, S_err_South_credit_not_zero_req_X_S_grant_S, S_err_South_credit_zero_or_not_req_X_S_not_grant_S, S_err_Local_req_X_L, S_err_Local_credit_not_zero_req_X_L_grant_L, S_err_Local_credit_zero_or_not_req_X_L_not_grant_L, S_err_IDLE_req_X_E, S_err_North_req_X_E, S_err_East_req_X_W, S_err_West_req_X_S, S_err_South_req_X_L, S_err_Local_req_X_N, S_err_IDLE_req_X_W, S_err_North_req_X_W, S_err_East_req_X_S, S_err_West_req_X_L, S_err_South_req_X_N, S_err_Local_req_X_E, S_err_IDLE_req_X_S, S_err_North_req_X_S, S_err_East_req_X_L, S_err_West_req_X_N, S_err_South_req_X_E, S_err_Local_req_X_W, S_err_IDLE_req_X_L, S_err_North_req_X_L, S_err_East_req_X_N, S_err_West_req_X_E, S_err_South_req_X_W, S_err_Local_req_X_S, S_arbiter_out_err_state_in_onehot, S_arbiter_out_err_no_request_grants, S_err_request_IDLE_state, S_err_request_IDLE_not_Grants, S_err_state_North_Invalid_Grant, S_err_state_East_Invalid_Grant, S_err_state_West_Invalid_Grant, S_err_state_South_Invalid_Grant, S_err_state_Local_Invalid_Grant, S_err_Grants_onehot_or_all_zero, -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal, L_err_IDLE_req_X_N, L_err_North_req_X_N, L_err_North_credit_not_zero_req_X_N_grant_N, L_err_North_credit_zero_or_not_req_X_N_not_grant_N, L_err_East_req_X_E, L_err_East_credit_not_zero_req_X_E_grant_E, L_err_East_credit_zero_or_not_req_X_E_not_grant_E, L_err_West_req_X_W, L_err_West_credit_not_zero_req_X_W_grant_W, L_err_West_credit_zero_or_not_req_X_W_not_grant_W, L_err_South_req_X_S, L_err_South_credit_not_zero_req_X_S_grant_S, L_err_South_credit_zero_or_not_req_X_S_not_grant_S, L_err_Local_req_X_L, L_err_Local_credit_not_zero_req_X_L_grant_L, L_err_Local_credit_zero_or_not_req_X_L_not_grant_L, L_err_IDLE_req_X_E, L_err_North_req_X_E, L_err_East_req_X_W, L_err_West_req_X_S, L_err_South_req_X_L, L_err_Local_req_X_N, L_err_IDLE_req_X_W, L_err_North_req_X_W, L_err_East_req_X_S, L_err_West_req_X_L, L_err_South_req_X_N, L_err_Local_req_X_E, L_err_IDLE_req_X_S, L_err_North_req_X_S, L_err_East_req_X_L, L_err_West_req_X_N, L_err_South_req_X_E, L_err_Local_req_X_W, L_err_IDLE_req_X_L, L_err_North_req_X_L, L_err_East_req_X_N, L_err_West_req_X_E, L_err_South_req_X_W, L_err_Local_req_X_S, L_arbiter_out_err_state_in_onehot, L_arbiter_out_err_no_request_grants, L_err_request_IDLE_state, L_err_request_IDLE_not_Grants, L_err_state_North_Invalid_Grant, L_err_state_East_Invalid_Grant, L_err_state_West_Invalid_Grant, L_err_state_South_Invalid_Grant, L_err_state_Local_Invalid_Grant, L_err_Grants_onehot_or_all_zero : std_logic; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Signals needed for grouping checkers to model turn/path faults signal N_FIFO_checkers_ORed, E_FIFO_checkers_ORed, W_FIFO_checkers_ORed, S_FIFO_checkers_ORed, L_FIFO_checkers_ORed : std_logic; signal N2E_turn_fault, N2W_turn_fault, E2N_turn_fault, E2S_turn_fault, W2N_turn_fault, W2S_turn_fault, S2E_turn_fault, S2W_turn_fault : std_logic; signal N2S_path_fault, S2N_path_fault, E2W_path_fault, W2E_path_fault : std_logic; signal L2N_fault, L2E_fault, L2W_fault, L2S_fault, N2L_fault, E2L_fault, W2L_fault, S2L_fault : std_logic; -- Just used temporarily for debugging purposes! signal N_LBDR_checkers_ORed, E_LBDR_checkers_ORed, W_LBDR_checkers_ORed, S_LBDR_checkers_ORed, L_LBDR_checkers_ORed : std_logic; signal Allocator_checkers_ORed : std_logic; --signal turn_faults_sig : std_logic_vector(19 downto 0); begin -- FIFO contributes to all turns and paths, therefore, for each turn or path (for the input direction), all the outputs of FIFO checkers -- corresponding to that input are ORed together. N_FIFO_checkers_ORed <= N_err_empty_full or N_err_empty_read_en or N_err_full_write_en or N_err_state_in_onehot or N_err_read_pointer_in_onehot or N_err_write_pointer_in_onehot or N_err_write_en_write_pointer or N_err_not_write_en_write_pointer or N_err_read_pointer_write_pointer_not_empty or N_err_read_pointer_write_pointer_empty or N_err_read_pointer_write_pointer_not_full or N_err_read_pointer_write_pointer_full or N_err_read_pointer_increment or N_err_read_pointer_not_increment or N_err_write_en or N_err_not_write_en or N_err_not_write_en1 or N_err_not_write_en2 or N_err_read_en_mismatch or N_err_read_en_mismatch1 or N_err_fake_credit_read_en_fake_credit_counter_in_increment or N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement or N_err_not_fake_credit_read_en_fake_credit_counter_in_not_change or N_err_fake_credit_not_read_en_fake_credit_counter_in_not_change or N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change or N_err_fake_credit_read_en_credit_out or N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out or N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out or N_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit or N_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change or N_err_state_out_Idle_not_fault_out_not_fake_credit or N_err_state_out_Idle_not_fault_out_not_fault_info_in or N_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal or N_err_state_out_Idle_fault_out_fake_credit or N_err_state_out_Idle_fault_out_state_in_Packet_drop or N_err_state_out_Idle_fault_out_fault_info_in or N_err_state_out_Idle_fault_out_faulty_packet_in or N_err_state_out_Idle_not_health_info or N_err_state_out_Idle_not_write_fake_flit or N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit or N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit or N_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit or N_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in or N_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit or N_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop or N_err_state_out_Header_flit_valid_in_fault_out_fault_info_in or N_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in or N_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change or N_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Header_flit_not_valid_in_not_fault_info_in or N_err_state_out_Header_flit_not_valid_in_not_write_fake_flit or N_err_state_out_Header_flit_or_Body_flit_not_fake_credit or N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change or N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit or N_err_state_out_Body_flit_valid_in_not_fault_out_health_info or N_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit or N_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in or N_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit or N_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop or N_err_state_out_Body_flit_valid_in_fault_out_fault_info_in or N_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in or N_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change or N_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Body_flit_not_valid_in_not_fault_info_in or N_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info or N_err_state_out_Body_flit_valid_in_fault_out_not_health_info or N_err_state_out_Body_flit_valid_in_not_health_info or N_err_state_out_Body_flit_not_fake_credit or N_err_state_out_Body_flit_not_valid_in_not_write_fake_flit or N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit or N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit or N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in or N_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Tail_flit_valid_in_fault_out_fake_credit or N_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop or N_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in or N_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in or N_err_state_out_Tail_flit_not_valid_in_state_in_Idle or N_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change or N_err_state_out_Tail_flit_not_valid_in_not_fault_info_in or N_err_state_out_Tail_flit_not_valid_in_not_fake_credit or N_err_state_out_Tail_flit_not_write_fake_flit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit or N_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change or N_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit or N_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change or N_err_fault_info_fault_info_out_equal or N_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal or N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in; -- East E_FIFO_checkers_ORed <= E_err_empty_full or E_err_empty_read_en or E_err_full_write_en or E_err_state_in_onehot or E_err_read_pointer_in_onehot or E_err_write_pointer_in_onehot or E_err_write_en_write_pointer or E_err_not_write_en_write_pointer or E_err_read_pointer_write_pointer_not_empty or E_err_read_pointer_write_pointer_empty or E_err_read_pointer_write_pointer_not_full or E_err_read_pointer_write_pointer_full or E_err_read_pointer_increment or E_err_read_pointer_not_increment or E_err_write_en or E_err_not_write_en or E_err_not_write_en1 or E_err_not_write_en2 or E_err_read_en_mismatch or E_err_read_en_mismatch1 or E_err_fake_credit_read_en_fake_credit_counter_in_increment or E_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement or E_err_not_fake_credit_read_en_fake_credit_counter_in_not_change or E_err_fake_credit_not_read_en_fake_credit_counter_in_not_change or E_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change or E_err_fake_credit_read_en_credit_out or E_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out or E_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out or E_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit or E_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change or E_err_state_out_Idle_not_fault_out_not_fake_credit or E_err_state_out_Idle_not_fault_out_not_fault_info_in or E_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal or E_err_state_out_Idle_fault_out_fake_credit or E_err_state_out_Idle_fault_out_state_in_Packet_drop or E_err_state_out_Idle_fault_out_fault_info_in or E_err_state_out_Idle_fault_out_faulty_packet_in or E_err_state_out_Idle_not_health_info or E_err_state_out_Idle_not_write_fake_flit or E_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit or E_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit or E_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit or E_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in or E_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or E_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit or E_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop or E_err_state_out_Header_flit_valid_in_fault_out_fault_info_in or E_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in or E_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change or E_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or E_err_state_out_Header_flit_not_valid_in_not_fault_info_in or E_err_state_out_Header_flit_not_valid_in_not_write_fake_flit or E_err_state_out_Header_flit_or_Body_flit_not_fake_credit or E_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change or E_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit or E_err_state_out_Body_flit_valid_in_not_fault_out_health_info or E_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit or E_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in or E_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or E_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit or E_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop or E_err_state_out_Body_flit_valid_in_fault_out_fault_info_in or E_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in or E_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change or E_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or E_err_state_out_Body_flit_not_valid_in_not_fault_info_in or E_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info or E_err_state_out_Body_flit_valid_in_fault_out_not_health_info or E_err_state_out_Body_flit_valid_in_not_health_info or E_err_state_out_Body_flit_not_fake_credit or E_err_state_out_Body_flit_not_valid_in_not_write_fake_flit or E_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit or E_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit or E_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in or E_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or E_err_state_out_Tail_flit_valid_in_fault_out_fake_credit or E_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop or E_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in or E_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in or E_err_state_out_Tail_flit_not_valid_in_state_in_Idle or E_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change or E_err_state_out_Tail_flit_not_valid_in_not_fault_info_in or E_err_state_out_Tail_flit_not_valid_in_not_fake_credit or E_err_state_out_Tail_flit_not_write_fake_flit or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit or E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change or E_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change or E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal or E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change or E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit or E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit or E_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change or E_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change or E_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit or E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit or E_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change or E_err_fault_info_fault_info_out_equal or E_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal or E_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal or E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in or E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in; -- West W_FIFO_checkers_ORed <= W_err_empty_full or W_err_empty_read_en or W_err_full_write_en or W_err_state_in_onehot or W_err_read_pointer_in_onehot or W_err_write_pointer_in_onehot or W_err_write_en_write_pointer or W_err_not_write_en_write_pointer or W_err_read_pointer_write_pointer_not_empty or W_err_read_pointer_write_pointer_empty or W_err_read_pointer_write_pointer_not_full or W_err_read_pointer_write_pointer_full or W_err_read_pointer_increment or W_err_read_pointer_not_increment or W_err_write_en or W_err_not_write_en or W_err_not_write_en1 or W_err_not_write_en2 or W_err_read_en_mismatch or W_err_read_en_mismatch1 or W_err_fake_credit_read_en_fake_credit_counter_in_increment or W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement or W_err_not_fake_credit_read_en_fake_credit_counter_in_not_change or W_err_fake_credit_not_read_en_fake_credit_counter_in_not_change or W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change or W_err_fake_credit_read_en_credit_out or W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out or W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out or W_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit or W_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change or W_err_state_out_Idle_not_fault_out_not_fake_credit or W_err_state_out_Idle_not_fault_out_not_fault_info_in or W_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal or W_err_state_out_Idle_fault_out_fake_credit or W_err_state_out_Idle_fault_out_state_in_Packet_drop or W_err_state_out_Idle_fault_out_fault_info_in or W_err_state_out_Idle_fault_out_faulty_packet_in or W_err_state_out_Idle_not_health_info or W_err_state_out_Idle_not_write_fake_flit or W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit or W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit or W_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit or W_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in or W_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit or W_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop or W_err_state_out_Header_flit_valid_in_fault_out_fault_info_in or W_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in or W_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change or W_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Header_flit_not_valid_in_not_fault_info_in or W_err_state_out_Header_flit_not_valid_in_not_write_fake_flit or W_err_state_out_Header_flit_or_Body_flit_not_fake_credit or W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change or W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit or W_err_state_out_Body_flit_valid_in_not_fault_out_health_info or W_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit or W_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in or W_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit or W_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop or W_err_state_out_Body_flit_valid_in_fault_out_fault_info_in or W_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in or W_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change or W_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Body_flit_not_valid_in_not_fault_info_in or W_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info or W_err_state_out_Body_flit_valid_in_fault_out_not_health_info or W_err_state_out_Body_flit_valid_in_not_health_info or W_err_state_out_Body_flit_not_fake_credit or W_err_state_out_Body_flit_not_valid_in_not_write_fake_flit or W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit or W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit or W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in or W_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Tail_flit_valid_in_fault_out_fake_credit or W_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop or W_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in or W_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in or W_err_state_out_Tail_flit_not_valid_in_state_in_Idle or W_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change or W_err_state_out_Tail_flit_not_valid_in_not_fault_info_in or W_err_state_out_Tail_flit_not_valid_in_not_fake_credit or W_err_state_out_Tail_flit_not_write_fake_flit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit or W_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change or W_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit or W_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change or W_err_fault_info_fault_info_out_equal or W_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal or W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in; -- South S_FIFO_checkers_ORed <= S_err_empty_full or S_err_empty_read_en or S_err_full_write_en or S_err_state_in_onehot or S_err_read_pointer_in_onehot or S_err_write_pointer_in_onehot or S_err_write_en_write_pointer or S_err_not_write_en_write_pointer or S_err_read_pointer_write_pointer_not_empty or S_err_read_pointer_write_pointer_empty or S_err_read_pointer_write_pointer_not_full or S_err_read_pointer_write_pointer_full or S_err_read_pointer_increment or S_err_read_pointer_not_increment or S_err_write_en or S_err_not_write_en or S_err_not_write_en1 or S_err_not_write_en2 or S_err_read_en_mismatch or S_err_read_en_mismatch1 or S_err_fake_credit_read_en_fake_credit_counter_in_increment or S_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement or S_err_not_fake_credit_read_en_fake_credit_counter_in_not_change or S_err_fake_credit_not_read_en_fake_credit_counter_in_not_change or S_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change or S_err_fake_credit_read_en_credit_out or S_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out or S_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out or S_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit or S_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change or S_err_state_out_Idle_not_fault_out_not_fake_credit or S_err_state_out_Idle_not_fault_out_not_fault_info_in or S_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal or S_err_state_out_Idle_fault_out_fake_credit or S_err_state_out_Idle_fault_out_state_in_Packet_drop or S_err_state_out_Idle_fault_out_fault_info_in or S_err_state_out_Idle_fault_out_faulty_packet_in or S_err_state_out_Idle_not_health_info or S_err_state_out_Idle_not_write_fake_flit or S_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit or S_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit or S_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit or S_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in or S_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or S_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit or S_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop or S_err_state_out_Header_flit_valid_in_fault_out_fault_info_in or S_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in or S_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change or S_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or S_err_state_out_Header_flit_not_valid_in_not_fault_info_in or S_err_state_out_Header_flit_not_valid_in_not_write_fake_flit or S_err_state_out_Header_flit_or_Body_flit_not_fake_credit or S_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change or S_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit or S_err_state_out_Body_flit_valid_in_not_fault_out_health_info or S_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit or S_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in or S_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or S_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit or S_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop or S_err_state_out_Body_flit_valid_in_fault_out_fault_info_in or S_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in or S_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change or S_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or S_err_state_out_Body_flit_not_valid_in_not_fault_info_in or S_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info or S_err_state_out_Body_flit_valid_in_fault_out_not_health_info or S_err_state_out_Body_flit_valid_in_not_health_info or S_err_state_out_Body_flit_not_fake_credit or S_err_state_out_Body_flit_not_valid_in_not_write_fake_flit or S_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit or S_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit or S_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in or S_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or S_err_state_out_Tail_flit_valid_in_fault_out_fake_credit or S_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop or S_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in or S_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in or S_err_state_out_Tail_flit_not_valid_in_state_in_Idle or S_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change or S_err_state_out_Tail_flit_not_valid_in_not_fault_info_in or S_err_state_out_Tail_flit_not_valid_in_not_fake_credit or S_err_state_out_Tail_flit_not_write_fake_flit or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit or S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change or S_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change or S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal or S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change or S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit or S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit or S_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change or S_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change or S_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit or S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit or S_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change or S_err_fault_info_fault_info_out_equal or S_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal or S_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal or S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in or S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in; -- Local L_FIFO_checkers_ORed <= L_err_empty_full or L_err_empty_read_en or L_err_full_write_en or L_err_state_in_onehot or L_err_read_pointer_in_onehot or L_err_write_pointer_in_onehot or L_err_write_en_write_pointer or L_err_not_write_en_write_pointer or L_err_read_pointer_write_pointer_not_empty or L_err_read_pointer_write_pointer_empty or L_err_read_pointer_write_pointer_not_full or L_err_read_pointer_write_pointer_full or L_err_read_pointer_increment or L_err_read_pointer_not_increment or L_err_write_en or L_err_not_write_en or L_err_not_write_en1 or L_err_not_write_en2 or L_err_read_en_mismatch or L_err_read_en_mismatch1 or L_err_fake_credit_read_en_fake_credit_counter_in_increment or L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement or L_err_not_fake_credit_read_en_fake_credit_counter_in_not_change or L_err_fake_credit_not_read_en_fake_credit_counter_in_not_change or L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change or L_err_fake_credit_read_en_credit_out or L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out or L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out or L_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit or L_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change or L_err_state_out_Idle_not_fault_out_not_fake_credit or L_err_state_out_Idle_not_fault_out_not_fault_info_in or L_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal or L_err_state_out_Idle_fault_out_fake_credit or L_err_state_out_Idle_fault_out_state_in_Packet_drop or L_err_state_out_Idle_fault_out_fault_info_in or L_err_state_out_Idle_fault_out_faulty_packet_in or L_err_state_out_Idle_not_health_info or L_err_state_out_Idle_not_write_fake_flit or L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit or L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit or L_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit or L_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in or L_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit or L_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop or L_err_state_out_Header_flit_valid_in_fault_out_fault_info_in or L_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in or L_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change or L_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Header_flit_not_valid_in_not_fault_info_in or L_err_state_out_Header_flit_not_valid_in_not_write_fake_flit or L_err_state_out_Header_flit_or_Body_flit_not_fake_credit or L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change or L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit or L_err_state_out_Body_flit_valid_in_not_fault_out_health_info or L_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit or L_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in or L_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit or L_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop or L_err_state_out_Body_flit_valid_in_fault_out_fault_info_in or L_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in or L_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change or L_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Body_flit_not_valid_in_not_fault_info_in or L_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info or L_err_state_out_Body_flit_valid_in_fault_out_not_health_info or L_err_state_out_Body_flit_valid_in_not_health_info or L_err_state_out_Body_flit_not_fake_credit or L_err_state_out_Body_flit_not_valid_in_not_write_fake_flit or L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit or L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit or L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in or L_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Tail_flit_valid_in_fault_out_fake_credit or L_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop or L_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in or L_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in or L_err_state_out_Tail_flit_not_valid_in_state_in_Idle or L_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change or L_err_state_out_Tail_flit_not_valid_in_not_fault_info_in or L_err_state_out_Tail_flit_not_valid_in_not_fake_credit or L_err_state_out_Tail_flit_not_write_fake_flit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit or L_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change or L_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit or L_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change or L_err_fault_info_fault_info_out_equal or L_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal or L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- Just for debugging purposes of the checkers! -- LBDR checker outputs ORed -- North -- Routing part checkers N_LBDR_checkers_ORed <= N_err_header_empty_Requests_FF_Requests_in or N_err_tail_Requests_in_all_zero or N_err_tail_empty_Requests_FF_Requests_in or N_err_tail_not_empty_not_grants_Requests_FF_Requests_in or N_err_grants_onehot or N_err_grants_mismatch or N_err_header_tail_Requests_FF_Requests_in or N_err_dst_addr_cur_addr_N1 or N_err_dst_addr_cur_addr_not_N1 or N_err_dst_addr_cur_addr_E1 or N_err_dst_addr_cur_addr_not_E1 or N_err_dst_addr_cur_addr_W1 or N_err_dst_addr_cur_addr_not_W1 or N_err_dst_addr_cur_addr_S1 or N_err_dst_addr_cur_addr_not_S1 or N_err_dst_addr_cur_addr_Req_L_in or N_err_dst_addr_cur_addr_not_Req_L_in or N_err_header_not_empty_faulty_drop_packet_in or -- added according to new design N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or -- added according to new design N_err_header_not_empty_faulty_Req_in_all_zero or -- added according to new design --N_err_header_not_empty_Req_L_in or -- added according to new design N_err_header_not_empty_Req_N_in or N_err_header_not_empty_Req_E_in or N_err_header_not_empty_Req_W_in or N_err_header_not_empty_Req_S_in or N_err_header_empty_packet_drop_in_packet_drop_equal or N_err_tail_not_empty_packet_drop_not_packet_drop_in or N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or N_err_packet_drop_order or -- Cx_Reconf checkers N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Rxy_Reconf checkers N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal; -- East -- Routing part checkers E_LBDR_checkers_ORed <= E_err_header_empty_Requests_FF_Requests_in or E_err_tail_Requests_in_all_zero or E_err_tail_empty_Requests_FF_Requests_in or E_err_tail_not_empty_not_grants_Requests_FF_Requests_in or E_err_grants_onehot or E_err_grants_mismatch or E_err_header_tail_Requests_FF_Requests_in or E_err_dst_addr_cur_addr_N1 or E_err_dst_addr_cur_addr_not_N1 or E_err_dst_addr_cur_addr_E1 or E_err_dst_addr_cur_addr_not_E1 or E_err_dst_addr_cur_addr_W1 or E_err_dst_addr_cur_addr_not_W1 or E_err_dst_addr_cur_addr_S1 or E_err_dst_addr_cur_addr_not_S1 or E_err_dst_addr_cur_addr_Req_L_in or E_err_dst_addr_cur_addr_not_Req_L_in or E_err_header_not_empty_faulty_drop_packet_in or -- added according to new design E_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or -- added according to new design E_err_header_not_empty_faulty_Req_in_all_zero or -- added according to new design --E_err_header_not_empty_Req_L_in or -- added according to new design E_err_header_not_empty_Req_N_in or E_err_header_not_empty_Req_E_in or E_err_header_not_empty_Req_W_in or E_err_header_not_empty_Req_S_in or E_err_header_empty_packet_drop_in_packet_drop_equal or E_err_tail_not_empty_packet_drop_not_packet_drop_in or E_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or E_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or E_err_packet_drop_order or -- Cx_Reconf checkers E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Rxy_Reconf checkers E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal; -- West -- Routing part checkers W_LBDR_checkers_ORed <= W_err_header_empty_Requests_FF_Requests_in or W_err_tail_Requests_in_all_zero or W_err_tail_empty_Requests_FF_Requests_in or W_err_tail_not_empty_not_grants_Requests_FF_Requests_in or W_err_grants_onehot or W_err_grants_mismatch or W_err_header_tail_Requests_FF_Requests_in or W_err_dst_addr_cur_addr_N1 or W_err_dst_addr_cur_addr_not_N1 or W_err_dst_addr_cur_addr_E1 or W_err_dst_addr_cur_addr_not_E1 or W_err_dst_addr_cur_addr_W1 or W_err_dst_addr_cur_addr_not_W1 or W_err_dst_addr_cur_addr_S1 or W_err_dst_addr_cur_addr_not_S1 or W_err_dst_addr_cur_addr_Req_L_in or W_err_dst_addr_cur_addr_not_Req_L_in or W_err_header_not_empty_faulty_drop_packet_in or -- added according to new design W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or -- added according to new design W_err_header_not_empty_faulty_Req_in_all_zero or -- added according to new design --W_err_header_not_empty_Req_L_in or -- added according to new design W_err_header_not_empty_Req_N_in or W_err_header_not_empty_Req_E_in or W_err_header_not_empty_Req_W_in or W_err_header_not_empty_Req_S_in or W_err_header_empty_packet_drop_in_packet_drop_equal or W_err_tail_not_empty_packet_drop_not_packet_drop_in or W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or W_err_packet_drop_order or -- Cx_Reconf checkers W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Rxy_Reconf checkers W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal; -- South -- Routing part checkers S_LBDR_checkers_ORed <= S_err_header_empty_Requests_FF_Requests_in or S_err_tail_Requests_in_all_zero or S_err_tail_empty_Requests_FF_Requests_in or S_err_tail_not_empty_not_grants_Requests_FF_Requests_in or S_err_grants_onehot or S_err_grants_mismatch or S_err_header_tail_Requests_FF_Requests_in or S_err_dst_addr_cur_addr_N1 or S_err_dst_addr_cur_addr_not_N1 or S_err_dst_addr_cur_addr_E1 or S_err_dst_addr_cur_addr_not_E1 or S_err_dst_addr_cur_addr_W1 or S_err_dst_addr_cur_addr_not_W1 or S_err_dst_addr_cur_addr_S1 or S_err_dst_addr_cur_addr_not_S1 or S_err_dst_addr_cur_addr_Req_L_in or S_err_dst_addr_cur_addr_not_Req_L_in or S_err_header_not_empty_faulty_drop_packet_in or -- added according to new design S_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or -- added according to new design S_err_header_not_empty_faulty_Req_in_all_zero or -- added according to new design --S_err_header_not_empty_Req_L_in or -- added according to new design S_err_header_not_empty_Req_N_in or S_err_header_not_empty_Req_E_in or S_err_header_not_empty_Req_W_in or S_err_header_not_empty_Req_S_in or S_err_header_empty_packet_drop_in_packet_drop_equal or S_err_tail_not_empty_packet_drop_not_packet_drop_in or S_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or S_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or S_err_packet_drop_order or -- Cx_Reconf checkers S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Rxy_Reconf checkers S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal; -- Local -- Routing part checkers L_LBDR_checkers_ORed <= L_err_header_empty_Requests_FF_Requests_in or L_err_tail_Requests_in_all_zero or L_err_tail_empty_Requests_FF_Requests_in or L_err_tail_not_empty_not_grants_Requests_FF_Requests_in or L_err_grants_onehot or L_err_grants_mismatch or L_err_header_tail_Requests_FF_Requests_in or L_err_dst_addr_cur_addr_N1 or L_err_dst_addr_cur_addr_not_N1 or L_err_dst_addr_cur_addr_E1 or L_err_dst_addr_cur_addr_not_E1 or L_err_dst_addr_cur_addr_W1 or L_err_dst_addr_cur_addr_not_W1 or L_err_dst_addr_cur_addr_S1 or L_err_dst_addr_cur_addr_not_S1 or L_err_dst_addr_cur_addr_Req_L_in or L_err_dst_addr_cur_addr_not_Req_L_in or L_err_header_not_empty_faulty_drop_packet_in or -- added according to new design L_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or -- added according to new design L_err_header_not_empty_faulty_Req_in_all_zero or -- added according to new design --L_err_header_not_empty_Req_L_in or -- added according to new design L_err_header_not_empty_Req_N_in or L_err_header_not_empty_Req_E_in or L_err_header_not_empty_Req_W_in or L_err_header_not_empty_Req_S_in or L_err_header_empty_packet_drop_in_packet_drop_equal or L_err_tail_not_empty_packet_drop_not_packet_drop_in or L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or L_err_packet_drop_order or -- Cx_Reconf checkers L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Rxy_Reconf checkers L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- Allocator checker outputs ORed ! -- Allocator logic checker outputs Allocator_checkers_ORed <= err_grant_N_N_sig_not_empty_N_grant_N_N or err_not_grant_N_N_sig_or_empty_N_not_grant_N_N or err_grant_N_E_sig_not_empty_E_grant_N_E or err_not_grant_N_E_sig_or_empty_E_not_grant_N_E or err_grant_N_W_sig_not_empty_W_grant_N_W or err_not_grant_N_W_sig_or_empty_W_not_grant_N_W or err_grant_N_S_sig_not_empty_S_grant_N_S or err_not_grant_N_S_sig_or_empty_S_not_grant_N_S or err_grant_N_L_sig_not_empty_L_grant_N_L or err_not_grant_N_L_sig_or_empty_L_not_grant_N_L or err_grant_E_N_sig_not_empty_N_grant_E_N or err_not_grant_E_N_sig_or_empty_N_not_grant_E_N or err_grant_E_E_sig_not_empty_E_grant_E_E or err_not_grant_E_E_sig_or_empty_E_not_grant_E_E or err_grant_E_W_sig_not_empty_W_grant_E_W or err_not_grant_E_W_sig_or_empty_W_not_grant_E_W or err_grant_E_S_sig_not_empty_S_grant_E_S or err_not_grant_E_S_sig_or_empty_S_not_grant_E_S or err_grant_E_L_sig_not_empty_L_grant_E_L or err_not_grant_E_L_sig_or_empty_L_not_grant_E_L or err_grant_W_N_sig_not_empty_N_grant_W_N or err_not_grant_W_N_sig_or_empty_N_not_grant_W_N or err_grant_W_E_sig_not_empty_E_grant_W_E or err_not_grant_W_E_sig_or_empty_E_not_grant_W_E or err_grant_W_W_sig_not_empty_W_grant_W_W or err_not_grant_W_W_sig_or_empty_W_not_grant_W_W or err_grant_W_S_sig_not_empty_S_grant_W_S or err_not_grant_W_S_sig_or_empty_S_not_grant_W_S or err_grant_W_L_sig_not_empty_L_grant_W_L or err_not_grant_W_L_sig_or_empty_L_not_grant_W_L or err_grant_S_N_sig_not_empty_N_grant_S_N or err_not_grant_S_N_sig_or_empty_N_not_grant_S_N or err_grant_S_E_sig_not_empty_E_grant_S_E or err_not_grant_S_E_sig_or_empty_E_not_grant_S_E or err_grant_S_W_sig_not_empty_W_grant_S_W or err_not_grant_S_W_sig_or_empty_W_not_grant_S_W or err_grant_S_S_sig_not_empty_S_grant_S_S or err_not_grant_S_S_sig_or_empty_S_not_grant_S_S or err_grant_S_L_sig_not_empty_L_grant_S_L or err_not_grant_S_L_sig_or_empty_L_not_grant_S_L or err_grant_L_N_sig_not_empty_N_grant_L_N or err_not_grant_L_N_sig_or_empty_N_not_grant_L_N or err_grant_L_E_sig_not_empty_E_grant_L_E or err_not_grant_L_E_sig_or_empty_E_not_grant_L_E or err_grant_L_W_sig_not_empty_W_grant_L_W or err_not_grant_L_W_sig_or_empty_W_not_grant_L_W or err_grant_L_S_sig_not_empty_S_grant_L_S or err_not_grant_L_S_sig_or_empty_S_not_grant_L_S or err_grant_L_L_sig_not_empty_L_grant_L_L or err_not_grant_L_L_sig_or_empty_L_not_grant_L_L or err_grant_signals_not_empty_grant_N or err_not_grant_signals_empty_not_grant_N or err_grant_signals_not_empty_grant_E or err_not_grant_signals_empty_not_grant_E or err_grant_signals_not_empty_grant_W or err_not_grant_signals_empty_not_grant_W or err_grant_signals_not_empty_grant_S or err_not_grant_signals_empty_not_grant_S or err_grant_signals_not_empty_grant_L or err_not_grant_signals_empty_not_grant_L or err_grants_valid_not_match or -- Allocator credit counter logic checker outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_N_credit_counter_N_out_increment or err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change or err_grant_N_credit_counter_N_out_decrement or err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change or err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal or err_credit_in_E_credit_counter_E_out_increment or err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change or err_grant_E_credit_counter_E_out_decrement or err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change or err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal or err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_W_credit_counter_W_out_increment or err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change or err_grant_W_credit_counter_W_out_decrement or err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change or err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal or err_credit_in_S_credit_counter_S_out_increment or err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change or err_grant_S_credit_counter_S_out_decrement or err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change or err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal or err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal or err_credit_in_L_credit_counter_L_out_increment or err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change or err_grant_L_credit_counter_L_out_decrement or err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change or err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal or -- Arbiter_in checker outputs -- North Arbiter_in checker outputs N_err_Requests_state_in_state_not_equal or N_err_IDLE_Req_N or N_err_IDLE_grant_N or N_err_North_Req_N or N_err_North_grant_N or N_err_East_Req_E or N_err_East_grant_E or N_err_West_Req_W or N_err_West_grant_W or N_err_South_Req_S or N_err_South_grant_S or N_err_Local_Req_L or N_err_Local_grant_L or N_err_IDLE_Req_E or N_err_IDLE_grant_E or N_err_North_Req_E or N_err_North_grant_E or N_err_East_Req_W or N_err_East_grant_W or N_err_West_Req_S or N_err_West_grant_S or N_err_South_Req_L or N_err_South_grant_L or N_err_Local_Req_N or N_err_Local_grant_N or N_err_IDLE_Req_W or N_err_IDLE_grant_W or N_err_North_Req_W or N_err_North_grant_W or N_err_East_Req_S or N_err_East_grant_S or N_err_West_Req_L or N_err_West_grant_L or N_err_South_Req_N or N_err_South_grant_N or N_err_Local_Req_E or N_err_Local_grant_E or N_err_IDLE_Req_S or N_err_IDLE_grant_S or N_err_North_Req_S or N_err_North_grant_S or N_err_East_Req_L or N_err_East_grant_L or N_err_West_Req_N or N_err_West_grant_N or N_err_South_Req_E or N_err_South_grant_E or N_err_Local_Req_W or N_err_Local_grant_W or N_err_IDLE_Req_L or N_err_IDLE_grant_L or N_err_North_Req_L or N_err_North_grant_L or N_err_East_Req_N or N_err_East_grant_N or N_err_West_Req_E or N_err_West_grant_E or N_err_South_Req_W or N_err_South_grant_W or N_err_Local_Req_S or N_err_Local_grant_S or N_err_state_in_onehot or N_err_no_request_grants or N_err_request_no_grants or N_err_no_Req_N_grant_N or N_err_no_Req_E_grant_E or N_err_no_Req_W_grant_W or N_err_no_Req_S_grant_S or N_err_no_Req_L_grant_L or -- East Arbiter_in checker outputs E_err_Requests_state_in_state_not_equal or E_err_IDLE_Req_N or E_err_IDLE_grant_N or E_err_North_Req_N or E_err_North_grant_N or E_err_East_Req_E or E_err_East_grant_E or E_err_West_Req_W or E_err_West_grant_W or E_err_South_Req_S or E_err_South_grant_S or E_err_Local_Req_L or E_err_Local_grant_L or E_err_IDLE_Req_E or E_err_IDLE_grant_E or E_err_North_Req_E or E_err_North_grant_E or E_err_East_Req_W or E_err_East_grant_W or E_err_West_Req_S or E_err_West_grant_S or E_err_South_Req_L or E_err_South_grant_L or E_err_Local_Req_N or E_err_Local_grant_N or E_err_IDLE_Req_W or E_err_IDLE_grant_W or E_err_North_Req_W or E_err_North_grant_W or E_err_East_Req_S or E_err_East_grant_S or E_err_West_Req_L or E_err_West_grant_L or E_err_South_Req_N or E_err_South_grant_N or E_err_Local_Req_E or E_err_Local_grant_E or E_err_IDLE_Req_S or E_err_IDLE_grant_S or E_err_North_Req_S or E_err_North_grant_S or E_err_East_Req_L or E_err_East_grant_L or E_err_West_Req_N or E_err_West_grant_N or E_err_South_Req_E or E_err_South_grant_E or E_err_Local_Req_W or E_err_Local_grant_W or E_err_IDLE_Req_L or E_err_IDLE_grant_L or E_err_North_Req_L or E_err_North_grant_L or E_err_East_Req_N or E_err_East_grant_N or E_err_West_Req_E or E_err_West_grant_E or E_err_South_Req_W or E_err_South_grant_W or E_err_Local_Req_S or E_err_Local_grant_S or E_err_state_in_onehot or E_err_no_request_grants or E_err_request_no_grants or E_err_no_Req_N_grant_N or E_err_no_Req_E_grant_E or E_err_no_Req_W_grant_W or E_err_no_Req_S_grant_S or E_err_no_Req_L_grant_L or -- West Arbiter_in checker outputs W_err_Requests_state_in_state_not_equal or W_err_IDLE_Req_N or W_err_IDLE_grant_N or W_err_North_Req_N or W_err_North_grant_N or W_err_East_Req_E or W_err_East_grant_E or W_err_West_Req_W or W_err_West_grant_W or W_err_South_Req_S or W_err_South_grant_S or W_err_Local_Req_L or W_err_Local_grant_L or W_err_IDLE_Req_E or W_err_IDLE_grant_E or W_err_North_Req_E or W_err_North_grant_E or W_err_East_Req_W or W_err_East_grant_W or W_err_West_Req_S or W_err_West_grant_S or W_err_South_Req_L or W_err_South_grant_L or W_err_Local_Req_N or W_err_Local_grant_N or W_err_IDLE_Req_W or W_err_IDLE_grant_W or W_err_North_Req_W or W_err_North_grant_W or W_err_East_Req_S or W_err_East_grant_S or W_err_West_Req_L or W_err_West_grant_L or W_err_South_Req_N or W_err_South_grant_N or W_err_Local_Req_E or W_err_Local_grant_E or W_err_IDLE_Req_S or W_err_IDLE_grant_S or W_err_North_Req_S or W_err_North_grant_S or W_err_East_Req_L or W_err_East_grant_L or W_err_West_Req_N or W_err_West_grant_N or W_err_South_Req_E or W_err_South_grant_E or W_err_Local_Req_W or W_err_Local_grant_W or W_err_IDLE_Req_L or W_err_IDLE_grant_L or W_err_North_Req_L or W_err_North_grant_L or W_err_East_Req_N or W_err_East_grant_N or W_err_West_Req_E or W_err_West_grant_E or W_err_South_Req_W or W_err_South_grant_W or W_err_Local_Req_S or W_err_Local_grant_S or W_err_state_in_onehot or W_err_no_request_grants or W_err_request_no_grants or W_err_no_Req_N_grant_N or W_err_no_Req_E_grant_E or W_err_no_Req_W_grant_W or W_err_no_Req_S_grant_S or W_err_no_Req_L_grant_L or -- South Arbiter_in checker outputs S_err_Requests_state_in_state_not_equal or S_err_IDLE_Req_N or S_err_IDLE_grant_N or S_err_North_Req_N or S_err_North_grant_N or S_err_East_Req_E or S_err_East_grant_E or S_err_West_Req_W or S_err_West_grant_W or S_err_South_Req_S or S_err_South_grant_S or S_err_Local_Req_L or S_err_Local_grant_L or S_err_IDLE_Req_E or S_err_IDLE_grant_E or S_err_North_Req_E or S_err_North_grant_E or S_err_East_Req_W or S_err_East_grant_W or S_err_West_Req_S or S_err_West_grant_S or S_err_South_Req_L or S_err_South_grant_L or S_err_Local_Req_N or S_err_Local_grant_N or S_err_IDLE_Req_W or S_err_IDLE_grant_W or S_err_North_Req_W or S_err_North_grant_W or S_err_East_Req_S or S_err_East_grant_S or S_err_West_Req_L or S_err_West_grant_L or S_err_South_Req_N or S_err_South_grant_N or S_err_Local_Req_E or S_err_Local_grant_E or S_err_IDLE_Req_S or S_err_IDLE_grant_S or S_err_North_Req_S or S_err_North_grant_S or S_err_East_Req_L or S_err_East_grant_L or S_err_West_Req_N or S_err_West_grant_N or S_err_South_Req_E or S_err_South_grant_E or S_err_Local_Req_W or S_err_Local_grant_W or S_err_IDLE_Req_L or S_err_IDLE_grant_L or S_err_North_Req_L or S_err_North_grant_L or S_err_East_Req_N or S_err_East_grant_N or S_err_West_Req_E or S_err_West_grant_E or S_err_South_Req_W or S_err_South_grant_W or S_err_Local_Req_S or S_err_Local_grant_S or S_err_state_in_onehot or S_err_no_request_grants or S_err_request_no_grants or S_err_no_Req_N_grant_N or S_err_no_Req_E_grant_E or S_err_no_Req_W_grant_W or S_err_no_Req_S_grant_S or S_err_no_Req_L_grant_L or -- Local Arbiter_in checker outputs L_err_Requests_state_in_state_not_equal or L_err_IDLE_Req_N or L_err_IDLE_grant_N or L_err_North_Req_N or L_err_North_grant_N or L_err_East_Req_E or L_err_East_grant_E or L_err_West_Req_W or L_err_West_grant_W or L_err_South_Req_S or L_err_South_grant_S or L_err_Local_Req_L or L_err_Local_grant_L or L_err_IDLE_Req_E or L_err_IDLE_grant_E or L_err_North_Req_E or L_err_North_grant_E or L_err_East_Req_W or L_err_East_grant_W or L_err_West_Req_S or L_err_West_grant_S or L_err_South_Req_L or L_err_South_grant_L or L_err_Local_Req_N or L_err_Local_grant_N or L_err_IDLE_Req_W or L_err_IDLE_grant_W or L_err_North_Req_W or L_err_North_grant_W or L_err_East_Req_S or L_err_East_grant_S or L_err_West_Req_L or L_err_West_grant_L or L_err_South_Req_N or L_err_South_grant_N or L_err_Local_Req_E or L_err_Local_grant_E or L_err_IDLE_Req_S or L_err_IDLE_grant_S or L_err_North_Req_S or L_err_North_grant_S or L_err_East_Req_L or L_err_East_grant_L or L_err_West_Req_N or L_err_West_grant_N or L_err_South_Req_E or L_err_South_grant_E or L_err_Local_Req_W or L_err_Local_grant_W or L_err_IDLE_Req_L or L_err_IDLE_grant_L or L_err_North_Req_L or L_err_North_grant_L or L_err_East_Req_N or L_err_East_grant_N or L_err_West_Req_E or L_err_West_grant_E or L_err_South_Req_W or L_err_South_grant_W or L_err_Local_Req_S or L_err_Local_grant_S or L_err_state_in_onehot or L_err_no_request_grants or L_err_request_no_grants or L_err_no_Req_N_grant_N or L_err_no_Req_E_grant_E or L_err_no_Req_W_grant_W or L_err_no_Req_S_grant_S or L_err_no_Req_L_grant_L or -- Arbiter_out checker outputs -- North Arbiter_out checker outputs N_arbiter_out_err_Requests_state_in_state_not_equal or N_err_IDLE_req_X_N or N_err_North_req_X_N or N_err_North_credit_not_zero_req_X_N_grant_N or N_err_North_credit_zero_or_not_req_X_N_not_grant_N or N_err_East_req_X_E or N_err_East_credit_not_zero_req_X_E_grant_E or N_err_East_credit_zero_or_not_req_X_E_not_grant_E or N_err_West_req_X_W or N_err_West_credit_not_zero_req_X_W_grant_W or N_err_West_credit_zero_or_not_req_X_W_not_grant_W or N_err_South_req_X_S or N_err_South_credit_not_zero_req_X_S_grant_S or N_err_South_credit_zero_or_not_req_X_S_not_grant_S or N_err_Local_req_X_L or N_err_Local_credit_not_zero_req_X_L_grant_L or N_err_Local_credit_zero_or_not_req_X_L_not_grant_L or N_err_IDLE_req_X_E or N_err_North_req_X_E or N_err_East_req_X_W or N_err_West_req_X_S or N_err_South_req_X_L or N_err_Local_req_X_N or N_err_IDLE_req_X_W or N_err_North_req_X_W or N_err_East_req_X_S or N_err_West_req_X_L or N_err_South_req_X_N or N_err_Local_req_X_E or N_err_IDLE_req_X_S or N_err_North_req_X_S or N_err_East_req_X_L or N_err_West_req_X_N or N_err_South_req_X_E or N_err_Local_req_X_W or N_err_IDLE_req_X_L or N_err_North_req_X_L or N_err_East_req_X_N or N_err_West_req_X_E or N_err_South_req_X_W or N_err_Local_req_X_S or N_arbiter_out_err_state_in_onehot or N_arbiter_out_err_no_request_grants or N_err_request_IDLE_state or N_err_request_IDLE_not_Grants or N_err_state_North_Invalid_Grant or N_err_state_East_Invalid_Grant or N_err_state_West_Invalid_Grant or N_err_state_South_Invalid_Grant or N_err_state_Local_Invalid_Grant or N_err_Grants_onehot_or_all_zero or -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal or E_err_IDLE_req_X_N or E_err_North_req_X_N or E_err_North_credit_not_zero_req_X_N_grant_N or E_err_North_credit_zero_or_not_req_X_N_not_grant_N or E_err_East_req_X_E or E_err_East_credit_not_zero_req_X_E_grant_E or E_err_East_credit_zero_or_not_req_X_E_not_grant_E or E_err_West_req_X_W or E_err_West_credit_not_zero_req_X_W_grant_W or E_err_West_credit_zero_or_not_req_X_W_not_grant_W or E_err_South_req_X_S or E_err_South_credit_not_zero_req_X_S_grant_S or E_err_South_credit_zero_or_not_req_X_S_not_grant_S or E_err_Local_req_X_L or E_err_Local_credit_not_zero_req_X_L_grant_L or E_err_Local_credit_zero_or_not_req_X_L_not_grant_L or E_err_IDLE_req_X_E or E_err_North_req_X_E or E_err_East_req_X_W or E_err_West_req_X_S or E_err_South_req_X_L or E_err_Local_req_X_N or E_err_IDLE_req_X_W or E_err_North_req_X_W or E_err_East_req_X_S or E_err_West_req_X_L or E_err_South_req_X_N or E_err_Local_req_X_E or E_err_IDLE_req_X_S or E_err_North_req_X_S or E_err_East_req_X_L or E_err_West_req_X_N or E_err_South_req_X_E or E_err_Local_req_X_W or E_err_IDLE_req_X_L or E_err_North_req_X_L or E_err_East_req_X_N or E_err_West_req_X_E or E_err_South_req_X_W or E_err_Local_req_X_S or E_arbiter_out_err_state_in_onehot or E_arbiter_out_err_no_request_grants or E_err_request_IDLE_state or E_err_request_IDLE_not_Grants or E_err_state_North_Invalid_Grant or E_err_state_East_Invalid_Grant or E_err_state_West_Invalid_Grant or E_err_state_South_Invalid_Grant or E_err_state_Local_Invalid_Grant or E_err_Grants_onehot_or_all_zero or -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal or W_err_IDLE_req_X_N or W_err_North_req_X_N or W_err_North_credit_not_zero_req_X_N_grant_N or W_err_North_credit_zero_or_not_req_X_N_not_grant_N or W_err_East_req_X_E or W_err_East_credit_not_zero_req_X_E_grant_E or W_err_East_credit_zero_or_not_req_X_E_not_grant_E or W_err_West_req_X_W or W_err_West_credit_not_zero_req_X_W_grant_W or W_err_West_credit_zero_or_not_req_X_W_not_grant_W or W_err_South_req_X_S or W_err_South_credit_not_zero_req_X_S_grant_S or W_err_South_credit_zero_or_not_req_X_S_not_grant_S or W_err_Local_req_X_L or W_err_Local_credit_not_zero_req_X_L_grant_L or W_err_Local_credit_zero_or_not_req_X_L_not_grant_L or W_err_IDLE_req_X_E or W_err_North_req_X_E or W_err_East_req_X_W or W_err_West_req_X_S or W_err_South_req_X_L or W_err_Local_req_X_N or W_err_IDLE_req_X_W or W_err_North_req_X_W or W_err_East_req_X_S or W_err_West_req_X_L or W_err_South_req_X_N or W_err_Local_req_X_E or W_err_IDLE_req_X_S or W_err_North_req_X_S or W_err_East_req_X_L or W_err_West_req_X_N or W_err_South_req_X_E or W_err_Local_req_X_W or W_err_IDLE_req_X_L or W_err_North_req_X_L or W_err_East_req_X_N or W_err_West_req_X_E or W_err_South_req_X_W or W_err_Local_req_X_S or W_arbiter_out_err_state_in_onehot or W_arbiter_out_err_no_request_grants or W_err_request_IDLE_state or W_err_request_IDLE_not_Grants or W_err_state_North_Invalid_Grant or W_err_state_East_Invalid_Grant or W_err_state_West_Invalid_Grant or W_err_state_South_Invalid_Grant or W_err_state_Local_Invalid_Grant or W_err_Grants_onehot_or_all_zero or -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal or S_err_IDLE_req_X_N or S_err_North_req_X_N or S_err_North_credit_not_zero_req_X_N_grant_N or S_err_North_credit_zero_or_not_req_X_N_not_grant_N or S_err_East_req_X_E or S_err_East_credit_not_zero_req_X_E_grant_E or S_err_East_credit_zero_or_not_req_X_E_not_grant_E or S_err_West_req_X_W or S_err_West_credit_not_zero_req_X_W_grant_W or S_err_West_credit_zero_or_not_req_X_W_not_grant_W or S_err_South_req_X_S or S_err_South_credit_not_zero_req_X_S_grant_S or S_err_South_credit_zero_or_not_req_X_S_not_grant_S or S_err_Local_req_X_L or S_err_Local_credit_not_zero_req_X_L_grant_L or S_err_Local_credit_zero_or_not_req_X_L_not_grant_L or S_err_IDLE_req_X_E or S_err_North_req_X_E or S_err_East_req_X_W or S_err_West_req_X_S or S_err_South_req_X_L or S_err_Local_req_X_N or S_err_IDLE_req_X_W or S_err_North_req_X_W or S_err_East_req_X_S or S_err_West_req_X_L or S_err_South_req_X_N or S_err_Local_req_X_E or S_err_IDLE_req_X_S or S_err_North_req_X_S or S_err_East_req_X_L or S_err_West_req_X_N or S_err_South_req_X_E or S_err_Local_req_X_W or S_err_IDLE_req_X_L or S_err_North_req_X_L or S_err_East_req_X_N or S_err_West_req_X_E or S_err_South_req_X_W or S_err_Local_req_X_S or S_arbiter_out_err_state_in_onehot or S_arbiter_out_err_no_request_grants or S_err_request_IDLE_state or S_err_request_IDLE_not_Grants or S_err_state_North_Invalid_Grant or S_err_state_East_Invalid_Grant or S_err_state_West_Invalid_Grant or S_err_state_South_Invalid_Grant or S_err_state_Local_Invalid_Grant or S_err_Grants_onehot_or_all_zero or -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal or L_err_IDLE_req_X_N or L_err_North_req_X_N or L_err_North_credit_not_zero_req_X_N_grant_N or L_err_North_credit_zero_or_not_req_X_N_not_grant_N or L_err_East_req_X_E or L_err_East_credit_not_zero_req_X_E_grant_E or L_err_East_credit_zero_or_not_req_X_E_not_grant_E or L_err_West_req_X_W or L_err_West_credit_not_zero_req_X_W_grant_W or L_err_West_credit_zero_or_not_req_X_W_not_grant_W or L_err_South_req_X_S or L_err_South_credit_not_zero_req_X_S_grant_S or L_err_South_credit_zero_or_not_req_X_S_not_grant_S or L_err_Local_req_X_L or L_err_Local_credit_not_zero_req_X_L_grant_L or L_err_Local_credit_zero_or_not_req_X_L_not_grant_L or L_err_IDLE_req_X_E or L_err_North_req_X_E or L_err_East_req_X_W or L_err_West_req_X_S or L_err_South_req_X_L or L_err_Local_req_X_N or L_err_IDLE_req_X_W or L_err_North_req_X_W or L_err_East_req_X_S or L_err_West_req_X_L or L_err_South_req_X_N or L_err_Local_req_X_E or L_err_IDLE_req_X_S or L_err_North_req_X_S or L_err_East_req_X_L or L_err_West_req_X_N or L_err_South_req_X_E or L_err_Local_req_X_W or L_err_IDLE_req_X_L or L_err_North_req_X_L or L_err_East_req_X_N or L_err_West_req_X_E or L_err_South_req_X_W or L_err_Local_req_X_S or L_arbiter_out_err_state_in_onehot or L_arbiter_out_err_no_request_grants or L_err_request_IDLE_state or L_err_request_IDLE_not_Grants or L_err_state_North_Invalid_Grant or L_err_state_East_Invalid_Grant or L_err_state_West_Invalid_Grant or L_err_state_South_Invalid_Grant or L_err_state_Local_Invalid_Grant or L_err_Grants_onehot_or_all_zero; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- Turn fault checkers -- FIFO N2E_turn_fault <= N_FIFO_checkers_ORed or -- LBDR N_err_header_empty_Requests_FF_Requests_in or N_err_tail_Requests_in_all_zero or N_err_tail_empty_Requests_FF_Requests_in or N_err_tail_not_empty_not_grants_Requests_FF_Requests_in or N_err_grants_onehot or N_err_grants_mismatch or N_err_header_tail_Requests_FF_Requests_in or N_err_dst_addr_cur_addr_E1 or N_err_dst_addr_cur_addr_not_E1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or N_err_header_not_empty_Req_E_in or N_err_header_empty_packet_drop_in_packet_drop_equal or N_err_tail_not_empty_packet_drop_not_packet_drop_in or N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or N_err_packet_drop_order or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator N_err_Requests_state_in_state_not_equal or N_err_East_Req_E or N_err_East_grant_E or N_err_IDLE_Req_E or N_err_IDLE_grant_E or N_err_North_Req_E or N_err_North_grant_E or N_err_Local_Req_E or N_err_Local_grant_E or N_err_South_Req_E or N_err_South_grant_E or N_err_West_Req_E or N_err_West_grant_E or N_err_state_in_onehot or N_err_no_request_grants or N_err_request_no_grants or N_err_no_Req_E_grant_E or E_arbiter_out_err_Requests_state_in_state_not_equal or E_err_IDLE_req_X_N or E_err_North_req_X_N or E_err_North_credit_not_zero_req_X_N_grant_N or E_err_North_credit_zero_or_not_req_X_N_not_grant_N or E_err_Local_req_X_N or E_err_South_req_X_N or E_err_West_req_X_N or E_err_East_req_X_N or E_arbiter_out_err_state_in_onehot or E_arbiter_out_err_no_request_grants or E_err_request_IDLE_state or E_err_request_IDLE_not_Grants or E_err_Grants_onehot_or_all_zero or W_err_South_req_X_N or W_err_West_req_X_N or W_err_East_req_X_N or err_grant_E_N_sig_not_empty_N_grant_E_N or err_not_grant_E_N_sig_or_empty_N_not_grant_E_N or err_grant_signals_not_empty_grant_E or err_not_grant_signals_empty_not_grant_E or err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal or err_credit_in_E_credit_counter_E_out_increment or err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change or err_grant_E_credit_counter_E_out_decrement or err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change or err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal; -- FIFO N2W_turn_fault <= N_FIFO_checkers_ORed or -- LBDR N_err_header_empty_Requests_FF_Requests_in or N_err_tail_Requests_in_all_zero or N_err_tail_empty_Requests_FF_Requests_in or N_err_tail_not_empty_not_grants_Requests_FF_Requests_in or N_err_grants_onehot or N_err_grants_mismatch or N_err_header_tail_Requests_FF_Requests_in or N_err_dst_addr_cur_addr_W1 or N_err_dst_addr_cur_addr_not_W1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or N_err_header_not_empty_Req_W_in or N_err_header_empty_packet_drop_in_packet_drop_equal or N_err_tail_not_empty_packet_drop_not_packet_drop_in or N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or N_err_packet_drop_order or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator N_err_Requests_state_in_state_not_equal or N_err_West_Req_W or N_err_West_grant_W or N_err_East_Req_W or N_err_East_grant_W or N_err_IDLE_Req_W or N_err_IDLE_grant_W or N_err_North_Req_W or N_err_North_grant_W or N_err_Local_Req_W or N_err_Local_grant_W or N_err_South_Req_W or N_err_South_grant_W or N_err_state_in_onehot or N_err_no_request_grants or N_err_request_no_grants or N_err_no_Req_W_grant_W or W_arbiter_out_err_Requests_state_in_state_not_equal or W_err_IDLE_req_X_N or W_err_North_req_X_N or W_err_North_credit_not_zero_req_X_N_grant_N or W_err_North_credit_zero_or_not_req_X_N_not_grant_N or W_err_Local_req_X_N or W_arbiter_out_err_state_in_onehot or W_arbiter_out_err_no_request_grants or W_err_request_IDLE_state or W_err_request_IDLE_not_Grants or W_err_Grants_onehot_or_all_zero or err_grant_W_N_sig_not_empty_N_grant_W_N or err_not_grant_W_N_sig_or_empty_N_not_grant_W_N or err_grant_signals_not_empty_grant_W or err_not_grant_signals_empty_not_grant_W or err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_W_credit_counter_W_out_increment or err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change or err_grant_W_credit_counter_W_out_decrement or err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change or err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal; -- FIFO E2N_turn_fault <= E_FIFO_checkers_ORed or -- LBDR E_err_header_empty_Requests_FF_Requests_in or E_err_tail_Requests_in_all_zero or E_err_tail_empty_Requests_FF_Requests_in or E_err_tail_not_empty_not_grants_Requests_FF_Requests_in or E_err_grants_onehot or E_err_grants_mismatch or E_err_header_tail_Requests_FF_Requests_in or E_err_dst_addr_cur_addr_N1 or E_err_dst_addr_cur_addr_not_N1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or E_err_header_not_empty_Req_N_in or E_err_header_empty_packet_drop_in_packet_drop_equal or E_err_tail_not_empty_packet_drop_not_packet_drop_in or E_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or E_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or E_err_packet_drop_order or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator E_err_Requests_state_in_state_not_equal or E_err_IDLE_Req_N or E_err_IDLE_grant_N or E_err_North_Req_N or E_err_North_grant_N or E_err_Local_Req_N or E_err_Local_grant_N or E_err_South_Req_N or E_err_South_grant_N or E_err_West_Req_N or E_err_West_grant_N or E_err_East_Req_N or E_err_East_grant_N or E_err_state_in_onehot or E_err_no_request_grants or E_err_request_no_grants or E_err_no_Req_N_grant_N or N_arbiter_out_err_Requests_state_in_state_not_equal or N_err_East_req_X_E or N_err_East_credit_not_zero_req_X_E_grant_E or N_err_East_credit_zero_or_not_req_X_E_not_grant_E or N_err_IDLE_req_X_E or N_err_North_req_X_E or N_err_Local_req_X_E or N_err_South_req_X_E or N_err_West_req_X_E or N_arbiter_out_err_state_in_onehot or N_arbiter_out_err_no_request_grants or N_err_request_IDLE_state or N_err_Grants_onehot_or_all_zero or err_grant_N_E_sig_not_empty_E_grant_N_E or err_not_grant_N_E_sig_or_empty_E_not_grant_N_E or err_grant_signals_not_empty_grant_N or err_not_grant_signals_empty_not_grant_N or err_grants_valid_not_match or err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_N_credit_counter_N_out_increment or err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change or err_grant_N_credit_counter_N_out_decrement or err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change or err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal; -- FIFO E2S_turn_fault <= E_FIFO_checkers_ORed or -- LBDR E_err_header_empty_Requests_FF_Requests_in or E_err_tail_Requests_in_all_zero or E_err_tail_empty_Requests_FF_Requests_in or E_err_tail_not_empty_not_grants_Requests_FF_Requests_in or E_err_grants_onehot or E_err_grants_mismatch or E_err_header_tail_Requests_FF_Requests_in or E_err_dst_addr_cur_addr_S1 or E_err_dst_addr_cur_addr_not_S1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or E_err_header_not_empty_Req_S_in or E_err_header_empty_packet_drop_in_packet_drop_equal or E_err_tail_not_empty_packet_drop_not_packet_drop_in or E_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or E_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or E_err_packet_drop_order or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator E_err_Requests_state_in_state_not_equal or E_err_South_Req_S or E_err_South_grant_S or E_err_West_Req_S or E_err_West_grant_S or E_err_East_Req_S or E_err_East_grant_S or E_err_IDLE_Req_S or E_err_IDLE_grant_S or E_err_North_Req_S or E_err_North_grant_S or E_err_Local_Req_S or E_err_Local_grant_S or E_err_state_in_onehot or E_err_no_request_grants or E_err_request_no_grants or E_err_no_Req_S_grant_S or S_arbiter_out_err_Requests_state_in_state_not_equal or S_err_East_req_X_E or S_err_East_credit_not_zero_req_X_E_grant_E or S_err_East_credit_zero_or_not_req_X_E_not_grant_E or S_err_IDLE_req_X_E or S_err_North_req_X_E or S_err_Local_req_X_E or S_err_South_req_X_E or S_err_West_req_X_E or S_arbiter_out_err_state_in_onehot or S_arbiter_out_err_no_request_grants or S_err_request_IDLE_state or S_err_request_IDLE_not_Grants or S_err_Grants_onehot_or_all_zero or err_grant_S_E_sig_not_empty_E_grant_S_E or err_not_grant_S_E_sig_or_empty_E_not_grant_S_E or err_grant_signals_not_empty_grant_S or err_not_grant_signals_empty_not_grant_S or err_grants_valid_not_match or err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal or err_credit_in_S_credit_counter_S_out_increment or err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change or err_grant_S_credit_counter_S_out_decrement or err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change or err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal; -- FIFO W2N_turn_fault <= W_FIFO_checkers_ORed or -- LBDR W_err_header_empty_Requests_FF_Requests_in or W_err_tail_Requests_in_all_zero or W_err_tail_empty_Requests_FF_Requests_in or W_err_tail_not_empty_not_grants_Requests_FF_Requests_in or W_err_grants_onehot or W_err_grants_mismatch or W_err_header_tail_Requests_FF_Requests_in or W_err_dst_addr_cur_addr_N1 or W_err_dst_addr_cur_addr_not_N1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or W_err_header_not_empty_Req_N_in or W_err_header_empty_packet_drop_in_packet_drop_equal or W_err_tail_not_empty_packet_drop_not_packet_drop_in or W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or W_err_packet_drop_order or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator W_err_Requests_state_in_state_not_equal or W_err_IDLE_Req_N or W_err_IDLE_grant_N or W_err_North_Req_N or W_err_North_grant_N or W_err_Local_Req_N or W_err_Local_grant_N or W_err_South_Req_N or W_err_South_grant_N or W_err_West_Req_N or W_err_West_grant_N or W_err_East_Req_N or W_err_East_grant_N or W_err_state_in_onehot or W_err_no_request_grants or W_err_request_no_grants or W_err_no_Req_N_grant_N or N_arbiter_out_err_Requests_state_in_state_not_equal or N_err_West_req_X_W or N_err_West_credit_not_zero_req_X_W_grant_W or N_err_West_credit_zero_or_not_req_X_W_not_grant_W or N_err_East_req_X_W or N_err_IDLE_req_X_W or N_err_North_req_X_W or N_err_Local_req_X_W or N_err_South_req_X_W or N_arbiter_out_err_state_in_onehot or N_arbiter_out_err_no_request_grants or N_err_request_IDLE_state or N_err_request_IDLE_not_Grants or N_err_Grants_onehot_or_all_zero or err_grant_N_W_sig_not_empty_W_grant_N_W or err_not_grant_N_W_sig_or_empty_W_not_grant_N_W or err_grant_signals_not_empty_grant_N or err_not_grant_signals_empty_not_grant_N or err_grants_valid_not_match or err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_N_credit_counter_N_out_increment or err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change or err_grant_N_credit_counter_N_out_decrement or err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change or err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal; -- FIFO W2S_turn_fault <= W_FIFO_checkers_ORed or -- LBDR W_err_header_empty_Requests_FF_Requests_in or W_err_tail_Requests_in_all_zero or W_err_tail_empty_Requests_FF_Requests_in or W_err_tail_not_empty_not_grants_Requests_FF_Requests_in or W_err_grants_onehot or W_err_grants_mismatch or W_err_header_tail_Requests_FF_Requests_in or W_err_dst_addr_cur_addr_S1 or W_err_dst_addr_cur_addr_not_S1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or W_err_header_not_empty_Req_S_in or W_err_header_empty_packet_drop_in_packet_drop_equal or W_err_tail_not_empty_packet_drop_not_packet_drop_in or W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or W_err_packet_drop_order or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator W_err_Requests_state_in_state_not_equal or W_err_South_Req_S or W_err_South_grant_S or W_err_West_Req_S or W_err_West_grant_S or W_err_East_Req_S or W_err_East_grant_S or W_err_IDLE_Req_S or W_err_IDLE_grant_S or W_err_North_Req_S or W_err_North_grant_S or W_err_Local_Req_S or W_err_Local_grant_S or W_err_state_in_onehot or W_err_no_request_grants or W_err_request_no_grants or W_err_no_Req_S_grant_S or S_arbiter_out_err_Requests_state_in_state_not_equal or S_err_West_req_X_W or S_err_West_credit_not_zero_req_X_W_grant_W or S_err_West_credit_zero_or_not_req_X_W_not_grant_W or S_err_East_req_X_W or S_err_IDLE_req_X_W or S_err_North_req_X_W or S_err_Local_req_X_W or S_err_South_req_X_W or S_arbiter_out_err_state_in_onehot or S_arbiter_out_err_no_request_grants or S_err_request_IDLE_state or S_err_request_IDLE_not_Grants or S_err_Grants_onehot_or_all_zero or err_grant_S_W_sig_not_empty_W_grant_S_W or err_not_grant_S_W_sig_or_empty_W_not_grant_S_W or err_grant_signals_not_empty_grant_S or err_not_grant_signals_empty_not_grant_S or err_grants_valid_not_match or err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal or err_credit_in_S_credit_counter_S_out_increment or err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change or err_grant_S_credit_counter_S_out_decrement or err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change or err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal; -- FIFO S2E_turn_fault <= S_FIFO_checkers_ORed or -- LBDR S_err_header_empty_Requests_FF_Requests_in or S_err_tail_Requests_in_all_zero or S_err_tail_empty_Requests_FF_Requests_in or S_err_tail_not_empty_not_grants_Requests_FF_Requests_in or S_err_grants_onehot or S_err_grants_mismatch or S_err_header_tail_Requests_FF_Requests_in or S_err_dst_addr_cur_addr_E1 or S_err_dst_addr_cur_addr_not_E1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or S_err_header_not_empty_Req_E_in or S_err_header_empty_packet_drop_in_packet_drop_equal or S_err_tail_not_empty_packet_drop_not_packet_drop_in or S_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or S_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or S_err_packet_drop_order or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator S_err_Requests_state_in_state_not_equal or S_err_East_Req_E or S_err_East_grant_E or S_err_IDLE_Req_E or S_err_IDLE_grant_E or S_err_North_Req_E or S_err_North_grant_E or S_err_Local_Req_E or S_err_Local_grant_E or S_err_South_Req_E or S_err_South_grant_E or S_err_West_Req_E or S_err_West_grant_E or S_err_state_in_onehot or S_err_no_request_grants or S_err_request_no_grants or S_err_no_Req_E_grant_E or E_arbiter_out_err_Requests_state_in_state_not_equal or E_err_South_req_X_S or E_err_South_credit_not_zero_req_X_S_grant_S or E_err_South_credit_zero_or_not_req_X_S_not_grant_S or E_err_West_req_X_S or E_err_East_req_X_S or E_err_IDLE_req_X_S or E_err_North_req_X_S or E_err_Local_req_X_S or E_arbiter_out_err_state_in_onehot or E_arbiter_out_err_no_request_grants or E_err_request_IDLE_state or E_err_request_IDLE_not_Grants or E_err_Grants_onehot_or_all_zero or err_grant_E_S_sig_not_empty_S_grant_E_S or err_not_grant_E_S_sig_or_empty_S_not_grant_E_S or err_grant_signals_not_empty_grant_E or err_not_grant_signals_empty_not_grant_E or err_grants_valid_not_match or err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal or err_credit_in_E_credit_counter_E_out_increment or err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change or err_grant_E_credit_counter_E_out_decrement or err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change or err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal; -- FIFO S2W_turn_fault <= S_FIFO_checkers_ORed or -- LBDR S_err_header_empty_Requests_FF_Requests_in or S_err_tail_Requests_in_all_zero or S_err_tail_empty_Requests_FF_Requests_in or S_err_tail_not_empty_not_grants_Requests_FF_Requests_in or S_err_grants_onehot or S_err_grants_mismatch or S_err_header_tail_Requests_FF_Requests_in or S_err_dst_addr_cur_addr_W1 or S_err_dst_addr_cur_addr_not_W1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or S_err_header_not_empty_Req_W_in or S_err_header_empty_packet_drop_in_packet_drop_equal or S_err_tail_not_empty_packet_drop_not_packet_drop_in or S_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or S_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or S_err_packet_drop_order or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator S_err_Requests_state_in_state_not_equal or S_err_West_Req_W or S_err_West_grant_W or S_err_East_Req_W or S_err_East_grant_W or S_err_IDLE_Req_W or S_err_IDLE_grant_W or S_err_North_Req_W or S_err_North_grant_W or S_err_Local_Req_W or S_err_Local_grant_W or S_err_South_Req_W or S_err_South_grant_W or S_err_state_in_onehot or S_err_no_request_grants or S_err_request_no_grants or S_err_no_Req_W_grant_W or W_arbiter_out_err_Requests_state_in_state_not_equal or W_err_South_req_X_S or W_err_South_credit_not_zero_req_X_S_grant_S or W_err_South_credit_zero_or_not_req_X_S_not_grant_S or W_err_West_req_X_S or W_err_East_req_X_S or W_err_IDLE_req_X_S or W_err_North_req_X_S or W_err_Local_req_X_S or W_arbiter_out_err_state_in_onehot or W_arbiter_out_err_no_request_grants or W_err_request_IDLE_state or W_err_request_IDLE_not_Grants or W_err_Grants_onehot_or_all_zero or err_grant_W_S_sig_not_empty_S_grant_W_S or err_not_grant_W_S_sig_or_empty_S_not_grant_W_S or err_grant_signals_not_empty_grant_W or err_not_grant_signals_empty_not_grant_W or err_grants_valid_not_match or err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_W_credit_counter_W_out_increment or err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change or err_grant_W_credit_counter_W_out_decrement or err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change or err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal; -- Path fault checkers -- FIFO N2S_path_fault <= N_FIFO_checkers_ORed or -- LBDR N_err_header_empty_Requests_FF_Requests_in or N_err_tail_Requests_in_all_zero or N_err_tail_empty_Requests_FF_Requests_in or N_err_tail_not_empty_not_grants_Requests_FF_Requests_in or N_err_grants_onehot or N_err_grants_mismatch or N_err_header_tail_Requests_FF_Requests_in or N_err_dst_addr_cur_addr_S1 or N_err_dst_addr_cur_addr_not_S1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or N_err_header_not_empty_Req_S_in or N_err_header_empty_packet_drop_in_packet_drop_equal or N_err_tail_not_empty_packet_drop_not_packet_drop_in or N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or N_err_packet_drop_order or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator N_err_Requests_state_in_state_not_equal or N_err_South_Req_S or N_err_South_grant_S or N_err_West_Req_S or N_err_West_grant_S or N_err_East_Req_S or N_err_East_grant_S or N_err_IDLE_Req_S or N_err_IDLE_grant_S or N_err_North_Req_S or N_err_North_grant_S or N_err_Local_Req_S or N_err_Local_grant_S or N_err_state_in_onehot or N_err_no_request_grants or N_err_request_no_grants or N_err_no_Req_S_grant_S or S_arbiter_out_err_Requests_state_in_state_not_equal or S_err_IDLE_req_X_N or S_err_North_req_X_N or S_err_North_credit_not_zero_req_X_N_grant_N or S_err_North_credit_zero_or_not_req_X_N_not_grant_N or S_err_Local_req_X_N or S_err_South_req_X_N or S_err_West_req_X_N or S_err_East_req_X_N or S_arbiter_out_err_state_in_onehot or S_arbiter_out_err_no_request_grants or S_err_request_IDLE_state or S_err_request_IDLE_not_Grants or S_err_Grants_onehot_or_all_zero or err_grant_S_N_sig_not_empty_N_grant_S_N or err_not_grant_S_N_sig_or_empty_N_not_grant_S_N or err_grant_signals_not_empty_grant_S or err_not_grant_signals_empty_not_grant_S or err_grants_valid_not_match or err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal or err_credit_in_S_credit_counter_S_out_increment or err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change or err_grant_S_credit_counter_S_out_decrement or err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change or err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal; -- FIFO S2N_path_fault <= S_FIFO_checkers_ORed or -- LBDR S_err_header_empty_Requests_FF_Requests_in or S_err_tail_Requests_in_all_zero or S_err_tail_empty_Requests_FF_Requests_in or S_err_tail_not_empty_not_grants_Requests_FF_Requests_in or S_err_grants_onehot or S_err_grants_mismatch or S_err_header_tail_Requests_FF_Requests_in or S_err_dst_addr_cur_addr_N1 or S_err_dst_addr_cur_addr_not_N1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or S_err_header_not_empty_Req_N_in or S_err_header_empty_packet_drop_in_packet_drop_equal or S_err_tail_not_empty_packet_drop_not_packet_drop_in or S_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or S_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or S_err_packet_drop_order or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator S_err_Requests_state_in_state_not_equal or S_err_IDLE_Req_N or S_err_IDLE_grant_N or S_err_North_Req_N or S_err_North_grant_N or S_err_Local_Req_N or S_err_Local_grant_N or S_err_South_Req_N or S_err_South_grant_N or S_err_West_Req_N or S_err_West_grant_N or S_err_East_Req_N or S_err_East_grant_N or S_err_state_in_onehot or S_err_no_request_grants or S_err_request_no_grants or S_err_no_Req_N_grant_N or N_arbiter_out_err_Requests_state_in_state_not_equal or N_err_South_req_X_S or N_err_South_credit_not_zero_req_X_S_grant_S or N_err_South_credit_zero_or_not_req_X_S_not_grant_S or N_err_West_req_X_S or N_err_East_req_X_S or N_err_IDLE_req_X_S or N_err_North_req_X_S or N_err_Local_req_X_S or N_arbiter_out_err_state_in_onehot or N_arbiter_out_err_no_request_grants or N_err_request_IDLE_state or N_err_request_IDLE_not_Grants or N_err_Grants_onehot_or_all_zero or err_grant_N_S_sig_not_empty_S_grant_N_S or err_not_grant_N_S_sig_or_empty_S_not_grant_N_S or err_grant_signals_not_empty_grant_N or err_not_grant_signals_empty_not_grant_N or err_grants_valid_not_match or err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_N_credit_counter_N_out_increment or err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change or err_grant_N_credit_counter_N_out_decrement or err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change or err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal; -- FIFO E2W_path_fault <= E_FIFO_checkers_ORed or -- LBDR E_err_header_empty_Requests_FF_Requests_in or E_err_tail_Requests_in_all_zero or E_err_tail_empty_Requests_FF_Requests_in or E_err_tail_not_empty_not_grants_Requests_FF_Requests_in or E_err_grants_onehot or E_err_grants_mismatch or E_err_header_tail_Requests_FF_Requests_in or E_err_dst_addr_cur_addr_W1 or E_err_dst_addr_cur_addr_not_W1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or E_err_header_not_empty_Req_W_in or E_err_header_empty_packet_drop_in_packet_drop_equal or E_err_tail_not_empty_packet_drop_not_packet_drop_in or E_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or E_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or E_err_packet_drop_order or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator E_err_Requests_state_in_state_not_equal or E_err_West_Req_W or E_err_West_grant_W or E_err_East_Req_W or E_err_East_grant_W or E_err_IDLE_Req_W or E_err_IDLE_grant_W or E_err_North_Req_W or E_err_North_grant_W or E_err_Local_Req_W or E_err_Local_grant_W or E_err_South_Req_W or E_err_South_grant_W or E_err_state_in_onehot or E_err_no_request_grants or E_err_request_no_grants or E_err_no_Req_W_grant_W or W_arbiter_out_err_Requests_state_in_state_not_equal or W_err_East_req_X_E or W_err_East_credit_not_zero_req_X_E_grant_E or W_err_East_credit_zero_or_not_req_X_E_not_grant_E or W_err_IDLE_req_X_E or W_err_North_req_X_E or W_err_Local_req_X_E or W_err_South_req_X_E or W_err_West_req_X_E or W_arbiter_out_err_state_in_onehot or W_arbiter_out_err_no_request_grants or W_err_request_IDLE_state or W_err_request_IDLE_not_Grants or W_err_Grants_onehot_or_all_zero or err_grant_W_E_sig_not_empty_E_grant_W_E or err_not_grant_W_E_sig_or_empty_E_not_grant_W_E or err_grant_signals_not_empty_grant_W or err_not_grant_signals_empty_not_grant_W or err_grants_valid_not_match or err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_W_credit_counter_W_out_increment or err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change or err_grant_W_credit_counter_W_out_decrement or err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change or err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal; -- FIFO W2E_path_fault <= W_FIFO_checkers_ORed or -- LBDR W_err_header_empty_Requests_FF_Requests_in or W_err_tail_Requests_in_all_zero or W_err_tail_empty_Requests_FF_Requests_in or W_err_tail_not_empty_not_grants_Requests_FF_Requests_in or W_err_grants_onehot or W_err_grants_mismatch or W_err_header_tail_Requests_FF_Requests_in or W_err_dst_addr_cur_addr_E1 or W_err_dst_addr_cur_addr_not_E1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or W_err_header_not_empty_Req_E_in or W_err_header_empty_packet_drop_in_packet_drop_equal or W_err_tail_not_empty_packet_drop_not_packet_drop_in or W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or W_err_packet_drop_order or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator W_err_Requests_state_in_state_not_equal or W_err_East_Req_E or W_err_East_grant_E or W_err_IDLE_Req_E or W_err_IDLE_grant_E or W_err_North_Req_E or W_err_North_grant_E or W_err_Local_Req_E or W_err_Local_grant_E or W_err_South_Req_E or W_err_South_grant_E or W_err_West_Req_E or W_err_West_grant_E or W_err_state_in_onehot or W_err_no_request_grants or W_err_request_no_grants or W_err_no_Req_E_grant_E or E_arbiter_out_err_Requests_state_in_state_not_equal or E_err_West_req_X_W or E_err_West_credit_not_zero_req_X_W_grant_W or E_err_West_credit_zero_or_not_req_X_W_not_grant_W or E_err_East_req_X_W or E_err_IDLE_req_X_W or E_err_North_req_X_W or E_err_Local_req_X_W or E_err_South_req_X_W or E_arbiter_out_err_state_in_onehot or E_arbiter_out_err_no_request_grants or E_err_request_IDLE_state or E_err_request_IDLE_not_Grants or E_err_Grants_onehot_or_all_zero or err_grant_E_W_sig_not_empty_W_grant_E_W or err_not_grant_E_W_sig_or_empty_W_not_grant_E_W or err_grant_signals_not_empty_grant_E or err_not_grant_signals_empty_not_grant_E or err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal or err_credit_in_E_credit_counter_E_out_increment or err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change or err_grant_E_credit_counter_E_out_decrement or err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change or err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal; -- Checkers for Paths/turns from/to Local port -- FIFO L2N_fault <= L_FIFO_checkers_ORed or -- LBDR L_err_header_empty_Requests_FF_Requests_in or L_err_tail_Requests_in_all_zero or L_err_tail_empty_Requests_FF_Requests_in or L_err_tail_not_empty_not_grants_Requests_FF_Requests_in or L_err_grants_onehot or L_err_grants_mismatch or L_err_header_tail_Requests_FF_Requests_in or L_err_dst_addr_cur_addr_N1 or L_err_dst_addr_cur_addr_not_N1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or L_err_header_not_empty_Req_N_in or L_err_header_empty_packet_drop_in_packet_drop_equal or L_err_tail_not_empty_packet_drop_not_packet_drop_in or L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or L_err_packet_drop_order or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator L_err_Requests_state_in_state_not_equal or L_err_IDLE_Req_N or L_err_IDLE_grant_N or L_err_North_Req_N or L_err_North_grant_N or L_err_Local_Req_N or L_err_Local_grant_N or L_err_South_Req_N or L_err_South_grant_N or L_err_West_Req_N or L_err_West_grant_N or L_err_East_Req_N or L_err_East_grant_N or L_err_state_in_onehot or L_err_no_request_grants or L_err_request_no_grants or L_err_no_Req_N_grant_N or N_arbiter_out_err_Requests_state_in_state_not_equal or N_err_Local_req_X_L or N_err_Local_credit_not_zero_req_X_L_grant_L or N_err_Local_credit_zero_or_not_req_X_L_not_grant_L or N_err_South_req_X_L or N_err_West_req_X_L or N_err_East_req_X_L or N_err_IDLE_req_X_L or N_err_North_req_X_L or N_arbiter_out_err_state_in_onehot or N_arbiter_out_err_no_request_grants or N_err_request_IDLE_state or N_err_request_IDLE_not_Grants or N_err_Grants_onehot_or_all_zero or err_grant_N_L_sig_not_empty_L_grant_N_L or err_not_grant_N_L_sig_or_empty_L_not_grant_N_L or err_grant_signals_not_empty_grant_N or err_not_grant_signals_empty_not_grant_N or err_grants_valid_not_match or err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_N_credit_counter_N_out_increment or err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change or err_grant_N_credit_counter_N_out_decrement or err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change or err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal; -- FIFO L2E_fault <= L_FIFO_checkers_ORed or -- LBDR L_err_header_empty_Requests_FF_Requests_in or L_err_tail_Requests_in_all_zero or L_err_tail_empty_Requests_FF_Requests_in or L_err_tail_not_empty_not_grants_Requests_FF_Requests_in or L_err_grants_onehot or L_err_grants_mismatch or L_err_header_tail_Requests_FF_Requests_in or L_err_dst_addr_cur_addr_E1 or L_err_dst_addr_cur_addr_not_E1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or L_err_header_not_empty_Req_E_in or L_err_header_empty_packet_drop_in_packet_drop_equal or L_err_tail_not_empty_packet_drop_not_packet_drop_in or L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or L_err_packet_drop_order or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator L_err_Requests_state_in_state_not_equal or L_err_East_Req_E or L_err_East_grant_E or L_err_IDLE_Req_E or L_err_IDLE_grant_E or L_err_North_Req_E or L_err_North_grant_E or L_err_Local_Req_E or L_err_Local_grant_E or L_err_South_Req_E or L_err_South_grant_E or L_err_West_Req_E or L_err_West_grant_E or L_err_state_in_onehot or L_err_no_request_grants or L_err_request_no_grants or L_err_no_Req_E_grant_E or E_arbiter_out_err_Requests_state_in_state_not_equal or E_err_Local_req_X_L or E_err_Local_credit_not_zero_req_X_L_grant_L or E_err_Local_credit_zero_or_not_req_X_L_not_grant_L or E_err_South_req_X_L or E_err_West_req_X_L or E_err_East_req_X_L or E_err_IDLE_req_X_L or E_err_North_req_X_L or E_arbiter_out_err_state_in_onehot or E_arbiter_out_err_no_request_grants or E_err_request_IDLE_state or E_err_request_IDLE_not_Grants or E_err_Grants_onehot_or_all_zero or err_grant_E_L_sig_not_empty_L_grant_E_L or err_not_grant_E_L_sig_or_empty_L_not_grant_E_L or err_grant_signals_not_empty_grant_E or err_not_grant_signals_empty_not_grant_E or err_grants_valid_not_match or err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal or err_credit_in_E_credit_counter_E_out_increment or err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change or err_grant_E_credit_counter_E_out_decrement or err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change or err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal; -- FIFO L2W_fault <= L_FIFO_checkers_ORed or -- LBDR L_err_header_empty_Requests_FF_Requests_in or L_err_tail_Requests_in_all_zero or L_err_tail_empty_Requests_FF_Requests_in or L_err_tail_not_empty_not_grants_Requests_FF_Requests_in or L_err_grants_onehot or L_err_grants_mismatch or L_err_header_tail_Requests_FF_Requests_in or L_err_dst_addr_cur_addr_W1 or L_err_dst_addr_cur_addr_not_W1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or L_err_header_not_empty_Req_W_in or L_err_header_empty_packet_drop_in_packet_drop_equal or L_err_tail_not_empty_packet_drop_not_packet_drop_in or L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or L_err_packet_drop_order or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator L_err_Requests_state_in_state_not_equal or L_err_West_Req_W or L_err_West_grant_W or L_err_East_Req_W or L_err_East_grant_W or L_err_IDLE_Req_W or L_err_IDLE_grant_W or L_err_North_Req_W or L_err_North_grant_W or L_err_Local_Req_W or L_err_Local_grant_W or L_err_South_Req_W or L_err_South_grant_W or L_err_state_in_onehot or L_err_no_request_grants or L_err_request_no_grants or L_err_no_Req_W_grant_W or W_arbiter_out_err_Requests_state_in_state_not_equal or W_err_Local_req_X_L or W_err_Local_credit_not_zero_req_X_L_grant_L or W_err_Local_credit_zero_or_not_req_X_L_not_grant_L or W_err_South_req_X_L or W_err_West_req_X_L or W_err_East_req_X_L or W_err_IDLE_req_X_L or W_err_North_req_X_L or W_arbiter_out_err_state_in_onehot or W_arbiter_out_err_no_request_grants or W_err_request_IDLE_state or W_err_request_IDLE_not_Grants or W_err_Grants_onehot_or_all_zero or err_grant_W_L_sig_not_empty_L_grant_W_L or err_not_grant_W_L_sig_or_empty_L_not_grant_W_L or err_grant_signals_not_empty_grant_W or err_not_grant_signals_empty_not_grant_W or err_grants_valid_not_match or err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_W_credit_counter_W_out_increment or err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change or err_grant_W_credit_counter_W_out_decrement or err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change or err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal; -- FIFO L2S_fault <= L_FIFO_checkers_ORed or -- LBDR L_err_header_empty_Requests_FF_Requests_in or L_err_tail_Requests_in_all_zero or L_err_tail_empty_Requests_FF_Requests_in or L_err_tail_not_empty_not_grants_Requests_FF_Requests_in or L_err_grants_onehot or L_err_grants_mismatch or L_err_header_tail_Requests_FF_Requests_in or L_err_dst_addr_cur_addr_S1 or L_err_dst_addr_cur_addr_not_S1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or L_err_header_not_empty_Req_S_in or L_err_header_empty_packet_drop_in_packet_drop_equal or L_err_tail_not_empty_packet_drop_not_packet_drop_in or L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or L_err_packet_drop_order or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator L_err_Requests_state_in_state_not_equal or L_err_South_Req_S or L_err_South_grant_S or L_err_West_Req_S or L_err_West_grant_S or L_err_East_Req_S or L_err_East_grant_S or L_err_IDLE_Req_S or L_err_IDLE_grant_S or L_err_North_Req_S or L_err_North_grant_S or L_err_Local_Req_S or L_err_Local_grant_S or L_err_state_in_onehot or L_err_no_request_grants or L_err_request_no_grants or L_err_no_Req_S_grant_S or S_arbiter_out_err_Requests_state_in_state_not_equal or S_err_Local_req_X_L or S_err_Local_credit_not_zero_req_X_L_grant_L or S_err_Local_credit_zero_or_not_req_X_L_not_grant_L or S_err_South_req_X_L or S_err_West_req_X_L or S_err_East_req_X_L or S_err_IDLE_req_X_L or S_err_North_req_X_L or S_arbiter_out_err_state_in_onehot or S_arbiter_out_err_no_request_grants or S_err_request_IDLE_state or S_err_request_IDLE_not_Grants or S_err_Grants_onehot_or_all_zero or err_grant_S_L_sig_not_empty_L_grant_S_L or err_not_grant_S_L_sig_or_empty_L_not_grant_S_L or err_grant_signals_not_empty_grant_S or err_not_grant_signals_empty_not_grant_S or err_grants_valid_not_match or err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal or err_credit_in_S_credit_counter_S_out_increment or err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change or err_grant_S_credit_counter_S_out_decrement or err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change or err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal; -- FIFO N2L_fault <= N_FIFO_checkers_ORed or -- LBDR N_err_header_empty_Requests_FF_Requests_in or N_err_tail_Requests_in_all_zero or N_err_tail_empty_Requests_FF_Requests_in or N_err_tail_not_empty_not_grants_Requests_FF_Requests_in or N_err_grants_onehot or N_err_grants_mismatch or N_err_header_tail_Requests_FF_Requests_in or N_err_dst_addr_cur_addr_Req_L_in or N_err_dst_addr_cur_addr_not_Req_L_in or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or --N_err_header_not_empty_Req_L_in or N_err_header_empty_packet_drop_in_packet_drop_equal or N_err_tail_not_empty_packet_drop_not_packet_drop_in or N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or N_err_packet_drop_order or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator N_err_Requests_state_in_state_not_equal or N_err_Local_Req_L or N_err_Local_grant_L or N_err_South_Req_L or N_err_South_grant_L or N_err_West_Req_L or N_err_West_grant_L or N_err_East_Req_L or N_err_East_grant_L or N_err_IDLE_Req_L or N_err_IDLE_grant_L or N_err_North_Req_L or N_err_North_grant_L or N_err_state_in_onehot or N_err_no_request_grants or N_err_request_no_grants or N_err_no_Req_L_grant_L or L_arbiter_out_err_Requests_state_in_state_not_equal or L_err_IDLE_req_X_N or L_err_North_req_X_N or L_err_North_credit_not_zero_req_X_N_grant_N or L_err_North_credit_zero_or_not_req_X_N_not_grant_N or L_err_Local_req_X_N or L_err_South_req_X_N or L_err_West_req_X_N or L_err_East_req_X_N or L_arbiter_out_err_state_in_onehot or L_arbiter_out_err_no_request_grants or L_err_request_IDLE_state or L_err_request_IDLE_not_Grants or L_err_Grants_onehot_or_all_zero or err_grant_L_N_sig_not_empty_N_grant_L_N or err_not_grant_L_N_sig_or_empty_N_not_grant_L_N or err_grant_signals_not_empty_grant_L or err_not_grant_signals_empty_not_grant_L or err_grants_valid_not_match or err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal or err_credit_in_L_credit_counter_L_out_increment or err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change or err_grant_L_credit_counter_L_out_decrement or err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change or err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal; -- FIFO E2L_fault <= E_FIFO_checkers_ORed or -- LBDR E_err_header_empty_Requests_FF_Requests_in or E_err_tail_Requests_in_all_zero or E_err_tail_empty_Requests_FF_Requests_in or E_err_tail_not_empty_not_grants_Requests_FF_Requests_in or E_err_grants_onehot or E_err_grants_mismatch or E_err_header_tail_Requests_FF_Requests_in or E_err_dst_addr_cur_addr_Req_L_in or E_err_dst_addr_cur_addr_not_Req_L_in or E_err_header_not_empty_faulty_drop_packet_in or E_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or E_err_header_not_empty_faulty_Req_in_all_zero or --E_err_header_not_empty_Req_L_in or E_err_header_empty_packet_drop_in_packet_drop_equal or E_err_tail_not_empty_packet_drop_not_packet_drop_in or E_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or E_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or E_err_packet_drop_order or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator E_err_Requests_state_in_state_not_equal or E_err_Local_Req_L or E_err_Local_grant_L or E_err_South_Req_L or E_err_South_grant_L or E_err_West_Req_L or E_err_West_grant_L or E_err_East_Req_L or E_err_East_grant_L or E_err_IDLE_Req_L or E_err_IDLE_grant_L or E_err_North_Req_L or E_err_North_grant_L or E_err_state_in_onehot or E_err_no_request_grants or E_err_request_no_grants or E_err_no_Req_L_grant_L or L_arbiter_out_err_Requests_state_in_state_not_equal or L_err_East_req_X_E or L_err_East_credit_not_zero_req_X_E_grant_E or L_err_East_credit_zero_or_not_req_X_E_not_grant_E or L_err_IDLE_req_X_E or L_err_North_req_X_E or L_err_Local_req_X_E or L_err_South_req_X_E or L_err_West_req_X_E or L_arbiter_out_err_state_in_onehot or L_arbiter_out_err_no_request_grants or L_err_request_IDLE_state or L_err_request_IDLE_not_Grants or L_err_Grants_onehot_or_all_zero or err_grant_L_E_sig_not_empty_E_grant_L_E or err_not_grant_L_E_sig_or_empty_E_not_grant_L_E or err_grant_signals_not_empty_grant_L or err_not_grant_signals_empty_not_grant_L or err_grants_valid_not_match or err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal or err_credit_in_L_credit_counter_L_out_increment or err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change or err_grant_L_credit_counter_L_out_decrement or err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change or err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal; -- FIFO W2L_fault <= W_FIFO_checkers_ORed or -- LBDR W_err_header_empty_Requests_FF_Requests_in or W_err_tail_Requests_in_all_zero or W_err_tail_empty_Requests_FF_Requests_in or W_err_tail_not_empty_not_grants_Requests_FF_Requests_in or W_err_grants_onehot or W_err_grants_mismatch or W_err_header_tail_Requests_FF_Requests_in or W_err_dst_addr_cur_addr_Req_L_in or W_err_dst_addr_cur_addr_not_Req_L_in or W_err_header_not_empty_faulty_drop_packet_in or W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or W_err_header_not_empty_faulty_Req_in_all_zero or --W_err_header_not_empty_Req_L_in or W_err_header_empty_packet_drop_in_packet_drop_equal or W_err_tail_not_empty_packet_drop_not_packet_drop_in or W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or W_err_packet_drop_order or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator W_err_Requests_state_in_state_not_equal or W_err_Local_Req_L or W_err_Local_grant_L or W_err_South_Req_L or W_err_South_grant_L or W_err_West_Req_L or W_err_West_grant_L or W_err_East_Req_L or W_err_East_grant_L or W_err_IDLE_Req_L or W_err_IDLE_grant_L or W_err_North_Req_L or W_err_North_grant_L or W_err_state_in_onehot or W_err_no_request_grants or W_err_request_no_grants or W_err_no_Req_L_grant_L or L_arbiter_out_err_Requests_state_in_state_not_equal or L_err_West_req_X_W or L_err_West_credit_not_zero_req_X_W_grant_W or L_err_West_credit_zero_or_not_req_X_W_not_grant_W or L_err_East_req_X_W or L_err_IDLE_req_X_W or L_err_North_req_X_W or L_err_Local_req_X_W or L_err_South_req_X_W or L_arbiter_out_err_state_in_onehot or L_arbiter_out_err_no_request_grants or L_err_request_IDLE_state or L_err_request_IDLE_not_Grants or L_err_Grants_onehot_or_all_zero or err_grant_L_W_sig_not_empty_W_grant_L_W or err_not_grant_L_W_sig_or_empty_W_not_grant_L_W or err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal or err_credit_in_L_credit_counter_L_out_increment or err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change or err_grant_L_credit_counter_L_out_decrement or err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change or err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal; -- FIFO S2L_fault <= S_FIFO_checkers_ORed or -- LBDR S_err_header_empty_Requests_FF_Requests_in or S_err_tail_Requests_in_all_zero or S_err_tail_empty_Requests_FF_Requests_in or S_err_tail_not_empty_not_grants_Requests_FF_Requests_in or S_err_grants_onehot or S_err_grants_mismatch or S_err_header_tail_Requests_FF_Requests_in or S_err_dst_addr_cur_addr_Req_L_in or S_err_dst_addr_cur_addr_not_Req_L_in or S_err_header_not_empty_faulty_drop_packet_in or S_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or S_err_header_not_empty_faulty_Req_in_all_zero or --S_err_header_not_empty_Req_L_in or S_err_header_empty_packet_drop_in_packet_drop_equal or S_err_tail_not_empty_packet_drop_not_packet_drop_in or S_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or S_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or S_err_packet_drop_order or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator S_err_Requests_state_in_state_not_equal or S_err_Local_Req_L or S_err_Local_grant_L or S_err_South_Req_L or S_err_South_grant_L or S_err_West_Req_L or S_err_West_grant_L or S_err_East_Req_L or S_err_East_grant_L or S_err_IDLE_Req_L or S_err_IDLE_grant_L or S_err_North_Req_L or S_err_North_grant_L or S_err_state_in_onehot or S_err_no_request_grants or S_err_request_no_grants or S_err_no_Req_L_grant_L or L_arbiter_out_err_Requests_state_in_state_not_equal or L_err_South_req_X_S or L_err_South_credit_not_zero_req_X_S_grant_S or L_err_South_credit_zero_or_not_req_X_S_not_grant_S or L_err_West_req_X_S or L_err_East_req_X_S or L_err_IDLE_req_X_S or L_err_North_req_X_S or L_err_Local_req_X_S or L_arbiter_out_err_state_in_onehot or L_arbiter_out_err_no_request_grants or L_err_request_IDLE_state or L_err_request_IDLE_not_Grants or L_err_Grants_onehot_or_all_zero or err_grant_L_S_sig_not_empty_S_grant_L_S or err_not_grant_L_S_sig_or_empty_S_not_grant_L_S or err_grant_signals_not_empty_grant_L or err_not_grant_signals_empty_not_grant_L or err_grants_valid_not_match or err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal or err_credit_in_L_credit_counter_L_out_increment or err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change or err_grant_L_credit_counter_L_out_decrement or err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change or err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- Link faults and turn faults -- The order of the turns/paths from left to right (MSB to LSB) -> 20 bits -- N2E, N2W, E2N, E2S, -- W2N, W2S, S2E, S2W, -- N2S, S2N, E2W, W2E, -- L2N, L2E, L2W, L2S, -- N2L, E2L, W2L, S2L --turn_faults <= "00000000000000000000"; turn_faults <= N2E_turn_fault & N2W_turn_fault & E2N_turn_fault & E2S_turn_fault & W2N_turn_fault & W2S_turn_fault & S2E_turn_fault & S2W_turn_fault & N2S_path_fault & S2N_path_fault & E2W_path_fault & W2E_path_fault & L2N_fault & L2E_fault & L2W_fault & L2S_fault & N2L_fault & E2L_fault & W2L_fault & S2L_fault; -- 20 bits because of turn/path faults link_faults <= sig_Faulty_N_out & sig_Faulty_E_out & sig_Faulty_W_out & sig_Faulty_S_out & faulty_link_L; --link_faults <= faulty_packet_N & faulty_packet_E & faulty_packet_W & faulty_packet_S & faulty_packet_L; Faulty_N_out <= sig_Faulty_N_out; Faulty_E_out <= sig_Faulty_E_out; Faulty_W_out <= sig_Faulty_W_out; Faulty_S_out <= sig_Faulty_S_out; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the counter_threshold modules CT_N: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => faulty_packet_N, Healthy_packet => healthy_packet_N, Healthy => healthy_link_N, intermittent=> intermittent_link_N, Faulty => sig_Faulty_N_out); CT_E: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => faulty_packet_E, Healthy_packet => healthy_packet_E, Healthy => healthy_link_E, intermittent=> intermittent_link_E, Faulty => sig_Faulty_E_out); CT_W: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => faulty_packet_W, Healthy_packet => healthy_packet_W, Healthy => healthy_link_W, intermittent=> intermittent_link_W, Faulty => sig_Faulty_W_out); CT_S: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => faulty_packet_S, Healthy_packet => healthy_packet_S, Healthy => healthy_link_S, intermittent=> intermittent_link_S, Faulty => sig_Faulty_S_out); CT_L: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => faulty_packet_L, Healthy_packet => healthy_packet_L, Healthy => healthy_link_L, intermittent=> intermittent_link_L, Faulty => faulty_link_L); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Checker Counter Threshold modules -- Turn faults CHK_CT_N2E_turn_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => N2E_turn_fault, Healthy => Healthy_N2E_turn_fault, Intermittent => intermittent_N2E_turn_fault, Faulty => faulty_N2E_turn_fault); CHK_CT_N2W_turn_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => N2W_turn_fault, Healthy => Healthy_N2W_turn_fault, Intermittent => intermittent_N2W_turn_fault, Faulty => faulty_N2W_turn_fault); CHK_CT_E2N_turn_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => E2N_turn_fault, Healthy => Healthy_E2N_turn_fault, Intermittent => intermittent_E2N_turn_fault, Faulty => faulty_E2N_turn_fault); CHK_CT_E2S_turn_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => E2S_turn_fault, Healthy => Healthy_E2S_turn_fault, Intermittent => intermittent_E2S_turn_fault, Faulty => faulty_E2S_turn_fault); CHK_CT_W2N_turn_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => W2N_turn_fault, Healthy => Healthy_W2N_turn_fault, Intermittent => intermittent_W2N_turn_fault, Faulty => faulty_W2N_turn_fault); CHK_CT_W2S_turn_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => W2S_turn_fault, Healthy => Healthy_W2S_turn_fault, Intermittent => intermittent_W2S_turn_fault, Faulty => faulty_W2S_turn_fault); CHK_CT_S2E_turn_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => S2E_turn_fault, Healthy => Healthy_S2E_turn_fault, Intermittent => intermittent_S2E_turn_fault, Faulty => faulty_S2E_turn_fault); CHK_CT_S2W_turn_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => S2W_turn_fault, Healthy => Healthy_S2W_turn_fault, Intermittent => intermittent_S2W_turn_fault, Faulty => faulty_S2W_turn_fault); --Path faults CHK_CT_N2S_path_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => N2S_path_fault, Healthy => Healthy_N2S_path_fault, Intermittent => intermittent_N2S_path_fault, Faulty => faulty_N2S_path_fault); CHK_CT_S2N_path_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => S2N_path_fault, Healthy => Healthy_S2N_path_fault, Intermittent => intermittent_S2N_path_fault, Faulty => faulty_S2N_path_fault); CHK_CT_E2W_path_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => E2W_path_fault, Healthy => Healthy_E2W_path_fault, Intermittent => intermittent_E2W_path_fault, Faulty => faulty_E2W_path_fault); CHK_CT_W2E_path_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => W2E_path_fault, Healthy => Healthy_W2E_path_fault, Intermittent => intermittent_W2E_path_fault, Faulty => faulty_W2E_path_fault); -- Local port related faults (to/from local port) CHK_CT_L2N_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => L2N_fault, Healthy => Healthy_L2N_fault, Intermittent => intermittent_L2N_fault, Faulty => faulty_L2N_fault); CHK_CT_L2E_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => L2E_fault, Healthy => Healthy_L2E_fault, Intermittent => intermittent_L2E_fault, Faulty => faulty_L2E_fault); CHK_CT_L2W_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => L2W_fault, Healthy => Healthy_L2W_fault, Intermittent => intermittent_L2W_fault, Faulty => faulty_L2W_fault); CHK_CT_L2S_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => L2S_fault, Healthy => Healthy_L2S_fault, Intermittent => intermittent_L2S_fault, Faulty => faulty_L2S_fault); CHK_CT_N2L_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => N2L_fault, Healthy => Healthy_N2L_fault, Intermittent => intermittent_N2L_fault, Faulty => faulty_N2L_fault); CHK_CT_E2L_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => E2L_fault, Healthy => Healthy_E2L_fault, Intermittent => intermittent_E2L_fault, Faulty => faulty_E2L_fault); CHK_CT_W2L_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => W2L_fault, Healthy => Healthy_W2L_fault, Intermittent => intermittent_W2L_fault, Faulty => faulty_W2L_fault); CHK_CT_S2L_fault: checkers_counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, data_input => S2L_fault, Healthy => Healthy_S2L_fault, Intermittent => intermittent_S2L_fault, Faulty => faulty_S2L_fault); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- All the FIFOs FIFO_N: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_N, valid_in => valid_in_N, read_en_N => packet_drop_order_N, read_en_E =>Grant_EN, read_en_W =>Grant_WN, read_en_S =>Grant_SN, read_en_L =>Grant_LN, credit_out => credit_out_N, empty_out => empty_N, Data_out => FIFO_D_out_N, fault_info=> faulty_packet_N, health_info=>healthy_packet_N, -- Checker outputs -- Functional checkers err_empty_full => N_err_empty_full, err_empty_read_en => N_err_empty_read_en, err_full_write_en => N_err_full_write_en, err_state_in_onehot => N_err_state_in_onehot, err_read_pointer_in_onehot => N_err_read_pointer_in_onehot, err_write_pointer_in_onehot => N_err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer => N_err_write_en_write_pointer, err_not_write_en_write_pointer => N_err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty => N_err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty => N_err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full => N_err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full => N_err_read_pointer_write_pointer_full, err_read_pointer_increment => N_err_read_pointer_increment, err_read_pointer_not_increment => N_err_read_pointer_not_increment, err_write_en => N_err_write_en, err_not_write_en => N_err_not_write_en, err_not_write_en1 => N_err_not_write_en1, err_not_write_en2 => N_err_not_write_en2, err_read_en_mismatch => N_err_read_en_mismatch, err_read_en_mismatch1 => N_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment => N_err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement => N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change => N_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change => N_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change => N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out => N_err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out => N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out => N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit => N_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change => N_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit => N_err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in => N_err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal => N_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit => N_err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop => N_err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in => N_err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in => N_err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info => N_err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit => N_err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit => N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit => N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit => N_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in => N_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit => N_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop => N_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in => N_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in => N_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change => N_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in => N_err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit => N_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit => N_err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change => N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit => N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info => N_err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit => N_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in => N_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit => N_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop => N_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in => N_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in => N_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change => N_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in => N_err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info => N_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info => N_err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info => N_err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit => N_err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit => N_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit => N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit => N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in => N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit => N_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop => N_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in => N_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in => N_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle => N_err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change => N_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in => N_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit => N_err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit => N_err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change => N_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit => N_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit => N_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal => N_err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal => N_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal => N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in ); FIFO_E: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_E, valid_in => valid_in_E, read_en_N => Grant_NE, read_en_E =>packet_drop_order_E, read_en_W =>Grant_WE, read_en_S =>Grant_SE, read_en_L =>Grant_LE, credit_out => credit_out_E, empty_out => empty_E, Data_out => FIFO_D_out_E, fault_info=> faulty_packet_E, health_info=>healthy_packet_E, -- Checker outputs -- Functional checkers err_empty_full => E_err_empty_full, err_empty_read_en => E_err_empty_read_en, err_full_write_en => E_err_full_write_en, err_state_in_onehot => E_err_state_in_onehot, err_read_pointer_in_onehot => E_err_read_pointer_in_onehot, err_write_pointer_in_onehot => E_err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer => E_err_write_en_write_pointer, err_not_write_en_write_pointer => E_err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty => E_err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty => E_err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full => E_err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full => E_err_read_pointer_write_pointer_full, err_read_pointer_increment => E_err_read_pointer_increment, err_read_pointer_not_increment => E_err_read_pointer_not_increment, err_write_en => E_err_write_en, err_not_write_en => E_err_not_write_en, err_not_write_en1 => E_err_not_write_en1, err_not_write_en2 => E_err_not_write_en2, err_read_en_mismatch => E_err_read_en_mismatch, err_read_en_mismatch1 => E_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment => E_err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement => E_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change => E_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change => E_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change => E_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out => E_err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out => E_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out => E_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit => E_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change => E_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit => E_err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in => E_err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal => E_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit => E_err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop => E_err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in => E_err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in => E_err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info => E_err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit => E_err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit => E_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit => E_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit => E_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in => E_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => E_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit => E_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop => E_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in => E_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in => E_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change => E_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => E_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in => E_err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit => E_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit => E_err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change => E_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit => E_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info => E_err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit => E_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in => E_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => E_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit => E_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop => E_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in => E_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in => E_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change => E_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => E_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in => E_err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info => E_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info => E_err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info => E_err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit => E_err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit => E_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit => E_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit => E_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in => E_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => E_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit => E_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop => E_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in => E_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in => E_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle => E_err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change => E_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in => E_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit => E_err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit => E_err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change => E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change => E_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal => E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change => E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit => E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit => E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change => E_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change => E_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit => E_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit => E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit => E_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal => E_err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal => E_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal => E_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in => E_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in => E_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in ); FIFO_W: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_W, valid_in => valid_in_W, read_en_N => Grant_NW, read_en_E =>Grant_EW, read_en_W =>packet_drop_order_W, read_en_S =>Grant_SW, read_en_L =>Grant_LW, credit_out => credit_out_W, empty_out => empty_W, Data_out => FIFO_D_out_W, fault_info=> faulty_packet_W, health_info=>healthy_packet_W, -- Checker outputs -- Functional checkers err_empty_full => W_err_empty_full, err_empty_read_en => W_err_empty_read_en, err_full_write_en => W_err_full_write_en, err_state_in_onehot => W_err_state_in_onehot, err_read_pointer_in_onehot => W_err_read_pointer_in_onehot, err_write_pointer_in_onehot => W_err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer => W_err_write_en_write_pointer, err_not_write_en_write_pointer => W_err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty => W_err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty => W_err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full => W_err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full => W_err_read_pointer_write_pointer_full, err_read_pointer_increment => W_err_read_pointer_increment, err_read_pointer_not_increment => W_err_read_pointer_not_increment, err_write_en => W_err_write_en, err_not_write_en => W_err_not_write_en, err_not_write_en1 => W_err_not_write_en1, err_not_write_en2 => W_err_not_write_en2, err_read_en_mismatch => W_err_read_en_mismatch, err_read_en_mismatch1 => W_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment => W_err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement => W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change => W_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change => W_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change => W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out => W_err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out => W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out => W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit => W_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change => W_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit => W_err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in => W_err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal => W_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit => W_err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop => W_err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in => W_err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in => W_err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info => W_err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit => W_err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit => W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit => W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit => W_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in => W_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit => W_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop => W_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in => W_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in => W_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change => W_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in => W_err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit => W_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit => W_err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change => W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit => W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info => W_err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit => W_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in => W_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit => W_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop => W_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in => W_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in => W_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change => W_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in => W_err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info => W_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info => W_err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info => W_err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit => W_err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit => W_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit => W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit => W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in => W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit => W_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop => W_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in => W_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in => W_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle => W_err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change => W_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in => W_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit => W_err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit => W_err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change => W_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit => W_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit => W_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal => W_err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal => W_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal => W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in ); FIFO_S: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_S, valid_in => valid_in_S, read_en_N => Grant_NS, read_en_E =>Grant_ES, read_en_W =>Grant_WS, read_en_S =>packet_drop_order_S, read_en_L =>Grant_LS, credit_out => credit_out_S, empty_out => empty_S, Data_out => FIFO_D_out_S, fault_info=> faulty_packet_S, health_info=>healthy_packet_S, -- Checker outputs -- Functional checkers err_empty_full => S_err_empty_full, err_empty_read_en => S_err_empty_read_en, err_full_write_en => S_err_full_write_en, err_state_in_onehot => S_err_state_in_onehot, err_read_pointer_in_onehot => S_err_read_pointer_in_onehot, err_write_pointer_in_onehot => S_err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer => S_err_write_en_write_pointer, err_not_write_en_write_pointer => S_err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty => S_err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty => S_err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full => S_err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full => S_err_read_pointer_write_pointer_full, err_read_pointer_increment => S_err_read_pointer_increment, err_read_pointer_not_increment => S_err_read_pointer_not_increment, err_write_en => S_err_write_en, err_not_write_en => S_err_not_write_en, err_not_write_en1 => S_err_not_write_en1, err_not_write_en2 => S_err_not_write_en2, err_read_en_mismatch => S_err_read_en_mismatch, err_read_en_mismatch1 => S_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment => S_err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement => S_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change => S_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change => S_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change => S_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out => S_err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out => S_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out => S_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit => S_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change => S_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit => S_err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in => S_err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal => S_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit => S_err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop => S_err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in => S_err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in => S_err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info => S_err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit => S_err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit => S_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit => S_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit => S_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in => S_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => S_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit => S_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop => S_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in => S_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in => S_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change => S_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => S_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in => S_err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit => S_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit => S_err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change => S_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit => S_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info => S_err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit => S_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in => S_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => S_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit => S_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop => S_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in => S_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in => S_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change => S_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => S_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in => S_err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info => S_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info => S_err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info => S_err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit => S_err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit => S_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit => S_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit => S_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in => S_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => S_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit => S_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop => S_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in => S_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in => S_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle => S_err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change => S_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in => S_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit => S_err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit => S_err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change => S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change => S_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal => S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change => S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit => S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit => S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change => S_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change => S_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit => S_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit => S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit => S_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal => S_err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal => S_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal => S_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in => S_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in => S_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in ); FIFO_L: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_L, valid_in => valid_in_L, read_en_N => Grant_NL, read_en_E =>Grant_EL, read_en_W =>Grant_WL, read_en_S => Grant_SL, read_en_L =>packet_drop_order_L, credit_out => credit_out_L, empty_out => empty_L, Data_out => FIFO_D_out_L, fault_info=> faulty_packet_L, health_info=>healthy_packet_L, -- Checker outputs -- Functional checkers err_empty_full => L_err_empty_full, err_empty_read_en => L_err_empty_read_en, err_full_write_en => L_err_full_write_en, err_state_in_onehot => L_err_state_in_onehot, err_read_pointer_in_onehot => L_err_read_pointer_in_onehot, err_write_pointer_in_onehot => L_err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer => L_err_write_en_write_pointer, err_not_write_en_write_pointer => L_err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty => L_err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty => L_err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full => L_err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full => L_err_read_pointer_write_pointer_full, err_read_pointer_increment => L_err_read_pointer_increment, err_read_pointer_not_increment => L_err_read_pointer_not_increment, err_write_en => L_err_write_en, err_not_write_en => L_err_not_write_en, err_not_write_en1 => L_err_not_write_en1, err_not_write_en2 => L_err_not_write_en2, err_read_en_mismatch => L_err_read_en_mismatch, err_read_en_mismatch1 => L_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment => L_err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement => L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change => L_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change => L_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change => L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out => L_err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out => L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out => L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit => L_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change => L_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit => L_err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in => L_err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal => L_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit => L_err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop => L_err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in => L_err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in => L_err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info => L_err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit => L_err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit => L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit => L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit => L_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in => L_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit => L_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop => L_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in => L_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in => L_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change => L_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in => L_err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit => L_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit => L_err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change => L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit => L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info => L_err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit => L_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in => L_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit => L_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop => L_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in => L_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in => L_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change => L_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in => L_err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info => L_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info => L_err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info => L_err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit => L_err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit => L_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit => L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit => L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in => L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit => L_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop => L_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in => L_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in => L_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle => L_err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change => L_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in => L_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit => L_err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit => L_err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change => L_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit => L_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit => L_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal => L_err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal => L_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal => L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in ); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ parity_LBDR_N: parity_checker_for_LBDR generic map(DATA_WIDTH => DATA_WIDTH) port map(FIFO_D_out_N, empty_N, LBDR_Fault_N); parity_LBDR_E: parity_checker_for_LBDR generic map(DATA_WIDTH => DATA_WIDTH) port map(FIFO_D_out_E, empty_E, LBDR_Fault_E); parity_LBDR_W: parity_checker_for_LBDR generic map(DATA_WIDTH => DATA_WIDTH) port map(FIFO_D_out_W, empty_W, LBDR_Fault_W); parity_LBDR_S: parity_checker_for_LBDR generic map(DATA_WIDTH => DATA_WIDTH) port map(FIFO_D_out_S, empty_S, LBDR_Fault_S); parity_LBDR_L: parity_checker_for_LBDR generic map(DATA_WIDTH => DATA_WIDTH) port map(FIFO_D_out_L, empty_L, LBDR_Fault_L); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ --- all the LBDRs LBDR_N: LBDR_packet_drop generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, Rxy_rst => Rxy_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_N, Faulty_C_N => Faulty_N_in, Faulty_C_E => Faulty_E_in, Faulty_C_W => Faulty_W_in, Faulty_C_S => Faulty_S_in, flit_type => FIFO_D_out_N(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_N(DATA_WIDTH-19+NoC_size-1 downto DATA_WIDTH-19) , faulty => LBDR_Fault_N, packet_drop_order => packet_drop_order_N, grant_N => '0', grant_E =>Grant_EN, grant_W => Grant_WN, grant_S=>Grant_SN, grant_L =>Grant_LN, Req_N=> Req_NN, Req_E=>Req_NE, Req_W=>Req_NW, Req_S=>Req_NS, Req_L=>Req_NL, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command=>Reconfig_command, -- Checker outputs err_header_empty_Requests_FF_Requests_in => N_err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => N_err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => N_err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => N_err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => N_err_grants_onehot, err_grants_mismatch => N_err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => N_err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => N_err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => N_err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => N_err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => N_err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => N_err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => N_err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => N_err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => N_err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in => N_err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in => N_err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in => N_err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change => N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero => N_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in => N_err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in => N_err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => N_err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => N_err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => N_err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal => N_err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => N_err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => N_err_packet_drop_order, err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal => N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in => N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal => N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp => N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in => N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal ); LBDR_E: LBDR_packet_drop generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, Rxy_rst => Rxy_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_E, Faulty_C_N => Faulty_N_in, Faulty_C_E => Faulty_E_in, Faulty_C_W => Faulty_W_in, Faulty_C_S => Faulty_S_in, flit_type => FIFO_D_out_E(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_E(DATA_WIDTH-19+NoC_size-1 downto DATA_WIDTH-19) , faulty => LBDR_Fault_E, packet_drop_order => packet_drop_order_E, grant_N => Grant_NE, grant_E =>'0', grant_W => Grant_WE, grant_S=>Grant_SE, grant_L =>Grant_LE, Req_N=> Req_EN, Req_E=>Req_EE, Req_W=>Req_EW, Req_S=>Req_ES, Req_L=>Req_EL, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command=>Reconfig_command, -- Checker outputs err_header_empty_Requests_FF_Requests_in => E_err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => E_err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => E_err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => E_err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => E_err_grants_onehot, err_grants_mismatch => E_err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => E_err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => E_err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => E_err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => E_err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => E_err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => E_err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => E_err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => E_err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => E_err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in => E_err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in => E_err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in => E_err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change => E_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero => E_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in => E_err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in => E_err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => E_err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => E_err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => E_err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal => E_err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => E_err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => E_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => E_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => E_err_packet_drop_order, err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal => E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in => E_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal => E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in => E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in => E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in => E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal => E_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal => E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal => E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal => E_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp => E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in => E_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal => E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in => E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal => E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal => E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal => E_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal ); LBDR_W: LBDR_packet_drop generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, Rxy_rst => Rxy_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_W, Faulty_C_N => Faulty_N_in, Faulty_C_E => Faulty_E_in, Faulty_C_W => Faulty_W_in, Faulty_C_S => Faulty_S_in, flit_type => FIFO_D_out_W(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_W(DATA_WIDTH-19+NoC_size-1 downto DATA_WIDTH-19) , faulty => LBDR_Fault_W, packet_drop_order => packet_drop_order_W, grant_N => Grant_NW, grant_E =>Grant_EW, grant_W =>'0' ,grant_S=>Grant_SW, grant_L =>Grant_LW, Req_N=> Req_WN, Req_E=>Req_WE, Req_W=>Req_WW, Req_S=>Req_WS, Req_L=>Req_WL, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command=>Reconfig_command, -- Checker outputs err_header_empty_Requests_FF_Requests_in => W_err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => W_err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => W_err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => W_err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => W_err_grants_onehot, err_grants_mismatch => W_err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => W_err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => W_err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => W_err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => W_err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => W_err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => W_err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => W_err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => W_err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => W_err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in => W_err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in => W_err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in => W_err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change => W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero => W_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in => W_err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in => W_err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => W_err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => W_err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => W_err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal => W_err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => W_err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => W_err_packet_drop_order, err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal => W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in => W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal => W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp => W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in => W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal ); LBDR_S: LBDR_packet_drop generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, Rxy_rst => Rxy_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_S, Faulty_C_N => Faulty_N_in, Faulty_C_E => Faulty_E_in, Faulty_C_W => Faulty_W_in, Faulty_C_S => Faulty_S_in, flit_type => FIFO_D_out_S(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_S(DATA_WIDTH-19+NoC_size-1 downto DATA_WIDTH-19) , faulty => LBDR_Fault_S, packet_drop_order => packet_drop_order_S, grant_N => Grant_NS, grant_E =>Grant_ES, grant_W =>Grant_WS ,grant_S=>'0', grant_L =>Grant_LS, Req_N=> Req_SN, Req_E=>Req_SE, Req_W=>Req_SW, Req_S=>Req_SS, Req_L=>Req_SL, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command=>Reconfig_command, -- Checker outputs err_header_empty_Requests_FF_Requests_in => S_err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => S_err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => S_err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => S_err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => S_err_grants_onehot, err_grants_mismatch => S_err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => S_err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => S_err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => S_err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => S_err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => S_err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => S_err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => S_err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => S_err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => S_err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in => S_err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in => S_err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in => S_err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change => S_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero => S_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in => S_err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in => S_err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => S_err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => S_err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => S_err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal => S_err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => S_err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => S_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => S_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => S_err_packet_drop_order, err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal => S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in => S_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal => S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in => S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in => S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in => S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal => S_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal => S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal => S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal => S_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp => S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in => S_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal => S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in => S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal => S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal => S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal => S_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal ); LBDR_L: LBDR_packet_drop generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, Rxy_rst => Rxy_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_L, Faulty_C_N => Faulty_N_in, Faulty_C_E => Faulty_E_in, Faulty_C_W => Faulty_W_in, Faulty_C_S => Faulty_S_in, flit_type => FIFO_D_out_L(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_L(DATA_WIDTH-19+NoC_size-1 downto DATA_WIDTH-19) , faulty => LBDR_Fault_L, packet_drop_order => packet_drop_order_L, grant_N => Grant_NL, grant_E =>Grant_EL, grant_W => Grant_WL,grant_S=>Grant_SL, grant_L =>'0', Req_N=> Req_LN, Req_E=>Req_LE, Req_W=>Req_LW, Req_S=>Req_LS, Req_L=>Req_LL, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command=>Reconfig_command, -- Checker outputs err_header_empty_Requests_FF_Requests_in => L_err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => L_err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => L_err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => L_err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => L_err_grants_onehot, err_grants_mismatch => L_err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => L_err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => L_err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => L_err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => L_err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => L_err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => L_err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => L_err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => L_err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => L_err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in => L_err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in => L_err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in => L_err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change => L_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero => L_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in => L_err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in => L_err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => L_err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => L_err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => L_err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal => L_err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => L_err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => L_err_packet_drop_order, err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal => L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in => L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal => L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp => L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in => L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal ); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- switch allocator allocator_unit: allocator port map ( reset => reset, clk => clk, -- flow control credit_in_N => credit_in_N, credit_in_E => credit_in_E, credit_in_W => credit_in_W, credit_in_S => credit_in_S, credit_in_L => credit_in_L, -- requests from the LBDRS req_N_N => '0', req_N_E => Req_NE, req_N_W => Req_NW, req_N_S => Req_NS, req_N_L => Req_NL, req_E_N => Req_EN, req_E_E => '0', req_E_W => Req_EW, req_E_S => Req_ES, req_E_L => Req_EL, req_W_N => Req_WN, req_W_E => Req_WE, req_W_W => '0', req_W_S => Req_WS, req_W_L => Req_WL, req_S_N => Req_SN, req_S_E => Req_SE, req_S_W => Req_SW, req_S_S => '0', req_S_L => Req_SL, req_L_N => Req_LN, req_L_E => Req_LE, req_L_W => Req_LW, req_L_S => Req_LS, req_L_L => '0', empty_N => empty_N, empty_E => empty_E, empty_w => empty_W, empty_S => empty_S, empty_L => empty_L, valid_N => valid_out_N, valid_E => valid_out_E, valid_W => valid_out_W, valid_S => valid_out_S, valid_L => valid_out_L, -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! grant_N_N => Grant_NN, grant_N_E => Grant_NE, grant_N_W => Grant_NW, grant_N_S => Grant_NS, grant_N_L => Grant_NL, grant_E_N => Grant_EN, grant_E_E => Grant_EE, grant_E_W => Grant_EW, grant_E_S => Grant_ES, grant_E_L => Grant_EL, grant_W_N => Grant_WN, grant_W_E => Grant_WE, grant_W_W => Grant_WW, grant_W_S => Grant_WS, grant_W_L => Grant_WL, grant_S_N => Grant_SN, grant_S_E => Grant_SE, grant_S_W => Grant_SW, grant_S_S => Grant_SS, grant_S_L => Grant_SL, grant_L_N => Grant_LN, grant_L_E => Grant_LE, grant_L_W => Grant_LW, grant_L_S => Grant_LS, grant_L_L => Grant_LL, -- Checker outputs -- Allocator logic checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N => err_grant_N_N_sig_not_empty_N_grant_N_N , err_not_grant_N_N_sig_or_empty_N_not_grant_N_N => err_not_grant_N_N_sig_or_empty_N_not_grant_N_N , err_grant_N_E_sig_not_empty_E_grant_N_E => err_grant_N_E_sig_not_empty_E_grant_N_E , err_not_grant_N_E_sig_or_empty_E_not_grant_N_E => err_not_grant_N_E_sig_or_empty_E_not_grant_N_E , err_grant_N_W_sig_not_empty_W_grant_N_W => err_grant_N_W_sig_not_empty_W_grant_N_W , err_not_grant_N_W_sig_or_empty_W_not_grant_N_W => err_not_grant_N_W_sig_or_empty_W_not_grant_N_W , err_grant_N_S_sig_not_empty_S_grant_N_S => err_grant_N_S_sig_not_empty_S_grant_N_S , err_not_grant_N_S_sig_or_empty_S_not_grant_N_S => err_not_grant_N_S_sig_or_empty_S_not_grant_N_S , err_grant_N_L_sig_not_empty_L_grant_N_L => err_grant_N_L_sig_not_empty_L_grant_N_L , err_not_grant_N_L_sig_or_empty_L_not_grant_N_L => err_not_grant_N_L_sig_or_empty_L_not_grant_N_L , err_grant_E_N_sig_not_empty_N_grant_E_N => err_grant_E_N_sig_not_empty_N_grant_E_N , err_not_grant_E_N_sig_or_empty_N_not_grant_E_N => err_not_grant_E_N_sig_or_empty_N_not_grant_E_N , err_grant_E_E_sig_not_empty_E_grant_E_E => err_grant_E_E_sig_not_empty_E_grant_E_E , err_not_grant_E_E_sig_or_empty_E_not_grant_E_E => err_not_grant_E_E_sig_or_empty_E_not_grant_E_E , err_grant_E_W_sig_not_empty_W_grant_E_W => err_grant_E_W_sig_not_empty_W_grant_E_W , err_not_grant_E_W_sig_or_empty_W_not_grant_E_W => err_not_grant_E_W_sig_or_empty_W_not_grant_E_W , err_grant_E_S_sig_not_empty_S_grant_E_S => err_grant_E_S_sig_not_empty_S_grant_E_S , err_not_grant_E_S_sig_or_empty_S_not_grant_E_S => err_not_grant_E_S_sig_or_empty_S_not_grant_E_S , err_grant_E_L_sig_not_empty_L_grant_E_L => err_grant_E_L_sig_not_empty_L_grant_E_L , err_not_grant_E_L_sig_or_empty_L_not_grant_E_L => err_not_grant_E_L_sig_or_empty_L_not_grant_E_L , err_grant_W_N_sig_not_empty_N_grant_W_N => err_grant_W_N_sig_not_empty_N_grant_W_N , err_not_grant_W_N_sig_or_empty_N_not_grant_W_N => err_not_grant_W_N_sig_or_empty_N_not_grant_W_N , err_grant_W_E_sig_not_empty_E_grant_W_E => err_grant_W_E_sig_not_empty_E_grant_W_E , err_not_grant_W_E_sig_or_empty_E_not_grant_W_E => err_not_grant_W_E_sig_or_empty_E_not_grant_W_E , err_grant_W_W_sig_not_empty_W_grant_W_W => err_grant_W_W_sig_not_empty_W_grant_W_W , err_not_grant_W_W_sig_or_empty_W_not_grant_W_W => err_not_grant_W_W_sig_or_empty_W_not_grant_W_W , err_grant_W_S_sig_not_empty_S_grant_W_S => err_grant_W_S_sig_not_empty_S_grant_W_S , err_not_grant_W_S_sig_or_empty_S_not_grant_W_S => err_not_grant_W_S_sig_or_empty_S_not_grant_W_S , err_grant_W_L_sig_not_empty_L_grant_W_L => err_grant_W_L_sig_not_empty_L_grant_W_L , err_not_grant_W_L_sig_or_empty_L_not_grant_W_L => err_not_grant_W_L_sig_or_empty_L_not_grant_W_L , err_grant_S_N_sig_not_empty_N_grant_S_N => err_grant_S_N_sig_not_empty_N_grant_S_N , err_not_grant_S_N_sig_or_empty_N_not_grant_S_N => err_not_grant_S_N_sig_or_empty_N_not_grant_S_N , err_grant_S_E_sig_not_empty_E_grant_S_E => err_grant_S_E_sig_not_empty_E_grant_S_E , err_not_grant_S_E_sig_or_empty_E_not_grant_S_E => err_not_grant_S_E_sig_or_empty_E_not_grant_S_E , err_grant_S_W_sig_not_empty_W_grant_S_W => err_grant_S_W_sig_not_empty_W_grant_S_W , err_not_grant_S_W_sig_or_empty_W_not_grant_S_W => err_not_grant_S_W_sig_or_empty_W_not_grant_S_W , err_grant_S_S_sig_not_empty_S_grant_S_S => err_grant_S_S_sig_not_empty_S_grant_S_S , err_not_grant_S_S_sig_or_empty_S_not_grant_S_S => err_not_grant_S_S_sig_or_empty_S_not_grant_S_S , err_grant_S_L_sig_not_empty_L_grant_S_L => err_grant_S_L_sig_not_empty_L_grant_S_L , err_not_grant_S_L_sig_or_empty_L_not_grant_S_L => err_not_grant_S_L_sig_or_empty_L_not_grant_S_L , err_grant_L_N_sig_not_empty_N_grant_L_N => err_grant_L_N_sig_not_empty_N_grant_L_N , err_not_grant_L_N_sig_or_empty_N_not_grant_L_N => err_not_grant_L_N_sig_or_empty_N_not_grant_L_N , err_grant_L_E_sig_not_empty_E_grant_L_E => err_grant_L_E_sig_not_empty_E_grant_L_E , err_not_grant_L_E_sig_or_empty_E_not_grant_L_E => err_not_grant_L_E_sig_or_empty_E_not_grant_L_E , err_grant_L_W_sig_not_empty_W_grant_L_W => err_grant_L_W_sig_not_empty_W_grant_L_W , err_not_grant_L_W_sig_or_empty_W_not_grant_L_W => err_not_grant_L_W_sig_or_empty_W_not_grant_L_W , err_grant_L_S_sig_not_empty_S_grant_L_S => err_grant_L_S_sig_not_empty_S_grant_L_S , err_not_grant_L_S_sig_or_empty_S_not_grant_L_S => err_not_grant_L_S_sig_or_empty_S_not_grant_L_S , err_grant_L_L_sig_not_empty_L_grant_L_L => err_grant_L_L_sig_not_empty_L_grant_L_L , err_not_grant_L_L_sig_or_empty_L_not_grant_L_L => err_not_grant_L_L_sig_or_empty_L_not_grant_L_L , err_grant_signals_not_empty_grant_N => err_grant_signals_not_empty_grant_N , err_not_grant_signals_empty_not_grant_N => err_not_grant_signals_empty_not_grant_N , err_grant_signals_not_empty_grant_E => err_grant_signals_not_empty_grant_E , err_not_grant_signals_empty_not_grant_E => err_not_grant_signals_empty_not_grant_E , err_grant_signals_not_empty_grant_W => err_grant_signals_not_empty_grant_W , err_not_grant_signals_empty_not_grant_W => err_not_grant_signals_empty_not_grant_W , err_grant_signals_not_empty_grant_S => err_grant_signals_not_empty_grant_S , err_not_grant_signals_empty_not_grant_S => err_not_grant_signals_empty_not_grant_S , err_grant_signals_not_empty_grant_L => err_grant_signals_not_empty_grant_L , err_not_grant_signals_empty_not_grant_L => err_not_grant_signals_empty_not_grant_L , err_grants_valid_not_match => err_grants_valid_not_match , -- Allocator credit counter logic checker outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal => err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal , err_credit_in_N_credit_counter_N_out_increment => err_credit_in_N_credit_counter_N_out_increment , err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change => err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change , err_grant_N_credit_counter_N_out_decrement => err_grant_N_credit_counter_N_out_decrement , err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change => err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change , err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal => err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal , err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal => err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal , err_credit_in_E_credit_counter_E_out_increment => err_credit_in_E_credit_counter_E_out_increment , err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change => err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change , err_grant_E_credit_counter_E_out_decrement => err_grant_E_credit_counter_E_out_decrement , err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change => err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change , err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal => err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal , err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal => err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal , err_credit_in_W_credit_counter_W_out_increment => err_credit_in_W_credit_counter_W_out_increment , err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change => err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change , err_grant_W_credit_counter_W_out_decrement => err_grant_W_credit_counter_W_out_decrement , err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change => err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change , err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal => err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal , err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal => err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal , err_credit_in_S_credit_counter_S_out_increment => err_credit_in_S_credit_counter_S_out_increment , err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change => err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change , err_grant_S_credit_counter_S_out_decrement => err_grant_S_credit_counter_S_out_decrement , err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change => err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change , err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal => err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal , err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal => err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal , err_credit_in_L_credit_counter_L_out_increment => err_credit_in_L_credit_counter_L_out_increment , err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change => err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change , err_grant_L_credit_counter_L_out_decrement => err_grant_L_credit_counter_L_out_decrement , err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change => err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change , err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal => err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal , -- North Arbiter_in Checker outputs N_err_Requests_state_in_state_not_equal => N_err_Requests_state_in_state_not_equal, N_err_IDLE_Req_N => N_err_IDLE_Req_N, N_err_IDLE_grant_N => N_err_IDLE_grant_N, N_err_North_Req_N => N_err_North_Req_N, N_err_North_grant_N => N_err_North_grant_N, N_err_East_Req_E => N_err_East_Req_E, N_err_East_grant_E => N_err_East_grant_E, N_err_West_Req_W => N_err_West_Req_W, N_err_West_grant_W => N_err_West_grant_W, N_err_South_Req_S => N_err_South_Req_S, N_err_South_grant_S => N_err_South_grant_S, N_err_Local_Req_L => N_err_Local_Req_L, N_err_Local_grant_L => N_err_Local_grant_L, N_err_IDLE_Req_E => N_err_IDLE_Req_E, N_err_IDLE_grant_E => N_err_IDLE_grant_E, N_err_North_Req_E => N_err_North_Req_E, N_err_North_grant_E => N_err_North_grant_E, N_err_East_Req_W => N_err_East_Req_W, N_err_East_grant_W => N_err_East_grant_W, N_err_West_Req_S => N_err_West_Req_S, N_err_West_grant_S => N_err_West_grant_S, N_err_South_Req_L => N_err_South_Req_L, N_err_South_grant_L => N_err_South_grant_L, N_err_Local_Req_N => N_err_Local_Req_N, N_err_Local_grant_N => N_err_Local_grant_N, N_err_IDLE_Req_W => N_err_IDLE_Req_W, N_err_IDLE_grant_W => N_err_IDLE_grant_W, N_err_North_Req_W => N_err_North_Req_W, N_err_North_grant_W => N_err_North_grant_W, N_err_East_Req_S => N_err_East_Req_S, N_err_East_grant_S => N_err_East_grant_S, N_err_West_Req_L => N_err_West_Req_L, N_err_West_grant_L => N_err_West_grant_L, N_err_South_Req_N => N_err_South_Req_N, N_err_South_grant_N => N_err_South_grant_N, N_err_Local_Req_E => N_err_Local_Req_E, N_err_Local_grant_E => N_err_Local_grant_E, N_err_IDLE_Req_S => N_err_IDLE_Req_S, N_err_IDLE_grant_S => N_err_IDLE_grant_S, N_err_North_Req_S => N_err_North_Req_S, N_err_North_grant_S => N_err_North_grant_S, N_err_East_Req_L => N_err_East_Req_L, N_err_East_grant_L => N_err_East_grant_L, N_err_West_Req_N => N_err_West_Req_N, N_err_West_grant_N => N_err_West_grant_N, N_err_South_Req_E => N_err_South_Req_E, N_err_South_grant_E => N_err_South_grant_E, N_err_Local_Req_W => N_err_Local_Req_W, N_err_Local_grant_W => N_err_Local_grant_W, N_err_IDLE_Req_L => N_err_IDLE_Req_L, N_err_IDLE_grant_L => N_err_IDLE_grant_L, N_err_North_Req_L => N_err_North_Req_L, N_err_North_grant_L => N_err_North_grant_L, N_err_East_Req_N => N_err_East_Req_N, N_err_East_grant_N => N_err_East_grant_N, N_err_West_Req_E => N_err_West_Req_E, N_err_West_grant_E => N_err_West_grant_E, N_err_South_Req_W => N_err_South_Req_W, N_err_South_grant_W => N_err_South_grant_W, N_err_Local_Req_S => N_err_Local_Req_S, N_err_Local_grant_S => N_err_Local_grant_S, N_err_state_in_onehot => N_err_arbiter_state_in_onehot, N_err_no_request_grants => N_err_no_request_grants, N_err_request_no_grants => N_err_request_no_grants, N_err_no_Req_N_grant_N => N_err_no_Req_N_grant_N, N_err_no_Req_E_grant_E => N_err_no_Req_E_grant_E, N_err_no_Req_W_grant_W => N_err_no_Req_W_grant_W, N_err_no_Req_S_grant_S => N_err_no_Req_S_grant_S, N_err_no_Req_L_grant_L => N_err_no_Req_L_grant_L, -- East Arbiter_in Checker outputs E_err_Requests_state_in_state_not_equal => E_err_Requests_state_in_state_not_equal, E_err_IDLE_Req_N => E_err_IDLE_Req_N, E_err_IDLE_grant_N => E_err_IDLE_grant_N, E_err_North_Req_N => E_err_North_Req_N, E_err_North_grant_N => E_err_North_grant_N, E_err_East_Req_E => E_err_East_Req_E, E_err_East_grant_E => E_err_East_grant_E, E_err_West_Req_W => E_err_West_Req_W, E_err_West_grant_W => E_err_West_grant_W, E_err_South_Req_S => E_err_South_Req_S, E_err_South_grant_S => E_err_South_grant_S, E_err_Local_Req_L => E_err_Local_Req_L, E_err_Local_grant_L => E_err_Local_grant_L, E_err_IDLE_Req_E => E_err_IDLE_Req_E, E_err_IDLE_grant_E => E_err_IDLE_grant_E, E_err_North_Req_E => E_err_North_Req_E, E_err_North_grant_E => E_err_North_grant_E, E_err_East_Req_W => E_err_East_Req_W, E_err_East_grant_W => E_err_East_grant_W, E_err_West_Req_S => E_err_West_Req_S, E_err_West_grant_S => E_err_West_grant_S, E_err_South_Req_L => E_err_South_Req_L, E_err_South_grant_L => E_err_South_grant_L, E_err_Local_Req_N => E_err_Local_Req_N, E_err_Local_grant_N => E_err_Local_grant_N, E_err_IDLE_Req_W => E_err_IDLE_Req_W, E_err_IDLE_grant_W => E_err_IDLE_grant_W, E_err_North_Req_W => E_err_North_Req_W, E_err_North_grant_W => E_err_North_grant_W, E_err_East_Req_S => E_err_East_Req_S, E_err_East_grant_S => E_err_East_grant_S, E_err_West_Req_L => E_err_West_Req_L, E_err_West_grant_L => E_err_West_grant_L, E_err_South_Req_N => E_err_South_Req_N, E_err_South_grant_N => E_err_South_grant_N, E_err_Local_Req_E => E_err_Local_Req_E, E_err_Local_grant_E => E_err_Local_grant_E, E_err_IDLE_Req_S => E_err_IDLE_Req_S, E_err_IDLE_grant_S => E_err_IDLE_grant_S, E_err_North_Req_S => E_err_North_Req_S, E_err_North_grant_S => E_err_North_grant_S, E_err_East_Req_L => E_err_East_Req_L, E_err_East_grant_L => E_err_East_grant_L, E_err_West_Req_N => E_err_West_Req_N, E_err_West_grant_N => E_err_West_grant_N, E_err_South_Req_E => E_err_South_Req_E, E_err_South_grant_E => E_err_South_grant_E, E_err_Local_Req_W => E_err_Local_Req_W, E_err_Local_grant_W => E_err_Local_grant_W, E_err_IDLE_Req_L => E_err_IDLE_Req_L, E_err_IDLE_grant_L => E_err_IDLE_grant_L, E_err_North_Req_L => E_err_North_Req_L, E_err_North_grant_L => E_err_North_grant_L, E_err_East_Req_N => E_err_East_Req_N, E_err_East_grant_N => E_err_East_grant_N, E_err_West_Req_E => E_err_West_Req_E, E_err_West_grant_E => E_err_West_grant_E, E_err_South_Req_W => E_err_South_Req_W, E_err_South_grant_W => E_err_South_grant_W, E_err_Local_Req_S => E_err_Local_Req_S, E_err_Local_grant_S => E_err_Local_grant_S, E_err_state_in_onehot => E_err_arbiter_state_in_onehot, E_err_no_request_grants => E_err_no_request_grants, E_err_request_no_grants => E_err_request_no_grants, E_err_no_Req_N_grant_N => E_err_no_Req_N_grant_N, E_err_no_Req_E_grant_E => E_err_no_Req_E_grant_E, E_err_no_Req_W_grant_W => E_err_no_Req_W_grant_W, E_err_no_Req_S_grant_S => E_err_no_Req_S_grant_S, E_err_no_Req_L_grant_L => E_err_no_Req_L_grant_L, -- West Arbiter_in Checker outputs W_err_Requests_state_in_state_not_equal => W_err_Requests_state_in_state_not_equal, W_err_IDLE_Req_N => W_err_IDLE_Req_N, W_err_IDLE_grant_N => W_err_IDLE_grant_N, W_err_North_Req_N => W_err_North_Req_N, W_err_North_grant_N => W_err_North_grant_N, W_err_East_Req_E => W_err_East_Req_E, W_err_East_grant_E => W_err_East_grant_E, W_err_West_Req_W => W_err_West_Req_W, W_err_West_grant_W => W_err_West_grant_W, W_err_South_Req_S => W_err_South_Req_S, W_err_South_grant_S => W_err_South_grant_S, W_err_Local_Req_L => W_err_Local_Req_L, W_err_Local_grant_L => W_err_Local_grant_L, W_err_IDLE_Req_E => W_err_IDLE_Req_E, W_err_IDLE_grant_E => W_err_IDLE_grant_E, W_err_North_Req_E => W_err_North_Req_E, W_err_North_grant_E => W_err_North_grant_E, W_err_East_Req_W => W_err_East_Req_W, W_err_East_grant_W => W_err_East_grant_W, W_err_West_Req_S => W_err_West_Req_S, W_err_West_grant_S => W_err_West_grant_S, W_err_South_Req_L => W_err_South_Req_L, W_err_South_grant_L => W_err_South_grant_L, W_err_Local_Req_N => W_err_Local_Req_N, W_err_Local_grant_N => W_err_Local_grant_N, W_err_IDLE_Req_W => W_err_IDLE_Req_W, W_err_IDLE_grant_W => W_err_IDLE_grant_W, W_err_North_Req_W => W_err_North_Req_W, W_err_North_grant_W => W_err_North_grant_W, W_err_East_Req_S => W_err_East_Req_S, W_err_East_grant_S => W_err_East_grant_S, W_err_West_Req_L => W_err_West_Req_L, W_err_West_grant_L => W_err_West_grant_L, W_err_South_Req_N => W_err_South_Req_N, W_err_South_grant_N => W_err_South_grant_N, W_err_Local_Req_E => W_err_Local_Req_E, W_err_Local_grant_E => W_err_Local_grant_E, W_err_IDLE_Req_S => W_err_IDLE_Req_S, W_err_IDLE_grant_S => W_err_IDLE_grant_S, W_err_North_Req_S => W_err_North_Req_S, W_err_North_grant_S => W_err_North_grant_S, W_err_East_Req_L => W_err_East_Req_L, W_err_East_grant_L => W_err_East_grant_L, W_err_West_Req_N => W_err_West_Req_N, W_err_West_grant_N => W_err_West_grant_N, W_err_South_Req_E => W_err_South_Req_E, W_err_South_grant_E => W_err_South_grant_E, W_err_Local_Req_W => W_err_Local_Req_W, W_err_Local_grant_W => W_err_Local_grant_W, W_err_IDLE_Req_L => W_err_IDLE_Req_L, W_err_IDLE_grant_L => W_err_IDLE_grant_L, W_err_North_Req_L => W_err_North_Req_L, W_err_North_grant_L => W_err_North_grant_L, W_err_East_Req_N => W_err_East_Req_N, W_err_East_grant_N => W_err_East_grant_N, W_err_West_Req_E => W_err_West_Req_E, W_err_West_grant_E => W_err_West_grant_E, W_err_South_Req_W => W_err_South_Req_W, W_err_South_grant_W => W_err_South_grant_W, W_err_Local_Req_S => W_err_Local_Req_S, W_err_Local_grant_S => W_err_Local_grant_S, W_err_state_in_onehot => W_err_arbiter_state_in_onehot, W_err_no_request_grants => W_err_no_request_grants, W_err_request_no_grants => W_err_request_no_grants, W_err_no_Req_N_grant_N => W_err_no_Req_N_grant_N, W_err_no_Req_E_grant_E => W_err_no_Req_E_grant_E, W_err_no_Req_W_grant_W => W_err_no_Req_W_grant_W, W_err_no_Req_S_grant_S => W_err_no_Req_S_grant_S, W_err_no_Req_L_grant_L => W_err_no_Req_L_grant_L, -- South Arbiter_in Checker outputs S_err_Requests_state_in_state_not_equal => S_err_Requests_state_in_state_not_equal, S_err_IDLE_Req_N => S_err_IDLE_Req_N, S_err_IDLE_grant_N => S_err_IDLE_grant_N, S_err_North_Req_N => S_err_North_Req_N, S_err_North_grant_N => S_err_North_grant_N, S_err_East_Req_E => S_err_East_Req_E, S_err_East_grant_E => S_err_East_grant_E, S_err_West_Req_W => S_err_West_Req_W, S_err_West_grant_W => S_err_West_grant_W, S_err_South_Req_S => S_err_South_Req_S, S_err_South_grant_S => S_err_South_grant_S, S_err_Local_Req_L => S_err_Local_Req_L, S_err_Local_grant_L => S_err_Local_grant_L, S_err_IDLE_Req_E => S_err_IDLE_Req_E, S_err_IDLE_grant_E => S_err_IDLE_grant_E, S_err_North_Req_E => S_err_North_Req_E, S_err_North_grant_E => S_err_North_grant_E, S_err_East_Req_W => S_err_East_Req_W, S_err_East_grant_W => S_err_East_grant_W, S_err_West_Req_S => S_err_West_Req_S, S_err_West_grant_S => S_err_West_grant_S, S_err_South_Req_L => S_err_South_Req_L, S_err_South_grant_L => S_err_South_grant_L, S_err_Local_Req_N => S_err_Local_Req_N, S_err_Local_grant_N => S_err_Local_grant_N, S_err_IDLE_Req_W => S_err_IDLE_Req_W, S_err_IDLE_grant_W => S_err_IDLE_grant_W, S_err_North_Req_W => S_err_North_Req_W, S_err_North_grant_W => S_err_North_grant_W, S_err_East_Req_S => S_err_East_Req_S, S_err_East_grant_S => S_err_East_grant_S, S_err_West_Req_L => S_err_West_Req_L, S_err_West_grant_L => S_err_West_grant_L, S_err_South_Req_N => S_err_South_Req_N, S_err_South_grant_N => S_err_South_grant_N, S_err_Local_Req_E => S_err_Local_Req_E, S_err_Local_grant_E => S_err_Local_grant_E, S_err_IDLE_Req_S => S_err_IDLE_Req_S, S_err_IDLE_grant_S => S_err_IDLE_grant_S, S_err_North_Req_S => S_err_North_Req_S, S_err_North_grant_S => S_err_North_grant_S, S_err_East_Req_L => S_err_East_Req_L, S_err_East_grant_L => S_err_East_grant_L, S_err_West_Req_N => S_err_West_Req_N, S_err_West_grant_N => S_err_West_grant_N, S_err_South_Req_E => S_err_South_Req_E, S_err_South_grant_E => S_err_South_grant_E, S_err_Local_Req_W => S_err_Local_Req_W, S_err_Local_grant_W => S_err_Local_grant_W, S_err_IDLE_Req_L => S_err_IDLE_Req_L, S_err_IDLE_grant_L => S_err_IDLE_grant_L, S_err_North_Req_L => S_err_North_Req_L, S_err_North_grant_L => S_err_North_grant_L, S_err_East_Req_N => S_err_East_Req_N, S_err_East_grant_N => S_err_East_grant_N, S_err_West_Req_E => S_err_West_Req_E, S_err_West_grant_E => S_err_West_grant_E, S_err_South_Req_W => S_err_South_Req_W, S_err_South_grant_W => S_err_South_grant_W, S_err_Local_Req_S => S_err_Local_Req_S, S_err_Local_grant_S => S_err_Local_grant_S, S_err_state_in_onehot => S_err_arbiter_state_in_onehot, S_err_no_request_grants => S_err_no_request_grants, S_err_request_no_grants => S_err_request_no_grants, S_err_no_Req_N_grant_N => S_err_no_Req_N_grant_N, S_err_no_Req_E_grant_E => S_err_no_Req_E_grant_E, S_err_no_Req_W_grant_W => S_err_no_Req_W_grant_W, S_err_no_Req_S_grant_S => S_err_no_Req_S_grant_S, S_err_no_Req_L_grant_L => S_err_no_Req_L_grant_L, -- Local Arbiter_in Checker outputs L_err_Requests_state_in_state_not_equal => L_err_Requests_state_in_state_not_equal, L_err_IDLE_Req_N => L_err_IDLE_Req_N, L_err_IDLE_grant_N => L_err_IDLE_grant_N, L_err_North_Req_N => L_err_North_Req_N, L_err_North_grant_N => L_err_North_grant_N, L_err_East_Req_E => L_err_East_Req_E, L_err_East_grant_E => L_err_East_grant_E, L_err_West_Req_W => L_err_West_Req_W, L_err_West_grant_W => L_err_West_grant_W, L_err_South_Req_S => L_err_South_Req_S, L_err_South_grant_S => L_err_South_grant_S, L_err_Local_Req_L => L_err_Local_Req_L, L_err_Local_grant_L => L_err_Local_grant_L, L_err_IDLE_Req_E => L_err_IDLE_Req_E, L_err_IDLE_grant_E => L_err_IDLE_grant_E, L_err_North_Req_E => L_err_North_Req_E, L_err_North_grant_E => L_err_North_grant_E, L_err_East_Req_W => L_err_East_Req_W, L_err_East_grant_W => L_err_East_grant_W, L_err_West_Req_S => L_err_West_Req_S, L_err_West_grant_S => L_err_West_grant_S, L_err_South_Req_L => L_err_South_Req_L, L_err_South_grant_L => L_err_South_grant_L, L_err_Local_Req_N => L_err_Local_Req_N, L_err_Local_grant_N => L_err_Local_grant_N, L_err_IDLE_Req_W => L_err_IDLE_Req_W, L_err_IDLE_grant_W => L_err_IDLE_grant_W, L_err_North_Req_W => L_err_North_Req_W, L_err_North_grant_W => L_err_North_grant_W, L_err_East_Req_S => L_err_East_Req_S, L_err_East_grant_S => L_err_East_grant_S, L_err_West_Req_L => L_err_West_Req_L, L_err_West_grant_L => L_err_West_grant_L, L_err_South_Req_N => L_err_South_Req_N, L_err_South_grant_N => L_err_South_grant_N, L_err_Local_Req_E => L_err_Local_Req_E, L_err_Local_grant_E => L_err_Local_grant_E, L_err_IDLE_Req_S => L_err_IDLE_Req_S, L_err_IDLE_grant_S => L_err_IDLE_grant_S, L_err_North_Req_S => L_err_North_Req_S, L_err_North_grant_S => L_err_North_grant_S, L_err_East_Req_L => L_err_East_Req_L, L_err_East_grant_L => L_err_East_grant_L, L_err_West_Req_N => L_err_West_Req_N, L_err_West_grant_N => L_err_West_grant_N, L_err_South_Req_E => L_err_South_Req_E, L_err_South_grant_E => L_err_South_grant_E, L_err_Local_Req_W => L_err_Local_Req_W, L_err_Local_grant_W => L_err_Local_grant_W, L_err_IDLE_Req_L => L_err_IDLE_Req_L, L_err_IDLE_grant_L => L_err_IDLE_grant_L, L_err_North_Req_L => L_err_North_Req_L, L_err_North_grant_L => L_err_North_grant_L, L_err_East_Req_N => L_err_East_Req_N, L_err_East_grant_N => L_err_East_grant_N, L_err_West_Req_E => L_err_West_Req_E, L_err_West_grant_E => L_err_West_grant_E, L_err_South_Req_W => L_err_South_Req_W, L_err_South_grant_W => L_err_South_grant_W, L_err_Local_Req_S => L_err_Local_Req_S, L_err_Local_grant_S => L_err_Local_grant_S, L_err_state_in_onehot => L_err_arbiter_state_in_onehot, L_err_no_request_grants => L_err_no_request_grants, L_err_request_no_grants => L_err_request_no_grants, L_err_no_Req_N_grant_N => L_err_no_Req_N_grant_N, L_err_no_Req_E_grant_E => L_err_no_Req_E_grant_E, L_err_no_Req_W_grant_W => L_err_no_Req_W_grant_W, L_err_no_Req_S_grant_S => L_err_no_Req_S_grant_S, L_err_no_Req_L_grant_L => L_err_no_Req_L_grant_L, -- Arbiter_out checker outputs -- North Arbiter_out checker outputs N_arbiter_out_err_Requests_state_in_state_not_equal => N_arbiter_out_err_Requests_state_in_state_not_equal, N_err_IDLE_req_X_N => N_err_IDLE_req_X_N, N_err_North_req_X_N => N_err_North_req_X_N, N_err_North_credit_not_zero_req_X_N_grant_N => N_err_North_credit_not_zero_req_X_N_grant_N, N_err_North_credit_zero_or_not_req_X_N_not_grant_N => N_err_North_credit_zero_or_not_req_X_N_not_grant_N, N_err_East_req_X_E => N_err_East_req_X_E, N_err_East_credit_not_zero_req_X_E_grant_E => N_err_East_credit_not_zero_req_X_E_grant_E, N_err_East_credit_zero_or_not_req_X_E_not_grant_E => N_err_East_credit_zero_or_not_req_X_E_not_grant_E, N_err_West_req_X_W => N_err_West_req_X_W, N_err_West_credit_not_zero_req_X_W_grant_W => N_err_West_credit_not_zero_req_X_W_grant_W, N_err_West_credit_zero_or_not_req_X_W_not_grant_W => N_err_West_credit_zero_or_not_req_X_W_not_grant_W, N_err_South_req_X_S => N_err_South_req_X_S, N_err_South_credit_not_zero_req_X_S_grant_S => N_err_South_credit_not_zero_req_X_S_grant_S, N_err_South_credit_zero_or_not_req_X_S_not_grant_S => N_err_South_credit_zero_or_not_req_X_S_not_grant_S, N_err_Local_req_X_L => N_err_Local_req_X_L, N_err_Local_credit_not_zero_req_X_L_grant_L => N_err_Local_credit_not_zero_req_X_L_grant_L, N_err_Local_credit_zero_or_not_req_X_L_not_grant_L => N_err_Local_credit_zero_or_not_req_X_L_not_grant_L, N_err_IDLE_req_X_E => N_err_IDLE_req_X_E, N_err_North_req_X_E => N_err_North_req_X_E, N_err_East_req_X_W => N_err_East_req_X_W, N_err_West_req_X_S => N_err_West_req_X_S, N_err_South_req_X_L => N_err_South_req_X_L, N_err_Local_req_X_N => N_err_Local_req_X_N, N_err_IDLE_req_X_W => N_err_IDLE_req_X_W, N_err_North_req_X_W => N_err_North_req_X_W, N_err_East_req_X_S => N_err_East_req_X_S, N_err_West_req_X_L => N_err_West_req_X_L, N_err_South_req_X_N => N_err_South_req_X_N, N_err_Local_req_X_E => N_err_Local_req_X_E, N_err_IDLE_req_X_S => N_err_IDLE_req_X_S, N_err_North_req_X_S => N_err_North_req_X_S, N_err_East_req_X_L => N_err_East_req_X_L, N_err_West_req_X_N => N_err_West_req_X_N, N_err_South_req_X_E => N_err_South_req_X_E, N_err_Local_req_X_W => N_err_Local_req_X_W, N_err_IDLE_req_X_L => N_err_IDLE_req_X_L, N_err_North_req_X_L => N_err_North_req_X_L, N_err_East_req_X_N => N_err_East_req_X_N, N_err_West_req_X_E => N_err_West_req_X_E, N_err_South_req_X_W => N_err_South_req_X_W, N_err_Local_req_X_S => N_err_Local_req_X_S, N_arbiter_out_err_state_in_onehot => N_arbiter_out_err_state_in_onehot, N_arbiter_out_err_no_request_grants => N_arbiter_out_err_no_request_grants, N_err_request_IDLE_state => N_err_request_IDLE_state, N_err_request_IDLE_not_Grants => N_err_request_IDLE_not_Grants, N_err_state_North_Invalid_Grant => N_err_state_North_Invalid_Grant, N_err_state_East_Invalid_Grant => N_err_state_East_Invalid_Grant, N_err_state_West_Invalid_Grant => N_err_state_West_Invalid_Grant, N_err_state_South_Invalid_Grant => N_err_state_South_Invalid_Grant, N_err_state_Local_Invalid_Grant => N_err_state_Local_Invalid_Grant, N_err_Grants_onehot_or_all_zero => N_err_Grants_onehot_or_all_zero, -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal => E_arbiter_out_err_Requests_state_in_state_not_equal, E_err_IDLE_req_X_N => E_err_IDLE_req_X_N, E_err_North_req_X_N => E_err_North_req_X_N, E_err_North_credit_not_zero_req_X_N_grant_N => E_err_North_credit_not_zero_req_X_N_grant_N, E_err_North_credit_zero_or_not_req_X_N_not_grant_N => E_err_North_credit_zero_or_not_req_X_N_not_grant_N, E_err_East_req_X_E => E_err_East_req_X_E, E_err_East_credit_not_zero_req_X_E_grant_E => E_err_East_credit_not_zero_req_X_E_grant_E, E_err_East_credit_zero_or_not_req_X_E_not_grant_E => E_err_East_credit_zero_or_not_req_X_E_not_grant_E, E_err_West_req_X_W => E_err_West_req_X_W, E_err_West_credit_not_zero_req_X_W_grant_W => E_err_West_credit_not_zero_req_X_W_grant_W, E_err_West_credit_zero_or_not_req_X_W_not_grant_W => E_err_West_credit_zero_or_not_req_X_W_not_grant_W, E_err_South_req_X_S => E_err_South_req_X_S, E_err_South_credit_not_zero_req_X_S_grant_S => E_err_South_credit_not_zero_req_X_S_grant_S, E_err_South_credit_zero_or_not_req_X_S_not_grant_S => E_err_South_credit_zero_or_not_req_X_S_not_grant_S, E_err_Local_req_X_L => E_err_Local_req_X_L, E_err_Local_credit_not_zero_req_X_L_grant_L => E_err_Local_credit_not_zero_req_X_L_grant_L, E_err_Local_credit_zero_or_not_req_X_L_not_grant_L => E_err_Local_credit_zero_or_not_req_X_L_not_grant_L, E_err_IDLE_req_X_E => E_err_IDLE_req_X_E, E_err_North_req_X_E => E_err_North_req_X_E, E_err_East_req_X_W => E_err_East_req_X_W, E_err_West_req_X_S => E_err_West_req_X_S, E_err_South_req_X_L => E_err_South_req_X_L, E_err_Local_req_X_N => E_err_Local_req_X_N, E_err_IDLE_req_X_W => E_err_IDLE_req_X_W, E_err_North_req_X_W => E_err_North_req_X_W, E_err_East_req_X_S => E_err_East_req_X_S, E_err_West_req_X_L => E_err_West_req_X_L, E_err_South_req_X_N => E_err_South_req_X_N, E_err_Local_req_X_E => E_err_Local_req_X_E, E_err_IDLE_req_X_S => E_err_IDLE_req_X_S, E_err_North_req_X_S => E_err_North_req_X_S, E_err_East_req_X_L => E_err_East_req_X_L, E_err_West_req_X_N => E_err_West_req_X_N, E_err_South_req_X_E => E_err_South_req_X_E, E_err_Local_req_X_W => E_err_Local_req_X_W, E_err_IDLE_req_X_L => E_err_IDLE_req_X_L, E_err_North_req_X_L => E_err_North_req_X_L, E_err_East_req_X_N => E_err_East_req_X_N, E_err_West_req_X_E => E_err_West_req_X_E, E_err_South_req_X_W => E_err_South_req_X_W, E_err_Local_req_X_S => E_err_Local_req_X_S, E_arbiter_out_err_state_in_onehot => E_arbiter_out_err_state_in_onehot, E_arbiter_out_err_no_request_grants => E_arbiter_out_err_no_request_grants, E_err_request_IDLE_state => E_err_request_IDLE_state, E_err_request_IDLE_not_Grants => E_err_request_IDLE_not_Grants, E_err_state_North_Invalid_Grant => E_err_state_North_Invalid_Grant, E_err_state_East_Invalid_Grant => E_err_state_East_Invalid_Grant, E_err_state_West_Invalid_Grant => E_err_state_West_Invalid_Grant, E_err_state_South_Invalid_Grant => E_err_state_South_Invalid_Grant, E_err_state_Local_Invalid_Grant => E_err_state_Local_Invalid_Grant, E_err_Grants_onehot_or_all_zero => E_err_Grants_onehot_or_all_zero, -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal => W_arbiter_out_err_Requests_state_in_state_not_equal, W_err_IDLE_req_X_N => W_err_IDLE_req_X_N, W_err_North_req_X_N => W_err_North_req_X_N, W_err_North_credit_not_zero_req_X_N_grant_N => W_err_North_credit_not_zero_req_X_N_grant_N, W_err_North_credit_zero_or_not_req_X_N_not_grant_N => W_err_North_credit_zero_or_not_req_X_N_not_grant_N, W_err_East_req_X_E => W_err_East_req_X_E, W_err_East_credit_not_zero_req_X_E_grant_E => W_err_East_credit_not_zero_req_X_E_grant_E, W_err_East_credit_zero_or_not_req_X_E_not_grant_E => W_err_East_credit_zero_or_not_req_X_E_not_grant_E, W_err_West_req_X_W => W_err_West_req_X_W, W_err_West_credit_not_zero_req_X_W_grant_W => W_err_West_credit_not_zero_req_X_W_grant_W, W_err_West_credit_zero_or_not_req_X_W_not_grant_W => W_err_West_credit_zero_or_not_req_X_W_not_grant_W, W_err_South_req_X_S => W_err_South_req_X_S, W_err_South_credit_not_zero_req_X_S_grant_S => W_err_South_credit_not_zero_req_X_S_grant_S, W_err_South_credit_zero_or_not_req_X_S_not_grant_S => W_err_South_credit_zero_or_not_req_X_S_not_grant_S, W_err_Local_req_X_L => W_err_Local_req_X_L, W_err_Local_credit_not_zero_req_X_L_grant_L => W_err_Local_credit_not_zero_req_X_L_grant_L, W_err_Local_credit_zero_or_not_req_X_L_not_grant_L => W_err_Local_credit_zero_or_not_req_X_L_not_grant_L, W_err_IDLE_req_X_E => W_err_IDLE_req_X_E, W_err_North_req_X_E => W_err_North_req_X_E, W_err_East_req_X_W => W_err_East_req_X_W, W_err_West_req_X_S => W_err_West_req_X_S, W_err_South_req_X_L => W_err_South_req_X_L, W_err_Local_req_X_N => W_err_Local_req_X_N, W_err_IDLE_req_X_W => W_err_IDLE_req_X_W, W_err_North_req_X_W => W_err_North_req_X_W, W_err_East_req_X_S => W_err_East_req_X_S, W_err_West_req_X_L => W_err_West_req_X_L, W_err_South_req_X_N => W_err_South_req_X_N, W_err_Local_req_X_E => W_err_Local_req_X_E, W_err_IDLE_req_X_S => W_err_IDLE_req_X_S, W_err_North_req_X_S => W_err_North_req_X_S, W_err_East_req_X_L => W_err_East_req_X_L, W_err_West_req_X_N => W_err_West_req_X_N, W_err_South_req_X_E => W_err_South_req_X_E, W_err_Local_req_X_W => W_err_Local_req_X_W, W_err_IDLE_req_X_L => W_err_IDLE_req_X_L, W_err_North_req_X_L => W_err_North_req_X_L, W_err_East_req_X_N => W_err_East_req_X_N, W_err_West_req_X_E => W_err_West_req_X_E, W_err_South_req_X_W => W_err_South_req_X_W, W_err_Local_req_X_S => W_err_Local_req_X_S, W_arbiter_out_err_state_in_onehot => W_arbiter_out_err_state_in_onehot, W_arbiter_out_err_no_request_grants => W_arbiter_out_err_no_request_grants, W_err_request_IDLE_state => W_err_request_IDLE_state, W_err_request_IDLE_not_Grants => W_err_request_IDLE_not_Grants, W_err_state_North_Invalid_Grant => W_err_state_North_Invalid_Grant, W_err_state_East_Invalid_Grant => W_err_state_East_Invalid_Grant, W_err_state_West_Invalid_Grant => W_err_state_West_Invalid_Grant, W_err_state_South_Invalid_Grant => W_err_state_South_Invalid_Grant, W_err_state_Local_Invalid_Grant => W_err_state_Local_Invalid_Grant, W_err_Grants_onehot_or_all_zero => W_err_Grants_onehot_or_all_zero, -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal => S_arbiter_out_err_Requests_state_in_state_not_equal, S_err_IDLE_req_X_N => S_err_IDLE_req_X_N, S_err_North_req_X_N => S_err_North_req_X_N, S_err_North_credit_not_zero_req_X_N_grant_N => S_err_North_credit_not_zero_req_X_N_grant_N, S_err_North_credit_zero_or_not_req_X_N_not_grant_N => S_err_North_credit_zero_or_not_req_X_N_not_grant_N, S_err_East_req_X_E => S_err_East_req_X_E, S_err_East_credit_not_zero_req_X_E_grant_E => S_err_East_credit_not_zero_req_X_E_grant_E, S_err_East_credit_zero_or_not_req_X_E_not_grant_E => S_err_East_credit_zero_or_not_req_X_E_not_grant_E, S_err_West_req_X_W => S_err_West_req_X_W, S_err_West_credit_not_zero_req_X_W_grant_W => S_err_West_credit_not_zero_req_X_W_grant_W, S_err_West_credit_zero_or_not_req_X_W_not_grant_W => S_err_West_credit_zero_or_not_req_X_W_not_grant_W, S_err_South_req_X_S => S_err_South_req_X_S, S_err_South_credit_not_zero_req_X_S_grant_S => S_err_South_credit_not_zero_req_X_S_grant_S, S_err_South_credit_zero_or_not_req_X_S_not_grant_S => S_err_South_credit_zero_or_not_req_X_S_not_grant_S, S_err_Local_req_X_L => S_err_Local_req_X_L, S_err_Local_credit_not_zero_req_X_L_grant_L => S_err_Local_credit_not_zero_req_X_L_grant_L, S_err_Local_credit_zero_or_not_req_X_L_not_grant_L => S_err_Local_credit_zero_or_not_req_X_L_not_grant_L, S_err_IDLE_req_X_E => S_err_IDLE_req_X_E, S_err_North_req_X_E => S_err_North_req_X_E, S_err_East_req_X_W => S_err_East_req_X_W, S_err_West_req_X_S => S_err_West_req_X_S, S_err_South_req_X_L => S_err_South_req_X_L, S_err_Local_req_X_N => S_err_Local_req_X_N, S_err_IDLE_req_X_W => S_err_IDLE_req_X_W, S_err_North_req_X_W => S_err_North_req_X_W, S_err_East_req_X_S => S_err_East_req_X_S, S_err_West_req_X_L => S_err_West_req_X_L, S_err_South_req_X_N => S_err_South_req_X_N, S_err_Local_req_X_E => S_err_Local_req_X_E, S_err_IDLE_req_X_S => S_err_IDLE_req_X_S, S_err_North_req_X_S => S_err_North_req_X_S, S_err_East_req_X_L => S_err_East_req_X_L, S_err_West_req_X_N => S_err_West_req_X_N, S_err_South_req_X_E => S_err_South_req_X_E, S_err_Local_req_X_W => S_err_Local_req_X_W, S_err_IDLE_req_X_L => S_err_IDLE_req_X_L, S_err_North_req_X_L => S_err_North_req_X_L, S_err_East_req_X_N => S_err_East_req_X_N, S_err_West_req_X_E => S_err_West_req_X_E, S_err_South_req_X_W => S_err_South_req_X_W, S_err_Local_req_X_S => S_err_Local_req_X_S, S_arbiter_out_err_state_in_onehot => S_arbiter_out_err_state_in_onehot, S_arbiter_out_err_no_request_grants => S_arbiter_out_err_no_request_grants, S_err_request_IDLE_state => S_err_request_IDLE_state, S_err_request_IDLE_not_Grants => S_err_request_IDLE_not_Grants, S_err_state_North_Invalid_Grant => S_err_state_North_Invalid_Grant, S_err_state_East_Invalid_Grant => S_err_state_East_Invalid_Grant, S_err_state_West_Invalid_Grant => S_err_state_West_Invalid_Grant, S_err_state_South_Invalid_Grant => S_err_state_South_Invalid_Grant, S_err_state_Local_Invalid_Grant => S_err_state_Local_Invalid_Grant, S_err_Grants_onehot_or_all_zero => S_err_Grants_onehot_or_all_zero, -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal => L_arbiter_out_err_Requests_state_in_state_not_equal, L_err_IDLE_req_X_N => L_err_IDLE_req_X_N, L_err_North_req_X_N => L_err_North_req_X_N, L_err_North_credit_not_zero_req_X_N_grant_N => L_err_North_credit_not_zero_req_X_N_grant_N, L_err_North_credit_zero_or_not_req_X_N_not_grant_N => L_err_North_credit_zero_or_not_req_X_N_not_grant_N, L_err_East_req_X_E => L_err_East_req_X_E, L_err_East_credit_not_zero_req_X_E_grant_E => L_err_East_credit_not_zero_req_X_E_grant_E, L_err_East_credit_zero_or_not_req_X_E_not_grant_E => L_err_East_credit_zero_or_not_req_X_E_not_grant_E, L_err_West_req_X_W => L_err_West_req_X_W, L_err_West_credit_not_zero_req_X_W_grant_W => L_err_West_credit_not_zero_req_X_W_grant_W, L_err_West_credit_zero_or_not_req_X_W_not_grant_W => L_err_West_credit_zero_or_not_req_X_W_not_grant_W, L_err_South_req_X_S => L_err_South_req_X_S, L_err_South_credit_not_zero_req_X_S_grant_S => L_err_South_credit_not_zero_req_X_S_grant_S, L_err_South_credit_zero_or_not_req_X_S_not_grant_S => L_err_South_credit_zero_or_not_req_X_S_not_grant_S, L_err_Local_req_X_L => L_err_Local_req_X_L, L_err_Local_credit_not_zero_req_X_L_grant_L => L_err_Local_credit_not_zero_req_X_L_grant_L, L_err_Local_credit_zero_or_not_req_X_L_not_grant_L => L_err_Local_credit_zero_or_not_req_X_L_not_grant_L, L_err_IDLE_req_X_E => L_err_IDLE_req_X_E, L_err_North_req_X_E => L_err_North_req_X_E, L_err_East_req_X_W => L_err_East_req_X_W, L_err_West_req_X_S => L_err_West_req_X_S, L_err_South_req_X_L => L_err_South_req_X_L, L_err_Local_req_X_N => L_err_Local_req_X_N, L_err_IDLE_req_X_W => L_err_IDLE_req_X_W, L_err_North_req_X_W => L_err_North_req_X_W, L_err_East_req_X_S => L_err_East_req_X_S, L_err_West_req_X_L => L_err_West_req_X_L, L_err_South_req_X_N => L_err_South_req_X_N, L_err_Local_req_X_E => L_err_Local_req_X_E, L_err_IDLE_req_X_S => L_err_IDLE_req_X_S, L_err_North_req_X_S => L_err_North_req_X_S, L_err_East_req_X_L => L_err_East_req_X_L, L_err_West_req_X_N => L_err_West_req_X_N, L_err_South_req_X_E => L_err_South_req_X_E, L_err_Local_req_X_W => L_err_Local_req_X_W, L_err_IDLE_req_X_L => L_err_IDLE_req_X_L, L_err_North_req_X_L => L_err_North_req_X_L, L_err_East_req_X_N => L_err_East_req_X_N, L_err_West_req_X_E => L_err_West_req_X_E, L_err_South_req_X_W => L_err_South_req_X_W, L_err_Local_req_X_S => L_err_Local_req_X_S, L_arbiter_out_err_state_in_onehot => L_arbiter_out_err_state_in_onehot, L_arbiter_out_err_no_request_grants => L_arbiter_out_err_no_request_grants, L_err_request_IDLE_state => L_err_request_IDLE_state, L_err_request_IDLE_not_Grants => L_err_request_IDLE_not_Grants, L_err_state_North_Invalid_Grant => L_err_state_North_Invalid_Grant, L_err_state_East_Invalid_Grant => L_err_state_East_Invalid_Grant, L_err_state_West_Invalid_Grant => L_err_state_West_Invalid_Grant, L_err_state_South_Invalid_Grant => L_err_state_South_Invalid_Grant, L_err_state_Local_Invalid_Grant => L_err_state_Local_Invalid_Grant, L_err_Grants_onehot_or_all_zero => L_err_Grants_onehot_or_all_zero ); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Xbar select_signals Xbar_sel_N <= '0' & Grant_NE & Grant_NW & Grant_NS & Grant_NL; Xbar_sel_E <= Grant_EN & '0' & Grant_EW & Grant_ES & Grant_EL; Xbar_sel_W <= Grant_WN & Grant_WE & '0' & Grant_WS & Grant_WL; Xbar_sel_S <= Grant_SN & Grant_SE & Grant_SW & '0' & Grant_SL; Xbar_sel_L <= Grant_LN & Grant_LE & Grant_LW & Grant_LS & '0'; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Xbars XBAR_N: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_N, Data_out=> TX_N); XBAR_E: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_E, Data_out=> TX_E); XBAR_W: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_W, Data_out=> TX_W); XBAR_S: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_S, Data_out=> TX_S); XBAR_L: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => FIFO_D_out_E, West_in => FIFO_D_out_W, South_in => FIFO_D_out_S, Local_in => FIFO_D_out_L, sel => Xbar_sel_L, Data_out=> TX_L); end;
gpl-3.0
c355458dc58ba9bdd4dbfa57af12662a
0.549795
3.18624
false
true
false
false
SKravitsky/ECEC412
InstructionMemory.vhd
1
802
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity InstructionMemory is port ( Address : in std_logic_vector(31 downto 0); ReadData : out std_logic_vector(31 downto 0) ); end InstructionMemory; architecture Structural of InstructionMemory is type mem_array is array(0 to 31) of std_logic_vector(31 downto 0); signal inst_mem: mem_array := ( 0 => X"8d150000", -- lw $s5, 0($t0) 1 => X"8d160004", -- lw $s6, 4($t0) 2 => X"02b6782a", -- slt $t7, $s5, $s6 3 => X"11e00002", -- beq $t7, $zero, L 4 => X"02538822", -- sub $s1, $s2, $s3 5 => X"08000007", -- j exit 6 => X"02538820", -- L: add $s1, $s2, $s3 7 => X"ad11000c", -- exit: sw $s1, 12($t0) others => X"00000000" ); begin ReadData <= inst_mem(to_integer(unsigned(Address)) / 4); end Structural;
apache-2.0
e3af0b5f67fb655322c17a625621ea42
0.627182
2.498442
false
false
false
false
AndyMcC0/UVVM_All
bitvis_irqc/src/irqc.vhd
3
3,092
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- VHDL unit : Bitvis IRQC Library : irqc -- -- Description : See dedicated powerpoint presentation and README-file(s) ------------------------------------------------------------------------------------------ library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use work.irqc_pif_pkg.all; entity irqc is port( -- DSP interface and general control signals clk : in std_logic; arst : in std_logic; -- CPU interface cs : in std_logic; addr: in unsigned(2 downto 0); wr : in std_logic; rd : in std_logic; din : in std_logic_vector(7 downto 0); dout: out std_logic_vector(7 downto 0) := (others => '0'); -- Interrupt related signals irq_source : in std_logic_vector(C_NUM_SOURCES-1 downto 0); irq2cpu : out std_logic; irq2cpu_ack : in std_logic ); end irqc; architecture rtl of irqc is -- PIF-core interface signal p2c : t_p2c; -- signal c2p : t_c2p; -- begin i_irqc_pif: entity work.irqc_pif port map ( arst => arst, -- clk => clk, -- -- CPU interface cs => cs, -- addr => addr, -- wr => wr, -- rd => rd, -- din => din, -- dout => dout, -- -- p2c => p2c, -- c2p => c2p -- ); i_irqc_core: entity work.irqc_core port map ( clk => clk, -- arst => arst, -- -- PIF-core interface p2c => p2c, -- c2p => c2p, -- -- Interrupt related signals irq_source => irq_source, -- irq2cpu => irq2cpu, -- irq2cpu_ack => irq2cpu_ack -- ); end rtl;
mit
f54c7514a4dc192fc18ef3f6e6f8ca87
0.433053
4.540382
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/network_files/customized_routers/Router_32_bit_SE_credit_based_packet_drop_classifier_SHMU_will_full_set_of_checkers_with_FI.vhd
3
312,787
--Copyright (C) 2016 Siavoosh Payandeh Azad, Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use ieee.std_logic_misc.all; use work.component_pack.all; entity router_SE_credit_based_PD_C_SHMU is --fault classifier plus packet-dropping generic ( DATA_WIDTH: integer := 32; current_address : integer := 0; Rxy_rst : integer := 10; Cx_rst : integer := 10; healthy_counter_threshold : integer := 8; faulty_counter_threshold: integer := 2; counter_depth: integer := 4; NoC_size: integer := 4 ); port ( reset, clk: in std_logic; RX_N, RX_W, RX_L : in std_logic_vector (DATA_WIDTH-1 downto 0); credit_in_N, credit_in_W, credit_in_L: in std_logic; valid_in_N, valid_in_W, valid_in_L : in std_logic; valid_out_N, valid_out_W, valid_out_L : out std_logic; credit_out_N, credit_out_W, credit_out_L: out std_logic; TX_N, TX_W, TX_L: out std_logic_vector (DATA_WIDTH-1 downto 0); Faulty_N_in, Faulty_W_in : in std_logic; Faulty_N_out, Faulty_W_out : out std_logic; -- should be connected to NI (Outputs for classified fault information) link_faults: out std_logic_vector(4 downto 0); turn_faults: out std_logic_vector(19 downto 0); Rxy_reconf_PE: in std_logic_vector(7 downto 0); Cx_reconf_PE: in std_logic_vector(3 downto 0); Reconfig_command : in std_logic; -- fault injector shift register with serial input signals TCK: in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output ---- Outputs for non-classified fault information link_faults_async: out std_logic_vector(4 downto 0); turn_faults_async: out std_logic_vector(19 downto 0) ); end router_SE_credit_based_PD_C_SHMU; architecture behavior of router_SE_credit_based_PD_C_SHMU is ------------------------------- -- Added because of Checkers -- ------------------------------- --signal combined_error_signals: std_logic_vector(19 downto 0); -- Shall we only consider this for the 20 bits showing the turn faults or individual checkers ?! --signal shift_parallel_data: std_logic_vector(19 downto 0); ------------------------------- ------------------------------- signal FIFO_D_out_N, FIFO_D_out_W, FIFO_D_out_L: std_logic_vector(DATA_WIDTH-1 downto 0); -- Grant_XY : Grant signal generated from Arbiter for output X connected to FIFO of input Y signal Grant_WW, Grant_WN, Grant_WL: std_logic; signal Grant_NW, Grant_NN, Grant_NL: std_logic; signal Grant_LW, Grant_LN, Grant_LL: std_logic; signal Req_WW, Req_NW, Req_LW: std_logic; signal Req_WN, Req_NN, Req_LN: std_logic; signal Req_WL, Req_NL, Req_LL: std_logic; signal empty_N, empty_W, empty_L: std_logic; signal Xbar_sel_N, Xbar_sel_W, Xbar_sel_L: std_logic_vector(4 downto 0); signal LBDR_Fault_N, LBDR_Fault_W, LBDR_Fault_L: std_logic; signal faulty_packet_N, faulty_packet_W, faulty_packet_L: std_logic; signal healthy_packet_N, healthy_packet_W, healthy_packet_L: std_logic; signal packet_drop_order_N, packet_drop_order_W, packet_drop_order_L: std_logic; -- Signals related to link fault classification modules signal healthy_link_N, healthy_link_W, healthy_link_L: std_logic; signal sig_Faulty_N_out, sig_Faulty_W_out, faulty_link_L: std_logic; signal intermittent_link_N, intermittent_link_W, intermittent_link_L: std_logic; -- Signals related to Control part checkers fault classification modules signal Healthy_W2N_turn_fault, intermittent_W2N_turn_fault, faulty_W2N_turn_fault: std_logic; signal Healthy_N2W_turn_fault, intermittent_N2W_turn_fault, faulty_N2W_turn_fault: std_logic; signal Healthy_L2W_fault, intermittent_L2W_fault, faulty_L2W_fault: std_logic; signal Healthy_L2N_fault, intermittent_L2N_fault, faulty_L2N_fault: std_logic; signal Healthy_W2L_fault, intermittent_W2L_fault, faulty_W2L_fault: std_logic; signal Healthy_N2L_fault, intermittent_N2L_fault, faulty_N2L_fault: std_logic; -- Signals needed for control part checkers -- Signals needed for LBDR packet drop checkers -- North signal N_err_header_empty_Requests_FF_Requests_in, N_err_tail_Requests_in_all_zero, N_err_tail_empty_Requests_FF_Requests_in, N_err_tail_not_empty_not_grants_Requests_FF_Requests_in, N_err_grants_onehot, N_err_grants_mismatch, N_err_header_tail_Requests_FF_Requests_in, N_err_dst_addr_cur_addr_N1, N_err_dst_addr_cur_addr_not_N1, N_err_dst_addr_cur_addr_E1, N_err_dst_addr_cur_addr_not_E1, N_err_dst_addr_cur_addr_W1, N_err_dst_addr_cur_addr_not_W1, N_err_dst_addr_cur_addr_S1, N_err_dst_addr_cur_addr_not_S1, N_err_dst_addr_cur_addr_Req_L_in, N_err_dst_addr_cur_addr_not_Req_L_in, N_err_header_not_empty_faulty_drop_packet_in, -- added according to new design N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design N_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --N_err_header_not_empty_Req_L_in, -- added according to new design N_err_header_not_empty_Req_N_in, N_err_header_not_empty_Req_E_in, N_err_header_not_empty_Req_W_in, N_err_header_not_empty_Req_S_in, N_err_header_empty_packet_drop_in_packet_drop_equal, N_err_tail_not_empty_packet_drop_not_packet_drop_in, N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, N_err_packet_drop_order, N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal, -- West W_err_header_empty_Requests_FF_Requests_in, W_err_tail_Requests_in_all_zero, W_err_tail_empty_Requests_FF_Requests_in, W_err_tail_not_empty_not_grants_Requests_FF_Requests_in, W_err_grants_onehot, W_err_grants_mismatch, W_err_header_tail_Requests_FF_Requests_in, W_err_dst_addr_cur_addr_N1, W_err_dst_addr_cur_addr_not_N1, W_err_dst_addr_cur_addr_E1, W_err_dst_addr_cur_addr_not_E1, W_err_dst_addr_cur_addr_W1, W_err_dst_addr_cur_addr_not_W1, W_err_dst_addr_cur_addr_S1, W_err_dst_addr_cur_addr_not_S1, W_err_dst_addr_cur_addr_Req_L_in, W_err_dst_addr_cur_addr_not_Req_L_in, W_err_header_not_empty_faulty_drop_packet_in, -- added according to new design W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design W_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --W_err_header_not_empty_Req_L_in, -- added according to new design W_err_header_not_empty_Req_N_in, W_err_header_not_empty_Req_E_in, W_err_header_not_empty_Req_W_in, W_err_header_not_empty_Req_S_in, W_err_header_empty_packet_drop_in_packet_drop_equal, W_err_tail_not_empty_packet_drop_not_packet_drop_in, W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, W_err_packet_drop_order, W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal, -- Local L_err_header_empty_Requests_FF_Requests_in, L_err_tail_Requests_in_all_zero, L_err_tail_empty_Requests_FF_Requests_in, L_err_tail_not_empty_not_grants_Requests_FF_Requests_in, L_err_grants_onehot, L_err_grants_mismatch, L_err_header_tail_Requests_FF_Requests_in, L_err_dst_addr_cur_addr_N1, L_err_dst_addr_cur_addr_not_N1, L_err_dst_addr_cur_addr_E1, L_err_dst_addr_cur_addr_not_E1, L_err_dst_addr_cur_addr_W1, L_err_dst_addr_cur_addr_not_W1, L_err_dst_addr_cur_addr_S1, L_err_dst_addr_cur_addr_not_S1, L_err_dst_addr_cur_addr_Req_L_in, L_err_dst_addr_cur_addr_not_Req_L_in, L_err_header_not_empty_faulty_drop_packet_in, -- added according to new design L_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design L_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --L_err_header_not_empty_Req_L_in, -- added according to new design L_err_header_not_empty_Req_N_in, L_err_header_not_empty_Req_E_in, L_err_header_not_empty_Req_W_in, L_err_header_not_empty_Req_S_in, L_err_header_empty_packet_drop_in_packet_drop_equal, L_err_tail_not_empty_packet_drop_not_packet_drop_in, L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, L_err_packet_drop_order, L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, -- Added L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal: std_logic; ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------ -- Signals needed for FIFO packet drop with fault classifier support checkers -- North -- Functional checkers signal N_err_empty_full, N_err_empty_read_en, N_err_full_write_en, N_err_state_in_onehot, N_err_read_pointer_in_onehot, N_err_write_pointer_in_onehot, -- Structural checkers N_err_write_en_write_pointer, N_err_not_write_en_write_pointer, N_err_read_pointer_write_pointer_not_empty, N_err_read_pointer_write_pointer_empty, N_err_read_pointer_write_pointer_not_full, N_err_read_pointer_write_pointer_full, N_err_read_pointer_increment, N_err_read_pointer_not_increment, N_err_write_en, N_err_not_write_en, N_err_not_write_en1, N_err_not_write_en2, N_err_read_en_mismatch, N_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! N_err_fake_credit_read_en_fake_credit_counter_in_increment, N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, N_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, N_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, N_err_fake_credit_read_en_credit_out, N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO N_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, N_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, N_err_state_out_Idle_not_fault_out_not_fake_credit, N_err_state_out_Idle_not_fault_out_not_fault_info_in, N_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, N_err_state_out_Idle_fault_out_fake_credit, N_err_state_out_Idle_fault_out_state_in_Packet_drop, N_err_state_out_Idle_fault_out_fault_info_in, N_err_state_out_Idle_fault_out_faulty_packet_in, N_err_state_out_Idle_not_health_info, N_err_state_out_Idle_not_write_fake_flit, N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, N_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, N_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, N_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, N_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, N_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, N_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, N_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, N_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Header_flit_not_valid_in_not_fault_info_in, N_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, N_err_state_out_Header_flit_or_Body_flit_not_fake_credit, N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, N_err_state_out_Body_flit_valid_in_not_fault_out_health_info, N_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, N_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, N_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, N_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, N_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, N_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, N_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, N_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Body_flit_not_valid_in_not_fault_info_in, N_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, N_err_state_out_Body_flit_valid_in_fault_out_not_health_info, N_err_state_out_Body_flit_valid_in_not_health_info, N_err_state_out_Body_flit_not_fake_credit, N_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, N_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, N_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, N_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, N_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, N_err_state_out_Tail_flit_not_valid_in_state_in_Idle, N_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, N_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, N_err_state_out_Tail_flit_not_valid_in_not_fake_credit, N_err_state_out_Tail_flit_not_write_fake_flit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, N_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, N_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, N_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, N_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, N_err_fault_info_fault_info_out_equal, N_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in, -- West -- Functional checkers W_err_empty_full, W_err_empty_read_en, W_err_full_write_en, W_err_state_in_onehot, W_err_read_pointer_in_onehot, W_err_write_pointer_in_onehot, -- Structural checkers W_err_write_en_write_pointer, W_err_not_write_en_write_pointer, W_err_read_pointer_write_pointer_not_empty, W_err_read_pointer_write_pointer_empty, W_err_read_pointer_write_pointer_not_full, W_err_read_pointer_write_pointer_full, W_err_read_pointer_increment, W_err_read_pointer_not_increment, W_err_write_en, W_err_not_write_en, W_err_not_write_en1, W_err_not_write_en2, W_err_read_en_mismatch, W_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! W_err_fake_credit_read_en_fake_credit_counter_in_increment, W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, W_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, W_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, W_err_fake_credit_read_en_credit_out, W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO W_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, W_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, W_err_state_out_Idle_not_fault_out_not_fake_credit, W_err_state_out_Idle_not_fault_out_not_fault_info_in, W_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, W_err_state_out_Idle_fault_out_fake_credit, W_err_state_out_Idle_fault_out_state_in_Packet_drop, W_err_state_out_Idle_fault_out_fault_info_in, W_err_state_out_Idle_fault_out_faulty_packet_in, W_err_state_out_Idle_not_health_info, W_err_state_out_Idle_not_write_fake_flit, W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, W_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, W_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, W_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, W_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, W_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, W_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, W_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, W_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Header_flit_not_valid_in_not_fault_info_in, W_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, W_err_state_out_Header_flit_or_Body_flit_not_fake_credit, W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, W_err_state_out_Body_flit_valid_in_not_fault_out_health_info, W_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, W_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, W_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, W_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, W_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, W_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, W_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, W_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Body_flit_not_valid_in_not_fault_info_in, W_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, W_err_state_out_Body_flit_valid_in_fault_out_not_health_info, W_err_state_out_Body_flit_valid_in_not_health_info, W_err_state_out_Body_flit_not_fake_credit, W_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, W_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, W_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, W_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, W_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, W_err_state_out_Tail_flit_not_valid_in_state_in_Idle, W_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, W_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, W_err_state_out_Tail_flit_not_valid_in_not_fake_credit, W_err_state_out_Tail_flit_not_write_fake_flit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, W_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, W_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, W_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, W_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, W_err_fault_info_fault_info_out_equal, W_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in, -- Local -- Functional checkers L_err_empty_full, L_err_empty_read_en, L_err_full_write_en, L_err_state_in_onehot, L_err_read_pointer_in_onehot, L_err_write_pointer_in_onehot, -- Structural checkers L_err_write_en_write_pointer, L_err_not_write_en_write_pointer, L_err_read_pointer_write_pointer_not_empty, L_err_read_pointer_write_pointer_empty, L_err_read_pointer_write_pointer_not_full, L_err_read_pointer_write_pointer_full, L_err_read_pointer_increment, L_err_read_pointer_not_increment, L_err_write_en, L_err_not_write_en, L_err_not_write_en1, L_err_not_write_en2, L_err_read_en_mismatch, L_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! L_err_fake_credit_read_en_fake_credit_counter_in_increment, L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, L_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, L_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, L_err_fake_credit_read_en_credit_out, L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO L_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, L_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, L_err_state_out_Idle_not_fault_out_not_fake_credit, L_err_state_out_Idle_not_fault_out_not_fault_info_in, L_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, L_err_state_out_Idle_fault_out_fake_credit, L_err_state_out_Idle_fault_out_state_in_Packet_drop, L_err_state_out_Idle_fault_out_fault_info_in, L_err_state_out_Idle_fault_out_faulty_packet_in, L_err_state_out_Idle_not_health_info, L_err_state_out_Idle_not_write_fake_flit, L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, L_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, L_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, L_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, L_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, L_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, L_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, L_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, L_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Header_flit_not_valid_in_not_fault_info_in, L_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, L_err_state_out_Header_flit_or_Body_flit_not_fake_credit, L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, L_err_state_out_Body_flit_valid_in_not_fault_out_health_info, L_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, L_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, L_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, L_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, L_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, L_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, L_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, L_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Body_flit_not_valid_in_not_fault_info_in, L_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, L_err_state_out_Body_flit_valid_in_fault_out_not_health_info, L_err_state_out_Body_flit_valid_in_not_health_info, L_err_state_out_Body_flit_not_fake_credit, L_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, L_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, L_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, L_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, L_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, L_err_state_out_Tail_flit_not_valid_in_state_in_Idle, L_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, L_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, L_err_state_out_Tail_flit_not_valid_in_not_fake_credit, L_err_state_out_Tail_flit_not_write_fake_flit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, L_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, L_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, L_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, L_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, L_err_fault_info_fault_info_out_equal, L_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in: std_logic; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Signals needed for Allocator unit -- Allocator logic checker outputs -- Might need to be changed ?! signal err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match: std_logic; -- Allocator credit_counter logic checker outputs signal err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_N_credit_counter_N_out_increment, err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change, err_grant_N_credit_counter_N_out_decrement, err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change, err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_E_credit_counter_E_out_increment, err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change, err_grant_E_credit_counter_E_out_decrement, err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change, err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_W_credit_counter_W_out_increment, err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change, err_grant_W_credit_counter_W_out_decrement, err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change, err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_S_credit_counter_S_out_increment, err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change, err_grant_S_credit_counter_S_out_decrement, err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change, err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal, err_credit_in_L_credit_counter_L_out_increment, err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change, err_grant_L_credit_counter_L_out_decrement, err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change, err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal : std_logic; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Arbiter_in Checker signals (part of allocator unit) -- North Arbiter_in checker outputs signal N_err_Requests_state_in_state_not_equal, N_err_IDLE_Req_N, N_err_IDLE_grant_N,N_err_North_Req_N, N_err_North_grant_N, N_err_East_Req_E, N_err_East_grant_E, N_err_West_Req_W, N_err_West_grant_W, N_err_South_Req_S,N_err_South_grant_S,N_err_Local_Req_L, N_err_Local_grant_L, N_err_IDLE_Req_E, N_err_IDLE_grant_E, N_err_North_Req_E, N_err_North_grant_E, N_err_East_Req_W, N_err_East_grant_W, N_err_West_Req_S, N_err_West_grant_S, N_err_South_Req_L, N_err_South_grant_L, N_err_Local_Req_N, N_err_Local_grant_N, N_err_IDLE_Req_W, N_err_IDLE_grant_W, N_err_North_Req_W, N_err_North_grant_W, N_err_East_Req_S, N_err_East_grant_S, N_err_West_Req_L, N_err_West_grant_L, N_err_South_Req_N, N_err_South_grant_N, N_err_Local_Req_E, N_err_Local_grant_E, N_err_IDLE_Req_S, N_err_IDLE_grant_S, N_err_North_Req_S, N_err_North_grant_S, N_err_East_Req_L, N_err_East_grant_L, N_err_West_Req_N, N_err_West_grant_N, N_err_South_Req_E, N_err_South_grant_E, N_err_Local_Req_W, N_err_Local_grant_W, N_err_IDLE_Req_L, N_err_IDLE_grant_L, N_err_North_Req_L, N_err_North_grant_L, N_err_East_Req_N, N_err_East_grant_N, N_err_West_Req_E, N_err_West_grant_E, N_err_South_Req_W, N_err_South_grant_W, N_err_Local_Req_S, N_err_Local_grant_S, N_err_arbiter_state_in_onehot, N_err_no_request_grants, N_err_request_no_grants, N_err_no_Req_N_grant_N, N_err_no_Req_E_grant_E, N_err_no_Req_W_grant_W, N_err_no_Req_S_grant_S, N_err_no_Req_L_grant_L, -- East Arbiter_in checker outputs E_err_Requests_state_in_state_not_equal, E_err_IDLE_Req_N, E_err_IDLE_grant_N, E_err_North_Req_N, E_err_North_grant_N, E_err_East_Req_E, E_err_East_grant_E, E_err_West_Req_W, E_err_West_grant_W, E_err_South_Req_S, E_err_South_grant_S, E_err_Local_Req_L, E_err_Local_grant_L, E_err_IDLE_Req_E, E_err_IDLE_grant_E, E_err_North_Req_E, E_err_North_grant_E, E_err_East_Req_W, E_err_East_grant_W, E_err_West_Req_S, E_err_West_grant_S, E_err_South_Req_L, E_err_South_grant_L, E_err_Local_Req_N, E_err_Local_grant_N, E_err_IDLE_Req_W, E_err_IDLE_grant_W, E_err_North_Req_W, E_err_North_grant_W, E_err_East_Req_S, E_err_East_grant_S, E_err_West_Req_L, E_err_West_grant_L, E_err_South_Req_N, E_err_South_grant_N, E_err_Local_Req_E, E_err_Local_grant_E, E_err_IDLE_Req_S, E_err_IDLE_grant_S, E_err_North_Req_S, E_err_North_grant_S, E_err_East_Req_L, E_err_East_grant_L, E_err_West_Req_N, E_err_West_grant_N, E_err_South_Req_E, E_err_South_grant_E, E_err_Local_Req_W, E_err_Local_grant_W, E_err_IDLE_Req_L, E_err_IDLE_grant_L, E_err_North_Req_L, E_err_North_grant_L, E_err_East_Req_N, E_err_East_grant_N, E_err_West_Req_E, E_err_West_grant_E, E_err_South_Req_W, E_err_South_grant_W, E_err_Local_Req_S, E_err_Local_grant_S, E_err_arbiter_state_in_onehot, E_err_no_request_grants, E_err_request_no_grants, E_err_no_Req_N_grant_N, E_err_no_Req_E_grant_E, E_err_no_Req_W_grant_W, E_err_no_Req_S_grant_S, E_err_no_Req_L_grant_L, -- West Arbiter_in checker outputs W_err_Requests_state_in_state_not_equal, W_err_IDLE_Req_N, W_err_IDLE_grant_N, W_err_North_Req_N, W_err_North_grant_N, W_err_East_Req_E, W_err_East_grant_E, W_err_West_Req_W, W_err_West_grant_W, W_err_South_Req_S, W_err_South_grant_S, W_err_Local_Req_L, W_err_Local_grant_L, W_err_IDLE_Req_E, W_err_IDLE_grant_E, W_err_North_Req_E, W_err_North_grant_E, W_err_East_Req_W, W_err_East_grant_W, W_err_West_Req_S, W_err_West_grant_S, W_err_South_Req_L, W_err_South_grant_L, W_err_Local_Req_N, W_err_Local_grant_N, W_err_IDLE_Req_W, W_err_IDLE_grant_W, W_err_North_Req_W, W_err_North_grant_W, W_err_East_Req_S, W_err_East_grant_S, W_err_West_Req_L, W_err_West_grant_L, W_err_South_Req_N, W_err_South_grant_N, W_err_Local_Req_E, W_err_Local_grant_E, W_err_IDLE_Req_S, W_err_IDLE_grant_S, W_err_North_Req_S, W_err_North_grant_S, W_err_East_Req_L, W_err_East_grant_L, W_err_West_Req_N, W_err_West_grant_N, W_err_South_Req_E, W_err_South_grant_E, W_err_Local_Req_W, W_err_Local_grant_W, W_err_IDLE_Req_L, W_err_IDLE_grant_L, W_err_North_Req_L, W_err_North_grant_L, W_err_East_Req_N, W_err_East_grant_N, W_err_West_Req_E, W_err_West_grant_E, W_err_South_Req_W, W_err_South_grant_W, W_err_Local_Req_S, W_err_Local_grant_S, W_err_arbiter_state_in_onehot, W_err_no_request_grants, W_err_request_no_grants, W_err_no_Req_N_grant_N, W_err_no_Req_E_grant_E, W_err_no_Req_W_grant_W, W_err_no_Req_S_grant_S, W_err_no_Req_L_grant_L, -- South Arbiter_in checker outputs S_err_Requests_state_in_state_not_equal, S_err_IDLE_Req_N, S_err_IDLE_grant_N,S_err_North_Req_N, S_err_North_grant_N, S_err_East_Req_E, S_err_East_grant_E, S_err_West_Req_W, S_err_West_grant_W, S_err_South_Req_S,S_err_South_grant_S,S_err_Local_Req_L, S_err_Local_grant_L, S_err_IDLE_Req_E, S_err_IDLE_grant_E, S_err_North_Req_E, S_err_North_grant_E, S_err_East_Req_W, S_err_East_grant_W, S_err_West_Req_S, S_err_West_grant_S, S_err_South_Req_L, S_err_South_grant_L, S_err_Local_Req_N, S_err_Local_grant_N, S_err_IDLE_Req_W, S_err_IDLE_grant_W, S_err_North_Req_W, S_err_North_grant_W, S_err_East_Req_S, S_err_East_grant_S, S_err_West_Req_L, S_err_West_grant_L, S_err_South_Req_N, S_err_South_grant_N, S_err_Local_Req_E, S_err_Local_grant_E, S_err_IDLE_Req_S, S_err_IDLE_grant_S, S_err_North_Req_S, S_err_North_grant_S, S_err_East_Req_L, S_err_East_grant_L, S_err_West_Req_N, S_err_West_grant_N, S_err_South_Req_E, S_err_South_grant_E, S_err_Local_Req_W, S_err_Local_grant_W, S_err_IDLE_Req_L, S_err_IDLE_grant_L, S_err_North_Req_L, S_err_North_grant_L, S_err_East_Req_N, S_err_East_grant_N, S_err_West_Req_E, S_err_West_grant_E, S_err_South_Req_W, S_err_South_grant_W, S_err_Local_Req_S, S_err_Local_grant_S, S_err_arbiter_state_in_onehot, S_err_no_request_grants, S_err_request_no_grants, S_err_no_Req_N_grant_N, S_err_no_Req_E_grant_E, S_err_no_Req_W_grant_W, S_err_no_Req_S_grant_S, S_err_no_Req_L_grant_L, -- Local Arbiter_in checker outputs L_err_Requests_state_in_state_not_equal, L_err_IDLE_Req_N, L_err_IDLE_grant_N,L_err_North_Req_N, L_err_North_grant_N, L_err_East_Req_E, L_err_East_grant_E, L_err_West_Req_W, L_err_West_grant_W, L_err_South_Req_S,L_err_South_grant_S, L_err_Local_Req_L, L_err_Local_grant_L, L_err_IDLE_Req_E, L_err_IDLE_grant_E, L_err_North_Req_E, L_err_North_grant_E, L_err_East_Req_W, L_err_East_grant_W, L_err_West_Req_S, L_err_West_grant_S, L_err_South_Req_L, L_err_South_grant_L, L_err_Local_Req_N, L_err_Local_grant_N, L_err_IDLE_Req_W, L_err_IDLE_grant_W, L_err_North_Req_W, L_err_North_grant_W, L_err_East_Req_S, L_err_East_grant_S, L_err_West_Req_L, L_err_West_grant_L, L_err_South_Req_N, L_err_South_grant_N, L_err_Local_Req_E, L_err_Local_grant_E, L_err_IDLE_Req_S, L_err_IDLE_grant_S, L_err_North_Req_S, L_err_North_grant_S, L_err_East_Req_L, L_err_East_grant_L, L_err_West_Req_N, L_err_West_grant_N, L_err_South_Req_E, L_err_South_grant_E, L_err_Local_Req_W, L_err_Local_grant_W, L_err_IDLE_Req_L, L_err_IDLE_grant_L, L_err_North_Req_L, L_err_North_grant_L, L_err_East_Req_N, L_err_East_grant_N, L_err_West_Req_E, L_err_West_grant_E, L_err_South_Req_W, L_err_South_grant_W, L_err_Local_Req_S, L_err_Local_grant_S, L_err_arbiter_state_in_onehot, L_err_no_request_grants, L_err_request_no_grants, L_err_no_Req_N_grant_N, L_err_no_Req_E_grant_E, L_err_no_Req_W_grant_W, L_err_no_Req_S_grant_S, L_err_no_Req_L_grant_L : std_logic; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Arbiter_out Checker signals (part of allocator unit) -- North Arbiter_out checker outputs signal N_arbiter_out_err_Requests_state_in_state_not_equal, N_err_IDLE_req_X_N, N_err_North_req_X_N, N_err_North_credit_not_zero_req_X_N_grant_N, N_err_North_credit_zero_or_not_req_X_N_not_grant_N, N_err_East_req_X_E, N_err_East_credit_not_zero_req_X_E_grant_E, N_err_East_credit_zero_or_not_req_X_E_not_grant_E, N_err_West_req_X_W, N_err_West_credit_not_zero_req_X_W_grant_W, N_err_West_credit_zero_or_not_req_X_W_not_grant_W, N_err_South_req_X_S, N_err_South_credit_not_zero_req_X_S_grant_S, N_err_South_credit_zero_or_not_req_X_S_not_grant_S, N_err_Local_req_X_L, N_err_Local_credit_not_zero_req_X_L_grant_L, N_err_Local_credit_zero_or_not_req_X_L_not_grant_L, N_err_IDLE_req_X_E, N_err_North_req_X_E, N_err_East_req_X_W, N_err_West_req_X_S, N_err_South_req_X_L, N_err_Local_req_X_N, N_err_IDLE_req_X_W, N_err_North_req_X_W, N_err_East_req_X_S, N_err_West_req_X_L, N_err_South_req_X_N, N_err_Local_req_X_E, N_err_IDLE_req_X_S, N_err_North_req_X_S, N_err_East_req_X_L, N_err_West_req_X_N, N_err_South_req_X_E, N_err_Local_req_X_W, N_err_IDLE_req_X_L, N_err_North_req_X_L, N_err_East_req_X_N, N_err_West_req_X_E, N_err_South_req_X_W, N_err_Local_req_X_S, N_arbiter_out_err_state_in_onehot, N_arbiter_out_err_no_request_grants, N_err_request_IDLE_state, N_err_request_IDLE_not_Grants, N_err_state_North_Invalid_Grant, N_err_state_East_Invalid_Grant, N_err_state_West_Invalid_Grant, N_err_state_South_Invalid_Grant, N_err_state_Local_Invalid_Grant, N_err_Grants_onehot_or_all_zero, -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal, E_err_IDLE_req_X_N, E_err_North_req_X_N, E_err_North_credit_not_zero_req_X_N_grant_N, E_err_North_credit_zero_or_not_req_X_N_not_grant_N, E_err_East_req_X_E, E_err_East_credit_not_zero_req_X_E_grant_E, E_err_East_credit_zero_or_not_req_X_E_not_grant_E, E_err_West_req_X_W, E_err_West_credit_not_zero_req_X_W_grant_W, E_err_West_credit_zero_or_not_req_X_W_not_grant_W, E_err_South_req_X_S, E_err_South_credit_not_zero_req_X_S_grant_S, E_err_South_credit_zero_or_not_req_X_S_not_grant_S, E_err_Local_req_X_L, E_err_Local_credit_not_zero_req_X_L_grant_L, E_err_Local_credit_zero_or_not_req_X_L_not_grant_L, E_err_IDLE_req_X_E, E_err_North_req_X_E, E_err_East_req_X_W, E_err_West_req_X_S, E_err_South_req_X_L, E_err_Local_req_X_N, E_err_IDLE_req_X_W, E_err_North_req_X_W, E_err_East_req_X_S, E_err_West_req_X_L, E_err_South_req_X_N, E_err_Local_req_X_E, E_err_IDLE_req_X_S, E_err_North_req_X_S, E_err_East_req_X_L, E_err_West_req_X_N, E_err_South_req_X_E, E_err_Local_req_X_W, E_err_IDLE_req_X_L, E_err_North_req_X_L, E_err_East_req_X_N, E_err_West_req_X_E, E_err_South_req_X_W, E_err_Local_req_X_S, E_arbiter_out_err_state_in_onehot, E_arbiter_out_err_no_request_grants, E_err_request_IDLE_state, E_err_request_IDLE_not_Grants, E_err_state_North_Invalid_Grant, E_err_state_East_Invalid_Grant, E_err_state_West_Invalid_Grant, E_err_state_South_Invalid_Grant, E_err_state_Local_Invalid_Grant, E_err_Grants_onehot_or_all_zero, -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal, W_err_IDLE_req_X_N, W_err_North_req_X_N, W_err_North_credit_not_zero_req_X_N_grant_N, W_err_North_credit_zero_or_not_req_X_N_not_grant_N, W_err_East_req_X_E, W_err_East_credit_not_zero_req_X_E_grant_E, W_err_East_credit_zero_or_not_req_X_E_not_grant_E, W_err_West_req_X_W, W_err_West_credit_not_zero_req_X_W_grant_W, W_err_West_credit_zero_or_not_req_X_W_not_grant_W, W_err_South_req_X_S, W_err_South_credit_not_zero_req_X_S_grant_S, W_err_South_credit_zero_or_not_req_X_S_not_grant_S, W_err_Local_req_X_L, W_err_Local_credit_not_zero_req_X_L_grant_L, W_err_Local_credit_zero_or_not_req_X_L_not_grant_L, W_err_IDLE_req_X_E, W_err_North_req_X_E, W_err_East_req_X_W, W_err_West_req_X_S, W_err_South_req_X_L, W_err_Local_req_X_N, W_err_IDLE_req_X_W, W_err_North_req_X_W, W_err_East_req_X_S, W_err_West_req_X_L, W_err_South_req_X_N, W_err_Local_req_X_E, W_err_IDLE_req_X_S, W_err_North_req_X_S, W_err_East_req_X_L, W_err_West_req_X_N, W_err_South_req_X_E, W_err_Local_req_X_W, W_err_IDLE_req_X_L, W_err_North_req_X_L, W_err_East_req_X_N, W_err_West_req_X_E, W_err_South_req_X_W, W_err_Local_req_X_S, W_arbiter_out_err_state_in_onehot, W_arbiter_out_err_no_request_grants, W_err_request_IDLE_state, W_err_request_IDLE_not_Grants, W_err_state_North_Invalid_Grant,W_err_state_East_Invalid_Grant, W_err_state_West_Invalid_Grant, W_err_state_South_Invalid_Grant,W_err_state_Local_Invalid_Grant, W_err_Grants_onehot_or_all_zero, -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal, S_err_IDLE_req_X_N, S_err_North_req_X_N, S_err_North_credit_not_zero_req_X_N_grant_N, S_err_North_credit_zero_or_not_req_X_N_not_grant_N, S_err_East_req_X_E, S_err_East_credit_not_zero_req_X_E_grant_E, S_err_East_credit_zero_or_not_req_X_E_not_grant_E, S_err_West_req_X_W, S_err_West_credit_not_zero_req_X_W_grant_W, S_err_West_credit_zero_or_not_req_X_W_not_grant_W, S_err_South_req_X_S, S_err_South_credit_not_zero_req_X_S_grant_S, S_err_South_credit_zero_or_not_req_X_S_not_grant_S, S_err_Local_req_X_L, S_err_Local_credit_not_zero_req_X_L_grant_L, S_err_Local_credit_zero_or_not_req_X_L_not_grant_L, S_err_IDLE_req_X_E, S_err_North_req_X_E, S_err_East_req_X_W, S_err_West_req_X_S, S_err_South_req_X_L, S_err_Local_req_X_N, S_err_IDLE_req_X_W, S_err_North_req_X_W, S_err_East_req_X_S, S_err_West_req_X_L, S_err_South_req_X_N, S_err_Local_req_X_E, S_err_IDLE_req_X_S, S_err_North_req_X_S, S_err_East_req_X_L, S_err_West_req_X_N, S_err_South_req_X_E, S_err_Local_req_X_W, S_err_IDLE_req_X_L, S_err_North_req_X_L, S_err_East_req_X_N, S_err_West_req_X_E, S_err_South_req_X_W, S_err_Local_req_X_S, S_arbiter_out_err_state_in_onehot, S_arbiter_out_err_no_request_grants, S_err_request_IDLE_state, S_err_request_IDLE_not_Grants, S_err_state_North_Invalid_Grant, S_err_state_East_Invalid_Grant, S_err_state_West_Invalid_Grant, S_err_state_South_Invalid_Grant, S_err_state_Local_Invalid_Grant, S_err_Grants_onehot_or_all_zero, -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal, L_err_IDLE_req_X_N, L_err_North_req_X_N, L_err_North_credit_not_zero_req_X_N_grant_N, L_err_North_credit_zero_or_not_req_X_N_not_grant_N, L_err_East_req_X_E, L_err_East_credit_not_zero_req_X_E_grant_E, L_err_East_credit_zero_or_not_req_X_E_not_grant_E, L_err_West_req_X_W, L_err_West_credit_not_zero_req_X_W_grant_W, L_err_West_credit_zero_or_not_req_X_W_not_grant_W, L_err_South_req_X_S, L_err_South_credit_not_zero_req_X_S_grant_S, L_err_South_credit_zero_or_not_req_X_S_not_grant_S, L_err_Local_req_X_L, L_err_Local_credit_not_zero_req_X_L_grant_L, L_err_Local_credit_zero_or_not_req_X_L_not_grant_L, L_err_IDLE_req_X_E, L_err_North_req_X_E, L_err_East_req_X_W, L_err_West_req_X_S, L_err_South_req_X_L, L_err_Local_req_X_N, L_err_IDLE_req_X_W, L_err_North_req_X_W, L_err_East_req_X_S, L_err_West_req_X_L, L_err_South_req_X_N, L_err_Local_req_X_E, L_err_IDLE_req_X_S, L_err_North_req_X_S, L_err_East_req_X_L, L_err_West_req_X_N, L_err_South_req_X_E, L_err_Local_req_X_W, L_err_IDLE_req_X_L, L_err_North_req_X_L, L_err_East_req_X_N, L_err_West_req_X_E, L_err_South_req_X_W, L_err_Local_req_X_S, L_arbiter_out_err_state_in_onehot, L_arbiter_out_err_no_request_grants, L_err_request_IDLE_state, L_err_request_IDLE_not_Grants, L_err_state_North_Invalid_Grant,L_err_state_East_Invalid_Grant, L_err_state_West_Invalid_Grant, L_err_state_South_Invalid_Grant, L_err_state_Local_Invalid_Grant, L_err_Grants_onehot_or_all_zero : std_logic; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Signals needed for grouping checkers to model turn/path faults signal N_FIFO_checkers_ORed, W_FIFO_checkers_ORed, L_FIFO_checkers_ORed : std_logic; signal W2N_turn_fault, N2W_turn_fault : std_logic; signal not_W2N_turn_fault, not_N2W_turn_fault : std_logic; signal L2W_fault, L2N_fault, W2L_fault, N2L_fault : std_logic; signal not_L2W_fault, not_L2N_fault, not_W2L_fault, not_N2L_fault : std_logic; -- Just used temporarily for debugging purposes! signal N_LBDR_checkers_ORed, W_LBDR_checkers_ORed, L_LBDR_checkers_ORed : std_logic; signal Allocator_checkers_ORed : std_logic; --signal turn_faults_sig : std_logic_vector(19 downto 0); ------------------------------------------------------------------------------------------------- -- Added because of the chain we make for sending faulty values --------------------------------- -- The chain is : L, N, E, W and S FIFO, then L, N, E, W and S LBDR, ---------------------------- -- then L, N, E, W and S Arbiter_in, -------------------- -- then L, N, E, W and S Arbiter_out and then Allocator's interlal logic ??!! -- ------------------------------------------------------------------------------------------------- --TODO: the chains should be fixed! --Fixed! signal fault_DO_serial_L_FIFO_to_N_FIFO, fault_DO_serial_N_FIFO_to_W_FIFO: std_logic; signal fault_DO_serial_W_FIFO_to_L_LBDR, fault_DO_serial_L_LBDR_to_N_LBDR: std_logic; signal fault_DO_serial_N_LBDR_to_W_LBDR, fault_DO_serial_W_LBDR_to_Allocator: std_logic; ------------------------------------------------------------------ ------------------------------------------------------------------ begin not_W2N_turn_fault <= not W2N_turn_fault; not_N2W_turn_fault <= not N2W_turn_fault; not_L2W_fault <= not L2W_fault; not_L2N_fault <= not L2N_fault; not_W2L_fault <= not W2L_fault; not_N2L_fault <= not N2L_fault; -- FIFO contributes to all turns and paths, therefore, for each turn or path (for the input direction), all the outputs of FIFO checkers -- corresponding to that input are ORed together. -- North N_FIFO_checkers_ORed <= N_err_empty_full or N_err_empty_read_en or N_err_full_write_en or N_err_state_in_onehot or N_err_read_pointer_in_onehot or N_err_write_pointer_in_onehot or N_err_write_en_write_pointer or N_err_not_write_en_write_pointer or N_err_read_pointer_write_pointer_not_empty or N_err_read_pointer_write_pointer_empty or N_err_read_pointer_write_pointer_not_full or N_err_read_pointer_write_pointer_full or N_err_read_pointer_increment or N_err_read_pointer_not_increment or N_err_write_en or N_err_not_write_en or N_err_not_write_en1 or N_err_not_write_en2 or N_err_read_en_mismatch or N_err_read_en_mismatch1 or N_err_fake_credit_read_en_fake_credit_counter_in_increment or N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement or N_err_not_fake_credit_read_en_fake_credit_counter_in_not_change or N_err_fake_credit_not_read_en_fake_credit_counter_in_not_change or N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change or N_err_fake_credit_read_en_credit_out or N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out or N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out or N_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit or N_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change or N_err_state_out_Idle_not_fault_out_not_fake_credit or N_err_state_out_Idle_not_fault_out_not_fault_info_in or N_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal or N_err_state_out_Idle_fault_out_fake_credit or N_err_state_out_Idle_fault_out_state_in_Packet_drop or N_err_state_out_Idle_fault_out_fault_info_in or N_err_state_out_Idle_fault_out_faulty_packet_in or N_err_state_out_Idle_not_health_info or N_err_state_out_Idle_not_write_fake_flit or N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit or N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit or N_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit or N_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in or N_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit or N_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop or N_err_state_out_Header_flit_valid_in_fault_out_fault_info_in or N_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in or N_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change or N_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Header_flit_not_valid_in_not_fault_info_in or N_err_state_out_Header_flit_not_valid_in_not_write_fake_flit or N_err_state_out_Header_flit_or_Body_flit_not_fake_credit or N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change or N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit or N_err_state_out_Body_flit_valid_in_not_fault_out_health_info or N_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit or N_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in or N_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit or N_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop or N_err_state_out_Body_flit_valid_in_fault_out_fault_info_in or N_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in or N_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change or N_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Body_flit_not_valid_in_not_fault_info_in or N_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info or N_err_state_out_Body_flit_valid_in_fault_out_not_health_info or N_err_state_out_Body_flit_valid_in_not_health_info or N_err_state_out_Body_flit_not_fake_credit or N_err_state_out_Body_flit_not_valid_in_not_write_fake_flit or N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit or N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit or N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in or N_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Tail_flit_valid_in_fault_out_fake_credit or N_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop or N_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in or N_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in or N_err_state_out_Tail_flit_not_valid_in_state_in_Idle or N_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change or N_err_state_out_Tail_flit_not_valid_in_not_fault_info_in or N_err_state_out_Tail_flit_not_valid_in_not_fake_credit or N_err_state_out_Tail_flit_not_write_fake_flit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit or N_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change or N_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change or N_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit or N_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change or N_err_fault_info_fault_info_out_equal or N_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal or N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal or N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in or N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in; -- West W_FIFO_checkers_ORed <= W_err_empty_full or W_err_empty_read_en or W_err_full_write_en or W_err_state_in_onehot or W_err_read_pointer_in_onehot or W_err_write_pointer_in_onehot or W_err_write_en_write_pointer or W_err_not_write_en_write_pointer or W_err_read_pointer_write_pointer_not_empty or W_err_read_pointer_write_pointer_empty or W_err_read_pointer_write_pointer_not_full or W_err_read_pointer_write_pointer_full or W_err_read_pointer_increment or W_err_read_pointer_not_increment or W_err_write_en or W_err_not_write_en or W_err_not_write_en1 or W_err_not_write_en2 or W_err_read_en_mismatch or W_err_read_en_mismatch1 or W_err_fake_credit_read_en_fake_credit_counter_in_increment or W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement or W_err_not_fake_credit_read_en_fake_credit_counter_in_not_change or W_err_fake_credit_not_read_en_fake_credit_counter_in_not_change or W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change or W_err_fake_credit_read_en_credit_out or W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out or W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out or W_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit or W_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change or W_err_state_out_Idle_not_fault_out_not_fake_credit or W_err_state_out_Idle_not_fault_out_not_fault_info_in or W_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal or W_err_state_out_Idle_fault_out_fake_credit or W_err_state_out_Idle_fault_out_state_in_Packet_drop or W_err_state_out_Idle_fault_out_fault_info_in or W_err_state_out_Idle_fault_out_faulty_packet_in or W_err_state_out_Idle_not_health_info or W_err_state_out_Idle_not_write_fake_flit or W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit or W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit or W_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit or W_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in or W_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit or W_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop or W_err_state_out_Header_flit_valid_in_fault_out_fault_info_in or W_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in or W_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change or W_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Header_flit_not_valid_in_not_fault_info_in or W_err_state_out_Header_flit_not_valid_in_not_write_fake_flit or W_err_state_out_Header_flit_or_Body_flit_not_fake_credit or W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change or W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit or W_err_state_out_Body_flit_valid_in_not_fault_out_health_info or W_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit or W_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in or W_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit or W_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop or W_err_state_out_Body_flit_valid_in_fault_out_fault_info_in or W_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in or W_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change or W_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Body_flit_not_valid_in_not_fault_info_in or W_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info or W_err_state_out_Body_flit_valid_in_fault_out_not_health_info or W_err_state_out_Body_flit_valid_in_not_health_info or W_err_state_out_Body_flit_not_fake_credit or W_err_state_out_Body_flit_not_valid_in_not_write_fake_flit or W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit or W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit or W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in or W_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Tail_flit_valid_in_fault_out_fake_credit or W_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop or W_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in or W_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in or W_err_state_out_Tail_flit_not_valid_in_state_in_Idle or W_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change or W_err_state_out_Tail_flit_not_valid_in_not_fault_info_in or W_err_state_out_Tail_flit_not_valid_in_not_fake_credit or W_err_state_out_Tail_flit_not_write_fake_flit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit or W_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change or W_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change or W_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit or W_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change or W_err_fault_info_fault_info_out_equal or W_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal or W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal or W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in or W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in; -- Local L_FIFO_checkers_ORed <= L_err_empty_full or L_err_empty_read_en or L_err_full_write_en or L_err_state_in_onehot or L_err_read_pointer_in_onehot or L_err_write_pointer_in_onehot or L_err_write_en_write_pointer or L_err_not_write_en_write_pointer or L_err_read_pointer_write_pointer_not_empty or L_err_read_pointer_write_pointer_empty or L_err_read_pointer_write_pointer_not_full or L_err_read_pointer_write_pointer_full or L_err_read_pointer_increment or L_err_read_pointer_not_increment or L_err_write_en or L_err_not_write_en or L_err_not_write_en1 or L_err_not_write_en2 or L_err_read_en_mismatch or L_err_read_en_mismatch1 or L_err_fake_credit_read_en_fake_credit_counter_in_increment or L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement or L_err_not_fake_credit_read_en_fake_credit_counter_in_not_change or L_err_fake_credit_not_read_en_fake_credit_counter_in_not_change or L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change or L_err_fake_credit_read_en_credit_out or L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out or L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out or L_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit or L_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change or L_err_state_out_Idle_not_fault_out_not_fake_credit or L_err_state_out_Idle_not_fault_out_not_fault_info_in or L_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal or L_err_state_out_Idle_fault_out_fake_credit or L_err_state_out_Idle_fault_out_state_in_Packet_drop or L_err_state_out_Idle_fault_out_fault_info_in or L_err_state_out_Idle_fault_out_faulty_packet_in or L_err_state_out_Idle_not_health_info or L_err_state_out_Idle_not_write_fake_flit or L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit or L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit or L_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit or L_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in or L_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit or L_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop or L_err_state_out_Header_flit_valid_in_fault_out_fault_info_in or L_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in or L_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change or L_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Header_flit_not_valid_in_not_fault_info_in or L_err_state_out_Header_flit_not_valid_in_not_write_fake_flit or L_err_state_out_Header_flit_or_Body_flit_not_fake_credit or L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change or L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit or L_err_state_out_Body_flit_valid_in_not_fault_out_health_info or L_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit or L_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in or L_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit or L_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop or L_err_state_out_Body_flit_valid_in_fault_out_fault_info_in or L_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in or L_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change or L_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Body_flit_not_valid_in_not_fault_info_in or L_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info or L_err_state_out_Body_flit_valid_in_fault_out_not_health_info or L_err_state_out_Body_flit_valid_in_not_health_info or L_err_state_out_Body_flit_not_fake_credit or L_err_state_out_Body_flit_not_valid_in_not_write_fake_flit or L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit or L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit or L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in or L_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Tail_flit_valid_in_fault_out_fake_credit or L_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop or L_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in or L_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in or L_err_state_out_Tail_flit_not_valid_in_state_in_Idle or L_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change or L_err_state_out_Tail_flit_not_valid_in_not_fault_info_in or L_err_state_out_Tail_flit_not_valid_in_not_fake_credit or L_err_state_out_Tail_flit_not_write_fake_flit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit or L_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change or L_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change or L_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit or L_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change or L_err_fault_info_fault_info_out_equal or L_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal or L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal or L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in or L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- Just for debugging purposes of the checkers! -- LBDR checker outputs ORed -- North -- Routing part checkers N_LBDR_checkers_ORed <= N_err_header_empty_Requests_FF_Requests_in or N_err_tail_Requests_in_all_zero or N_err_tail_empty_Requests_FF_Requests_in or N_err_tail_not_empty_not_grants_Requests_FF_Requests_in or N_err_grants_onehot or N_err_grants_mismatch or N_err_header_tail_Requests_FF_Requests_in or N_err_dst_addr_cur_addr_N1 or N_err_dst_addr_cur_addr_not_N1 or N_err_dst_addr_cur_addr_E1 or N_err_dst_addr_cur_addr_not_E1 or N_err_dst_addr_cur_addr_W1 or N_err_dst_addr_cur_addr_not_W1 or N_err_dst_addr_cur_addr_S1 or N_err_dst_addr_cur_addr_not_S1 or N_err_dst_addr_cur_addr_Req_L_in or N_err_dst_addr_cur_addr_not_Req_L_in or N_err_header_not_empty_faulty_drop_packet_in or -- added according to new design N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or -- added according to new design N_err_header_not_empty_faulty_Req_in_all_zero or -- added according to new design --N_err_header_not_empty_Req_L_in or -- added according to new design N_err_header_not_empty_Req_N_in or N_err_header_not_empty_Req_E_in or N_err_header_not_empty_Req_W_in or N_err_header_not_empty_Req_S_in or N_err_header_empty_packet_drop_in_packet_drop_equal or N_err_tail_not_empty_packet_drop_not_packet_drop_in or N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or N_err_packet_drop_order or -- Cx_Reconf checkers N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Rxy_Reconf checkers N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal; -- West -- Routing part checkers W_LBDR_checkers_ORed <= W_err_header_empty_Requests_FF_Requests_in or W_err_tail_Requests_in_all_zero or W_err_tail_empty_Requests_FF_Requests_in or W_err_tail_not_empty_not_grants_Requests_FF_Requests_in or W_err_grants_onehot or W_err_grants_mismatch or W_err_header_tail_Requests_FF_Requests_in or W_err_dst_addr_cur_addr_N1 or W_err_dst_addr_cur_addr_not_N1 or W_err_dst_addr_cur_addr_E1 or W_err_dst_addr_cur_addr_not_E1 or W_err_dst_addr_cur_addr_W1 or W_err_dst_addr_cur_addr_not_W1 or W_err_dst_addr_cur_addr_S1 or W_err_dst_addr_cur_addr_not_S1 or W_err_dst_addr_cur_addr_Req_L_in or W_err_dst_addr_cur_addr_not_Req_L_in or W_err_header_not_empty_faulty_drop_packet_in or -- added according to new design W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or -- added according to new design W_err_header_not_empty_faulty_Req_in_all_zero or -- added according to new design --W_err_header_not_empty_Req_L_in or -- added according to new design W_err_header_not_empty_Req_N_in or W_err_header_not_empty_Req_E_in or W_err_header_not_empty_Req_W_in or W_err_header_not_empty_Req_S_in or W_err_header_empty_packet_drop_in_packet_drop_equal or W_err_tail_not_empty_packet_drop_not_packet_drop_in or W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or W_err_packet_drop_order or -- Cx_Reconf checkers W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Rxy_Reconf checkers W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal; -- Local -- Routing part checkers L_LBDR_checkers_ORed <= L_err_header_empty_Requests_FF_Requests_in or L_err_tail_Requests_in_all_zero or L_err_tail_empty_Requests_FF_Requests_in or L_err_tail_not_empty_not_grants_Requests_FF_Requests_in or L_err_grants_onehot or L_err_grants_mismatch or L_err_header_tail_Requests_FF_Requests_in or L_err_dst_addr_cur_addr_N1 or L_err_dst_addr_cur_addr_not_N1 or L_err_dst_addr_cur_addr_E1 or L_err_dst_addr_cur_addr_not_E1 or L_err_dst_addr_cur_addr_W1 or L_err_dst_addr_cur_addr_not_W1 or L_err_dst_addr_cur_addr_S1 or L_err_dst_addr_cur_addr_not_S1 or L_err_dst_addr_cur_addr_Req_L_in or L_err_dst_addr_cur_addr_not_Req_L_in or L_err_header_not_empty_faulty_drop_packet_in or -- added according to new design L_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or -- added according to new design L_err_header_not_empty_faulty_Req_in_all_zero or -- added according to new design --L_err_header_not_empty_Req_L_in or -- added according to new design L_err_header_not_empty_Req_N_in or L_err_header_not_empty_Req_E_in or L_err_header_not_empty_Req_W_in or L_err_header_not_empty_Req_S_in or L_err_header_empty_packet_drop_in_packet_drop_equal or L_err_tail_not_empty_packet_drop_not_packet_drop_in or L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or L_err_packet_drop_order or -- Cx_Reconf checkers L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Rxy_Reconf checkers L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- Allocator checker outputs ORed ! -- Allocator logic checker outputs Allocator_checkers_ORed <= err_grant_N_N_sig_not_empty_N_grant_N_N or err_not_grant_N_N_sig_or_empty_N_not_grant_N_N or err_grant_N_E_sig_not_empty_E_grant_N_E or err_not_grant_N_E_sig_or_empty_E_not_grant_N_E or err_grant_N_W_sig_not_empty_W_grant_N_W or err_not_grant_N_W_sig_or_empty_W_not_grant_N_W or err_grant_N_S_sig_not_empty_S_grant_N_S or err_not_grant_N_S_sig_or_empty_S_not_grant_N_S or err_grant_N_L_sig_not_empty_L_grant_N_L or err_not_grant_N_L_sig_or_empty_L_not_grant_N_L or err_grant_E_N_sig_not_empty_N_grant_E_N or err_not_grant_E_N_sig_or_empty_N_not_grant_E_N or err_grant_E_E_sig_not_empty_E_grant_E_E or err_not_grant_E_E_sig_or_empty_E_not_grant_E_E or err_grant_E_W_sig_not_empty_W_grant_E_W or err_not_grant_E_W_sig_or_empty_W_not_grant_E_W or err_grant_E_S_sig_not_empty_S_grant_E_S or err_not_grant_E_S_sig_or_empty_S_not_grant_E_S or err_grant_E_L_sig_not_empty_L_grant_E_L or err_not_grant_E_L_sig_or_empty_L_not_grant_E_L or err_grant_W_N_sig_not_empty_N_grant_W_N or err_not_grant_W_N_sig_or_empty_N_not_grant_W_N or err_grant_W_E_sig_not_empty_E_grant_W_E or err_not_grant_W_E_sig_or_empty_E_not_grant_W_E or err_grant_W_W_sig_not_empty_W_grant_W_W or err_not_grant_W_W_sig_or_empty_W_not_grant_W_W or err_grant_W_S_sig_not_empty_S_grant_W_S or err_not_grant_W_S_sig_or_empty_S_not_grant_W_S or err_grant_W_L_sig_not_empty_L_grant_W_L or err_not_grant_W_L_sig_or_empty_L_not_grant_W_L or err_grant_S_N_sig_not_empty_N_grant_S_N or err_not_grant_S_N_sig_or_empty_N_not_grant_S_N or err_grant_S_E_sig_not_empty_E_grant_S_E or err_not_grant_S_E_sig_or_empty_E_not_grant_S_E or err_grant_S_W_sig_not_empty_W_grant_S_W or err_not_grant_S_W_sig_or_empty_W_not_grant_S_W or err_grant_S_S_sig_not_empty_S_grant_S_S or err_not_grant_S_S_sig_or_empty_S_not_grant_S_S or err_grant_S_L_sig_not_empty_L_grant_S_L or err_not_grant_S_L_sig_or_empty_L_not_grant_S_L or err_grant_L_N_sig_not_empty_N_grant_L_N or err_not_grant_L_N_sig_or_empty_N_not_grant_L_N or err_grant_L_E_sig_not_empty_E_grant_L_E or err_not_grant_L_E_sig_or_empty_E_not_grant_L_E or err_grant_L_W_sig_not_empty_W_grant_L_W or err_not_grant_L_W_sig_or_empty_W_not_grant_L_W or err_grant_L_S_sig_not_empty_S_grant_L_S or err_not_grant_L_S_sig_or_empty_S_not_grant_L_S or err_grant_L_L_sig_not_empty_L_grant_L_L or err_not_grant_L_L_sig_or_empty_L_not_grant_L_L or err_grant_signals_not_empty_grant_N or err_not_grant_signals_empty_not_grant_N or err_grant_signals_not_empty_grant_E or err_not_grant_signals_empty_not_grant_E or err_grant_signals_not_empty_grant_W or err_not_grant_signals_empty_not_grant_W or err_grant_signals_not_empty_grant_S or err_not_grant_signals_empty_not_grant_S or err_grant_signals_not_empty_grant_L or err_not_grant_signals_empty_not_grant_L or err_grants_valid_not_match or -- Allocator credit counter logic checker outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_N_credit_counter_N_out_increment or err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change or err_grant_N_credit_counter_N_out_decrement or err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change or err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal or err_credit_in_E_credit_counter_E_out_increment or err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change or err_grant_E_credit_counter_E_out_decrement or err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change or err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal or err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_W_credit_counter_W_out_increment or err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change or err_grant_W_credit_counter_W_out_decrement or err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change or err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal or err_credit_in_S_credit_counter_S_out_increment or err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change or err_grant_S_credit_counter_S_out_decrement or err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change or err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal or err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal or err_credit_in_L_credit_counter_L_out_increment or err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change or err_grant_L_credit_counter_L_out_decrement or err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change or err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal or -- Arbiter_in checker outputs -- North Arbiter_in checker outputs N_err_Requests_state_in_state_not_equal or N_err_IDLE_Req_N or N_err_IDLE_grant_N or N_err_North_Req_N or N_err_North_grant_N or N_err_East_Req_E or N_err_East_grant_E or N_err_West_Req_W or N_err_West_grant_W or N_err_South_Req_S or N_err_South_grant_S or N_err_Local_Req_L or N_err_Local_grant_L or N_err_IDLE_Req_E or N_err_IDLE_grant_E or N_err_North_Req_E or N_err_North_grant_E or N_err_East_Req_W or N_err_East_grant_W or N_err_West_Req_S or N_err_West_grant_S or N_err_South_Req_L or N_err_South_grant_L or N_err_Local_Req_N or N_err_Local_grant_N or N_err_IDLE_Req_W or N_err_IDLE_grant_W or N_err_North_Req_W or N_err_North_grant_W or N_err_East_Req_S or N_err_East_grant_S or N_err_West_Req_L or N_err_West_grant_L or N_err_South_Req_N or N_err_South_grant_N or N_err_Local_Req_E or N_err_Local_grant_E or N_err_IDLE_Req_S or N_err_IDLE_grant_S or N_err_North_Req_S or N_err_North_grant_S or N_err_East_Req_L or N_err_East_grant_L or N_err_West_Req_N or N_err_West_grant_N or N_err_South_Req_E or N_err_South_grant_E or N_err_Local_Req_W or N_err_Local_grant_W or N_err_IDLE_Req_L or N_err_IDLE_grant_L or N_err_North_Req_L or N_err_North_grant_L or N_err_East_Req_N or N_err_East_grant_N or N_err_West_Req_E or N_err_West_grant_E or N_err_South_Req_W or N_err_South_grant_W or N_err_Local_Req_S or N_err_Local_grant_S or N_err_arbiter_state_in_onehot or N_err_no_request_grants or N_err_request_no_grants or N_err_no_Req_N_grant_N or N_err_no_Req_E_grant_E or N_err_no_Req_W_grant_W or N_err_no_Req_S_grant_S or N_err_no_Req_L_grant_L or -- East Arbiter_in checker outputs E_err_Requests_state_in_state_not_equal or E_err_IDLE_Req_N or E_err_IDLE_grant_N or E_err_North_Req_N or E_err_North_grant_N or E_err_East_Req_E or E_err_East_grant_E or E_err_West_Req_W or E_err_West_grant_W or E_err_South_Req_S or E_err_South_grant_S or E_err_Local_Req_L or E_err_Local_grant_L or E_err_IDLE_Req_E or E_err_IDLE_grant_E or E_err_North_Req_E or E_err_North_grant_E or E_err_East_Req_W or E_err_East_grant_W or E_err_West_Req_S or E_err_West_grant_S or E_err_South_Req_L or E_err_South_grant_L or E_err_Local_Req_N or E_err_Local_grant_N or E_err_IDLE_Req_W or E_err_IDLE_grant_W or E_err_North_Req_W or E_err_North_grant_W or E_err_East_Req_S or E_err_East_grant_S or E_err_West_Req_L or E_err_West_grant_L or E_err_South_Req_N or E_err_South_grant_N or E_err_Local_Req_E or E_err_Local_grant_E or E_err_IDLE_Req_S or E_err_IDLE_grant_S or E_err_North_Req_S or E_err_North_grant_S or E_err_East_Req_L or E_err_East_grant_L or E_err_West_Req_N or E_err_West_grant_N or E_err_South_Req_E or E_err_South_grant_E or E_err_Local_Req_W or E_err_Local_grant_W or E_err_IDLE_Req_L or E_err_IDLE_grant_L or E_err_North_Req_L or E_err_North_grant_L or E_err_East_Req_N or E_err_East_grant_N or E_err_West_Req_E or E_err_West_grant_E or E_err_South_Req_W or E_err_South_grant_W or E_err_Local_Req_S or E_err_Local_grant_S or E_err_arbiter_state_in_onehot or E_err_no_request_grants or E_err_request_no_grants or E_err_no_Req_N_grant_N or E_err_no_Req_E_grant_E or E_err_no_Req_W_grant_W or E_err_no_Req_S_grant_S or E_err_no_Req_L_grant_L or -- West Arbiter_in checker outputs W_err_Requests_state_in_state_not_equal or W_err_IDLE_Req_N or W_err_IDLE_grant_N or W_err_North_Req_N or W_err_North_grant_N or W_err_East_Req_E or W_err_East_grant_E or W_err_West_Req_W or W_err_West_grant_W or W_err_South_Req_S or W_err_South_grant_S or W_err_Local_Req_L or W_err_Local_grant_L or W_err_IDLE_Req_E or W_err_IDLE_grant_E or W_err_North_Req_E or W_err_North_grant_E or W_err_East_Req_W or W_err_East_grant_W or W_err_West_Req_S or W_err_West_grant_S or W_err_South_Req_L or W_err_South_grant_L or W_err_Local_Req_N or W_err_Local_grant_N or W_err_IDLE_Req_W or W_err_IDLE_grant_W or W_err_North_Req_W or W_err_North_grant_W or W_err_East_Req_S or W_err_East_grant_S or W_err_West_Req_L or W_err_West_grant_L or W_err_South_Req_N or W_err_South_grant_N or W_err_Local_Req_E or W_err_Local_grant_E or W_err_IDLE_Req_S or W_err_IDLE_grant_S or W_err_North_Req_S or W_err_North_grant_S or W_err_East_Req_L or W_err_East_grant_L or W_err_West_Req_N or W_err_West_grant_N or W_err_South_Req_E or W_err_South_grant_E or W_err_Local_Req_W or W_err_Local_grant_W or W_err_IDLE_Req_L or W_err_IDLE_grant_L or W_err_North_Req_L or W_err_North_grant_L or W_err_East_Req_N or W_err_East_grant_N or W_err_West_Req_E or W_err_West_grant_E or W_err_South_Req_W or W_err_South_grant_W or W_err_Local_Req_S or W_err_Local_grant_S or W_err_arbiter_state_in_onehot or W_err_no_request_grants or W_err_request_no_grants or W_err_no_Req_N_grant_N or W_err_no_Req_E_grant_E or W_err_no_Req_W_grant_W or W_err_no_Req_S_grant_S or W_err_no_Req_L_grant_L or -- South Arbiter_in checker outputs S_err_Requests_state_in_state_not_equal or S_err_IDLE_Req_N or S_err_IDLE_grant_N or S_err_North_Req_N or S_err_North_grant_N or S_err_East_Req_E or S_err_East_grant_E or S_err_West_Req_W or S_err_West_grant_W or S_err_South_Req_S or S_err_South_grant_S or S_err_Local_Req_L or S_err_Local_grant_L or S_err_IDLE_Req_E or S_err_IDLE_grant_E or S_err_North_Req_E or S_err_North_grant_E or S_err_East_Req_W or S_err_East_grant_W or S_err_West_Req_S or S_err_West_grant_S or S_err_South_Req_L or S_err_South_grant_L or S_err_Local_Req_N or S_err_Local_grant_N or S_err_IDLE_Req_W or S_err_IDLE_grant_W or S_err_North_Req_W or S_err_North_grant_W or S_err_East_Req_S or S_err_East_grant_S or S_err_West_Req_L or S_err_West_grant_L or S_err_South_Req_N or S_err_South_grant_N or S_err_Local_Req_E or S_err_Local_grant_E or S_err_IDLE_Req_S or S_err_IDLE_grant_S or S_err_North_Req_S or S_err_North_grant_S or S_err_East_Req_L or S_err_East_grant_L or S_err_West_Req_N or S_err_West_grant_N or S_err_South_Req_E or S_err_South_grant_E or S_err_Local_Req_W or S_err_Local_grant_W or S_err_IDLE_Req_L or S_err_IDLE_grant_L or S_err_North_Req_L or S_err_North_grant_L or S_err_East_Req_N or S_err_East_grant_N or S_err_West_Req_E or S_err_West_grant_E or S_err_South_Req_W or S_err_South_grant_W or S_err_Local_Req_S or S_err_Local_grant_S or S_err_arbiter_state_in_onehot or S_err_no_request_grants or S_err_request_no_grants or S_err_no_Req_N_grant_N or S_err_no_Req_E_grant_E or S_err_no_Req_W_grant_W or S_err_no_Req_S_grant_S or S_err_no_Req_L_grant_L or -- Local Arbiter_in checker outputs L_err_Requests_state_in_state_not_equal or L_err_IDLE_Req_N or L_err_IDLE_grant_N or L_err_North_Req_N or L_err_North_grant_N or L_err_East_Req_E or L_err_East_grant_E or L_err_West_Req_W or L_err_West_grant_W or L_err_South_Req_S or L_err_South_grant_S or L_err_Local_Req_L or L_err_Local_grant_L or L_err_IDLE_Req_E or L_err_IDLE_grant_E or L_err_North_Req_E or L_err_North_grant_E or L_err_East_Req_W or L_err_East_grant_W or L_err_West_Req_S or L_err_West_grant_S or L_err_South_Req_L or L_err_South_grant_L or L_err_Local_Req_N or L_err_Local_grant_N or L_err_IDLE_Req_W or L_err_IDLE_grant_W or L_err_North_Req_W or L_err_North_grant_W or L_err_East_Req_S or L_err_East_grant_S or L_err_West_Req_L or L_err_West_grant_L or L_err_South_Req_N or L_err_South_grant_N or L_err_Local_Req_E or L_err_Local_grant_E or L_err_IDLE_Req_S or L_err_IDLE_grant_S or L_err_North_Req_S or L_err_North_grant_S or L_err_East_Req_L or L_err_East_grant_L or L_err_West_Req_N or L_err_West_grant_N or L_err_South_Req_E or L_err_South_grant_E or L_err_Local_Req_W or L_err_Local_grant_W or L_err_IDLE_Req_L or L_err_IDLE_grant_L or L_err_North_Req_L or L_err_North_grant_L or L_err_East_Req_N or L_err_East_grant_N or L_err_West_Req_E or L_err_West_grant_E or L_err_South_Req_W or L_err_South_grant_W or L_err_Local_Req_S or L_err_Local_grant_S or L_err_arbiter_state_in_onehot or L_err_no_request_grants or L_err_request_no_grants or L_err_no_Req_N_grant_N or L_err_no_Req_E_grant_E or L_err_no_Req_W_grant_W or L_err_no_Req_S_grant_S or L_err_no_Req_L_grant_L or -- Arbiter_out checker outputs -- North Arbiter_out checker outputs N_arbiter_out_err_Requests_state_in_state_not_equal or N_err_IDLE_req_X_N or N_err_North_req_X_N or N_err_North_credit_not_zero_req_X_N_grant_N or N_err_North_credit_zero_or_not_req_X_N_not_grant_N or N_err_East_req_X_E or N_err_East_credit_not_zero_req_X_E_grant_E or N_err_East_credit_zero_or_not_req_X_E_not_grant_E or N_err_West_req_X_W or N_err_West_credit_not_zero_req_X_W_grant_W or N_err_West_credit_zero_or_not_req_X_W_not_grant_W or N_err_South_req_X_S or N_err_South_credit_not_zero_req_X_S_grant_S or N_err_South_credit_zero_or_not_req_X_S_not_grant_S or N_err_Local_req_X_L or N_err_Local_credit_not_zero_req_X_L_grant_L or N_err_Local_credit_zero_or_not_req_X_L_not_grant_L or N_err_IDLE_req_X_E or N_err_North_req_X_E or N_err_East_req_X_W or N_err_West_req_X_S or N_err_South_req_X_L or N_err_Local_req_X_N or N_err_IDLE_req_X_W or N_err_North_req_X_W or N_err_East_req_X_S or N_err_West_req_X_L or N_err_South_req_X_N or N_err_Local_req_X_E or N_err_IDLE_req_X_S or N_err_North_req_X_S or N_err_East_req_X_L or N_err_West_req_X_N or N_err_South_req_X_E or N_err_Local_req_X_W or N_err_IDLE_req_X_L or N_err_North_req_X_L or N_err_East_req_X_N or N_err_West_req_X_E or N_err_South_req_X_W or N_err_Local_req_X_S or N_arbiter_out_err_state_in_onehot or N_arbiter_out_err_no_request_grants or N_err_request_IDLE_state or N_err_request_IDLE_not_Grants or N_err_state_North_Invalid_Grant or N_err_state_East_Invalid_Grant or N_err_state_West_Invalid_Grant or N_err_state_South_Invalid_Grant or N_err_state_Local_Invalid_Grant or N_err_Grants_onehot_or_all_zero or -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal or E_err_IDLE_req_X_N or E_err_North_req_X_N or E_err_North_credit_not_zero_req_X_N_grant_N or E_err_North_credit_zero_or_not_req_X_N_not_grant_N or E_err_East_req_X_E or E_err_East_credit_not_zero_req_X_E_grant_E or E_err_East_credit_zero_or_not_req_X_E_not_grant_E or E_err_West_req_X_W or E_err_West_credit_not_zero_req_X_W_grant_W or E_err_West_credit_zero_or_not_req_X_W_not_grant_W or E_err_South_req_X_S or E_err_South_credit_not_zero_req_X_S_grant_S or E_err_South_credit_zero_or_not_req_X_S_not_grant_S or E_err_Local_req_X_L or E_err_Local_credit_not_zero_req_X_L_grant_L or E_err_Local_credit_zero_or_not_req_X_L_not_grant_L or E_err_IDLE_req_X_E or E_err_North_req_X_E or E_err_East_req_X_W or E_err_West_req_X_S or E_err_South_req_X_L or E_err_Local_req_X_N or E_err_IDLE_req_X_W or E_err_North_req_X_W or E_err_East_req_X_S or E_err_West_req_X_L or E_err_South_req_X_N or E_err_Local_req_X_E or E_err_IDLE_req_X_S or E_err_North_req_X_S or E_err_East_req_X_L or E_err_West_req_X_N or E_err_South_req_X_E or E_err_Local_req_X_W or E_err_IDLE_req_X_L or E_err_North_req_X_L or E_err_East_req_X_N or E_err_West_req_X_E or E_err_South_req_X_W or E_err_Local_req_X_S or E_arbiter_out_err_state_in_onehot or E_arbiter_out_err_no_request_grants or E_err_request_IDLE_state or E_err_request_IDLE_not_Grants or E_err_state_North_Invalid_Grant or E_err_state_East_Invalid_Grant or E_err_state_West_Invalid_Grant or E_err_state_South_Invalid_Grant or E_err_state_Local_Invalid_Grant or E_err_Grants_onehot_or_all_zero or -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal or W_err_IDLE_req_X_N or W_err_North_req_X_N or W_err_North_credit_not_zero_req_X_N_grant_N or W_err_North_credit_zero_or_not_req_X_N_not_grant_N or W_err_East_req_X_E or W_err_East_credit_not_zero_req_X_E_grant_E or W_err_East_credit_zero_or_not_req_X_E_not_grant_E or W_err_West_req_X_W or W_err_West_credit_not_zero_req_X_W_grant_W or W_err_West_credit_zero_or_not_req_X_W_not_grant_W or W_err_South_req_X_S or W_err_South_credit_not_zero_req_X_S_grant_S or W_err_South_credit_zero_or_not_req_X_S_not_grant_S or W_err_Local_req_X_L or W_err_Local_credit_not_zero_req_X_L_grant_L or W_err_Local_credit_zero_or_not_req_X_L_not_grant_L or W_err_IDLE_req_X_E or W_err_North_req_X_E or W_err_East_req_X_W or W_err_West_req_X_S or W_err_South_req_X_L or W_err_Local_req_X_N or W_err_IDLE_req_X_W or W_err_North_req_X_W or W_err_East_req_X_S or W_err_West_req_X_L or W_err_South_req_X_N or W_err_Local_req_X_E or W_err_IDLE_req_X_S or W_err_North_req_X_S or W_err_East_req_X_L or W_err_West_req_X_N or W_err_South_req_X_E or W_err_Local_req_X_W or W_err_IDLE_req_X_L or W_err_North_req_X_L or W_err_East_req_X_N or W_err_West_req_X_E or W_err_South_req_X_W or W_err_Local_req_X_S or W_arbiter_out_err_state_in_onehot or W_arbiter_out_err_no_request_grants or W_err_request_IDLE_state or W_err_request_IDLE_not_Grants or W_err_state_North_Invalid_Grant or W_err_state_East_Invalid_Grant or W_err_state_West_Invalid_Grant or W_err_state_South_Invalid_Grant or W_err_state_Local_Invalid_Grant or W_err_Grants_onehot_or_all_zero or -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal or S_err_IDLE_req_X_N or S_err_North_req_X_N or S_err_North_credit_not_zero_req_X_N_grant_N or S_err_North_credit_zero_or_not_req_X_N_not_grant_N or S_err_East_req_X_E or S_err_East_credit_not_zero_req_X_E_grant_E or S_err_East_credit_zero_or_not_req_X_E_not_grant_E or S_err_West_req_X_W or S_err_West_credit_not_zero_req_X_W_grant_W or S_err_West_credit_zero_or_not_req_X_W_not_grant_W or S_err_South_req_X_S or S_err_South_credit_not_zero_req_X_S_grant_S or S_err_South_credit_zero_or_not_req_X_S_not_grant_S or S_err_Local_req_X_L or S_err_Local_credit_not_zero_req_X_L_grant_L or S_err_Local_credit_zero_or_not_req_X_L_not_grant_L or S_err_IDLE_req_X_E or S_err_North_req_X_E or S_err_East_req_X_W or S_err_West_req_X_S or S_err_South_req_X_L or S_err_Local_req_X_N or S_err_IDLE_req_X_W or S_err_North_req_X_W or S_err_East_req_X_S or S_err_West_req_X_L or S_err_South_req_X_N or S_err_Local_req_X_E or S_err_IDLE_req_X_S or S_err_North_req_X_S or S_err_East_req_X_L or S_err_West_req_X_N or S_err_South_req_X_E or S_err_Local_req_X_W or S_err_IDLE_req_X_L or S_err_North_req_X_L or S_err_East_req_X_N or S_err_West_req_X_E or S_err_South_req_X_W or S_err_Local_req_X_S or S_arbiter_out_err_state_in_onehot or S_arbiter_out_err_no_request_grants or S_err_request_IDLE_state or S_err_request_IDLE_not_Grants or S_err_state_North_Invalid_Grant or S_err_state_East_Invalid_Grant or S_err_state_West_Invalid_Grant or S_err_state_South_Invalid_Grant or S_err_state_Local_Invalid_Grant or S_err_Grants_onehot_or_all_zero or -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal or L_err_IDLE_req_X_N or L_err_North_req_X_N or L_err_North_credit_not_zero_req_X_N_grant_N or L_err_North_credit_zero_or_not_req_X_N_not_grant_N or L_err_East_req_X_E or L_err_East_credit_not_zero_req_X_E_grant_E or L_err_East_credit_zero_or_not_req_X_E_not_grant_E or L_err_West_req_X_W or L_err_West_credit_not_zero_req_X_W_grant_W or L_err_West_credit_zero_or_not_req_X_W_not_grant_W or L_err_South_req_X_S or L_err_South_credit_not_zero_req_X_S_grant_S or L_err_South_credit_zero_or_not_req_X_S_not_grant_S or L_err_Local_req_X_L or L_err_Local_credit_not_zero_req_X_L_grant_L or L_err_Local_credit_zero_or_not_req_X_L_not_grant_L or L_err_IDLE_req_X_E or L_err_North_req_X_E or L_err_East_req_X_W or L_err_West_req_X_S or L_err_South_req_X_L or L_err_Local_req_X_N or L_err_IDLE_req_X_W or L_err_North_req_X_W or L_err_East_req_X_S or L_err_West_req_X_L or L_err_South_req_X_N or L_err_Local_req_X_E or L_err_IDLE_req_X_S or L_err_North_req_X_S or L_err_East_req_X_L or L_err_West_req_X_N or L_err_South_req_X_E or L_err_Local_req_X_W or L_err_IDLE_req_X_L or L_err_North_req_X_L or L_err_East_req_X_N or L_err_West_req_X_E or L_err_South_req_X_W or L_err_Local_req_X_S or L_arbiter_out_err_state_in_onehot or L_arbiter_out_err_no_request_grants or L_err_request_IDLE_state or L_err_request_IDLE_not_Grants or L_err_state_North_Invalid_Grant or L_err_state_East_Invalid_Grant or L_err_state_West_Invalid_Grant or L_err_state_South_Invalid_Grant or L_err_state_Local_Invalid_Grant or L_err_Grants_onehot_or_all_zero; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- Turn fault checkers -- FIFO N2W_turn_fault <= N_FIFO_checkers_ORed or -- LBDR N_err_header_empty_Requests_FF_Requests_in or N_err_tail_Requests_in_all_zero or N_err_tail_empty_Requests_FF_Requests_in or N_err_tail_not_empty_not_grants_Requests_FF_Requests_in or N_err_grants_onehot or N_err_grants_mismatch or N_err_header_tail_Requests_FF_Requests_in or N_err_dst_addr_cur_addr_W1 or N_err_dst_addr_cur_addr_not_W1 or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or N_err_header_not_empty_Req_W_in or N_err_header_empty_packet_drop_in_packet_drop_equal or N_err_tail_not_empty_packet_drop_not_packet_drop_in or N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or N_err_packet_drop_order or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator N_err_Requests_state_in_state_not_equal or N_err_West_Req_W or N_err_West_grant_W or N_err_East_Req_W or N_err_East_grant_W or N_err_IDLE_Req_W or N_err_IDLE_grant_W or N_err_North_Req_W or N_err_North_grant_W or N_err_Local_Req_W or N_err_Local_grant_W or N_err_South_Req_W or N_err_South_grant_W or N_err_state_in_onehot or N_err_no_request_grants or N_err_request_no_grants or N_err_no_Req_W_grant_W or W_arbiter_out_err_Requests_state_in_state_not_equal or W_err_IDLE_req_X_N or W_err_North_req_X_N or W_err_North_credit_not_zero_req_X_N_grant_N or W_err_North_credit_zero_or_not_req_X_N_not_grant_N or W_err_Local_req_X_N or W_arbiter_out_err_state_in_onehot or W_arbiter_out_err_no_request_grants or W_err_request_IDLE_state or W_err_request_IDLE_not_Grants or W_err_Grants_onehot_or_all_zero or err_grant_W_N_sig_not_empty_N_grant_W_N or err_not_grant_W_N_sig_or_empty_N_not_grant_W_N or err_grant_signals_not_empty_grant_W or err_not_grant_signals_empty_not_grant_W or err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_W_credit_counter_W_out_increment or err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change or err_grant_W_credit_counter_W_out_decrement or err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change or err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal; -- FIFO W2N_turn_fault <= W_FIFO_checkers_ORed or -- LBDR W_err_header_empty_Requests_FF_Requests_in or W_err_tail_Requests_in_all_zero or W_err_tail_empty_Requests_FF_Requests_in or W_err_tail_not_empty_not_grants_Requests_FF_Requests_in or W_err_grants_onehot or W_err_grants_mismatch or W_err_header_tail_Requests_FF_Requests_in or W_err_dst_addr_cur_addr_N1 or W_err_dst_addr_cur_addr_not_N1 or W_err_header_not_empty_faulty_drop_packet_in or W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or W_err_header_not_empty_faulty_Req_in_all_zero or W_err_header_not_empty_Req_N_in or W_err_header_empty_packet_drop_in_packet_drop_equal or W_err_tail_not_empty_packet_drop_not_packet_drop_in or W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or W_err_packet_drop_order or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator W_err_Requests_state_in_state_not_equal or W_err_IDLE_Req_N or W_err_IDLE_grant_N or W_err_North_Req_N or W_err_North_grant_N or W_err_Local_Req_N or W_err_Local_grant_N or W_err_South_Req_N or W_err_South_grant_N or W_err_West_Req_N or W_err_West_grant_N or W_err_East_Req_N or W_err_East_grant_N or W_err_state_in_onehot or W_err_no_request_grants or W_err_request_no_grants or W_err_no_Req_N_grant_N or N_arbiter_out_err_Requests_state_in_state_not_equal or N_err_West_req_X_W or N_err_West_credit_not_zero_req_X_W_grant_W or N_err_West_credit_zero_or_not_req_X_W_not_grant_W or N_err_East_req_X_W or N_err_IDLE_req_X_W or N_err_North_req_X_W or N_err_Local_req_X_W or N_err_South_req_X_W or N_arbiter_out_err_state_in_onehot or N_arbiter_out_err_no_request_grants or N_err_request_IDLE_state or N_err_request_IDLE_not_Grants or N_err_Grants_onehot_or_all_zero or err_grant_N_W_sig_not_empty_W_grant_N_W or err_not_grant_N_W_sig_or_empty_W_not_grant_N_W or err_grant_signals_not_empty_grant_N or err_not_grant_signals_empty_not_grant_N or err_grants_valid_not_match or err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_N_credit_counter_N_out_increment or err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change or err_grant_N_credit_counter_N_out_decrement or err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change or err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal; -- Checkers for Paths/turns from/to Local port -- FIFO L2N_fault <= L_FIFO_checkers_ORed or -- LBDR L_err_header_empty_Requests_FF_Requests_in or L_err_tail_Requests_in_all_zero or L_err_tail_empty_Requests_FF_Requests_in or L_err_tail_not_empty_not_grants_Requests_FF_Requests_in or L_err_grants_onehot or L_err_grants_mismatch or L_err_header_tail_Requests_FF_Requests_in or L_err_dst_addr_cur_addr_N1 or L_err_dst_addr_cur_addr_not_N1 or L_err_header_not_empty_faulty_drop_packet_in or L_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or L_err_header_not_empty_faulty_Req_in_all_zero or L_err_header_not_empty_Req_N_in or L_err_header_empty_packet_drop_in_packet_drop_equal or L_err_tail_not_empty_packet_drop_not_packet_drop_in or L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or L_err_packet_drop_order or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator L_err_Requests_state_in_state_not_equal or L_err_IDLE_Req_N or L_err_IDLE_grant_N or L_err_North_Req_N or L_err_North_grant_N or L_err_Local_Req_N or L_err_Local_grant_N or L_err_South_Req_N or L_err_South_grant_N or L_err_West_Req_N or L_err_West_grant_N or L_err_East_Req_N or L_err_East_grant_N or L_err_state_in_onehot or L_err_no_request_grants or L_err_request_no_grants or L_err_no_Req_N_grant_N or N_arbiter_out_err_Requests_state_in_state_not_equal or N_err_Local_req_X_L or N_err_Local_credit_not_zero_req_X_L_grant_L or N_err_Local_credit_zero_or_not_req_X_L_not_grant_L or N_err_South_req_X_L or N_err_West_req_X_L or N_err_East_req_X_L or N_err_IDLE_req_X_L or N_err_North_req_X_L or N_arbiter_out_err_state_in_onehot or N_arbiter_out_err_no_request_grants or N_err_request_IDLE_state or N_err_request_IDLE_not_Grants or N_err_Grants_onehot_or_all_zero or err_grant_N_L_sig_not_empty_L_grant_N_L or err_not_grant_N_L_sig_or_empty_L_not_grant_N_L or err_grant_signals_not_empty_grant_N or err_not_grant_signals_empty_not_grant_N or err_grants_valid_not_match or err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal or err_credit_in_N_credit_counter_N_out_increment or err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change or err_grant_N_credit_counter_N_out_decrement or err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change or err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal; -- FIFO L2W_fault <= L_FIFO_checkers_ORed or -- LBDR L_err_header_empty_Requests_FF_Requests_in or L_err_tail_Requests_in_all_zero or L_err_tail_empty_Requests_FF_Requests_in or L_err_tail_not_empty_not_grants_Requests_FF_Requests_in or L_err_grants_onehot or L_err_grants_mismatch or L_err_header_tail_Requests_FF_Requests_in or L_err_dst_addr_cur_addr_W1 or L_err_dst_addr_cur_addr_not_W1 or L_err_header_not_empty_faulty_drop_packet_in or L_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or L_err_header_not_empty_faulty_Req_in_all_zero or L_err_header_not_empty_Req_W_in or L_err_header_empty_packet_drop_in_packet_drop_equal or L_err_tail_not_empty_packet_drop_not_packet_drop_in or L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or L_err_packet_drop_order or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator L_err_Requests_state_in_state_not_equal or L_err_West_Req_W or L_err_West_grant_W or L_err_East_Req_W or L_err_East_grant_W or L_err_IDLE_Req_W or L_err_IDLE_grant_W or L_err_North_Req_W or L_err_North_grant_W or L_err_Local_Req_W or L_err_Local_grant_W or L_err_South_Req_W or L_err_South_grant_W or L_err_state_in_onehot or L_err_no_request_grants or L_err_request_no_grants or L_err_no_Req_W_grant_W or W_arbiter_out_err_Requests_state_in_state_not_equal or W_err_Local_req_X_L or W_err_Local_credit_not_zero_req_X_L_grant_L or W_err_Local_credit_zero_or_not_req_X_L_not_grant_L or W_err_South_req_X_L or W_err_West_req_X_L or W_err_East_req_X_L or W_err_IDLE_req_X_L or W_err_North_req_X_L or W_arbiter_out_err_state_in_onehot or W_arbiter_out_err_no_request_grants or W_err_request_IDLE_state or W_err_request_IDLE_not_Grants or W_err_Grants_onehot_or_all_zero or err_grant_W_L_sig_not_empty_L_grant_W_L or err_not_grant_W_L_sig_or_empty_L_not_grant_W_L or err_grant_signals_not_empty_grant_W or err_not_grant_signals_empty_not_grant_W or err_grants_valid_not_match or err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal or err_credit_in_W_credit_counter_W_out_increment or err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change or err_grant_W_credit_counter_W_out_decrement or err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change or err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal; -- FIFO N2L_fault <= N_FIFO_checkers_ORed or -- LBDR N_err_header_empty_Requests_FF_Requests_in or N_err_tail_Requests_in_all_zero or N_err_tail_empty_Requests_FF_Requests_in or N_err_tail_not_empty_not_grants_Requests_FF_Requests_in or N_err_grants_onehot or N_err_grants_mismatch or N_err_header_tail_Requests_FF_Requests_in or N_err_dst_addr_cur_addr_Req_L_in or N_err_dst_addr_cur_addr_not_Req_L_in or N_err_header_not_empty_faulty_drop_packet_in or N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or N_err_header_not_empty_faulty_Req_in_all_zero or --N_err_header_not_empty_Req_L_in or N_err_header_empty_packet_drop_in_packet_drop_equal or N_err_tail_not_empty_packet_drop_not_packet_drop_in or N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or N_err_packet_drop_order or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator N_err_Requests_state_in_state_not_equal or N_err_Local_Req_L or N_err_Local_grant_L or N_err_South_Req_L or N_err_South_grant_L or N_err_West_Req_L or N_err_West_grant_L or N_err_East_Req_L or N_err_East_grant_L or N_err_IDLE_Req_L or N_err_IDLE_grant_L or N_err_North_Req_L or N_err_North_grant_L or N_err_state_in_onehot or N_err_no_request_grants or N_err_request_no_grants or N_err_no_Req_L_grant_L or L_arbiter_out_err_Requests_state_in_state_not_equal or L_err_IDLE_req_X_N or L_err_North_req_X_N or L_err_North_credit_not_zero_req_X_N_grant_N or L_err_North_credit_zero_or_not_req_X_N_not_grant_N or L_err_Local_req_X_N or L_err_South_req_X_N or L_err_West_req_X_N or L_err_East_req_X_N or L_arbiter_out_err_state_in_onehot or L_arbiter_out_err_no_request_grants or L_err_request_IDLE_state or L_err_request_IDLE_not_Grants or L_err_Grants_onehot_or_all_zero or err_grant_L_N_sig_not_empty_N_grant_L_N or err_not_grant_L_N_sig_or_empty_N_not_grant_L_N or err_grant_signals_not_empty_grant_L or err_not_grant_signals_empty_not_grant_L or err_grants_valid_not_match or err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal or err_credit_in_L_credit_counter_L_out_increment or err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change or err_grant_L_credit_counter_L_out_decrement or err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change or err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal; -- FIFO W2L_fault <= W_FIFO_checkers_ORed or -- LBDR W_err_header_empty_Requests_FF_Requests_in or W_err_tail_Requests_in_all_zero or W_err_tail_empty_Requests_FF_Requests_in or W_err_tail_not_empty_not_grants_Requests_FF_Requests_in or W_err_grants_onehot or W_err_grants_mismatch or W_err_header_tail_Requests_FF_Requests_in or W_err_dst_addr_cur_addr_Req_L_in or W_err_dst_addr_cur_addr_not_Req_L_in or W_err_header_not_empty_faulty_drop_packet_in or W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change or W_err_header_not_empty_faulty_Req_in_all_zero or --W_err_header_not_empty_Req_L_in or W_err_header_empty_packet_drop_in_packet_drop_equal or W_err_tail_not_empty_packet_drop_not_packet_drop_in or W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal or W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal or W_err_packet_drop_order or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp or W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal or W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in or W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal or W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal or -- Added W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal or -- Added -- Allocator W_err_Requests_state_in_state_not_equal or W_err_Local_Req_L or W_err_Local_grant_L or W_err_South_Req_L or W_err_South_grant_L or W_err_West_Req_L or W_err_West_grant_L or W_err_East_Req_L or W_err_East_grant_L or W_err_IDLE_Req_L or W_err_IDLE_grant_L or W_err_North_Req_L or W_err_North_grant_L or W_err_state_in_onehot or W_err_no_request_grants or W_err_request_no_grants or W_err_no_Req_L_grant_L or L_arbiter_out_err_Requests_state_in_state_not_equal or L_err_West_req_X_W or L_err_West_credit_not_zero_req_X_W_grant_W or L_err_West_credit_zero_or_not_req_X_W_not_grant_W or L_err_East_req_X_W or L_err_IDLE_req_X_W or L_err_North_req_X_W or L_err_Local_req_X_W or L_err_South_req_X_W or L_arbiter_out_err_state_in_onehot or L_arbiter_out_err_no_request_grants or L_err_request_IDLE_state or L_err_request_IDLE_not_Grants or L_err_Grants_onehot_or_all_zero or err_grant_L_W_sig_not_empty_W_grant_L_W or err_not_grant_L_W_sig_or_empty_W_not_grant_L_W or err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal or err_credit_in_L_credit_counter_L_out_increment or err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change or err_grant_L_credit_counter_L_out_decrement or err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change or err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- Link faults and turn faults -- The order of the turns/paths from left to right (MSB to LSB) -> 20 bits -- N2E, N2W, E2N, E2S, -- W2N, W2S, S2E, S2W, -- N2S, S2N, E2W, W2E, -- L2N, L2E, L2W, L2S, -- N2L, E2L, W2L, S2L ------------------------------------------------------------------------------------------------------------------------------ -- Taking classified fault information to output ------------------------------------------------------------------------------------------------------------------------------ turn_faults <= '0' & faulty_N2W_turn_fault & '0' & '0' & faulty_W2N_turn_fault & '0' & '0' & '0' & '0' & '0' & '0' & '0' & faulty_L2N_fault & '0' & faulty_L2W_fault & '0' & faulty_N2L_fault & '0' & faulty_W2L_fault & '0'; -- 20 bits because of turn/path faults link_faults <= sig_Faulty_N_out & '0' & sig_Faulty_W_out & '0' & faulty_link_L; -- sig_Faulty_N_out & sig_Faulty_E_out & sig_Faulty_W_out & sig_Faulty_S_out & faulty_link_L; ------------------------------------------------------------------------------------------------------------------------------ -- Taking non-classified fault information to output ------------------------------------------------------------------------------------------------------------------------------ turn_faults_async <= '0' & N2W_turn_fault & '0' & '0' & W2N_turn_fault & '0' & '0' & '0' & '0' & '0' & '0' & '0' & L2N_fault & '0' & L2W_fault & '0' & N2L_fault & '0' & W2L_fault & '0'; -- 20 bits because of turn/path faults link_faults_async <= faulty_packet_N & '0' & faulty_packet_W & '0' & faulty_packet_L; -- faulty_packet_N & faulty_packet_E & faulty_packet_W & faulty_packet_S & faulty_packet_L; ------------------------------------------------------------------------------------------------------------------------------ Faulty_N_out <= sig_Faulty_N_out; Faulty_W_out <= sig_Faulty_W_out; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the counter_threshold modules CT_N: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => faulty_packet_N, Healthy_packet => healthy_packet_N, Healthy => healthy_link_N, intermittent=> intermittent_link_N, Faulty => sig_Faulty_N_out); CT_W: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => faulty_packet_W, Healthy_packet => healthy_packet_W, Healthy => healthy_link_W, intermittent=> intermittent_link_W, Faulty => sig_Faulty_W_out); CT_L: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => faulty_packet_L, Healthy_packet => healthy_packet_L, Healthy => healthy_link_L, intermittent=> intermittent_link_L, Faulty => faulty_link_L); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Checker Counter Threshold modules -- Turn faults CHK_CT_N2W_turn_fault: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => N2W_turn_fault, Healthy_packet => not_N2W_turn_fault, Healthy => Healthy_N2W_turn_fault, Intermittent => intermittent_N2W_turn_fault, Faulty => faulty_N2W_turn_fault); CHK_CT_W2N_turn_fault: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => W2N_turn_fault, Healthy_packet => not_W2N_turn_fault, Healthy => Healthy_W2N_turn_fault, Intermittent => intermittent_W2N_turn_fault, Faulty => faulty_W2N_turn_fault); -- Local port related faults (to/from local port) CHK_CT_L2N_fault: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => L2N_fault, Healthy_packet => not_L2N_fault, Healthy => Healthy_L2N_fault, Intermittent => intermittent_L2N_fault, Faulty => faulty_L2N_fault); CHK_CT_L2W_fault: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => L2W_fault, Healthy_packet => not_L2W_fault, Healthy => Healthy_L2W_fault, Intermittent => intermittent_L2W_fault, Faulty => faulty_L2W_fault); CHK_CT_N2L_fault: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => N2L_fault, Healthy_packet => not_N2L_fault, Healthy => Healthy_N2L_fault, Intermittent => intermittent_N2L_fault, Faulty => faulty_N2L_fault); CHK_CT_W2L_fault: counter_threshold_classifier generic map(counter_depth => counter_depth, healthy_counter_threshold => healthy_counter_threshold, faulty_counter_threshold => faulty_counter_threshold) port map(reset => reset, clk => clk, faulty_packet => W2L_fault, Healthy_packet => not_W2L_fault, Healthy => Healthy_W2L_fault, Intermittent => intermittent_W2L_fault, Faulty => faulty_W2L_fault); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- All the FIFOs (North, East and Local) FIFO_N: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_N, valid_in => valid_in_N, read_en_N => packet_drop_order_N, read_en_E =>'0', read_en_W =>Grant_WN, read_en_S =>'0', read_en_L =>Grant_LN, credit_out => credit_out_N, empty_out => empty_N, Data_out => FIFO_D_out_N, fault_info=> faulty_packet_N, health_info=>healthy_packet_N, TCK=> TCK, SE=> SE, UE=> UE, SI=> fault_DO_serial_L_FIFO_to_N_FIFO, SO=> fault_DO_serial_N_FIFO_to_W_FIFO, -- Checker outputs -- Functional checkers err_empty_full => N_err_empty_full, err_empty_read_en => N_err_empty_read_en, err_full_write_en => N_err_full_write_en, err_state_in_onehot => N_err_state_in_onehot, err_read_pointer_in_onehot => N_err_read_pointer_in_onehot, err_write_pointer_in_onehot => N_err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer => N_err_write_en_write_pointer, err_not_write_en_write_pointer => N_err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty => N_err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty => N_err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full => N_err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full => N_err_read_pointer_write_pointer_full, err_read_pointer_increment => N_err_read_pointer_increment, err_read_pointer_not_increment => N_err_read_pointer_not_increment, err_write_en => N_err_write_en, err_not_write_en => N_err_not_write_en, err_not_write_en1 => N_err_not_write_en1, err_not_write_en2 => N_err_not_write_en2, err_read_en_mismatch => N_err_read_en_mismatch, err_read_en_mismatch1 => N_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment => N_err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement => N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change => N_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change => N_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change => N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out => N_err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out => N_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out => N_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit => N_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change => N_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit => N_err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in => N_err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal => N_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit => N_err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop => N_err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in => N_err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in => N_err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info => N_err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit => N_err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit => N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit => N_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit => N_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in => N_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit => N_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop => N_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in => N_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in => N_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change => N_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in => N_err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit => N_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit => N_err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change => N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit => N_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info => N_err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit => N_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in => N_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit => N_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop => N_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in => N_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in => N_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change => N_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in => N_err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info => N_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info => N_err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info => N_err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit => N_err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit => N_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit => N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit => N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in => N_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit => N_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop => N_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in => N_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in => N_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle => N_err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change => N_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in => N_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit => N_err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit => N_err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change => N_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change => N_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit => N_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit => N_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal => N_err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal => N_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal => N_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in => N_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in => N_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in ); FIFO_W: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_W, valid_in => valid_in_W, read_en_N => Grant_NW, read_en_E =>'0', read_en_W =>packet_drop_order_W, read_en_S =>'0', read_en_L =>Grant_LW, credit_out => credit_out_W, empty_out => empty_W, Data_out => FIFO_D_out_W, fault_info=> faulty_packet_W, health_info=>healthy_packet_W, TCK=> TCK, SE=> SE, UE=> UE, SI=> fault_DO_serial_N_FIFO_to_W_FIFO, SO=> fault_DO_serial_W_FIFO_to_L_LBDR, -- Checker outputs -- Functional checkers err_empty_full => W_err_empty_full, err_empty_read_en => W_err_empty_read_en, err_full_write_en => W_err_full_write_en, err_state_in_onehot => W_err_state_in_onehot, err_read_pointer_in_onehot => W_err_read_pointer_in_onehot, err_write_pointer_in_onehot => W_err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer => W_err_write_en_write_pointer, err_not_write_en_write_pointer => W_err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty => W_err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty => W_err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full => W_err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full => W_err_read_pointer_write_pointer_full, err_read_pointer_increment => W_err_read_pointer_increment, err_read_pointer_not_increment => W_err_read_pointer_not_increment, err_write_en => W_err_write_en, err_not_write_en => W_err_not_write_en, err_not_write_en1 => W_err_not_write_en1, err_not_write_en2 => W_err_not_write_en2, err_read_en_mismatch => W_err_read_en_mismatch, err_read_en_mismatch1 => W_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment => W_err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement => W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change => W_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change => W_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change => W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out => W_err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out => W_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out => W_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit => W_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change => W_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit => W_err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in => W_err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal => W_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit => W_err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop => W_err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in => W_err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in => W_err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info => W_err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit => W_err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit => W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit => W_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit => W_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in => W_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit => W_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop => W_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in => W_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in => W_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change => W_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in => W_err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit => W_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit => W_err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change => W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit => W_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info => W_err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit => W_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in => W_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit => W_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop => W_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in => W_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in => W_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change => W_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in => W_err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info => W_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info => W_err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info => W_err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit => W_err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit => W_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit => W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit => W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in => W_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit => W_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop => W_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in => W_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in => W_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle => W_err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change => W_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in => W_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit => W_err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit => W_err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change => W_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change => W_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit => W_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit => W_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal => W_err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal => W_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal => W_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in => W_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in => W_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in ); FIFO_L: FIFO_credit_based generic map ( DATA_WIDTH => DATA_WIDTH) port map ( reset => reset, clk => clk, RX => RX_L, valid_in => valid_in_L, read_en_N => Grant_NL, read_en_E =>'0', read_en_W =>Grant_WL, read_en_S => '0', read_en_L =>packet_drop_order_L, credit_out => credit_out_L, empty_out => empty_L, Data_out => FIFO_D_out_L, fault_info=> faulty_packet_L, health_info=>healthy_packet_L, TCK=> TCK, SE=> SE, UE=> UE, SI=> SI, SO=> fault_DO_serial_L_FIFO_to_N_FIFO, -- Checker outputs -- Functional checkers err_empty_full => L_err_empty_full, err_empty_read_en => L_err_empty_read_en, err_full_write_en => L_err_full_write_en, err_state_in_onehot => L_err_state_in_onehot, err_read_pointer_in_onehot => L_err_read_pointer_in_onehot, err_write_pointer_in_onehot => L_err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer => L_err_write_en_write_pointer, err_not_write_en_write_pointer => L_err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty => L_err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty => L_err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full => L_err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full => L_err_read_pointer_write_pointer_full, err_read_pointer_increment => L_err_read_pointer_increment, err_read_pointer_not_increment => L_err_read_pointer_not_increment, err_write_en => L_err_write_en, err_not_write_en => L_err_not_write_en, err_not_write_en1 => L_err_not_write_en1, err_not_write_en2 => L_err_not_write_en2, err_read_en_mismatch => L_err_read_en_mismatch, err_read_en_mismatch1 => L_err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment => L_err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement => L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change => L_err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change => L_err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change => L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out => L_err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out => L_err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out => L_err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit => L_err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change => L_err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit => L_err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in => L_err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal => L_err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit => L_err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop => L_err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in => L_err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in => L_err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info => L_err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit => L_err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit => L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit => L_err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit => L_err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in => L_err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit => L_err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop => L_err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in => L_err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in => L_err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change => L_err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in => L_err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit => L_err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit => L_err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change => L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit => L_err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info => L_err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit => L_err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in => L_err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit => L_err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop => L_err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in => L_err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in => L_err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change => L_err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in => L_err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info => L_err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info => L_err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info => L_err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit => L_err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit => L_err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit => L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit => L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in => L_err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit => L_err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop => L_err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in => L_err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in => L_err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle => L_err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change => L_err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in => L_err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit => L_err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit => L_err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change => L_err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change => L_err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit => L_err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit => L_err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal => L_err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal => L_err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal => L_err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in => L_err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in => L_err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in ); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ parity_LBDR_N: parity_checker_for_LBDR generic map(DATA_WIDTH => DATA_WIDTH) port map(FIFO_D_out_N, empty_N, LBDR_Fault_N); parity_LBDR_W: parity_checker_for_LBDR generic map(DATA_WIDTH => DATA_WIDTH) port map(FIFO_D_out_W, empty_W, LBDR_Fault_W); parity_LBDR_L: parity_checker_for_LBDR generic map(DATA_WIDTH => DATA_WIDTH) port map(FIFO_D_out_L, empty_L, LBDR_Fault_L); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ LBDR_N: LBDR_packet_drop generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, Rxy_rst => Rxy_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_N, Faulty_C_N => Faulty_N_in, Faulty_C_E => '0', Faulty_C_W => Faulty_W_in, Faulty_C_S => '0', flit_type => FIFO_D_out_N(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_N(DATA_WIDTH-19+NoC_size-1 downto DATA_WIDTH-19) , faulty => LBDR_Fault_N, packet_drop_order => packet_drop_order_N, grant_N => '0', grant_E =>'0', grant_W => Grant_WN, grant_S=>'0', grant_L =>Grant_LN, Req_N=> Req_NN, Req_E=>open, Req_W=>Req_NW, Req_S=>open, Req_L=>Req_NL, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command=>Reconfig_command, TCK=> TCK, SE=> SE, UE=> UE, SI=> fault_DO_serial_L_LBDR_to_N_LBDR, SO=> fault_DO_serial_N_LBDR_to_W_LBDR, -- Checker outputs err_header_empty_Requests_FF_Requests_in => N_err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => N_err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => N_err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => N_err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => N_err_grants_onehot, err_grants_mismatch => N_err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => N_err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => N_err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => N_err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => N_err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => N_err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => N_err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => N_err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => N_err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => N_err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in => N_err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in => N_err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in => N_err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change => N_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero => N_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in => N_err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in => N_err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => N_err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => N_err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => N_err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal => N_err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => N_err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => N_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => N_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => N_err_packet_drop_order, err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal => N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in => N_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal => N_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal => N_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp => N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in => N_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal => N_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal ); LBDR_W: LBDR_packet_drop generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, Rxy_rst => Rxy_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_W, Faulty_C_N => Faulty_N_in, Faulty_C_E => '0', Faulty_C_W => Faulty_W_in, Faulty_C_S => '0', flit_type => FIFO_D_out_W(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_W(DATA_WIDTH-19+NoC_size-1 downto DATA_WIDTH-19) , faulty => LBDR_Fault_W, packet_drop_order => packet_drop_order_W, grant_N => Grant_NW, grant_E =>'0', grant_W =>'0' ,grant_S=>'0', grant_L =>Grant_LW, Req_N=> Req_WN, Req_E=>open, Req_W=>Req_WW, Req_S=>open, Req_L=>Req_WL, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command=>Reconfig_command, TCK=> TCK, SE=> SE, UE=> UE, SI=> fault_DO_serial_N_LBDR_to_W_LBDR, SO=> fault_DO_serial_W_LBDR_to_Allocator, -- Checker outputs err_header_empty_Requests_FF_Requests_in => W_err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => W_err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => W_err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => W_err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => W_err_grants_onehot, err_grants_mismatch => W_err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => W_err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => W_err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => W_err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => W_err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => W_err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => W_err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => W_err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => W_err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => W_err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in => W_err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in => W_err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in => W_err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change => W_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero => W_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in => W_err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in => W_err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => W_err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => W_err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => W_err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal => W_err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => W_err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => W_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => W_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => W_err_packet_drop_order, err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal => W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in => W_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal => W_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal => W_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp => W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in => W_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal => W_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal ); LBDR_L: LBDR_packet_drop generic map (cur_addr_rst => current_address, Cx_rst => Cx_rst, Rxy_rst => Rxy_rst, NoC_size => NoC_size) PORT MAP (reset => reset, clk => clk, empty => empty_L, Faulty_C_N => Faulty_N_in, Faulty_C_E => '0', Faulty_C_W => Faulty_W_in, Faulty_C_S => '0', flit_type => FIFO_D_out_L(DATA_WIDTH-1 downto DATA_WIDTH-3), dst_addr=> FIFO_D_out_L(DATA_WIDTH-19+NoC_size-1 downto DATA_WIDTH-19) , faulty => LBDR_Fault_L, packet_drop_order => packet_drop_order_L, grant_N => Grant_NL, grant_E =>'0', grant_W => Grant_WL, grant_S=>'0', grant_L =>'0', Req_N=> Req_LN, Req_E=>open, Req_W=>Req_LW, Req_S=>open, Req_L=>Req_LL, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command=>Reconfig_command, TCK=> TCK, SE=> SE, UE=> UE, SI=> fault_DO_serial_W_FIFO_to_L_LBDR, SO=> fault_DO_serial_L_LBDR_to_N_LBDR, -- Checker outputs err_header_empty_Requests_FF_Requests_in => L_err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => L_err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => L_err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => L_err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => L_err_grants_onehot, err_grants_mismatch => L_err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => L_err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => L_err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => L_err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => L_err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => L_err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => L_err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => L_err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => L_err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => L_err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_Req_L_in => L_err_dst_addr_cur_addr_Req_L_in, err_dst_addr_cur_addr_not_Req_L_in => L_err_dst_addr_cur_addr_not_Req_L_in, err_header_not_empty_faulty_drop_packet_in => L_err_header_not_empty_faulty_drop_packet_in, -- added according to new design err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change => L_err_header_not_empty_not_faulty_drop_packet_in_packet_drop_not_change, -- added according to new design err_header_not_empty_faulty_Req_in_all_zero => L_err_header_not_empty_faulty_Req_in_all_zero, -- added according to new design --err_header_not_empty_Req_L_in => L_err_header_not_empty_Req_L_in, -- added according to new design err_header_not_empty_Req_N_in => L_err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => L_err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => L_err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => L_err_header_not_empty_Req_S_in, err_header_empty_packet_drop_in_packet_drop_equal => L_err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => L_err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => L_err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => L_err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => L_err_packet_drop_order, err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal => L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Cx_in_Temp_Cx_equal, err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in => L_err_reconfig_cx_flit_type_Tail_not_empty_grants_not_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Cx_in_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_reconfig_cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_Faulty_C_Temp_Cx_in, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Reconfig_command_reconfig_cx_in, err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal => L_err_reconfig_cx_flit_type_Tail_not_empty_grants_Temp_Cx_in_Temp_Cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_Temp_Cx_in_Cx_reconf_PE_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_reconfig_cx_in_reconfig_cx_equal, err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal => L_err_not_reconfig_cx_flit_type_not_Tail_empty_not_grants_not_Faulty_C_not_Reconfig_command_Temp_Cx_in_Temp_Cx_equal, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp => L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_Rxy_in_Rxy_tmp, err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in => L_err_ReConf_FF_out_flit_type_Tail_not_empty_grants_not_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Rxy_in_Rxy_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_ReConf_FF_in, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_Reconfig_command_Rxy_tmp_in_Rxy_reconf_PE_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_Rxy_tmp_in_Rxy_tmp_equal, err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal => L_err_not_ReConf_FF_out_flit_type_not_Tail_empty_not_grants_not_Reconfig_command_ReConf_FF_in_ReConf_FF_out_equal ); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- switch allocator allocator_unit: allocator port map ( reset => reset, clk => clk, -- flow control credit_in_N => credit_in_N, credit_in_E => '0', credit_in_W => credit_in_W, credit_in_S => '0', credit_in_L => credit_in_L, -- requests from the LBDRs req_N_N => '0', req_N_E => '0', req_N_W => Req_NW, req_N_S => '0', req_N_L => Req_NL, req_E_N => '0', req_E_E => '0', req_E_W => '0', req_E_S => '0', req_E_L => '0', req_W_N => Req_WN, req_W_E => '0', req_W_W => '0', req_W_S => '0', req_W_L => Req_WL, req_S_N => '0', req_S_E => '0', req_S_W => '0', req_S_S => '0', req_S_L => '0', req_L_N => Req_LN, req_L_E => '0', req_L_W => Req_LW, req_L_S => '0', req_L_L => '0', empty_N => empty_N, empty_E => '0', empty_W => empty_W, empty_S => '0', empty_L => empty_L, valid_N => valid_out_N, valid_E => open, valid_W => valid_out_W, valid_S => open, valid_L => valid_out_L, -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! grant_N_N => open, grant_N_E => open, grant_N_W => Grant_NW, grant_N_S => open, grant_N_L => Grant_NL, grant_E_N => open, grant_E_E => open, grant_E_W => open, grant_E_S => open, grant_E_L => open, grant_W_N => Grant_WN, grant_W_E => open, grant_W_W => open, grant_W_S => open, grant_W_L => Grant_WL, grant_S_N => open, grant_S_E => open, grant_S_W => open, grant_S_S => open, grant_S_L => open, grant_L_N => Grant_LN, grant_L_E => open, grant_L_W => Grant_LW, grant_L_S => open, grant_L_L => open, TCK=> TCK, SE=> SE, UE=> UE, SI=> fault_DO_serial_W_LBDR_to_Allocator, SO=> SO, -- Checker outputs -- Allocator logic checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N => err_grant_N_N_sig_not_empty_N_grant_N_N , err_not_grant_N_N_sig_or_empty_N_not_grant_N_N => err_not_grant_N_N_sig_or_empty_N_not_grant_N_N , err_grant_N_E_sig_not_empty_E_grant_N_E => err_grant_N_E_sig_not_empty_E_grant_N_E , err_not_grant_N_E_sig_or_empty_E_not_grant_N_E => err_not_grant_N_E_sig_or_empty_E_not_grant_N_E , err_grant_N_W_sig_not_empty_W_grant_N_W => err_grant_N_W_sig_not_empty_W_grant_N_W , err_not_grant_N_W_sig_or_empty_W_not_grant_N_W => err_not_grant_N_W_sig_or_empty_W_not_grant_N_W , err_grant_N_S_sig_not_empty_S_grant_N_S => err_grant_N_S_sig_not_empty_S_grant_N_S , err_not_grant_N_S_sig_or_empty_S_not_grant_N_S => err_not_grant_N_S_sig_or_empty_S_not_grant_N_S , err_grant_N_L_sig_not_empty_L_grant_N_L => err_grant_N_L_sig_not_empty_L_grant_N_L , err_not_grant_N_L_sig_or_empty_L_not_grant_N_L => err_not_grant_N_L_sig_or_empty_L_not_grant_N_L , err_grant_E_N_sig_not_empty_N_grant_E_N => err_grant_E_N_sig_not_empty_N_grant_E_N , err_not_grant_E_N_sig_or_empty_N_not_grant_E_N => err_not_grant_E_N_sig_or_empty_N_not_grant_E_N , err_grant_E_E_sig_not_empty_E_grant_E_E => err_grant_E_E_sig_not_empty_E_grant_E_E , err_not_grant_E_E_sig_or_empty_E_not_grant_E_E => err_not_grant_E_E_sig_or_empty_E_not_grant_E_E , err_grant_E_W_sig_not_empty_W_grant_E_W => err_grant_E_W_sig_not_empty_W_grant_E_W , err_not_grant_E_W_sig_or_empty_W_not_grant_E_W => err_not_grant_E_W_sig_or_empty_W_not_grant_E_W , err_grant_E_S_sig_not_empty_S_grant_E_S => err_grant_E_S_sig_not_empty_S_grant_E_S , err_not_grant_E_S_sig_or_empty_S_not_grant_E_S => err_not_grant_E_S_sig_or_empty_S_not_grant_E_S , err_grant_E_L_sig_not_empty_L_grant_E_L => err_grant_E_L_sig_not_empty_L_grant_E_L , err_not_grant_E_L_sig_or_empty_L_not_grant_E_L => err_not_grant_E_L_sig_or_empty_L_not_grant_E_L , err_grant_W_N_sig_not_empty_N_grant_W_N => err_grant_W_N_sig_not_empty_N_grant_W_N , err_not_grant_W_N_sig_or_empty_N_not_grant_W_N => err_not_grant_W_N_sig_or_empty_N_not_grant_W_N , err_grant_W_E_sig_not_empty_E_grant_W_E => err_grant_W_E_sig_not_empty_E_grant_W_E , err_not_grant_W_E_sig_or_empty_E_not_grant_W_E => err_not_grant_W_E_sig_or_empty_E_not_grant_W_E , err_grant_W_W_sig_not_empty_W_grant_W_W => err_grant_W_W_sig_not_empty_W_grant_W_W , err_not_grant_W_W_sig_or_empty_W_not_grant_W_W => err_not_grant_W_W_sig_or_empty_W_not_grant_W_W , err_grant_W_S_sig_not_empty_S_grant_W_S => err_grant_W_S_sig_not_empty_S_grant_W_S , err_not_grant_W_S_sig_or_empty_S_not_grant_W_S => err_not_grant_W_S_sig_or_empty_S_not_grant_W_S , err_grant_W_L_sig_not_empty_L_grant_W_L => err_grant_W_L_sig_not_empty_L_grant_W_L , err_not_grant_W_L_sig_or_empty_L_not_grant_W_L => err_not_grant_W_L_sig_or_empty_L_not_grant_W_L , err_grant_S_N_sig_not_empty_N_grant_S_N => err_grant_S_N_sig_not_empty_N_grant_S_N , err_not_grant_S_N_sig_or_empty_N_not_grant_S_N => err_not_grant_S_N_sig_or_empty_N_not_grant_S_N , err_grant_S_E_sig_not_empty_E_grant_S_E => err_grant_S_E_sig_not_empty_E_grant_S_E , err_not_grant_S_E_sig_or_empty_E_not_grant_S_E => err_not_grant_S_E_sig_or_empty_E_not_grant_S_E , err_grant_S_W_sig_not_empty_W_grant_S_W => err_grant_S_W_sig_not_empty_W_grant_S_W , err_not_grant_S_W_sig_or_empty_W_not_grant_S_W => err_not_grant_S_W_sig_or_empty_W_not_grant_S_W , err_grant_S_S_sig_not_empty_S_grant_S_S => err_grant_S_S_sig_not_empty_S_grant_S_S , err_not_grant_S_S_sig_or_empty_S_not_grant_S_S => err_not_grant_S_S_sig_or_empty_S_not_grant_S_S , err_grant_S_L_sig_not_empty_L_grant_S_L => err_grant_S_L_sig_not_empty_L_grant_S_L , err_not_grant_S_L_sig_or_empty_L_not_grant_S_L => err_not_grant_S_L_sig_or_empty_L_not_grant_S_L , err_grant_L_N_sig_not_empty_N_grant_L_N => err_grant_L_N_sig_not_empty_N_grant_L_N , err_not_grant_L_N_sig_or_empty_N_not_grant_L_N => err_not_grant_L_N_sig_or_empty_N_not_grant_L_N , err_grant_L_E_sig_not_empty_E_grant_L_E => err_grant_L_E_sig_not_empty_E_grant_L_E , err_not_grant_L_E_sig_or_empty_E_not_grant_L_E => err_not_grant_L_E_sig_or_empty_E_not_grant_L_E , err_grant_L_W_sig_not_empty_W_grant_L_W => err_grant_L_W_sig_not_empty_W_grant_L_W , err_not_grant_L_W_sig_or_empty_W_not_grant_L_W => err_not_grant_L_W_sig_or_empty_W_not_grant_L_W , err_grant_L_S_sig_not_empty_S_grant_L_S => err_grant_L_S_sig_not_empty_S_grant_L_S , err_not_grant_L_S_sig_or_empty_S_not_grant_L_S => err_not_grant_L_S_sig_or_empty_S_not_grant_L_S , err_grant_L_L_sig_not_empty_L_grant_L_L => err_grant_L_L_sig_not_empty_L_grant_L_L , err_not_grant_L_L_sig_or_empty_L_not_grant_L_L => err_not_grant_L_L_sig_or_empty_L_not_grant_L_L , err_grant_signals_not_empty_grant_N => err_grant_signals_not_empty_grant_N , err_not_grant_signals_empty_not_grant_N => err_not_grant_signals_empty_not_grant_N , err_grant_signals_not_empty_grant_E => err_grant_signals_not_empty_grant_E , err_not_grant_signals_empty_not_grant_E => err_not_grant_signals_empty_not_grant_E , err_grant_signals_not_empty_grant_W => err_grant_signals_not_empty_grant_W , err_not_grant_signals_empty_not_grant_W => err_not_grant_signals_empty_not_grant_W , err_grant_signals_not_empty_grant_S => err_grant_signals_not_empty_grant_S , err_not_grant_signals_empty_not_grant_S => err_not_grant_signals_empty_not_grant_S , err_grant_signals_not_empty_grant_L => err_grant_signals_not_empty_grant_L , err_not_grant_signals_empty_not_grant_L => err_not_grant_signals_empty_not_grant_L , err_grants_valid_not_match => err_grants_valid_not_match , -- Allocator credit counter logic checker outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal => err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal , err_credit_in_N_credit_counter_N_out_increment => err_credit_in_N_credit_counter_N_out_increment , err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change => err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change , err_grant_N_credit_counter_N_out_decrement => err_grant_N_credit_counter_N_out_decrement , err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change => err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change , err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal => err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal , err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal => err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal , err_credit_in_E_credit_counter_E_out_increment => err_credit_in_E_credit_counter_E_out_increment , err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change => err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change , err_grant_E_credit_counter_E_out_decrement => err_grant_E_credit_counter_E_out_decrement , err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change => err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change , err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal => err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal , err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal => err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal , err_credit_in_W_credit_counter_W_out_increment => err_credit_in_W_credit_counter_W_out_increment , err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change => err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change , err_grant_W_credit_counter_W_out_decrement => err_grant_W_credit_counter_W_out_decrement , err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change => err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change , err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal => err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal , err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal => err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal , err_credit_in_S_credit_counter_S_out_increment => err_credit_in_S_credit_counter_S_out_increment , err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change => err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change , err_grant_S_credit_counter_S_out_decrement => err_grant_S_credit_counter_S_out_decrement , err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change => err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change , err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal => err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal , err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal => err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal , err_credit_in_L_credit_counter_L_out_increment => err_credit_in_L_credit_counter_L_out_increment , err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change => err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change , err_grant_L_credit_counter_L_out_decrement => err_grant_L_credit_counter_L_out_decrement , err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change => err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change , err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal => err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal , -- North Arbiter_in Checker outputs N_err_Requests_state_in_state_not_equal => N_err_Requests_state_in_state_not_equal, N_err_IDLE_Req_N => N_err_IDLE_Req_N, N_err_IDLE_grant_N => N_err_IDLE_grant_N, N_err_North_Req_N => N_err_North_Req_N, N_err_North_grant_N => N_err_North_grant_N, N_err_East_Req_E => N_err_East_Req_E, N_err_East_grant_E => N_err_East_grant_E, N_err_West_Req_W => N_err_West_Req_W, N_err_West_grant_W => N_err_West_grant_W, N_err_South_Req_S => N_err_South_Req_S, N_err_South_grant_S => N_err_South_grant_S, N_err_Local_Req_L => N_err_Local_Req_L, N_err_Local_grant_L => N_err_Local_grant_L, N_err_IDLE_Req_E => N_err_IDLE_Req_E, N_err_IDLE_grant_E => N_err_IDLE_grant_E, N_err_North_Req_E => N_err_North_Req_E, N_err_North_grant_E => N_err_North_grant_E, N_err_East_Req_W => N_err_East_Req_W, N_err_East_grant_W => N_err_East_grant_W, N_err_West_Req_S => N_err_West_Req_S, N_err_West_grant_S => N_err_West_grant_S, N_err_South_Req_L => N_err_South_Req_L, N_err_South_grant_L => N_err_South_grant_L, N_err_Local_Req_N => N_err_Local_Req_N, N_err_Local_grant_N => N_err_Local_grant_N, N_err_IDLE_Req_W => N_err_IDLE_Req_W, N_err_IDLE_grant_W => N_err_IDLE_grant_W, N_err_North_Req_W => N_err_North_Req_W, N_err_North_grant_W => N_err_North_grant_W, N_err_East_Req_S => N_err_East_Req_S, N_err_East_grant_S => N_err_East_grant_S, N_err_West_Req_L => N_err_West_Req_L, N_err_West_grant_L => N_err_West_grant_L, N_err_South_Req_N => N_err_South_Req_N, N_err_South_grant_N => N_err_South_grant_N, N_err_Local_Req_E => N_err_Local_Req_E, N_err_Local_grant_E => N_err_Local_grant_E, N_err_IDLE_Req_S => N_err_IDLE_Req_S, N_err_IDLE_grant_S => N_err_IDLE_grant_S, N_err_North_Req_S => N_err_North_Req_S, N_err_North_grant_S => N_err_North_grant_S, N_err_East_Req_L => N_err_East_Req_L, N_err_East_grant_L => N_err_East_grant_L, N_err_West_Req_N => N_err_West_Req_N, N_err_West_grant_N => N_err_West_grant_N, N_err_South_Req_E => N_err_South_Req_E, N_err_South_grant_E => N_err_South_grant_E, N_err_Local_Req_W => N_err_Local_Req_W, N_err_Local_grant_W => N_err_Local_grant_W, N_err_IDLE_Req_L => N_err_IDLE_Req_L, N_err_IDLE_grant_L => N_err_IDLE_grant_L, N_err_North_Req_L => N_err_North_Req_L, N_err_North_grant_L => N_err_North_grant_L, N_err_East_Req_N => N_err_East_Req_N, N_err_East_grant_N => N_err_East_grant_N, N_err_West_Req_E => N_err_West_Req_E, N_err_West_grant_E => N_err_West_grant_E, N_err_South_Req_W => N_err_South_Req_W, N_err_South_grant_W => N_err_South_grant_W, N_err_Local_Req_S => N_err_Local_Req_S, N_err_Local_grant_S => N_err_Local_grant_S, N_err_state_in_onehot => N_err_arbiter_state_in_onehot, N_err_no_request_grants => N_err_no_request_grants, N_err_request_no_grants => N_err_request_no_grants, N_err_no_Req_N_grant_N => N_err_no_Req_N_grant_N, N_err_no_Req_E_grant_E => N_err_no_Req_E_grant_E, N_err_no_Req_W_grant_W => N_err_no_Req_W_grant_W, N_err_no_Req_S_grant_S => N_err_no_Req_S_grant_S, N_err_no_Req_L_grant_L => N_err_no_Req_L_grant_L, -- East Arbiter_in Checker outputs E_err_Requests_state_in_state_not_equal => E_err_Requests_state_in_state_not_equal, E_err_IDLE_Req_N => E_err_IDLE_Req_N, E_err_IDLE_grant_N => E_err_IDLE_grant_N, E_err_North_Req_N => E_err_North_Req_N, E_err_North_grant_N => E_err_North_grant_N, E_err_East_Req_E => E_err_East_Req_E, E_err_East_grant_E => E_err_East_grant_E, E_err_West_Req_W => E_err_West_Req_W, E_err_West_grant_W => E_err_West_grant_W, E_err_South_Req_S => E_err_South_Req_S, E_err_South_grant_S => E_err_South_grant_S, E_err_Local_Req_L => E_err_Local_Req_L, E_err_Local_grant_L => E_err_Local_grant_L, E_err_IDLE_Req_E => E_err_IDLE_Req_E, E_err_IDLE_grant_E => E_err_IDLE_grant_E, E_err_North_Req_E => E_err_North_Req_E, E_err_North_grant_E => E_err_North_grant_E, E_err_East_Req_W => E_err_East_Req_W, E_err_East_grant_W => E_err_East_grant_W, E_err_West_Req_S => E_err_West_Req_S, E_err_West_grant_S => E_err_West_grant_S, E_err_South_Req_L => E_err_South_Req_L, E_err_South_grant_L => E_err_South_grant_L, E_err_Local_Req_N => E_err_Local_Req_N, E_err_Local_grant_N => E_err_Local_grant_N, E_err_IDLE_Req_W => E_err_IDLE_Req_W, E_err_IDLE_grant_W => E_err_IDLE_grant_W, E_err_North_Req_W => E_err_North_Req_W, E_err_North_grant_W => E_err_North_grant_W, E_err_East_Req_S => E_err_East_Req_S, E_err_East_grant_S => E_err_East_grant_S, E_err_West_Req_L => E_err_West_Req_L, E_err_West_grant_L => E_err_West_grant_L, E_err_South_Req_N => E_err_South_Req_N, E_err_South_grant_N => E_err_South_grant_N, E_err_Local_Req_E => E_err_Local_Req_E, E_err_Local_grant_E => E_err_Local_grant_E, E_err_IDLE_Req_S => E_err_IDLE_Req_S, E_err_IDLE_grant_S => E_err_IDLE_grant_S, E_err_North_Req_S => E_err_North_Req_S, E_err_North_grant_S => E_err_North_grant_S, E_err_East_Req_L => E_err_East_Req_L, E_err_East_grant_L => E_err_East_grant_L, E_err_West_Req_N => E_err_West_Req_N, E_err_West_grant_N => E_err_West_grant_N, E_err_South_Req_E => E_err_South_Req_E, E_err_South_grant_E => E_err_South_grant_E, E_err_Local_Req_W => E_err_Local_Req_W, E_err_Local_grant_W => E_err_Local_grant_W, E_err_IDLE_Req_L => E_err_IDLE_Req_L, E_err_IDLE_grant_L => E_err_IDLE_grant_L, E_err_North_Req_L => E_err_North_Req_L, E_err_North_grant_L => E_err_North_grant_L, E_err_East_Req_N => E_err_East_Req_N, E_err_East_grant_N => E_err_East_grant_N, E_err_West_Req_E => E_err_West_Req_E, E_err_West_grant_E => E_err_West_grant_E, E_err_South_Req_W => E_err_South_Req_W, E_err_South_grant_W => E_err_South_grant_W, E_err_Local_Req_S => E_err_Local_Req_S, E_err_Local_grant_S => E_err_Local_grant_S, E_err_state_in_onehot => E_err_arbiter_state_in_onehot, E_err_no_request_grants => E_err_no_request_grants, E_err_request_no_grants => E_err_request_no_grants, E_err_no_Req_N_grant_N => E_err_no_Req_N_grant_N, E_err_no_Req_E_grant_E => E_err_no_Req_E_grant_E, E_err_no_Req_W_grant_W => E_err_no_Req_W_grant_W, E_err_no_Req_S_grant_S => E_err_no_Req_S_grant_S, E_err_no_Req_L_grant_L => E_err_no_Req_L_grant_L, -- West Arbiter_in Checker outputs W_err_Requests_state_in_state_not_equal => W_err_Requests_state_in_state_not_equal, W_err_IDLE_Req_N => W_err_IDLE_Req_N, W_err_IDLE_grant_N => W_err_IDLE_grant_N, W_err_North_Req_N => W_err_North_Req_N, W_err_North_grant_N => W_err_North_grant_N, W_err_East_Req_E => W_err_East_Req_E, W_err_East_grant_E => W_err_East_grant_E, W_err_West_Req_W => W_err_West_Req_W, W_err_West_grant_W => W_err_West_grant_W, W_err_South_Req_S => W_err_South_Req_S, W_err_South_grant_S => W_err_South_grant_S, W_err_Local_Req_L => W_err_Local_Req_L, W_err_Local_grant_L => W_err_Local_grant_L, W_err_IDLE_Req_E => W_err_IDLE_Req_E, W_err_IDLE_grant_E => W_err_IDLE_grant_E, W_err_North_Req_E => W_err_North_Req_E, W_err_North_grant_E => W_err_North_grant_E, W_err_East_Req_W => W_err_East_Req_W, W_err_East_grant_W => W_err_East_grant_W, W_err_West_Req_S => W_err_West_Req_S, W_err_West_grant_S => W_err_West_grant_S, W_err_South_Req_L => W_err_South_Req_L, W_err_South_grant_L => W_err_South_grant_L, W_err_Local_Req_N => W_err_Local_Req_N, W_err_Local_grant_N => W_err_Local_grant_N, W_err_IDLE_Req_W => W_err_IDLE_Req_W, W_err_IDLE_grant_W => W_err_IDLE_grant_W, W_err_North_Req_W => W_err_North_Req_W, W_err_North_grant_W => W_err_North_grant_W, W_err_East_Req_S => W_err_East_Req_S, W_err_East_grant_S => W_err_East_grant_S, W_err_West_Req_L => W_err_West_Req_L, W_err_West_grant_L => W_err_West_grant_L, W_err_South_Req_N => W_err_South_Req_N, W_err_South_grant_N => W_err_South_grant_N, W_err_Local_Req_E => W_err_Local_Req_E, W_err_Local_grant_E => W_err_Local_grant_E, W_err_IDLE_Req_S => W_err_IDLE_Req_S, W_err_IDLE_grant_S => W_err_IDLE_grant_S, W_err_North_Req_S => W_err_North_Req_S, W_err_North_grant_S => W_err_North_grant_S, W_err_East_Req_L => W_err_East_Req_L, W_err_East_grant_L => W_err_East_grant_L, W_err_West_Req_N => W_err_West_Req_N, W_err_West_grant_N => W_err_West_grant_N, W_err_South_Req_E => W_err_South_Req_E, W_err_South_grant_E => W_err_South_grant_E, W_err_Local_Req_W => W_err_Local_Req_W, W_err_Local_grant_W => W_err_Local_grant_W, W_err_IDLE_Req_L => W_err_IDLE_Req_L, W_err_IDLE_grant_L => W_err_IDLE_grant_L, W_err_North_Req_L => W_err_North_Req_L, W_err_North_grant_L => W_err_North_grant_L, W_err_East_Req_N => W_err_East_Req_N, W_err_East_grant_N => W_err_East_grant_N, W_err_West_Req_E => W_err_West_Req_E, W_err_West_grant_E => W_err_West_grant_E, W_err_South_Req_W => W_err_South_Req_W, W_err_South_grant_W => W_err_South_grant_W, W_err_Local_Req_S => W_err_Local_Req_S, W_err_Local_grant_S => W_err_Local_grant_S, W_err_state_in_onehot => W_err_arbiter_state_in_onehot, W_err_no_request_grants => W_err_no_request_grants, W_err_request_no_grants => W_err_request_no_grants, W_err_no_Req_N_grant_N => W_err_no_Req_N_grant_N, W_err_no_Req_E_grant_E => W_err_no_Req_E_grant_E, W_err_no_Req_W_grant_W => W_err_no_Req_W_grant_W, W_err_no_Req_S_grant_S => W_err_no_Req_S_grant_S, W_err_no_Req_L_grant_L => W_err_no_Req_L_grant_L, -- South Arbiter_in Checker outputs S_err_Requests_state_in_state_not_equal => S_err_Requests_state_in_state_not_equal, S_err_IDLE_Req_N => S_err_IDLE_Req_N, S_err_IDLE_grant_N => S_err_IDLE_grant_N, S_err_North_Req_N => S_err_North_Req_N, S_err_North_grant_N => S_err_North_grant_N, S_err_East_Req_E => S_err_East_Req_E, S_err_East_grant_E => S_err_East_grant_E, S_err_West_Req_W => S_err_West_Req_W, S_err_West_grant_W => S_err_West_grant_W, S_err_South_Req_S => S_err_South_Req_S, S_err_South_grant_S => S_err_South_grant_S, S_err_Local_Req_L => S_err_Local_Req_L, S_err_Local_grant_L => S_err_Local_grant_L, S_err_IDLE_Req_E => S_err_IDLE_Req_E, S_err_IDLE_grant_E => S_err_IDLE_grant_E, S_err_North_Req_E => S_err_North_Req_E, S_err_North_grant_E => S_err_North_grant_E, S_err_East_Req_W => S_err_East_Req_W, S_err_East_grant_W => S_err_East_grant_W, S_err_West_Req_S => S_err_West_Req_S, S_err_West_grant_S => S_err_West_grant_S, S_err_South_Req_L => S_err_South_Req_L, S_err_South_grant_L => S_err_South_grant_L, S_err_Local_Req_N => S_err_Local_Req_N, S_err_Local_grant_N => S_err_Local_grant_N, S_err_IDLE_Req_W => S_err_IDLE_Req_W, S_err_IDLE_grant_W => S_err_IDLE_grant_W, S_err_North_Req_W => S_err_North_Req_W, S_err_North_grant_W => S_err_North_grant_W, S_err_East_Req_S => S_err_East_Req_S, S_err_East_grant_S => S_err_East_grant_S, S_err_West_Req_L => S_err_West_Req_L, S_err_West_grant_L => S_err_West_grant_L, S_err_South_Req_N => S_err_South_Req_N, S_err_South_grant_N => S_err_South_grant_N, S_err_Local_Req_E => S_err_Local_Req_E, S_err_Local_grant_E => S_err_Local_grant_E, S_err_IDLE_Req_S => S_err_IDLE_Req_S, S_err_IDLE_grant_S => S_err_IDLE_grant_S, S_err_North_Req_S => S_err_North_Req_S, S_err_North_grant_S => S_err_North_grant_S, S_err_East_Req_L => S_err_East_Req_L, S_err_East_grant_L => S_err_East_grant_L, S_err_West_Req_N => S_err_West_Req_N, S_err_West_grant_N => S_err_West_grant_N, S_err_South_Req_E => S_err_South_Req_E, S_err_South_grant_E => S_err_South_grant_E, S_err_Local_Req_W => S_err_Local_Req_W, S_err_Local_grant_W => S_err_Local_grant_W, S_err_IDLE_Req_L => S_err_IDLE_Req_L, S_err_IDLE_grant_L => S_err_IDLE_grant_L, S_err_North_Req_L => S_err_North_Req_L, S_err_North_grant_L => S_err_North_grant_L, S_err_East_Req_N => S_err_East_Req_N, S_err_East_grant_N => S_err_East_grant_N, S_err_West_Req_E => S_err_West_Req_E, S_err_West_grant_E => S_err_West_grant_E, S_err_South_Req_W => S_err_South_Req_W, S_err_South_grant_W => S_err_South_grant_W, S_err_Local_Req_S => S_err_Local_Req_S, S_err_Local_grant_S => S_err_Local_grant_S, S_err_state_in_onehot => S_err_arbiter_state_in_onehot, S_err_no_request_grants => S_err_no_request_grants, S_err_request_no_grants => S_err_request_no_grants, S_err_no_Req_N_grant_N => S_err_no_Req_N_grant_N, S_err_no_Req_E_grant_E => S_err_no_Req_E_grant_E, S_err_no_Req_W_grant_W => S_err_no_Req_W_grant_W, S_err_no_Req_S_grant_S => S_err_no_Req_S_grant_S, S_err_no_Req_L_grant_L => S_err_no_Req_L_grant_L, -- Local Arbiter_in Checker outputs L_err_Requests_state_in_state_not_equal => L_err_Requests_state_in_state_not_equal, L_err_IDLE_Req_N => L_err_IDLE_Req_N, L_err_IDLE_grant_N => L_err_IDLE_grant_N, L_err_North_Req_N => L_err_North_Req_N, L_err_North_grant_N => L_err_North_grant_N, L_err_East_Req_E => L_err_East_Req_E, L_err_East_grant_E => L_err_East_grant_E, L_err_West_Req_W => L_err_West_Req_W, L_err_West_grant_W => L_err_West_grant_W, L_err_South_Req_S => L_err_South_Req_S, L_err_South_grant_S => L_err_South_grant_S, L_err_Local_Req_L => L_err_Local_Req_L, L_err_Local_grant_L => L_err_Local_grant_L, L_err_IDLE_Req_E => L_err_IDLE_Req_E, L_err_IDLE_grant_E => L_err_IDLE_grant_E, L_err_North_Req_E => L_err_North_Req_E, L_err_North_grant_E => L_err_North_grant_E, L_err_East_Req_W => L_err_East_Req_W, L_err_East_grant_W => L_err_East_grant_W, L_err_West_Req_S => L_err_West_Req_S, L_err_West_grant_S => L_err_West_grant_S, L_err_South_Req_L => L_err_South_Req_L, L_err_South_grant_L => L_err_South_grant_L, L_err_Local_Req_N => L_err_Local_Req_N, L_err_Local_grant_N => L_err_Local_grant_N, L_err_IDLE_Req_W => L_err_IDLE_Req_W, L_err_IDLE_grant_W => L_err_IDLE_grant_W, L_err_North_Req_W => L_err_North_Req_W, L_err_North_grant_W => L_err_North_grant_W, L_err_East_Req_S => L_err_East_Req_S, L_err_East_grant_S => L_err_East_grant_S, L_err_West_Req_L => L_err_West_Req_L, L_err_West_grant_L => L_err_West_grant_L, L_err_South_Req_N => L_err_South_Req_N, L_err_South_grant_N => L_err_South_grant_N, L_err_Local_Req_E => L_err_Local_Req_E, L_err_Local_grant_E => L_err_Local_grant_E, L_err_IDLE_Req_S => L_err_IDLE_Req_S, L_err_IDLE_grant_S => L_err_IDLE_grant_S, L_err_North_Req_S => L_err_North_Req_S, L_err_North_grant_S => L_err_North_grant_S, L_err_East_Req_L => L_err_East_Req_L, L_err_East_grant_L => L_err_East_grant_L, L_err_West_Req_N => L_err_West_Req_N, L_err_West_grant_N => L_err_West_grant_N, L_err_South_Req_E => L_err_South_Req_E, L_err_South_grant_E => L_err_South_grant_E, L_err_Local_Req_W => L_err_Local_Req_W, L_err_Local_grant_W => L_err_Local_grant_W, L_err_IDLE_Req_L => L_err_IDLE_Req_L, L_err_IDLE_grant_L => L_err_IDLE_grant_L, L_err_North_Req_L => L_err_North_Req_L, L_err_North_grant_L => L_err_North_grant_L, L_err_East_Req_N => L_err_East_Req_N, L_err_East_grant_N => L_err_East_grant_N, L_err_West_Req_E => L_err_West_Req_E, L_err_West_grant_E => L_err_West_grant_E, L_err_South_Req_W => L_err_South_Req_W, L_err_South_grant_W => L_err_South_grant_W, L_err_Local_Req_S => L_err_Local_Req_S, L_err_Local_grant_S => L_err_Local_grant_S, L_err_state_in_onehot => L_err_arbiter_state_in_onehot, L_err_no_request_grants => L_err_no_request_grants, L_err_request_no_grants => L_err_request_no_grants, L_err_no_Req_N_grant_N => L_err_no_Req_N_grant_N, L_err_no_Req_E_grant_E => L_err_no_Req_E_grant_E, L_err_no_Req_W_grant_W => L_err_no_Req_W_grant_W, L_err_no_Req_S_grant_S => L_err_no_Req_S_grant_S, L_err_no_Req_L_grant_L => L_err_no_Req_L_grant_L, -- Arbiter_out checker outputs -- North Arbiter_out checker outputs N_arbiter_out_err_Requests_state_in_state_not_equal => N_arbiter_out_err_Requests_state_in_state_not_equal, N_err_IDLE_req_X_N => N_err_IDLE_req_X_N, N_err_North_req_X_N => N_err_North_req_X_N, N_err_North_credit_not_zero_req_X_N_grant_N => N_err_North_credit_not_zero_req_X_N_grant_N, N_err_North_credit_zero_or_not_req_X_N_not_grant_N => N_err_North_credit_zero_or_not_req_X_N_not_grant_N, N_err_East_req_X_E => N_err_East_req_X_E, N_err_East_credit_not_zero_req_X_E_grant_E => N_err_East_credit_not_zero_req_X_E_grant_E, N_err_East_credit_zero_or_not_req_X_E_not_grant_E => N_err_East_credit_zero_or_not_req_X_E_not_grant_E, N_err_West_req_X_W => N_err_West_req_X_W, N_err_West_credit_not_zero_req_X_W_grant_W => N_err_West_credit_not_zero_req_X_W_grant_W, N_err_West_credit_zero_or_not_req_X_W_not_grant_W => N_err_West_credit_zero_or_not_req_X_W_not_grant_W, N_err_South_req_X_S => N_err_South_req_X_S, N_err_South_credit_not_zero_req_X_S_grant_S => N_err_South_credit_not_zero_req_X_S_grant_S, N_err_South_credit_zero_or_not_req_X_S_not_grant_S => N_err_South_credit_zero_or_not_req_X_S_not_grant_S, N_err_Local_req_X_L => N_err_Local_req_X_L, N_err_Local_credit_not_zero_req_X_L_grant_L => N_err_Local_credit_not_zero_req_X_L_grant_L, N_err_Local_credit_zero_or_not_req_X_L_not_grant_L => N_err_Local_credit_zero_or_not_req_X_L_not_grant_L, N_err_IDLE_req_X_E => N_err_IDLE_req_X_E, N_err_North_req_X_E => N_err_North_req_X_E, N_err_East_req_X_W => N_err_East_req_X_W, N_err_West_req_X_S => N_err_West_req_X_S, N_err_South_req_X_L => N_err_South_req_X_L, N_err_Local_req_X_N => N_err_Local_req_X_N, N_err_IDLE_req_X_W => N_err_IDLE_req_X_W, N_err_North_req_X_W => N_err_North_req_X_W, N_err_East_req_X_S => N_err_East_req_X_S, N_err_West_req_X_L => N_err_West_req_X_L, N_err_South_req_X_N => N_err_South_req_X_N, N_err_Local_req_X_E => N_err_Local_req_X_E, N_err_IDLE_req_X_S => N_err_IDLE_req_X_S, N_err_North_req_X_S => N_err_North_req_X_S, N_err_East_req_X_L => N_err_East_req_X_L, N_err_West_req_X_N => N_err_West_req_X_N, N_err_South_req_X_E => N_err_South_req_X_E, N_err_Local_req_X_W => N_err_Local_req_X_W, N_err_IDLE_req_X_L => N_err_IDLE_req_X_L, N_err_North_req_X_L => N_err_North_req_X_L, N_err_East_req_X_N => N_err_East_req_X_N, N_err_West_req_X_E => N_err_West_req_X_E, N_err_South_req_X_W => N_err_South_req_X_W, N_err_Local_req_X_S => N_err_Local_req_X_S, N_arbiter_out_err_state_in_onehot => N_arbiter_out_err_state_in_onehot, N_arbiter_out_err_no_request_grants => N_arbiter_out_err_no_request_grants, N_err_request_IDLE_state => N_err_request_IDLE_state, N_err_request_IDLE_not_Grants => N_err_request_IDLE_not_Grants, N_err_state_North_Invalid_Grant => N_err_state_North_Invalid_Grant, N_err_state_East_Invalid_Grant => N_err_state_East_Invalid_Grant, N_err_state_West_Invalid_Grant => N_err_state_West_Invalid_Grant, N_err_state_South_Invalid_Grant => N_err_state_South_Invalid_Grant, N_err_state_Local_Invalid_Grant => N_err_state_Local_Invalid_Grant, N_err_Grants_onehot_or_all_zero => N_err_Grants_onehot_or_all_zero, -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal => E_arbiter_out_err_Requests_state_in_state_not_equal, E_err_IDLE_req_X_N => E_err_IDLE_req_X_N, E_err_North_req_X_N => E_err_North_req_X_N, E_err_North_credit_not_zero_req_X_N_grant_N => E_err_North_credit_not_zero_req_X_N_grant_N, E_err_North_credit_zero_or_not_req_X_N_not_grant_N => E_err_North_credit_zero_or_not_req_X_N_not_grant_N, E_err_East_req_X_E => E_err_East_req_X_E, E_err_East_credit_not_zero_req_X_E_grant_E => E_err_East_credit_not_zero_req_X_E_grant_E, E_err_East_credit_zero_or_not_req_X_E_not_grant_E => E_err_East_credit_zero_or_not_req_X_E_not_grant_E, E_err_West_req_X_W => E_err_West_req_X_W, E_err_West_credit_not_zero_req_X_W_grant_W => E_err_West_credit_not_zero_req_X_W_grant_W, E_err_West_credit_zero_or_not_req_X_W_not_grant_W => E_err_West_credit_zero_or_not_req_X_W_not_grant_W, E_err_South_req_X_S => E_err_South_req_X_S, E_err_South_credit_not_zero_req_X_S_grant_S => E_err_South_credit_not_zero_req_X_S_grant_S, E_err_South_credit_zero_or_not_req_X_S_not_grant_S => E_err_South_credit_zero_or_not_req_X_S_not_grant_S, E_err_Local_req_X_L => E_err_Local_req_X_L, E_err_Local_credit_not_zero_req_X_L_grant_L => E_err_Local_credit_not_zero_req_X_L_grant_L, E_err_Local_credit_zero_or_not_req_X_L_not_grant_L => E_err_Local_credit_zero_or_not_req_X_L_not_grant_L, E_err_IDLE_req_X_E => E_err_IDLE_req_X_E, E_err_North_req_X_E => E_err_North_req_X_E, E_err_East_req_X_W => E_err_East_req_X_W, E_err_West_req_X_S => E_err_West_req_X_S, E_err_South_req_X_L => E_err_South_req_X_L, E_err_Local_req_X_N => E_err_Local_req_X_N, E_err_IDLE_req_X_W => E_err_IDLE_req_X_W, E_err_North_req_X_W => E_err_North_req_X_W, E_err_East_req_X_S => E_err_East_req_X_S, E_err_West_req_X_L => E_err_West_req_X_L, E_err_South_req_X_N => E_err_South_req_X_N, E_err_Local_req_X_E => E_err_Local_req_X_E, E_err_IDLE_req_X_S => E_err_IDLE_req_X_S, E_err_North_req_X_S => E_err_North_req_X_S, E_err_East_req_X_L => E_err_East_req_X_L, E_err_West_req_X_N => E_err_West_req_X_N, E_err_South_req_X_E => E_err_South_req_X_E, E_err_Local_req_X_W => E_err_Local_req_X_W, E_err_IDLE_req_X_L => E_err_IDLE_req_X_L, E_err_North_req_X_L => E_err_North_req_X_L, E_err_East_req_X_N => E_err_East_req_X_N, E_err_West_req_X_E => E_err_West_req_X_E, E_err_South_req_X_W => E_err_South_req_X_W, E_err_Local_req_X_S => E_err_Local_req_X_S, E_arbiter_out_err_state_in_onehot => E_arbiter_out_err_state_in_onehot, E_arbiter_out_err_no_request_grants => E_arbiter_out_err_no_request_grants, E_err_request_IDLE_state => E_err_request_IDLE_state, E_err_request_IDLE_not_Grants => E_err_request_IDLE_not_Grants, E_err_state_North_Invalid_Grant => E_err_state_North_Invalid_Grant, E_err_state_East_Invalid_Grant => E_err_state_East_Invalid_Grant, E_err_state_West_Invalid_Grant => E_err_state_West_Invalid_Grant, E_err_state_South_Invalid_Grant => E_err_state_South_Invalid_Grant, E_err_state_Local_Invalid_Grant => E_err_state_Local_Invalid_Grant, E_err_Grants_onehot_or_all_zero => E_err_Grants_onehot_or_all_zero, -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal => W_arbiter_out_err_Requests_state_in_state_not_equal, W_err_IDLE_req_X_N => W_err_IDLE_req_X_N, W_err_North_req_X_N => W_err_North_req_X_N, W_err_North_credit_not_zero_req_X_N_grant_N => W_err_North_credit_not_zero_req_X_N_grant_N, W_err_North_credit_zero_or_not_req_X_N_not_grant_N => W_err_North_credit_zero_or_not_req_X_N_not_grant_N, W_err_East_req_X_E => W_err_East_req_X_E, W_err_East_credit_not_zero_req_X_E_grant_E => W_err_East_credit_not_zero_req_X_E_grant_E, W_err_East_credit_zero_or_not_req_X_E_not_grant_E => W_err_East_credit_zero_or_not_req_X_E_not_grant_E, W_err_West_req_X_W => W_err_West_req_X_W, W_err_West_credit_not_zero_req_X_W_grant_W => W_err_West_credit_not_zero_req_X_W_grant_W, W_err_West_credit_zero_or_not_req_X_W_not_grant_W => W_err_West_credit_zero_or_not_req_X_W_not_grant_W, W_err_South_req_X_S => W_err_South_req_X_S, W_err_South_credit_not_zero_req_X_S_grant_S => W_err_South_credit_not_zero_req_X_S_grant_S, W_err_South_credit_zero_or_not_req_X_S_not_grant_S => W_err_South_credit_zero_or_not_req_X_S_not_grant_S, W_err_Local_req_X_L => W_err_Local_req_X_L, W_err_Local_credit_not_zero_req_X_L_grant_L => W_err_Local_credit_not_zero_req_X_L_grant_L, W_err_Local_credit_zero_or_not_req_X_L_not_grant_L => W_err_Local_credit_zero_or_not_req_X_L_not_grant_L, W_err_IDLE_req_X_E => W_err_IDLE_req_X_E, W_err_North_req_X_E => W_err_North_req_X_E, W_err_East_req_X_W => W_err_East_req_X_W, W_err_West_req_X_S => W_err_West_req_X_S, W_err_South_req_X_L => W_err_South_req_X_L, W_err_Local_req_X_N => W_err_Local_req_X_N, W_err_IDLE_req_X_W => W_err_IDLE_req_X_W, W_err_North_req_X_W => W_err_North_req_X_W, W_err_East_req_X_S => W_err_East_req_X_S, W_err_West_req_X_L => W_err_West_req_X_L, W_err_South_req_X_N => W_err_South_req_X_N, W_err_Local_req_X_E => W_err_Local_req_X_E, W_err_IDLE_req_X_S => W_err_IDLE_req_X_S, W_err_North_req_X_S => W_err_North_req_X_S, W_err_East_req_X_L => W_err_East_req_X_L, W_err_West_req_X_N => W_err_West_req_X_N, W_err_South_req_X_E => W_err_South_req_X_E, W_err_Local_req_X_W => W_err_Local_req_X_W, W_err_IDLE_req_X_L => W_err_IDLE_req_X_L, W_err_North_req_X_L => W_err_North_req_X_L, W_err_East_req_X_N => W_err_East_req_X_N, W_err_West_req_X_E => W_err_West_req_X_E, W_err_South_req_X_W => W_err_South_req_X_W, W_err_Local_req_X_S => W_err_Local_req_X_S, W_arbiter_out_err_state_in_onehot => W_arbiter_out_err_state_in_onehot, W_arbiter_out_err_no_request_grants => W_arbiter_out_err_no_request_grants, W_err_request_IDLE_state => W_err_request_IDLE_state, W_err_request_IDLE_not_Grants => W_err_request_IDLE_not_Grants, W_err_state_North_Invalid_Grant => W_err_state_North_Invalid_Grant, W_err_state_East_Invalid_Grant => W_err_state_East_Invalid_Grant, W_err_state_West_Invalid_Grant => W_err_state_West_Invalid_Grant, W_err_state_South_Invalid_Grant => W_err_state_South_Invalid_Grant, W_err_state_Local_Invalid_Grant => W_err_state_Local_Invalid_Grant, W_err_Grants_onehot_or_all_zero => W_err_Grants_onehot_or_all_zero, -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal => S_arbiter_out_err_Requests_state_in_state_not_equal, S_err_IDLE_req_X_N => S_err_IDLE_req_X_N, S_err_North_req_X_N => S_err_North_req_X_N, S_err_North_credit_not_zero_req_X_N_grant_N => S_err_North_credit_not_zero_req_X_N_grant_N, S_err_North_credit_zero_or_not_req_X_N_not_grant_N => S_err_North_credit_zero_or_not_req_X_N_not_grant_N, S_err_East_req_X_E => S_err_East_req_X_E, S_err_East_credit_not_zero_req_X_E_grant_E => S_err_East_credit_not_zero_req_X_E_grant_E, S_err_East_credit_zero_or_not_req_X_E_not_grant_E => S_err_East_credit_zero_or_not_req_X_E_not_grant_E, S_err_West_req_X_W => S_err_West_req_X_W, S_err_West_credit_not_zero_req_X_W_grant_W => S_err_West_credit_not_zero_req_X_W_grant_W, S_err_West_credit_zero_or_not_req_X_W_not_grant_W => S_err_West_credit_zero_or_not_req_X_W_not_grant_W, S_err_South_req_X_S => S_err_South_req_X_S, S_err_South_credit_not_zero_req_X_S_grant_S => S_err_South_credit_not_zero_req_X_S_grant_S, S_err_South_credit_zero_or_not_req_X_S_not_grant_S => S_err_South_credit_zero_or_not_req_X_S_not_grant_S, S_err_Local_req_X_L => S_err_Local_req_X_L, S_err_Local_credit_not_zero_req_X_L_grant_L => S_err_Local_credit_not_zero_req_X_L_grant_L, S_err_Local_credit_zero_or_not_req_X_L_not_grant_L => S_err_Local_credit_zero_or_not_req_X_L_not_grant_L, S_err_IDLE_req_X_E => S_err_IDLE_req_X_E, S_err_North_req_X_E => S_err_North_req_X_E, S_err_East_req_X_W => S_err_East_req_X_W, S_err_West_req_X_S => S_err_West_req_X_S, S_err_South_req_X_L => S_err_South_req_X_L, S_err_Local_req_X_N => S_err_Local_req_X_N, S_err_IDLE_req_X_W => S_err_IDLE_req_X_W, S_err_North_req_X_W => S_err_North_req_X_W, S_err_East_req_X_S => S_err_East_req_X_S, S_err_West_req_X_L => S_err_West_req_X_L, S_err_South_req_X_N => S_err_South_req_X_N, S_err_Local_req_X_E => S_err_Local_req_X_E, S_err_IDLE_req_X_S => S_err_IDLE_req_X_S, S_err_North_req_X_S => S_err_North_req_X_S, S_err_East_req_X_L => S_err_East_req_X_L, S_err_West_req_X_N => S_err_West_req_X_N, S_err_South_req_X_E => S_err_South_req_X_E, S_err_Local_req_X_W => S_err_Local_req_X_W, S_err_IDLE_req_X_L => S_err_IDLE_req_X_L, S_err_North_req_X_L => S_err_North_req_X_L, S_err_East_req_X_N => S_err_East_req_X_N, S_err_West_req_X_E => S_err_West_req_X_E, S_err_South_req_X_W => S_err_South_req_X_W, S_err_Local_req_X_S => S_err_Local_req_X_S, S_arbiter_out_err_state_in_onehot => S_arbiter_out_err_state_in_onehot, S_arbiter_out_err_no_request_grants => S_arbiter_out_err_no_request_grants, S_err_request_IDLE_state => S_err_request_IDLE_state, S_err_request_IDLE_not_Grants => S_err_request_IDLE_not_Grants, S_err_state_North_Invalid_Grant => S_err_state_North_Invalid_Grant, S_err_state_East_Invalid_Grant => S_err_state_East_Invalid_Grant, S_err_state_West_Invalid_Grant => S_err_state_West_Invalid_Grant, S_err_state_South_Invalid_Grant => S_err_state_South_Invalid_Grant, S_err_state_Local_Invalid_Grant => S_err_state_Local_Invalid_Grant, S_err_Grants_onehot_or_all_zero => S_err_Grants_onehot_or_all_zero, -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal => L_arbiter_out_err_Requests_state_in_state_not_equal, L_err_IDLE_req_X_N => L_err_IDLE_req_X_N, L_err_North_req_X_N => L_err_North_req_X_N, L_err_North_credit_not_zero_req_X_N_grant_N => L_err_North_credit_not_zero_req_X_N_grant_N, L_err_North_credit_zero_or_not_req_X_N_not_grant_N => L_err_North_credit_zero_or_not_req_X_N_not_grant_N, L_err_East_req_X_E => L_err_East_req_X_E, L_err_East_credit_not_zero_req_X_E_grant_E => L_err_East_credit_not_zero_req_X_E_grant_E, L_err_East_credit_zero_or_not_req_X_E_not_grant_E => L_err_East_credit_zero_or_not_req_X_E_not_grant_E, L_err_West_req_X_W => L_err_West_req_X_W, L_err_West_credit_not_zero_req_X_W_grant_W => L_err_West_credit_not_zero_req_X_W_grant_W, L_err_West_credit_zero_or_not_req_X_W_not_grant_W => L_err_West_credit_zero_or_not_req_X_W_not_grant_W, L_err_South_req_X_S => L_err_South_req_X_S, L_err_South_credit_not_zero_req_X_S_grant_S => L_err_South_credit_not_zero_req_X_S_grant_S, L_err_South_credit_zero_or_not_req_X_S_not_grant_S => L_err_South_credit_zero_or_not_req_X_S_not_grant_S, L_err_Local_req_X_L => L_err_Local_req_X_L, L_err_Local_credit_not_zero_req_X_L_grant_L => L_err_Local_credit_not_zero_req_X_L_grant_L, L_err_Local_credit_zero_or_not_req_X_L_not_grant_L => L_err_Local_credit_zero_or_not_req_X_L_not_grant_L, L_err_IDLE_req_X_E => L_err_IDLE_req_X_E, L_err_North_req_X_E => L_err_North_req_X_E, L_err_East_req_X_W => L_err_East_req_X_W, L_err_West_req_X_S => L_err_West_req_X_S, L_err_South_req_X_L => L_err_South_req_X_L, L_err_Local_req_X_N => L_err_Local_req_X_N, L_err_IDLE_req_X_W => L_err_IDLE_req_X_W, L_err_North_req_X_W => L_err_North_req_X_W, L_err_East_req_X_S => L_err_East_req_X_S, L_err_West_req_X_L => L_err_West_req_X_L, L_err_South_req_X_N => L_err_South_req_X_N, L_err_Local_req_X_E => L_err_Local_req_X_E, L_err_IDLE_req_X_S => L_err_IDLE_req_X_S, L_err_North_req_X_S => L_err_North_req_X_S, L_err_East_req_X_L => L_err_East_req_X_L, L_err_West_req_X_N => L_err_West_req_X_N, L_err_South_req_X_E => L_err_South_req_X_E, L_err_Local_req_X_W => L_err_Local_req_X_W, L_err_IDLE_req_X_L => L_err_IDLE_req_X_L, L_err_North_req_X_L => L_err_North_req_X_L, L_err_East_req_X_N => L_err_East_req_X_N, L_err_West_req_X_E => L_err_West_req_X_E, L_err_South_req_X_W => L_err_South_req_X_W, L_err_Local_req_X_S => L_err_Local_req_X_S, L_arbiter_out_err_state_in_onehot => L_arbiter_out_err_state_in_onehot, L_arbiter_out_err_no_request_grants => L_arbiter_out_err_no_request_grants, L_err_request_IDLE_state => L_err_request_IDLE_state, L_err_request_IDLE_not_Grants => L_err_request_IDLE_not_Grants, L_err_state_North_Invalid_Grant => L_err_state_North_Invalid_Grant, L_err_state_East_Invalid_Grant => L_err_state_East_Invalid_Grant, L_err_state_West_Invalid_Grant => L_err_state_West_Invalid_Grant, L_err_state_South_Invalid_Grant => L_err_state_South_Invalid_Grant, L_err_state_Local_Invalid_Grant => L_err_state_Local_Invalid_Grant, L_err_Grants_onehot_or_all_zero => L_err_Grants_onehot_or_all_zero ); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Xbar select_signals Xbar_sel_N <= '0' & '0' & Grant_NW & '0' & Grant_NL; Xbar_sel_W <= Grant_WN & '0' & '0' & '0' & Grant_WL; Xbar_sel_L <= Grant_LN & '0' & Grant_LW & '0' & '0'; ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ -- all the Xbars XBAR_N: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => (others =>'0'), West_in => FIFO_D_out_W, South_in => (others =>'0'), Local_in => FIFO_D_out_L, sel => Xbar_sel_N, Data_out=> TX_N); XBAR_W: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => (others =>'0'), West_in => FIFO_D_out_W, South_in => (others =>'0'), Local_in => FIFO_D_out_L, sel => Xbar_sel_W, Data_out=> TX_W); XBAR_L: XBAR generic map (DATA_WIDTH => DATA_WIDTH) PORT MAP (North_in => FIFO_D_out_N, East_in => (others =>'0'), West_in => FIFO_D_out_W, South_in => (others =>'0'), Local_in => FIFO_D_out_L, sel => Xbar_sel_L, Data_out=> TX_L); ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------ end;
gpl-3.0
6ac31c537bd3dc79387f2a2435841ebc
0.587237
2.932067
false
true
false
false
siavooshpayandehazad/NoC_Router
FPGA-integration/RTL/NI_AXI_wrapper_top.vhd
3
5,323
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity AXI_wrapper_top is generic ( -- Users to add parameters here -- User parameters ends -- Do not modify the parameters beyond this line -- Parameters of Axi Slave Bus Interface S00_AXI C_S00_AXI_DATA_WIDTH : integer := 32; C_S00_AXI_ADDR_WIDTH : integer := 4; NI_DEPTH : integer := 16 ); port ( -- Users to add ports here signal AXI_RX_IRQ : out std_logic; --Router connection R_RX : in std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0); R_TX : out std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0); R_DRTS : in std_logic; R_DCTS : in std_logic; R_RTS : out std_logic; R_CTS : out std_logic; -- User ports ends -- Do not modify the ports beyond this line -- Ports of Axi Slave Bus Interface S00_AXI s00_axi_aclk : in std_logic; s00_axi_aresetn : in std_logic; s00_axi_awaddr : in std_logic_vector(C_S00_AXI_ADDR_WIDTH-1 downto 0); s00_axi_awprot : in std_logic_vector(2 downto 0); s00_axi_awvalid : in std_logic; s00_axi_awready : out std_logic; s00_axi_wdata : in std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0); s00_axi_wstrb : in std_logic_vector((C_S00_AXI_DATA_WIDTH/8)-1 downto 0); s00_axi_wvalid : in std_logic; s00_axi_wready : out std_logic; s00_axi_bresp : out std_logic_vector(1 downto 0); s00_axi_bvalid : out std_logic; s00_axi_bready : in std_logic; s00_axi_araddr : in std_logic_vector(C_S00_AXI_ADDR_WIDTH-1 downto 0); s00_axi_arprot : in std_logic_vector(2 downto 0); s00_axi_arvalid : in std_logic; s00_axi_arready : out std_logic; s00_axi_rdata : out std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0); s00_axi_rresp : out std_logic_vector(1 downto 0); s00_axi_rvalid : out std_logic; s00_axi_rready : in std_logic ); end AXI_wrapper_top; architecture arch_imp of AXI_wrapper_top is -- component declaration component AXI_wrapper is generic ( C_S_AXI_DATA_WIDTH : integer := 32; NI_DEPTH : integer := 4; C_S_AXI_ADDR_WIDTH : integer := 16 ); port ( S_AXI_ACLK : in std_logic; S_AXI_ARESETN : in std_logic; S_AXI_AWADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_AWPROT : in std_logic_vector(2 downto 0); S_AXI_AWVALID : in std_logic; S_AXI_AWREADY : out std_logic; S_AXI_WDATA : in std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_WSTRB : in std_logic_vector((C_S_AXI_DATA_WIDTH/8)-1 downto 0); S_AXI_WVALID : in std_logic; S_AXI_WREADY : out std_logic; S_AXI_BRESP : out std_logic_vector(1 downto 0); S_AXI_BVALID : out std_logic; S_AXI_BREADY : in std_logic; S_AXI_ARADDR : in std_logic_vector(C_S_AXI_ADDR_WIDTH-1 downto 0); S_AXI_ARPROT : in std_logic_vector(2 downto 0); S_AXI_ARVALID : in std_logic; S_AXI_ARREADY : out std_logic; S_AXI_RDATA : out std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); S_AXI_RRESP : out std_logic_vector(1 downto 0); S_AXI_RVALID : out std_logic; S_AXI_RREADY : in std_logic; --Router connection AXI_RX_IRQ : out std_logic; --Router connection R_RX : in std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); R_TX : out std_logic_vector(C_S_AXI_DATA_WIDTH-1 downto 0); R_DRTS : in std_logic; R_DCTS : in std_logic; R_RTS : out std_logic; R_CTS : out std_logic ); end component AXI_wrapper; begin -- Instantiation of Axi Bus Interface S00_AXI AXI_wrapper_inst : AXI_wrapper generic map ( C_S_AXI_DATA_WIDTH => C_S00_AXI_DATA_WIDTH, C_S_AXI_ADDR_WIDTH => C_S00_AXI_ADDR_WIDTH, NI_DEPTH => NI_DEPTH ) port map ( S_AXI_ACLK => s00_axi_aclk, S_AXI_ARESETN => s00_axi_aresetn, S_AXI_AWADDR => s00_axi_awaddr, S_AXI_AWPROT => s00_axi_awprot, S_AXI_AWVALID => s00_axi_awvalid, S_AXI_AWREADY => s00_axi_awready, S_AXI_WDATA => s00_axi_wdata, S_AXI_WSTRB => s00_axi_wstrb, S_AXI_WVALID => s00_axi_wvalid, S_AXI_WREADY => s00_axi_wready, S_AXI_BRESP => s00_axi_bresp, S_AXI_BVALID => s00_axi_bvalid, S_AXI_BREADY => s00_axi_bready, S_AXI_ARADDR => s00_axi_araddr, S_AXI_ARPROT => s00_axi_arprot, S_AXI_ARVALID => s00_axi_arvalid, S_AXI_ARREADY => s00_axi_arready, S_AXI_RDATA => s00_axi_rdata, S_AXI_RRESP => s00_axi_rresp, S_AXI_RVALID => s00_axi_rvalid, S_AXI_RREADY => s00_axi_rready, -- Router connection R_RX => R_RX, R_DRTS => R_DRTS, R_CTS => R_CTS, R_TX => R_TX, R_DCTS => R_DCTS, R_RTS => R_RTS, AXI_RX_IRQ => AXI_RX_IRQ ); -- Add user logic here -- User logic ends end arch_imp;
gpl-3.0
b60850a5fbc158fb36781f508fe22131
0.557205
2.905568
false
false
false
false
Joozty/FIT-VUT
3. Semester/INP - Design of Computer Systems/2. Project/cpu.vhd
1
9,590
-- cpu.vhd: Simple 8-bit CPU (BrainLove interpreter) -- Copyright (C) 2016 Brno University of Technology, -- Faculty of Information Technology -- Author(s): (xharag01) -- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; -- ---------------------------------------------------------------------------- -- Entity declaration -- ---------------------------------------------------------------------------- entity cpu is port ( CLK : in std_logic; -- hodinovy signal RESET : in std_logic; -- asynchronni reset procesoru EN : in std_logic; -- povoleni cinnosti procesoru -- synchronni pamet ROM CODE_ADDR : out std_logic_vector(11 downto 0); -- adresa do pameti CODE_DATA : in std_logic_vector(7 downto 0); -- CODE_DATA <- rom[CODE_ADDR] pokud CODE_EN='1' CODE_EN : out std_logic; -- povoleni cinnosti -- synchronni pamet RAM DATA_ADDR : out std_logic_vector(9 downto 0); -- adresa do pameti DATA_WDATA : out std_logic_vector(7 downto 0); -- mem[DATA_ADDR] <- DATA_WDATA pokud DATA_EN='1' DATA_RDATA : in std_logic_vector(7 downto 0); -- DATA_RDATA <- ram[DATA_ADDR] pokud DATA_EN='1' DATA_RDWR : out std_logic; -- cteni (1) / zapis (0) DATA_EN : out std_logic; -- povoleni cinnosti -- vstupni port IN_DATA : in std_logic_vector(7 downto 0); -- IN_DATA <- stav klavesnice pokud IN_VLD='1' a IN_REQ='1' IN_VLD : in std_logic; -- data platna IN_REQ : out std_logic; -- pozadavek na vstup data -- vystupni port OUT_DATA : out std_logic_vector(7 downto 0); -- zapisovana data OUT_BUSY : in std_logic; -- LCD je zaneprazdnen (1), nelze zapisovat OUT_WE : out std_logic -- LCD <- OUT_DATA pokud OUT_WE='1' a OUT_BUSY='0' ); end cpu; -- ---------------------------------------------------------------------------- -- Architecture declaration -- ---------------------------------------------------------------------------- architecture behavioral of cpu is -- deklaracie signalov -- stavy konecneho automatu type ka_stavy is ( ka_fetch_0, ka_fetch_1, ka_decode, ka_inc, ka_dec, ka_while, ka_while_end, ka_while_while, ka_while_CNT, ka_while_end_while, ka_while_end_delay, ka_while_end_CNT, ka_out_delay, ka_out, sin, ka_in_delay_1, ka_in_delay_2, ka_save_tmp, ka_halt); signal READ_RDATA_zero: std_logic; --PTR signal PTRreg: std_logic_vector(9 downto 0); signal PTRinc: std_logic; signal PTRdec: std_logic; -- CNT signal CNTreg: std_logic_vector(7 downto 0); signal CNTzero: std_logic; signal CNTinc: std_logic; signal CNTdec: std_logic; -- PC signal PCreg: std_logic_vector(11 downto 0); signal PCinc: std_logic; signal PCdec: std_logic; --MX2 signal MX2sel: std_logic_vector(1 downto 0); -- TMP signal TMPreg: std_logic_vector(7 downto 0); signal TMPid: std_logic; --FSM signal present_state: ka_stavy; signal next_state: ka_stavy; begin -- PTR process(CLK, RESET) begin if(RESET='1')then PTRreg <= (others => '0'); elsif rising_edge(CLK) then if(PTRdec='1') then PTRreg<=PTRreg-1; elsif(PTRinc='1') then PTRreg<=PTRreg+1; end if; end if; end process; -- PC process(RESET, CLK) begin if(RESET='1') then PCreg<=(others=>'0'); elsif rising_edge(CLK) then if(PCdec='1') then PCreg<=PCreg-1; elsif(PCinc='1') then PCreg<=PCreg+1; end if; end if; end process; --MX2 process(MX2sel, IN_DATA, TMPreg, DATA_RDATA) begin case MX2sel is when "11" => DATA_WDATA<=DATA_RDATA+1; when "00" => DATA_WDATA<=IN_DATA; when "10" => DATA_WDATA<=DATA_RDATA-1; when "01" => DATA_WDATA<=TMPreg; when others => Null; end case; end process; --CNT process(RESET, CLK) begin if(RESET='1') then CNTreg<=(others=>'0'); elsif rising_edge(CLK) then if(CNTdec='1') then CNTreg<=CNTreg-1; elsif(CNTinc='1') then CNTreg<=CNTreg+1; end if; end if; end process; --is cnt zero process (CNTreg) begin if not (CNTreg = "00000000") then CNTzero <= '0'; else CNTzero <= '1'; end if; end process; -- set code address process(PCreg) begin CODE_ADDR<=PCreg; end process; -- set data address process(PTRreg) begin DATA_ADDR<=PTRreg; end process; -- TMP process(CLK, RESET) begin if(RESET='1') then TMPreg<=(others=>'0'); elsif rising_edge(CLK) then if(TMPid='1') then TMPreg <= DATA_RDATA; end if; end if; end process; -- GCV process (DATA_RDATA) begin if(DATA_RDATA = "00000000") then READ_RDATA_zero <= '1'; else READ_RDATA_zero <= '0'; end if; end process; --------------------KONECNY AUTOMAT--------------------------------- --sucastny stav process(RESET, CLK, EN) begin if(RESET='1')then present_state<=ka_fetch_0; elsif(CLK'event and EN='1' and CLK='1') then present_state<=next_state; end if; end process; --nasledujuci stav process(present_state, OUT_BUSY, CODE_DATA, DATA_RDATA, IN_VLD, READ_RDATA_zero) begin CODE_EN <= '0'; DATA_EN <= '0'; IN_REQ <= '0'; OUT_WE <= '0'; DATA_RDWR <= '1'; CNTdec <= '0'; CNTinc <= '0'; TMPid <= '0'; PCinc <= '0'; PCdec <= '0'; PTRinc <= '0'; PTRdec <= '0'; MX2sel <= (others => '0'); case present_state is when ka_decode => if(CODE_DATA = X"3E") then PTRinc <='1'; PCinc <='1'; next_state <=ka_fetch_0; elsif(CODE_DATA = X"3C") then PTRdec <='1'; PCinc <='1'; next_state <=ka_fetch_0; elsif(CODE_DATA = X"2B") then DATA_EN <='1'; next_state <=ka_inc; elsif(CODE_DATA = X"2D") then DATA_EN <='1'; next_state<=ka_dec; elsif(CODE_DATA = X"5B") then DATA_EN <='1'; next_state <= ka_while; elsif(CODE_DATA = X"5D") then DATA_EN <= '1'; next_state <= ka_while_end; elsif(CODE_DATA = X"2E") then DATA_EN <= '1'; IN_REQ <= '1'; next_state <= ka_out_delay; elsif(CODE_DATA = X"2C") then IN_REQ <= '0'; MX2sel <= "00"; next_state <= sin; elsif(CODE_DATA = X"24") then DATA_EN <= '1'; next_state <= ka_save_tmp; elsif(CODE_DATA = X"21") then DATA_EN <= '1'; DATA_RDWR <= '0'; MX2sel <= "01"; PCinc <= '1'; next_state <= ka_fetch_0; elsif(CODE_DATA = X"00") then next_state <= ka_halt; else PCinc <='1'; next_state <= ka_fetch_0; end if; when ka_inc => DATA_RDWR <= '0'; DATA_EN <= '1'; MX2sel <= "11"; PCinc <= '1'; next_state <= ka_fetch_0; when ka_dec=> DATA_RDWR <= '0'; DATA_EN <='1'; MX2sel <= "10"; PCinc <= '1'; next_state<=ka_fetch_0; when ka_fetch_0 => CODE_EN <= '1'; next_state<=ka_fetch_1; when ka_fetch_1 => next_state<=ka_decode; when ka_while => PCinc <='1'; if(READ_RDATA_zero = '1') then if(CNTreg = "00000000") then CNTinc <= '1'; end if; CODE_EN <= '1'; next_state <= ka_while_CNT; else next_state <= ka_fetch_0; end if; when ka_while_while => next_state <=ka_while; if(CODE_DATA = X"5D" ) then CNTdec <='1'; if(CNTreg = "00000001") then PCinc <= '1'; next_state <= ka_fetch_0; end if; elsif(CODE_DATA = X"5B")then CNTinc <= '1'; end if; when ka_while_end => DATA_EN <= '1'; if not (READ_RDATA_zero = '1') then CNTinc <= '1'; CODE_EN <= '1'; PCdec <= '1'; next_state <= ka_while_end_delay; else PCinc <= '1'; next_state <= ka_fetch_0; end if; when ka_while_CNT => if not (CNTreg = "00000000") then CODE_EN <= '1'; next_state <= ka_while_while; else next_state <= ka_fetch_0; end if; when ka_while_end_delay => CODE_EN <= '1'; next_state <= ka_while_end_while; when ka_while_end_while => next_state <= ka_while_end_CNT; if(CODE_DATA = X"5D") then CNTinc <= '1'; elsif(CODE_DATA = X"5B")then CNTdec <= '1'; end if; when ka_while_end_CNT => CODE_EN <= '1'; if not (CNTreg = "00000000") then PCdec <='1'; next_state <= ka_while_end_delay; else PCinc <= '1'; next_state <= ka_fetch_0; end if; when sin => next_state <= sin; IN_REQ <= '1'; if(IN_VLD = '1') then DATA_RDWR <= '0'; DATA_EN <= '1'; MX2sel <= "00"; next_state <= ka_in_delay_1; end if; when ka_in_delay_1 => DATA_RDWR <='0'; DATA_EN <='1'; next_state <= ka_in_delay_2; when ka_in_delay_2 => PCinc <='1'; next_state<=ka_fetch_0; when ka_save_tmp => TMPid <='1'; PCinc <='1'; next_state <=ka_fetch_0; when ka_out_delay => DATA_EN <='1'; DATA_RDWR <='1'; next_state <= ka_out; when ka_out => next_state <= ka_out; if(OUT_BUSY = '0') then OUT_WE <= '1'; OUT_DATA <= DATA_RDATA; PCinc <= '1'; next_state <= ka_fetch_0; end if; when ka_halt => next_state <= ka_halt; when others=> next_state <= ka_halt; end case; end process; end behavioral;
gpl-3.0
cdad66fbbb641e244603bb45c07283fe
0.520542
2.926457
false
false
false
false
elainemielas/CVUT_BI-PNO
project1/hex2seg.vhd
1
3,277
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- zobrazi 4 hexa cislice (DATA) na 4 mistnem 7segmentovem displeji (SEGMENT, DP, DIGIT) entity HEX2SEG is port ( DATA : in STD_LOGIC_VECTOR (15 downto 0); -- vstupni data k zobrazeni (4 sestnactkove cislice) CLK : in STD_LOGIC; SEGMENT : out STD_LOGIC_VECTOR (6 downto 0); -- 7 segmentu displeje DP : out STD_LOGIC; -- desetinna tecka DIGIT : out STD_LOGIC_VECTOR (3 downto 0) -- 4 cifry displeje ); end HEX2SEG; architecture HEX2SEG_BODY of HEX2SEG is constant PRESCALER_WIDTH : integer := 16; signal PRESCALER : std_logic_vector (PRESCALER_WIDTH-1 downto 0); signal SEL : std_logic_vector (1 downto 0); signal HEX : std_logic_vector (3 downto 0); begin -- hodinovy kmitocet 50 MHz vydelime pomoci 16 bitoveho citace -- tim ziskame obnovovaci kmitocet displeje P_PRESCALER : process (CLK) begin if CLK = '1' and CLK'event then PRESCALER <= PRESCALER + 1; end if; end process; -- nejvyssi 2 bity citace slouzi k prepinani 4 cifer displeje SEL <= PRESCALER(PRESCALER_WIDTH-1 downto PRESCALER_WIDTH-2); -- binarni kod prevedeme do kodu 1 z N -- cifra I je aktivni, jestlize DIGIT(I) = '0' SEL_DIGIT : process (SEL) begin case SEL is when "00" => DIGIT <= "1110"; -- 0. cifra when "01" => DIGIT <= "1101"; -- 1. cifra when "10" => DIGIT <= "1011"; -- 2. cifra when others => DIGIT <= "0111"; -- 3. cifra end case; end process; -- a zaroven vybereme prislusnou ctverici bitu (sestnactkovou cifru) k zobrazeni SEL_INPUT : process (SEL, DATA) begin case SEL is when "00" => HEX <= DATA( 3 downto 0); -- 0. sestnactkova cifra when "01" => HEX <= DATA( 7 downto 4); -- 1. sestnactkova cifra when "10" => HEX <= DATA(11 downto 8); -- 2. sestnactkova cifra when others => HEX <= DATA(15 downto 12); -- 3. sestnactkova cifra end case; end process; -- ctverici bitu (sestnactkovou cifru) prevedeme na sedmici segmentu -- segement J sviti, pokud SEGMENT(J) = '0' HEX_2_7SEG : process (HEX) begin case HEX is -- -- abcdefg when "0000" => SEGMENT <= "0000001"; -- 0 when "0001" => SEGMENT <= "1001111"; -- 1 when "0010" => SEGMENT <= "0010010"; -- 2 when "0011" => SEGMENT <= "0000110"; -- 3 when "0100" => SEGMENT <= "1001100"; -- 4 when "0101" => SEGMENT <= "0100100"; -- 5 when "0110" => SEGMENT <= "0100000"; -- 6 when "0111" => SEGMENT <= "0001111"; -- 7 when "1000" => SEGMENT <= "0000000"; -- 8 when "1001" => SEGMENT <= "0000100"; -- 9 when "1010" => SEGMENT <= "0001000"; -- A when "1011" => SEGMENT <= "1100000"; -- b when "1100" => SEGMENT <= "0110001"; -- C when "1101" => SEGMENT <= "1000010"; -- d when "1110" => SEGMENT <= "0110000"; -- E when others => SEGMENT <= "0111000"; -- F end case; end process; -- desetinna tecka bude stale zhasnuta DP <= '1'; end HEX2SEG_BODY;
mit
cc62005fb93c2f9048a66e54f8e6f53b
0.561489
3.427824
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/Checkers/Control_Part_Checkers/Allocator_checkers/Arbiter_out_one_hot_checkers/RTL/Arbiter_out_one_hot_pseudo_with_checkers_top.vhd
3
11,199
library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity Arbiter_out_one_hot_pseudo_with_checkers_top is port ( credit: in std_logic_vector(1 downto 0); req_X_N, req_X_E, req_X_W, req_X_S, req_X_L :in std_logic; -- From LBDR modules state: in std_logic_vector (5 downto 0); -- 6 states for Arbiter_out's FSM grant_Y_N, grant_Y_E, grant_Y_W, grant_Y_S, grant_Y_L : out std_logic; -- Grants given to LBDR requests (encoded as one-hot) state_in: out std_logic_vector (5 downto 0); -- 6 states for Arbiter's FSM -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_req_X_N, err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E, err_North_req_X_E, err_East_req_X_W, err_West_req_X_S, err_South_req_X_L, err_Local_req_X_N, err_IDLE_req_X_W, err_North_req_X_W, err_East_req_X_S, err_West_req_X_L, err_South_req_X_N, err_Local_req_X_E, err_IDLE_req_X_S, err_North_req_X_S, err_East_req_X_L, err_West_req_X_N, err_South_req_X_E, err_Local_req_X_W, err_IDLE_req_X_L, err_North_req_X_L, err_East_req_X_N, err_West_req_X_E, err_South_req_X_W, err_Local_req_X_S, err_state_in_onehot, err_no_request_grants, err_request_IDLE_state, err_request_IDLE_not_Grants, err_state_North_Invalid_Grant, err_state_East_Invalid_Grant, err_state_West_Invalid_Grant, err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero : out std_logic ); end Arbiter_out_one_hot_pseudo_with_checkers_top; architecture behavior of Arbiter_out_one_hot_pseudo_with_checkers_top is component arbiter_out_one_hot_pseudo is port ( credit: in std_logic_vector(1 downto 0); req_X_N, req_X_E, req_X_W, req_X_S, req_X_L :in std_logic; -- From LBDR modules state: in std_logic_vector (5 downto 0); -- 6 states for Arbiter_out's FSM grant_Y_N, grant_Y_E, grant_Y_W, grant_Y_S, grant_Y_L : out std_logic; -- Grants given to LBDR requests (encoded as one-hot) state_in: out std_logic_vector (5 downto 0) -- 6 states for Arbiter's FSM ); end component; component Arbiter_out_one_hot_pseudo_checkers is port ( credit: in std_logic_vector(1 downto 0); req_X_N, req_X_E, req_X_W, req_X_S, req_X_L :in std_logic; -- From LBDR modules state: in std_logic_vector (5 downto 0); -- 6 states for Arbiter_out's FSM grant_Y_N, grant_Y_E, grant_Y_W, grant_Y_S, grant_Y_L : in std_logic; -- Grants given to LBDR requests (encoded as one-hot) state_in: in std_logic_vector (5 downto 0); -- 6 states for Arbiter's FSM -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_req_X_N, err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E, err_North_req_X_E, err_East_req_X_W, err_West_req_X_S, err_South_req_X_L, err_Local_req_X_N, err_IDLE_req_X_W, err_North_req_X_W, err_East_req_X_S, err_West_req_X_L, err_South_req_X_N, err_Local_req_X_E, err_IDLE_req_X_S, err_North_req_X_S, err_East_req_X_L, err_West_req_X_N, err_South_req_X_E, err_Local_req_X_W, err_IDLE_req_X_L, err_North_req_X_L, err_East_req_X_N, err_West_req_X_E, err_South_req_X_W, err_Local_req_X_S, err_state_in_onehot, err_no_request_grants, err_request_IDLE_state, err_request_IDLE_not_Grants, err_state_North_Invalid_Grant, err_state_East_Invalid_Grant, err_state_West_Invalid_Grant, err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero : out std_logic ); end component; signal grant_Y_N_sig, grant_Y_E_sig, grant_Y_W_sig, grant_Y_S_sig, grant_Y_L_sig: std_logic; signal state_in_sig: std_logic_vector (5 downto 0); begin grant_Y_N <= grant_Y_N_sig; grant_Y_E <= grant_Y_E_sig; grant_Y_W <= grant_Y_W_sig; grant_Y_S <= grant_Y_S_sig; grant_Y_L <= grant_Y_L_sig; state_in <= state_in_sig; -- Arbiter_out instantiation ARBITER_OUT_ONE_HOT: arbiter_out_one_hot_pseudo port map ( credit => credit, req_X_N => req_X_N, req_X_E => req_X_E, req_X_W => req_X_W, req_X_S => req_X_S, req_X_L => req_X_L, state => state, grant_Y_N => grant_Y_N_sig, grant_Y_E => grant_Y_E_sig, grant_Y_W => grant_Y_W_sig, grant_Y_S => grant_Y_S_sig, grant_Y_L => grant_Y_L_sig, state_in => state_in_sig ); -- Checkers instantiation CHECKERS: Arbiter_out_one_hot_pseudo_checkers port map ( credit => credit, req_X_N => req_X_N, req_X_E => req_X_E, req_X_W => req_X_W, req_X_S => req_X_S, req_X_L => req_X_L, state => state, grant_Y_N => grant_Y_N_sig, grant_Y_E => grant_Y_E_sig, grant_Y_W => grant_Y_W_sig, grant_Y_S => grant_Y_S_sig, grant_Y_L => grant_Y_L_sig, state_in => state_in_sig, -- Checker Outputs err_Requests_state_in_state_not_equal => err_Requests_state_in_state_not_equal, err_IDLE_req_X_N => err_IDLE_req_X_N, err_North_req_X_N => err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N => err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N => err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E => err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E => err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E => err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W => err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W => err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W => err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S => err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S => err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S => err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L => err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L => err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L => err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E => err_IDLE_req_X_E, err_North_req_X_E => err_North_req_X_E, err_East_req_X_W => err_East_req_X_W, err_West_req_X_S => err_West_req_X_S, err_South_req_X_L => err_South_req_X_L, err_Local_req_X_N => err_Local_req_X_N, err_IDLE_req_X_W => err_IDLE_req_X_W, err_North_req_X_W => err_North_req_X_W, err_East_req_X_S => err_East_req_X_S, err_West_req_X_L => err_West_req_X_L, err_South_req_X_N => err_South_req_X_N, err_Local_req_X_E => err_Local_req_X_E, err_IDLE_req_X_S => err_IDLE_req_X_S, err_North_req_X_S => err_North_req_X_S, err_East_req_X_L => err_East_req_X_L, err_West_req_X_N => err_West_req_X_N, err_South_req_X_E => err_South_req_X_E, err_Local_req_X_W => err_Local_req_X_W, err_IDLE_req_X_L => err_IDLE_req_X_L, err_North_req_X_L => err_North_req_X_L, err_East_req_X_N => err_East_req_X_N, err_West_req_X_E => err_West_req_X_E, err_South_req_X_W => err_South_req_X_W, err_Local_req_X_S => err_Local_req_X_S, err_state_in_onehot => err_state_in_onehot, err_no_request_grants => err_no_request_grants, err_request_IDLE_state => err_request_IDLE_state, err_request_IDLE_not_Grants => err_request_IDLE_not_Grants, err_state_North_Invalid_Grant => err_state_North_Invalid_Grant, err_state_East_Invalid_Grant => err_state_East_Invalid_Grant, err_state_West_Invalid_Grant => err_state_West_Invalid_Grant, err_state_South_Invalid_Grant => err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant => err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero => err_Grants_onehot_or_all_zero ); end behavior;
gpl-3.0
00ca78b624e5a44c2cf4e6ef5036174d
0.521118
2.810994
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/mlite_pack.vhd
3
26,279
--------------------------------------------------------------------- -- TITLE: Plasma Misc. Package -- Main AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 2/15/01 -- FILENAME: mlite_pack.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Data types, constants, and add functions needed for the Plasma CPU. -- modified by: Siavoosh Payandeh Azad -- Change logs: -- * An NI has been added to the file as a new module -- * some changes has been applied to the ports of the older modules -- to facilitate the new module! --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; package mlite_pack is constant ZERO : std_logic_vector(31 downto 0) := "00000000000000000000000000000000"; constant ONES : std_logic_vector(31 downto 0) := "11111111111111111111111111111111"; --make HIGH_Z equal to ZERO if compiler complains constant HIGH_Z : std_logic_vector(31 downto 0) := "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; subtype alu_function_type is std_logic_vector(3 downto 0); constant ALU_NOTHING : alu_function_type := "0000"; constant ALU_ADD : alu_function_type := "0001"; constant ALU_SUBTRACT : alu_function_type := "0010"; constant ALU_LESS_THAN : alu_function_type := "0011"; constant ALU_LESS_THAN_SIGNED : alu_function_type := "0100"; constant ALU_OR : alu_function_type := "0101"; constant ALU_AND : alu_function_type := "0110"; constant ALU_XOR : alu_function_type := "0111"; constant ALU_NOR : alu_function_type := "1000"; subtype shift_function_type is std_logic_vector(1 downto 0); constant SHIFT_NOTHING : shift_function_type := "00"; constant SHIFT_LEFT_UNSIGNED : shift_function_type := "01"; constant SHIFT_RIGHT_SIGNED : shift_function_type := "11"; constant SHIFT_RIGHT_UNSIGNED : shift_function_type := "10"; subtype mult_function_type is std_logic_vector(3 downto 0); constant MULT_NOTHING : mult_function_type := "0000"; constant MULT_READ_LO : mult_function_type := "0001"; constant MULT_READ_HI : mult_function_type := "0010"; constant MULT_WRITE_LO : mult_function_type := "0011"; constant MULT_WRITE_HI : mult_function_type := "0100"; constant MULT_MULT : mult_function_type := "0101"; constant MULT_SIGNED_MULT : mult_function_type := "0110"; constant MULT_DIVIDE : mult_function_type := "0111"; constant MULT_SIGNED_DIVIDE : mult_function_type := "1000"; subtype a_source_type is std_logic_vector(1 downto 0); constant A_FROM_REG_SOURCE : a_source_type := "00"; constant A_FROM_IMM10_6 : a_source_type := "01"; constant A_FROM_PC : a_source_type := "10"; subtype b_source_type is std_logic_vector(1 downto 0); constant B_FROM_REG_TARGET : b_source_type := "00"; constant B_FROM_IMM : b_source_type := "01"; constant B_FROM_SIGNED_IMM : b_source_type := "10"; constant B_FROM_IMMX4 : b_source_type := "11"; subtype c_source_type is std_logic_vector(2 downto 0); constant C_FROM_NULL : c_source_type := "000"; constant C_FROM_ALU : c_source_type := "001"; constant C_FROM_SHIFT : c_source_type := "001"; --same as alu constant C_FROM_MULT : c_source_type := "001"; --same as alu constant C_FROM_MEMORY : c_source_type := "010"; constant C_FROM_PC : c_source_type := "011"; constant C_FROM_PC_PLUS4 : c_source_type := "100"; constant C_FROM_IMM_SHIFT16: c_source_type := "101"; constant C_FROM_REG_SOURCEN: c_source_type := "110"; subtype pc_source_type is std_logic_vector(1 downto 0); constant FROM_INC4 : pc_source_type := "00"; constant FROM_OPCODE25_0 : pc_source_type := "01"; constant FROM_BRANCH : pc_source_type := "10"; constant FROM_LBRANCH : pc_source_type := "11"; subtype branch_function_type is std_logic_vector(2 downto 0); constant BRANCH_LTZ : branch_function_type := "000"; constant BRANCH_LEZ : branch_function_type := "001"; constant BRANCH_EQ : branch_function_type := "010"; constant BRANCH_NE : branch_function_type := "011"; constant BRANCH_GEZ : branch_function_type := "100"; constant BRANCH_GTZ : branch_function_type := "101"; constant BRANCH_YES : branch_function_type := "110"; constant BRANCH_NO : branch_function_type := "111"; -- mode(32=1,16=2,8=3), signed, write subtype mem_source_type is std_logic_vector(3 downto 0); constant MEM_FETCH : mem_source_type := "0000"; constant MEM_READ32 : mem_source_type := "0100"; constant MEM_WRITE32 : mem_source_type := "0101"; constant MEM_READ16 : mem_source_type := "1000"; constant MEM_READ16S : mem_source_type := "1010"; constant MEM_WRITE16 : mem_source_type := "1001"; constant MEM_READ8 : mem_source_type := "1100"; constant MEM_READ8S : mem_source_type := "1110"; constant MEM_WRITE8 : mem_source_type := "1101"; function bv_adder(a : in std_logic_vector; b : in std_logic_vector; do_add: in std_logic) return std_logic_vector; function bv_negate(a : in std_logic_vector) return std_logic_vector; function bv_increment(a : in std_logic_vector(31 downto 2) ) return std_logic_vector; function bv_inc(a : in std_logic_vector ) return std_logic_vector; -- For Altera COMPONENT lpm_ram_dp generic ( LPM_WIDTH : natural; -- MUST be greater than 0 LPM_WIDTHAD : natural; -- MUST be greater than 0 LPM_NUMWORDS : natural := 0; LPM_INDATA : string := "REGISTERED"; LPM_OUTDATA : string := "REGISTERED"; LPM_RDADDRESS_CONTROL : string := "REGISTERED"; LPM_WRADDRESS_CONTROL : string := "REGISTERED"; LPM_FILE : string := "UNUSED"; LPM_TYPE : string := "LPM_RAM_DP"; USE_EAB : string := "OFF"; INTENDED_DEVICE_FAMILY : string := "UNUSED"; RDEN_USED : string := "TRUE"; LPM_HINT : string := "UNUSED"); port ( RDCLOCK : in std_logic := '0'; RDCLKEN : in std_logic := '1'; RDADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); RDEN : in std_logic := '1'; DATA : in std_logic_vector(LPM_WIDTH-1 downto 0); WRADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); WREN : in std_logic; WRCLOCK : in std_logic := '0'; WRCLKEN : in std_logic := '1'; Q : out std_logic_vector(LPM_WIDTH-1 downto 0)); END COMPONENT; -- For Altera component LPM_RAM_DQ generic ( LPM_WIDTH : natural; -- MUST be greater than 0 LPM_WIDTHAD : natural; -- MUST be greater than 0 LPM_NUMWORDS : natural := 0; LPM_INDATA : string := "REGISTERED"; LPM_ADDRESS_CONTROL: string := "REGISTERED"; LPM_OUTDATA : string := "REGISTERED"; LPM_FILE : string := "UNUSED"; LPM_TYPE : string := "LPM_RAM_DQ"; USE_EAB : string := "OFF"; INTENDED_DEVICE_FAMILY : string := "UNUSED"; LPM_HINT : string := "UNUSED"); port ( DATA : in std_logic_vector(LPM_WIDTH-1 downto 0); ADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); INCLOCK : in std_logic := '0'; OUTCLOCK : in std_logic := '0'; WE : in std_logic; Q : out std_logic_vector(LPM_WIDTH-1 downto 0)); end component; -- For Xilinx component RAM16X1D -- synthesis translate_off generic (INIT : bit_vector := X"0000"); -- synthesis translate_on port (DPO : out STD_ULOGIC; SPO : out STD_ULOGIC; A0 : in STD_ULOGIC; A1 : in STD_ULOGIC; A2 : in STD_ULOGIC; A3 : in STD_ULOGIC; D : in STD_ULOGIC; DPRA0 : in STD_ULOGIC; DPRA1 : in STD_ULOGIC; DPRA2 : in STD_ULOGIC; DPRA3 : in STD_ULOGIC; WCLK : in STD_ULOGIC; WE : in STD_ULOGIC); end component; -- For Xilinx Virtex-5 component RAM32X1D -- synthesis translate_off generic (INIT : bit_vector := X"00000000"); -- synthesis translate_on port (DPO : out STD_ULOGIC; SPO : out STD_ULOGIC; A0 : in STD_ULOGIC; A1 : in STD_ULOGIC; A2 : in STD_ULOGIC; A3 : in STD_ULOGIC; A4 : in STD_ULOGIC; D : in STD_ULOGIC; DPRA0 : in STD_ULOGIC; DPRA1 : in STD_ULOGIC; DPRA2 : in STD_ULOGIC; DPRA3 : in STD_ULOGIC; DPRA4 : in STD_ULOGIC; WCLK : in STD_ULOGIC; WE : in STD_ULOGIC); end component; component pc_next port(clk : in std_logic; reset_in : in std_logic; pc_new : in std_logic_vector(31 downto 2); take_branch : in std_logic; pause_in : in std_logic; opcode25_0 : in std_logic_vector(25 downto 0); pc_source : in pc_source_type; pc_future : out std_logic_vector(31 downto 2); pc_current : out std_logic_vector(31 downto 2); pc_plus4 : out std_logic_vector(31 downto 2)); end component; component mem_ctrl port(clk : in std_logic; reset_in : in std_logic; pause_in : in std_logic; nullify_op : in std_logic; address_pc : in std_logic_vector(31 downto 2); opcode_out : out std_logic_vector(31 downto 0); address_in : in std_logic_vector(31 downto 0); mem_source : in mem_source_type; data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); pause_out : out std_logic; address_next : out std_logic_vector(31 downto 2); byte_we_next : out std_logic_vector(3 downto 0); address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_w : out std_logic_vector(31 downto 0); data_r : in std_logic_vector(31 downto 0)); end component; component control port(opcode : in std_logic_vector(31 downto 0); intr_signal : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; rs_index : out std_logic_vector(5 downto 0); rt_index : out std_logic_vector(5 downto 0); rd_index : out std_logic_vector(5 downto 0); imm_out : out std_logic_vector(15 downto 0); alu_func : out alu_function_type; shift_func : out shift_function_type; mult_func : out mult_function_type; branch_func : out branch_function_type; a_source_out : out a_source_type; b_source_out : out b_source_type; c_source_out : out c_source_type; pc_source_out: out pc_source_type; mem_source_out:out mem_source_type; exception_out: out std_logic); end component; component reg_bank generic(memory_type : string := "XILINX_16X"); port(clk : in std_logic; reset_in : in std_logic; pause : in std_logic; interrupt_in : in std_logic; -- modified rs_index : in std_logic_vector(5 downto 0); rt_index : in std_logic_vector(5 downto 0); rd_index : in std_logic_vector(5 downto 0); reg_source_out : out std_logic_vector(31 downto 0); reg_target_out : out std_logic_vector(31 downto 0); reg_dest_new : in std_logic_vector(31 downto 0); intr_enable : out std_logic); end component; component bus_mux port(imm_in : in std_logic_vector(15 downto 0); reg_source : in std_logic_vector(31 downto 0); a_mux : in a_source_type; a_out : out std_logic_vector(31 downto 0); reg_target : in std_logic_vector(31 downto 0); b_mux : in b_source_type; b_out : out std_logic_vector(31 downto 0); c_bus : in std_logic_vector(31 downto 0); c_memory : in std_logic_vector(31 downto 0); c_pc : in std_logic_vector(31 downto 2); c_pc_plus4 : in std_logic_vector(31 downto 2); c_mux : in c_source_type; reg_dest_out : out std_logic_vector(31 downto 0); branch_func : in branch_function_type; take_branch : out std_logic); end component; component alu generic(alu_type : string := "DEFAULT"); port(a_in : in std_logic_vector(31 downto 0); b_in : in std_logic_vector(31 downto 0); alu_function : in alu_function_type; c_alu : out std_logic_vector(31 downto 0)); end component; component shifter generic(shifter_type : string := "DEFAULT" ); port(value : in std_logic_vector(31 downto 0); shift_amount : in std_logic_vector(4 downto 0); shift_func : in shift_function_type; c_shift : out std_logic_vector(31 downto 0)); end component; component mult generic(mult_type : string := "DEFAULT"); port(clk : in std_logic; reset_in : in std_logic; a, b : in std_logic_vector(31 downto 0); mult_func : in mult_function_type; c_mult : out std_logic_vector(31 downto 0); pause_out : out std_logic); end component; component pipeline port(clk : in std_logic; reset : in std_logic; a_bus : in std_logic_vector(31 downto 0); a_busD : out std_logic_vector(31 downto 0); b_bus : in std_logic_vector(31 downto 0); b_busD : out std_logic_vector(31 downto 0); alu_func : in alu_function_type; alu_funcD : out alu_function_type; shift_func : in shift_function_type; shift_funcD : out shift_function_type; mult_func : in mult_function_type; mult_funcD : out mult_function_type; reg_dest : in std_logic_vector(31 downto 0); reg_destD : out std_logic_vector(31 downto 0); rd_index : in std_logic_vector(5 downto 0); rd_indexD : out std_logic_vector(5 downto 0); rs_index : in std_logic_vector(5 downto 0); rt_index : in std_logic_vector(5 downto 0); pc_source : in pc_source_type; mem_source : in mem_source_type; a_source : in a_source_type; b_source : in b_source_type; c_source : in c_source_type; c_bus : in std_logic_vector(31 downto 0); pause_any : in std_logic; pause_pipeline : out std_logic); end component; component mlite_cpu generic(memory_type : string := "XILINX_16X"; --ALTERA_LPM, or DUAL_PORT_ mult_type : string := "DEFAULT"; shifter_type : string := "DEFAULT"; alu_type : string := "DEFAULT"; pipeline_stages : natural := 2); --2 or 3 port(clk : in std_logic; reset_in : in std_logic; intr_in : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; address_next : out std_logic_vector(31 downto 2); --for synch ram byte_we_next : out std_logic_vector(3 downto 0); address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_w : out std_logic_vector(31 downto 0); data_r : in std_logic_vector(31 downto 0); mem_pause : in std_logic); end component; component cache generic(memory_type : string := "DEFAULT"); port(clk : in std_logic; reset : in std_logic; address_next : in std_logic_vector(31 downto 2); byte_we_next : in std_logic_vector(3 downto 0); cpu_address : in std_logic_vector(31 downto 2); mem_busy : in std_logic; cache_access : out std_logic; --access 4KB cache cache_checking : out std_logic; --checking if cache hit cache_miss : out std_logic); --cache miss end component; --cache component ram generic(memory_type : string := "DEFAULT"; stim_file: string :="code.txt"); port(clk : in std_logic; enable : in std_logic; reset : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0)); end component; --ram component NI generic(current_address : integer := 10; -- the current node's address SHMU_address : integer := 0; reserved_address : std_logic_vector(29 downto 0) := "000000000000000001111111111111"; flag_address : std_logic_vector(29 downto 0) := "000000000000000010000000000000"; -- reserved address for the memory mapped I/O counter_address : std_logic_vector(29 downto 0) := "000000000000000010000000000001"); -- reserved address for the counter port(clk : in std_logic; reset : in std_logic; enable : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); --NI_read_flag : out std_logic; --NI_write_flag : out std_logic; irq_out : out std_logic; credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(7 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); Reconfig_command : out std_logic ); end component; --network interface component uart generic(log_file : string := "UNUSED"); port(clk : in std_logic; reset : in std_logic; enable_read : in std_logic; enable_write : in std_logic; data_in : in std_logic_vector(7 downto 0); data_out : out std_logic_vector(7 downto 0); uart_read : in std_logic; uart_write : out std_logic; busy_write : out std_logic; data_avail : out std_logic); end component; --uart component eth_dma port(clk : in std_logic; --25 MHz reset : in std_logic; enable_eth : in std_logic; select_eth : in std_logic; rec_isr : out std_logic; send_isr : out std_logic; address : out std_logic_vector(31 downto 2); --to DDR byte_we : out std_logic_vector(3 downto 0); data_write : out std_logic_vector(31 downto 0); data_read : in std_logic_vector(31 downto 0); pause_in : in std_logic; mem_address : in std_logic_vector(31 downto 2); --from CPU mem_byte_we : in std_logic_vector(3 downto 0); data_w : in std_logic_vector(31 downto 0); pause_out : out std_logic; E_RX_CLK : in std_logic; --2.5 MHz receive E_RX_DV : in std_logic; --data valid E_RXD : in std_logic_vector(3 downto 0); --receive nibble E_TX_CLK : in std_logic; --2.5 MHz transmit E_TX_EN : out std_logic; --transmit enable E_TXD : out std_logic_vector(3 downto 0)); --transmit nibble end component; --eth_dma component plasma generic(memory_type : string := "XILINX_X16"; --"DUAL_PORT_" "ALTERA_LPM"; log_file : string := "UNUSED"; ethernet : std_logic := '0'; use_cache : std_logic := '0'; current_address : integer := 10; stim_file: string :="code.txt"); port(clk : in std_logic; reset : in std_logic; uart_write : out std_logic; uart_read : in std_logic; address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_write : out std_logic_vector(31 downto 0); data_read : in std_logic_vector(31 downto 0); mem_pause_in : in std_logic; no_ddr_start : out std_logic; no_ddr_stop : out std_logic; gpio0_out : out std_logic_vector(31 downto 0); gpioA_in : in std_logic_vector(31 downto 0); credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(7 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); Reconfig_command : out std_logic ); end component; --plasma component ddr_ctrl port(clk : in std_logic; clk_2x : in std_logic; reset_in : in std_logic; address : in std_logic_vector(25 downto 2); byte_we : in std_logic_vector(3 downto 0); data_w : in std_logic_vector(31 downto 0); data_r : out std_logic_vector(31 downto 0); active : in std_logic; no_start : in std_logic; no_stop : in std_logic; pause : out std_logic; SD_CK_P : out std_logic; --clock_positive SD_CK_N : out std_logic; --clock_negative SD_CKE : out std_logic; --clock_enable SD_BA : out std_logic_vector(1 downto 0); --bank_address SD_A : out std_logic_vector(12 downto 0); --address(row or col) SD_CS : out std_logic; --chip_select SD_RAS : out std_logic; --row_address_strobe SD_CAS : out std_logic; --column_address_strobe SD_WE : out std_logic; --write_enable SD_DQ : inout std_logic_vector(15 downto 0); --data SD_UDM : out std_logic; --upper_byte_enable SD_UDQS : inout std_logic; --upper_data_strobe SD_LDM : out std_logic; --low_byte_enable SD_LDQS : inout std_logic); --low_data_strobe end component; --ddr end; --package mlite_pack package body mlite_pack is function bv_adder(a : in std_logic_vector; b : in std_logic_vector; do_add: in std_logic) return std_logic_vector is variable carry_in : std_logic; variable bb : std_logic_vector(a'length-1 downto 0); variable result : std_logic_vector(a'length downto 0); begin if do_add = '1' then bb := b; carry_in := '0'; else bb := not b; carry_in := '1'; end if; for index in 0 to a'length-1 loop result(index) := a(index) xor bb(index) xor carry_in; carry_in := (carry_in and (a(index) or bb(index))) or (a(index) and bb(index)); end loop; result(a'length) := carry_in xnor do_add; return result; end; --function function bv_negate(a : in std_logic_vector) return std_logic_vector is variable carry_in : std_logic; variable not_a : std_logic_vector(a'length-1 downto 0); variable result : std_logic_vector(a'length-1 downto 0); begin not_a := not a; carry_in := '1'; for index in a'reverse_range loop result(index) := not_a(index) xor carry_in; carry_in := carry_in and not_a(index); end loop; return result; end; --function function bv_increment(a : in std_logic_vector(31 downto 2) ) return std_logic_vector is variable carry_in : std_logic; variable result : std_logic_vector(31 downto 2); begin carry_in := '1'; for index in 2 to 31 loop result(index) := a(index) xor carry_in; carry_in := a(index) and carry_in; end loop; return result; end; --function function bv_inc(a : in std_logic_vector ) return std_logic_vector is variable carry_in : std_logic; variable result : std_logic_vector(a'length-1 downto 0); begin carry_in := '1'; for index in 0 to a'length-1 loop result(index) := a(index) xor carry_in; carry_in := a(index) and carry_in; end loop; return result; end; --function end; --package body
gpl-3.0
0e0a197c4e86d4e314b60e0199b0b69c
0.543552
3.666155
false
false
false
false
Wynjones1/gbvhdl
synth/top.vhd
1
7,036
library IEEE; use IEEE.numeric_std.all; use IEEE.std_logic_1164.all; entity top is port( clk : in std_logic; reset : in std_logic; an : out std_logic_vector(3 downto 0); disp : out std_logic_vector(6 downto 0); dp : out std_logic; ss : out std_logic; sck : out std_logic; mosi : out std_logic; miso : in std_logic; sddat : out std_logic_vector(1 downto 0); wp : in std_logic; cd : in std_logic; led : out std_logic_vector(7 downto 0); HS : out std_logic; VS : out std_logic; colour: out std_logic_vector(7 downto 0)); end top; architecture rtl of top is component clk_gen is generic( CLOCK_SPEED : integer := 50_000_000; REQUIRED_HZ : integer := 1); port( clk : in std_logic; reset : in std_logic; clk_out : out std_logic); end component; component ssd is port( clk : in std_logic; reset : in std_logic; input : in std_logic_vector(15 downto 0); an_sel : out std_logic_vector( 3 downto 0); output : out std_logic_vector( 6 downto 0)); end component; component vga is port(clk : in std_logic; reset : in std_logic; en : out std_logic; HS : out std_logic; VS : out std_logic; pix_x : out integer; pix_y : out integer); end component; constant CLK_HZ : integer := 50_000_000; signal clk_1khz : std_logic; signal clk_1hz : std_logic; signal clk_200hz : std_logic; signal clk_25Mhz : std_logic; signal sck_s : std_logic; signal shift_data : std_logic_vector(7 downto 0) := (others => '0'); signal clk_count : integer := 0; signal led_s : std_logic_vector(7 downto 0); signal ssd_value : unsigned(15 downto 0); signal cmd_buffer : std_logic_vector(47 downto 0); signal vga_en : std_logic; signal pix_x : integer := 0; signal pix_y : integer := 0; signal colour_s : std_logic_vector(7 downto 0); begin clk_gen_1khz:clk_gen generic map ( REQUIRED_HZ => 400_000) port map (clk, reset, clk_1khz); clk_gen_200hz:clk_gen generic map ( REQUIRED_HZ => 200) port map (clk, reset, clk_200hz); clk_gen_1hz:clk_gen generic map ( REQUIRED_HZ => 1) port map (clk, reset, clk_1hz); clk_gen_25Mhz: clk_gen generic map ( REQUIRED_HZ => 25_000_000) port map (clk, reset, clk_25Mhz); led <= led_s; sck <= not clk_1khz; ssd1 : ssd port map (clk_200hz, reset, std_logic_vector(ssd_value), an, disp); dp <= '1'; sddat <= "11"; vga0 : vga port map (clk_25mhz, reset, vga_en, HS, VS, pix_x, pix_y); main: process(clk_1khz, reset) type state_t is (state_idle, state_wait_74, state_send_cmd, state_wait_for_resp, state_done, state_read_resp, state_init); variable state : state_t := state_idle; variable ret_state : state_t; variable count : integer := 0; constant cmd0 : std_logic_vector(47 downto 0) := "010000000000000000000000000000000000000010010101"; constant cmd1 : std_logic_vector(47 downto 0) := "010000010000000000000000000000000000000000000001"; begin if reset = '1' then ssd_value <= x"0000"; mosi <= '1'; ss <= '1'; led_s <= (others => '0'); state := state_idle; count := 0; elsif rising_edge(clk_1khz) then case state is when state_idle => state := state_wait_74; count := 74; mosi <= '1'; ss <= '1'; ssd_value(15 downto 12) <= x"0"; when state_wait_74 => mosi <= '1'; ss <= '1'; count := count - 1; if count = 0 then state := state_send_cmd; ret_state := state_init; count := 48; cmd_buffer <= cmd0; ss <= '0'; else state := state_wait_74; end if; ssd_value(15 downto 12) <= x"1"; when state_send_cmd => count := count - 1; mosi <= cmd_buffer(count); ss <= '0'; if count = 0 then state := state_wait_for_resp; count := 7; else state := state_send_cmd; end if; ssd_value(15 downto 12) <= x"2"; when state_wait_for_resp => mosi <= '1'; ss <= '0'; if miso = '0' then state := state_read_resp; led_s(count) <= miso; count := count - 1; else state := state_wait_for_resp; end if; ssd_value(15 downto 12) <= x"3"; when state_read_resp => mosi <= '1'; ss <= '0'; led_s(count) <= miso; if count = 0 then state := ret_state; else count := count - 1; state := state_read_resp; end if; ssd_value(15 downto 12) <= x"4"; when state_init => state := state_send_cmd; ret_state := state_done; count := 48; cmd_buffer <= (others => '1'); --cmd1; led_s <= (others => '0'); ss <= '0'; ssd_value(15 downto 12) <= x"5"; ssd_value(11 downto 8) <= x"5"; when state_done => state := state_done; ssd_value(15 downto 12) <= x"6"; end case; end if; end process; colour_gen: process(pix_x, pix_y) begin if pix_x = 0 or pix_x = 639 or pix_y = 0 or pix_y = 479 then colour_s <= "00000111"; else colour_s <= std_logic_vector(to_unsigned(pix_y, 4) & to_unsigned(pix_x, 4)); end if; end process; colour <= colour_s when vga_en = '1' else (others => '0'); end rtl;
mit
2695546f51828698cb0b39dc1f5f0fb9
0.426947
4.027476
false
false
false
false
AndyMcC0/UVVM_All
bitvis_vip_uart/src/uart_bfm_pkg.vhd
1
25,198
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) -- -- NOTE: This BFM is only intended as a simplified UART BFM to be used as a test -- vehicle for presenting UVVM functionality. ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library STD; use std.textio.all; --================================================================================================= package uart_bfm_pkg is --=============================================================================================== -- Types and constants for UART BFMs --=============================================================================================== constant C_SCOPE : string := "UART BFM"; -- Configuration record to be assigned in the test harness. type t_parity is ( PARITY_NONE, PARITY_ODD, PARITY_EVEN ); type t_stop_bits is ( STOP_BITS_ONE, STOP_BITS_ONE_AND_HALF, STOP_BITS_TWO ); constant C_MAX_BITS_IN_RECEIVED_DATA : natural := 8; constant C_EXPECT_RECEIVED_DATA_STRING_SEPARATOR : string := "; "; type uart_expect_received_data_array is array (natural range<>) of std_logic_vector(C_MAX_BITS_IN_RECEIVED_DATA-1 downto 0); type t_uart_bfm_config is record bit_time : time; -- The time it takes to transfer one bit num_data_bits : natural range 7 to 8; -- Number of data bits to send per transmission idle_state : std_logic; -- Bit value when line is idle num_stop_bits : t_stop_bits; -- Number of stop-bits to use per transmission {STOP_BITS_ONE, STOP_BITS_ONE_AND_HALF, STOP_BITS_TWO} parity : t_parity; -- Transmission parity bit {PARITY_NONE, PARITY_ODD, PARITY_EVEN} timeout : time; -- The maximum time to pass before the expected data must be received. Exceeding this limit results in an alert with severity ‘alert_level’. timeout_severity : t_alert_level; -- The above timeout will have this severity num_bytes_to_log_before_expected_data : natural; -- Maximum number of bytes to save ahead of the expected data in the receive buffer. The bytes in the receive buffer will be logged. id_for_bfm : t_msg_id; -- The message ID used as a general message ID in the UART BFM id_for_bfm_wait : t_msg_id; -- The message ID used for logging waits in the UART BFM id_for_bfm_poll : t_msg_id; -- The message ID used for logging polling in the UART BFM id_for_bfm_poll_summary : t_msg_id; -- The message ID used for logging polling summary in the UART BFM end record; constant C_UART_BFM_CONFIG_DEFAULT : t_uart_bfm_config := ( bit_time => -1 ns, num_data_bits => 8, idle_state => '1', num_stop_bits => STOP_BITS_ONE, parity => PARITY_ODD, timeout => 0 ns, -- will default never time out timeout_severity => error, num_bytes_to_log_before_expected_data => 10, id_for_bfm => ID_BFM, id_for_bfm_wait => ID_BFM_WAIT, id_for_bfm_poll => ID_BFM_POLL, id_for_bfm_poll_summary => ID_BFM_POLL_SUMMARY ); ---------------------------------------------------- -- BFM procedures ---------------------------------------------------- ------------------------------------------ -- uart_transmit ------------------------------------------ -- - This procedure transmits data 'data_value' to the UART DUT -- - The TX configuration can be set in the config parameter procedure uart_transmit ( constant data_value : in std_logic_vector; constant msg : in string; signal tx : inout std_logic; constant config : in t_uart_bfm_config := C_UART_BFM_CONFIG_DEFAULT; constant scope : in string := C_SCOPE; constant msg_id_panel : in t_msg_id_panel := shared_msg_id_panel ); ------------------------------------------ -- uart_receive ------------------------------------------ -- - This procedure reads data from the UART DUT and returns it in 'data_value' -- - The RX configuration can be set in the config parameter procedure uart_receive ( variable data_value : out std_logic_vector; constant msg : in string; signal rx : in std_logic; signal terminate_loop : in std_logic; constant config : in t_uart_bfm_config := C_UART_BFM_CONFIG_DEFAULT; constant scope : in string := C_SCOPE; constant msg_id_panel : in t_msg_id_panel := shared_msg_id_panel; constant ext_proc_call: in string := "" -- External proc_call; used if called from other BFM procedure like uart_expect ); ------------------------------------------ -- uart_expect ------------------------------------------ -- - This procedure reads data from the UART DUT and compares it to the data in -- 'data_exp'. -- - If the read data is inconsistent with the 'data_exp' data, a new read will -- be performed, and the new read data will be compared with 'data_exp'. -- This process will continue untill one of the following conditions are met: -- a) The read data is equal to the expected data -- b) The number of reads equal 'max_receptions' -- c) The time spent reading is equal to the 'timeout' -- - If 'timeout' is set to 0, it will be interpreted as no timeout -- - If 'max_receptions' is set to 0, it will be interpreted as no limitation on number of reads -- - The RX configuration can be set in the config parameter procedure uart_expect ( constant data_exp : in std_logic_vector; constant msg : in string; signal rx : in std_logic; signal terminate_loop : in std_logic; constant max_receptions : in natural := 1; constant timeout : in time := -1 ns; constant alert_level : in t_alert_level := ERROR; constant config : in t_uart_bfm_config := C_UART_BFM_CONFIG_DEFAULT; constant scope : in string := C_SCOPE; constant msg_id_panel : in t_msg_id_panel := shared_msg_id_panel ); ------------------------------------------ -- odd_parity ------------------------------------------ -- - This function checks if the data parity is odd or even -- - If the number of '1' in the 'data' input is odd, '1' will be returned -- - If the number of '1' in the 'data' input is even, '0' will be returned function odd_parity ( constant data : std_logic_vector(7 downto 0)) return std_logic; end package uart_bfm_pkg; --================================================================================================= --================================================================================================= package body uart_bfm_pkg is function odd_parity ( constant data : std_logic_vector(7 downto 0)) return std_logic is begin return xnor(data); end odd_parity; --------------------------------------------------------------------------------- -- uart_transmit --------------------------------------------------------------------------------- procedure uart_transmit ( constant data_value : in std_logic_vector; constant msg : in string; signal tx : inout std_logic; constant config : in t_uart_bfm_config := C_UART_BFM_CONFIG_DEFAULT; constant scope : in string := C_SCOPE; constant msg_id_panel : in t_msg_id_panel := shared_msg_id_panel ) is constant proc_name : string := "uart_transmit"; constant proc_call : string := proc_name & "(" & to_string(data_value, HEX, AS_IS, INCL_RADIX) & ")"; begin -- check whether config.bit_time was set probably check_value(config.bit_time /= -1 ns, TB_ERROR, "UART Bit time was not set in config. " & add_msg_delimiter(msg), scope, ID_NEVER, msg_id_panel); check_value(data_value'length = config.num_data_bits, FAILURE, "length of data_value does not match config.num_data_bits. " & add_msg_delimiter(msg), C_SCOPE, ID_NEVER, msg_id_panel); -- check if tx line was idle when trying to transmit data check_value(tx, config.idle_state, FAILURE, proc_call & " Bus was active when trying to send data. " & add_msg_delimiter(msg), scope, ID_NEVER, msg_id_panel); tx <= not config.idle_state; wait for config.bit_time; for j in 0 to config.num_data_bits-1 loop tx <= data_value(j); wait for config.bit_time; end loop; -- parity? if (config.parity = PARITY_ODD) then tx <= odd_parity(data_value); wait for config.bit_time; elsif(config.parity = PARITY_EVEN) then tx <= not odd_parity(data_value); wait for config.bit_time; end if; -- stop bits tx <= config.idle_state; wait for config.bit_time; if (config.num_stop_bits = STOP_BITS_ONE_AND_HALF) then wait for config.bit_time/2; elsif(config.num_stop_bits = STOP_BITS_TWO) then wait for config.bit_time; end if; log(config.id_for_bfm, proc_call & " completed. " & add_msg_delimiter(msg), scope, msg_id_panel); end procedure; --------------------------------------------------------------------------------- -- uart_receive --------------------------------------------------------------------------------- -- Perform a receive operation procedure uart_receive ( variable data_value : out std_logic_vector; constant msg : in string; signal rx : in std_logic; signal terminate_loop : in std_logic; constant config : in t_uart_bfm_config := C_UART_BFM_CONFIG_DEFAULT; constant scope : in string := C_SCOPE; constant msg_id_panel : in t_msg_id_panel := shared_msg_id_panel; constant ext_proc_call: in string := "" -- External proc_call; used if called from other BFM procedure like uart_expect ) is constant start_time : time := now; -- local_proc_* used if uart_receive is called directly from sequencer or VVC constant local_proc_name : string := "uart_receive"; constant local_proc_call : string := local_proc_name & "()"; -- Helper variables variable v_proc_call : line; -- Current proc_call, external or internal variable v_remaining_time : time; -- temp variable to calculate the remaining time before timeout variable v_data_value : std_logic_vector(config.num_data_bits-1 downto 0); variable v_terminated : boolean := false; variable v_timeout : boolean := false; begin -- check whether config.bit_time was set properly check_value(config.bit_time /= -1 ns, TB_ERROR, "UART Bit time was not set in config. " & add_msg_delimiter(msg), C_SCOPE, ID_NEVER, msg_id_panel); data_value := (data_value'range => 'X'); check_value(data_value'length = config.num_data_bits, FAILURE, "length of data_value does not match config.num_data_bits. " & add_msg_delimiter(msg), C_SCOPE, ID_NEVER, msg_id_panel); if ext_proc_call = "" then -- called from sequencer/VVC, show 'uart_receive()...' in log write(v_proc_call, local_proc_call); else -- called from other BFM procedure like uart_expect, log 'uart_expect() while executing uart_receive()...' write(v_proc_call, ext_proc_call & " while executing " & local_proc_name & ". "); end if; -- check if bus is in idle state check_value(rx, config.idle_state, FAILURE, v_proc_call.all & "Bus was active when trying to receive data. " & add_msg_delimiter(msg), scope, ID_NEVER, msg_id_panel); -- wait until the start bit is sent on the bus, configured timeout occures or procedure get terminate signal if config.timeout = 0 ns then wait until (rx /= config.idle_state) or (terminate_loop = '1'); else wait until (rx /= config.idle_state) or (terminate_loop = '1') for config.timeout; end if; if terminate_loop = '1' then if ext_proc_call = "" then log(ID_TERMINATE_CMD, v_proc_call.all & "=> terminated." & add_msg_delimiter(msg), scope, msg_id_panel); else -- termination handled in calling procedure end if; v_terminated := true; end if; -- if configured timeout, check if there is enough time remaining to receive the byte if config.timeout /= 0 ns and not v_terminated then v_remaining_time := (config.num_data_bits + 2) * config.bit_time; if config.parity = PARITY_ODD or config.parity = PARITY_EVEN then v_remaining_time := v_remaining_time + config.bit_time; end if; if config.num_stop_bits = STOP_BITS_ONE_AND_HALF then v_remaining_time := v_remaining_time + config.bit_time/2; elsif config.num_stop_bits = STOP_BITS_TWO then v_remaining_time := v_remaining_time + config.bit_time; end if; if now + v_remaining_time > start_time + config.timeout then -- wait until timeout wait for ((start_time + config.timeout) - now); if ext_proc_call = "" then alert(config.timeout_severity, v_proc_call.all & "=> timeout. " & add_msg_delimiter(msg),scope); else -- timeout handled in upper module end if; v_timeout := true; end if; end if; if not v_terminated and not v_timeout then -- enter the middle of the bit period wait for config.bit_time/2; check_value(rx , not config.idle_state, FAILURE, v_proc_call.all & " Start bit was not stable during receiving. " & add_msg_delimiter(msg), scope, ID_NEVER, msg_id_panel); -- wait for data bit wait for config.bit_time; -- sample the data bits for i in 0 to config.num_data_bits-1 loop v_data_value(i) := rx; -- wait for middle of the next bit wait for config.bit_time; end loop; -- check parity, if enabled if config.parity = PARITY_ODD then if rx /= odd_parity(v_data_value) then alert(error, v_proc_call.all & "=> Failed. Incorrect parity received. " & add_msg_delimiter(msg),scope); end if; wait for config.bit_time; elsif config.parity = PARITY_EVEN then if rx /= not odd_parity(v_data_value) then alert(error, v_proc_call.all & "=> Failed. Incorrect parity received. " & add_msg_delimiter(msg),scope); end if; wait for config.bit_time; end if; -- check the stop bit if rx /= config.idle_state then alert(error, v_proc_call.all & "=> Failed. Incorrect stop bit received. " & add_msg_delimiter(msg),scope); end if; -- wait until transfer without STOP_BITS_ONE is finished wait for config.bit_time/2; if config.num_stop_bits = STOP_BITS_ONE_AND_HALF then wait for config.bit_time/4; -- middle of the last half if rx /= config.idle_state then alert(error, v_proc_call.all & "=> Failed. Incorrect second half stop bit received. " & add_msg_delimiter(msg),scope); end if; wait for config.bit_time/4; -- transfer is finished elsif config.num_stop_bits = STOP_BITS_TWO then wait for config.bit_time/2; -- middle of the last bit if rx /= config.idle_state then alert(error, v_proc_call.all & "=> Failed. Incorrect second stop bit received. " & add_msg_delimiter(msg),scope); end if; wait for config.bit_time/2; -- transfer is finished end if; -- return the received data data_value := v_data_value; if ext_proc_call = "" then log(config.id_for_bfm, v_proc_call.all & "=> " & to_string(v_data_value, HEX, SKIP_LEADING_0, INCL_RADIX) & ". " & add_msg_delimiter(msg), scope, msg_id_panel); else -- Log will be handled by calling procedure (e.g. uart_expect) end if; end if; end procedure; ---------------------------------------------------------------------------------------- -- uart_expect ---------------------------------------------------------------------------------------- -- Perform a receive operation, then compare the received value to the expected value. procedure uart_expect ( constant data_exp : in std_logic_vector; constant msg : in string; signal rx : in std_logic; signal terminate_loop : in std_logic; constant max_receptions : in natural := 1; -- 0 = any occurrence before timeout constant timeout : in time := -1 ns; constant alert_level : in t_alert_level := ERROR; constant config : in t_uart_bfm_config := C_UART_BFM_CONFIG_DEFAULT; constant scope : in string := C_SCOPE; constant msg_id_panel : in t_msg_id_panel := shared_msg_id_panel ) is constant proc_name : string := "uart_expect"; constant proc_call : string := proc_name & "(" & to_string(data_exp, HEX, AS_IS, INCL_RADIX) & ")"; constant start_time : time := now; variable v_data_value : std_logic_vector(config.num_data_bits-1 downto 0); variable v_num_of_occurrences : natural := 0; variable v_check_ok : boolean; variable v_num_of_occurrences_ok : boolean; variable v_timeout_ok : boolean; variable v_config : t_uart_bfm_config := config; variable v_received_data_fifo : uart_expect_received_data_array(0 to v_config.num_bytes_to_log_before_expected_data-1) := (others => (others =>'0')); variable v_received_data_fifo_write_idx : natural := 0; variable v_received_output_line : line; variable v_internal_timeout : time; begin -- check whether config.bit_time was set probably check_value(config.bit_time /= -1 ns, TB_ERROR, "UART Bit time was not set in config. " & add_msg_delimiter(msg), C_SCOPE, ID_NEVER, msg_id_panel); -- if timeout = -1 function was called without parameter if timeout = -1 ns then v_internal_timeout := config.timeout; else v_internal_timeout := timeout; end if; assert (v_internal_timeout >= 0 ns) report "configured negative timeout(not allowed). " & add_msg_delimiter(msg) severity failure; -- Check for v_internal_timeout = 0 and max_receptions = 0. This combination can result in an infinite loop. if v_internal_timeout = 0 ns and max_receptions = 0 then alert(ERROR, proc_name & " called with timeout=0 and max_receptions = 0. This combination can result in an infinite loop. " & add_msg_delimiter(msg),scope); end if; if v_internal_timeout = 0 ns then log(v_config.id_for_bfm_wait, "Expecting data " & to_string(data_exp, HEX, SKIP_LEADING_0, INCL_RADIX) & " within " & to_string(max_receptions) & " occurrences.", scope, msg_id_panel); elsif max_receptions = 0 then log(v_config.id_for_bfm_wait, "Expecting data " & to_string(data_exp, HEX, SKIP_LEADING_0, INCL_RADIX) & " within " & to_string(v_internal_timeout,ns) & ".", scope, msg_id_panel); else log(v_config.id_for_bfm_wait, "Expecting data " & to_string(data_exp, HEX, SKIP_LEADING_0, INCL_RADIX) & " within " & to_string(max_receptions) & " occurrences and " & to_string(v_internal_timeout,ns) & ".", scope, msg_id_panel); end if; -- Initial status of check variables v_check_ok := false; v_timeout_ok := true; if max_receptions < 1 then v_num_of_occurrences_ok := true; else v_num_of_occurrences_ok := v_num_of_occurrences < max_receptions; end if; -- Setup of v_config with correct timeout v_config.timeout := v_internal_timeout; -- Check operation while not v_check_ok and v_timeout_ok and v_num_of_occurrences_ok and (terminate_loop = '0') loop -- Receive and check data uart_receive(v_data_value, msg, rx, terminate_loop, v_config, scope, msg_id_panel, proc_call); for i in 0 to v_config.num_data_bits-1 loop if (data_exp(i) = '-' or v_data_value(i) = data_exp(i)) then v_check_ok := true; else v_check_ok := false; exit; end if; end loop; -- Place the received data in the received data buffer for debugging -- If the FIFO is not full, fill it up if v_received_data_fifo_write_idx < v_config.num_bytes_to_log_before_expected_data then v_received_data_fifo(v_received_data_fifo_write_idx)(v_data_value'length-1 downto 0) := v_data_value; v_received_data_fifo_write_idx := v_received_data_fifo_write_idx + 1; else -- If the FIFO is full, left shift all input and append new data for i in 1 to v_config.num_bytes_to_log_before_expected_data-1 loop v_received_data_fifo(i-1) := v_received_data_fifo(i); end loop; v_received_data_fifo(v_received_data_fifo_write_idx-1)(v_data_value'length-1 downto 0) := v_data_value; end if; -- Evaluate number of occurrences, if limited by user if max_receptions > 0 then v_num_of_occurrences := v_num_of_occurrences + 1; v_num_of_occurrences_ok := v_num_of_occurrences < max_receptions; end if; -- Evaluate timeout if specified by user if v_internal_timeout = 0 ns then v_timeout_ok := true; else v_timeout_ok := now < start_time + v_internal_timeout; end if; end loop; -- Concatenate the string FIFO into a single string with given separators for i in 0 to v_received_data_fifo_write_idx-1 loop write(v_received_output_line, to_string(v_received_data_fifo(i), HEX, SKIP_LEADING_0, INCL_RADIX)); if i /= v_received_data_fifo_write_idx-1 then write(v_received_output_line, C_EXPECT_RECEIVED_DATA_STRING_SEPARATOR); end if; end loop; if max_receptions > 1 then -- Print the received string of bytes log(v_config.id_for_bfm_poll_summary, "Last "& to_string(v_received_data_fifo_write_idx) & " received data bytes while waiting for expected data: " & v_received_output_line.all, scope, msg_id_panel); end if; if v_check_ok then log(v_config.id_for_bfm, proc_call & "=> OK, received data = " & to_string(v_data_value, HEX, SKIP_LEADING_0, INCL_RADIX) & " after " & to_string(v_num_of_occurrences) & " occurrences and " & to_string((now - start_time),ns) & ". " & add_msg_delimiter(msg), scope, msg_id_panel); elsif not v_timeout_ok then alert(config.timeout_severity, proc_call & "=> Failed due to timeout. Did not get expected value " & to_string(data_exp, HEX, AS_IS, INCL_RADIX) & " before time " & to_string(v_internal_timeout,ns) & ". " & add_msg_delimiter(msg), scope); elsif not v_num_of_occurrences_ok then alert(alert_level, proc_call & "=> Failed. Expected value " & to_string(data_exp, HEX, AS_IS, INCL_RADIX) & " did not appear within " & to_string(max_receptions) & " occurrences. " & add_msg_delimiter(msg), scope); else alert(warning, proc_call & "=> Failed. Terminate loop received. " & add_msg_delimiter(msg), scope); end if; end procedure; end package body uart_bfm_pkg;
mit
5b2262e22abb974c094a2db1bd930edc
0.565928
3.957587
false
true
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/Testbenches/sim_uart.vhd
3
9,310
--------------------------------------------------------------------- -- TITLE: UART -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 5/29/02 -- FILENAME: uart.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Implements the UART. -- modified by: Siavoosh Payandeh Azad -- Change logs: -- * added a memory mapped register for counter value -- * added necessary signals for the above mentioned register to the interface! -- * COUNT_VALUE is replaced with count_value_sig which comes from the above mentioned register --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_misc.all; use ieee.std_logic_arith.all; use ieee.std_logic_textio.all; use ieee.std_logic_unsigned.all; use std.textio.all; use work.mlite_pack.all; entity sim_uart is generic(log_file : string := "UNUSED"); port(clk : in std_logic; reset : in std_logic; enable_read : in std_logic; enable_write : in std_logic; data_in : in std_logic_vector(7 downto 0); data_out : out std_logic_vector(7 downto 0); uart_read : in std_logic; uart_write : out std_logic; busy_write : out std_logic; data_avail : out std_logic; reg_enable : in std_logic; reg_write_byte_enable : in std_logic_vector(3 downto 0); reg_address : in std_logic_vector(31 downto 2); reg_data_write : in std_logic_vector(31 downto 0); reg_data_read : out std_logic_vector(31 downto 0) ); end; --entity uart architecture logic of sim_uart is signal delay_write_reg : std_logic_vector(9 downto 0); signal bits_write_reg : std_logic_vector(3 downto 0); signal data_write_reg : std_logic_vector(8 downto 0); signal delay_read_reg : std_logic_vector(9 downto 0); signal bits_read_reg : std_logic_vector(3 downto 0); signal data_read_reg : std_logic_vector(7 downto 0); signal data_save_reg : std_logic_vector(17 downto 0); signal busy_write_sig : std_logic; signal count_value_reg_in, count_value_reg: std_logic_vector(31 downto 0); signal old_address : std_logic_vector(31 downto 2); signal count_value_sig : std_logic_vector(9 downto 0); begin -- added by siavoosh payandeh azad update_count_value: process(count_value_reg, reg_data_write, reg_write_byte_enable, reg_address, reg_enable)begin count_value_reg_in <= count_value_reg ; if reg_enable = '1' and reg_address = uart_count_value_address then if reg_write_byte_enable(0) = '1' then count_value_reg_in(7 downto 0) <= reg_data_write(7 downto 0); end if; if reg_write_byte_enable(1) = '1' then count_value_reg_in(15 downto 8) <= reg_data_write(15 downto 8); end if; if reg_write_byte_enable(2) = '1' then count_value_reg_in(23 downto 16) <= reg_data_write(23 downto 16); end if; if reg_write_byte_enable(3) = '1' then count_value_reg_in(31 downto 24) <= reg_data_write(31 downto 24); end if; end if; end process; process(count_value_reg, old_address) begin if old_address = uart_count_value_address then reg_data_read <= count_value_reg; else reg_data_read <= (others => 'U'); end if; end process; process(clk, reset, count_value_reg_in, reg_address)begin if reset = '1' then old_address <= (others => '0'); count_value_reg <= (others => '0'); elsif rising_edge(clk) then old_address <= reg_address; count_value_reg <= count_value_reg_in; end if; end process; count_value_sig <= count_value_reg(9 downto 0); -- end of updates by Siavoosh Payandeh Azad uart_proc: process(clk, reset, enable_read, enable_write, data_in, data_write_reg, bits_write_reg, delay_write_reg, data_read_reg, bits_read_reg, delay_read_reg, data_save_reg, busy_write_sig, uart_read) ----------------------------------------------- --- MUST BE EDITED BASED ON THE FREQUENCY! ---- ----------------------------------------------- -- constant COUNT_VALUE : std_logic_vector(9 downto 0) := -- "0100011110"; --33MHz/2/57600Hz = 0x11e -- "1101100100"; --50MHz/57600Hz = 0x364 -- "0110110010"; --25MHz/57600Hz = 0x1b2 -- Plasma IF uses div2 -- "0011011001"; --12.5MHz/57600Hz = 0xd9 -- "0000000100"; --for debug (shorten read_value_reg) begin if reset = '1' then data_write_reg <= ZERO(8 downto 1) & '1'; bits_write_reg <= "0000"; delay_write_reg <= ZERO(9 downto 0); data_read_reg <= ZERO(7 downto 0); bits_read_reg <= "0000"; delay_read_reg <= ZERO(9 downto 0); data_save_reg <= ZERO(17 downto 0); elsif rising_edge(clk) then --Write UART if bits_write_reg = "0000" then --nothing left to write? if enable_write = '1' then delay_write_reg <= ZERO(9 downto 0); --delay before next bit bits_write_reg <= "1010"; --number of bits to write data_write_reg <= data_in & '0'; --remember data & start bit end if; else --if delay_write_reg /= COUNT_VALUE then if delay_write_reg /= count_value_sig then delay_write_reg <= delay_write_reg + 1; --delay before next bit else delay_write_reg <= ZERO(9 downto 0); --reset delay bits_write_reg <= bits_write_reg - 1; --bits left to write data_write_reg <= '1' & data_write_reg(8 downto 1); end if; end if; --Read UART if delay_read_reg = ZERO(9 downto 0) then --done delay for read? if bits_read_reg = "0000" then --nothing left to read? --if uart_read2 = '0' then --wait for start bit if uart_read = '0' then --wait for start bit --delay_read_reg <= '0' & COUNT_VALUE(9 downto 1); --half period delay_read_reg <= '0' & count_value_sig(9 downto 1); --half period bits_read_reg <= "1001"; --bits left to read end if; else --delay_read_reg <= COUNT_VALUE; --initialize delay delay_read_reg <= count_value_sig; --initialize delay bits_read_reg <= bits_read_reg - 1; --bits left to read --data_read_reg <= uart_read2 & data_read_reg(7 downto 1); data_read_reg <= uart_read & data_read_reg(7 downto 1); end if; else delay_read_reg <= delay_read_reg - 1; --delay end if; --Control character buffer --if bits_read_reg = "0000" and delay_read_reg = COUNT_VALUE then if bits_read_reg = "0000" and delay_read_reg = count_value_sig and delay_read_reg /= ZERO(delay_read_reg'length-1 downto 0) then if data_save_reg(8) = '0' or (enable_read = '1' and data_save_reg(17) = '0') then --Empty buffer data_save_reg(8 downto 0) <= '1' & data_read_reg; else --Second character in buffer data_save_reg(17 downto 9) <= '1' & data_read_reg; if enable_read = '1' then data_save_reg(8 downto 0) <= data_save_reg(17 downto 9); end if; end if; elsif enable_read = '1' then data_save_reg(17) <= '0'; --data_available data_save_reg(8 downto 0) <= data_save_reg(17 downto 9); end if; end if; --rising_edge(clk) uart_write <= data_write_reg(0); if bits_write_reg /= "0000" -- Comment out the following line for full UART simulation (much slower) --and log_file = "UNUSED" then busy_write_sig <= '1'; else busy_write_sig <= '0'; end if; busy_write <= busy_write_sig; data_avail <= data_save_reg(8); data_out <= data_save_reg(7 downto 0); end process; --uart_proc --synthesis_off uart_logger: if log_file /= "UNUSED" generate uart_proc: process(clk, enable_read, data_save_reg) file store_file : text open write_mode is log_file; variable hex_file_line : line; variable c : character; variable index : natural; variable line_length : natural := 0; begin if rising_edge(clk) and enable_read = '1' then if data_save_reg(8) = '1' then index := conv_integer(data_save_reg(7 downto 0)); if index /= 10 then c := character'val(index); write(hex_file_line, c); line_length := line_length + 1; end if; if index = 10 or line_length >= 72 then --The following line may have to be commented out for synthesis writeline(store_file, hex_file_line); line_length := 0; end if; end if; --uart_sel end if; --rising_edge(clk) end process; --uart_proc end generate; --uart_logger --synthesis_on end; --architecture logic
gpl-3.0
9cddaafd40cbce47f7bed5ee76987f31
0.563265
3.529189
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/network_files/shift_register_serial_in.vhd
3
1,353
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; entity shift_register_serial_in is generic ( REG_WIDTH: integer := 32 ); port ( TCK, reset : in std_logic; SE: in std_logic; -- shift enable UE: in std_logic; -- update enable SI: in std_logic; -- serial Input SO: out std_logic; -- serial output data_out_parallel: out std_logic_vector(REG_WIDTH-1 downto 0) ); end; architecture behavior of shift_register_serial_in is signal shift_register_mem_out : std_logic_vector(REG_WIDTH-1 downto 0); signal output_strobe : std_logic; begin process (TCK, reset) begin if reset = '0' then shift_register_mem_out <= (others => '0'); elsif TCK'event and TCK = '1' then if SE = '1' then shift_register_mem_out <= shift_register_mem_out (REG_WIDTH-2 downto 0) & SI; end if; end if; end process; process(TCK) begin if TCK'event and TCK = '0' then output_strobe <= UE; end if; end process; process(output_strobe, shift_register_mem_out) begin if output_strobe = '1' then data_out_parallel <= shift_register_mem_out; else data_out_parallel <= (others => '0'); end if; end process; SO <= shift_register_mem_out (REG_WIDTH-1); end;
gpl-3.0
30e81037e268748bcdbfb91add0dd441
0.6068
3.332512
false
false
false
false
sea212/vhdl_wishbone_intercon_generator
vhdl/the_intercon.vhdl
1
4,024
---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 2016-03-25 13:21:34.929354 -- Design Name: Wishbone intercon -- Module Name: the_intercon -- Project Name: -- Target Devices: -- Tool Versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 1.00 - File Generated by wishbone intercon generator -- https://github.com/sea212/vhdl_wishbone_intercon_generator -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity intercon is Port ( -- General intercon signals clk_i : in std_logic; rst_i : in std_logic; -- Wishbone Master btn_ctrl_dat_i : out std_logic_vector(7 downto 0) := (others => '0'); btn_ctrl_dat_o : in std_logic_vector(7 downto 0); btn_ctrl_adr_o : in std_logic_vector(7 downto 0); btn_ctrl_ack_i : out std_logic := '0'; btn_ctrl_cyc_o : in std_logic; btn_ctrl_sel_o : in std_logic_vector(0 downto 0); btn_ctrl_stb_o : in std_logic; btn_ctrl_we_o : in std_logic; -- Wishbone Slaves led_ctrl_dat_i : out std_logic_vector(7 downto 0) := (others => '0'); led_ctrl_dat_o : in std_logic_vector(7 downto 0); led_ctrl_adr_i : out std_logic_vector(7 downto 0) := (others => '0'); led_ctrl_ack_o : in std_logic; led_ctrl_cyc_i : out std_logic := '0'; led_ctrl_sel_i : out std_logic_vector(0 downto 0) := (others => '0'); led_ctrl_stb_i : out std_logic := '0'; led_ctrl_we_i : out std_logic := '0' ); end intercon; architecture Behavioral of intercon is -- define required signals signal adr : std_logic_vector(7 downto 0) := (others => '0'); signal datm2s, dats2m : std_logic_vector(7 downto 0) := (others => '0'); signal sel : std_logic_vector(0 downto 0) := (others => '0'); -- define required 1-bit signals signal we, stb, ack, cyc : std_logic := '0'; -- define additional signals (err,rty,tga,tgc,tgd) begin datm2s <= btn_ctrl_dat_o; adr <= btn_ctrl_adr_o; sel <= btn_ctrl_sel_o; we <= btn_ctrl_we_o; btn_ctrl_dat_i <= dats2m; btn_ctrl_ack_i <= ack; -- interconnect interconnect : process (rst_i, adr, btn_ctrl_cyc_o) begin --if (rising_edge(clk_i)) then if (rst_i = '1') then --synchronous reset stb <= '0'; cyc <= '0'; else stb <= btn_ctrl_stb_o; cyc <= btn_ctrl_cyc_o; if (btn_ctrl_cyc_o = '1') then -- address decoder (slave select) = ifs -- interconnection = inside ifs -- Baseaddress: 0x0, size: 0x100000 if (to_integer(unsigned(adr)) <= 1048576) then led_ctrl_dat_i <= datm2s; dats2m <= led_ctrl_dat_o; led_ctrl_sel_i <= sel; ack <= led_ctrl_ack_o; led_ctrl_adr_i <= adr(7 downto 0); led_ctrl_cyc_i <= cyc; led_ctrl_stb_i <= stb; led_ctrl_we_i <= we; else -- prevent latches on invalid slave selection led_ctrl_dat_i <= (others => '0'); led_ctrl_sel_i <= (others => '0'); led_ctrl_adr_i <= (others => '0'); led_ctrl_cyc_i <= '0'; led_ctrl_stb_i <= '0'; led_ctrl_we_i <= '0'; dats2m <= (others => '0'); ack <= '0'; end if; else -- prevent latches on invalid cycles led_ctrl_dat_i <= (others => '0'); led_ctrl_sel_i <= (others => '0'); led_ctrl_adr_i <= (others => '0'); led_ctrl_cyc_i <= '0'; led_ctrl_stb_i <= '0'; led_ctrl_we_i <= '0'; dats2m <= (others => '0'); ack <= '0'; end if; end if; --else --null; --end if; end process interconnect; end Behavioral;
gpl-3.0
1f67ab3191a642b681287789662de3ea
0.499503
3.232129
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/NI_Test/mlite_pack.vhd
3
25,669
--------------------------------------------------------------------- -- TITLE: Plasma Misc. Package -- Main AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 2/15/01 -- FILENAME: mlite_pack.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Data types, constants, and add functions needed for the Plasma CPU. -- modified by: Siavoosh Payandeh Azad -- Change logs: -- * An NI has been added to the file as a new module -- * some changes has been applied to the ports of the older modules -- to facilitate the new module! --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; package mlite_pack is constant ZERO : std_logic_vector(31 downto 0) := "00000000000000000000000000000000"; constant ONES : std_logic_vector(31 downto 0) := "11111111111111111111111111111111"; --make HIGH_Z equal to ZERO if compiler complains constant HIGH_Z : std_logic_vector(31 downto 0) := "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; subtype alu_function_type is std_logic_vector(3 downto 0); constant ALU_NOTHING : alu_function_type := "0000"; constant ALU_ADD : alu_function_type := "0001"; constant ALU_SUBTRACT : alu_function_type := "0010"; constant ALU_LESS_THAN : alu_function_type := "0011"; constant ALU_LESS_THAN_SIGNED : alu_function_type := "0100"; constant ALU_OR : alu_function_type := "0101"; constant ALU_AND : alu_function_type := "0110"; constant ALU_XOR : alu_function_type := "0111"; constant ALU_NOR : alu_function_type := "1000"; subtype shift_function_type is std_logic_vector(1 downto 0); constant SHIFT_NOTHING : shift_function_type := "00"; constant SHIFT_LEFT_UNSIGNED : shift_function_type := "01"; constant SHIFT_RIGHT_SIGNED : shift_function_type := "11"; constant SHIFT_RIGHT_UNSIGNED : shift_function_type := "10"; subtype mult_function_type is std_logic_vector(3 downto 0); constant MULT_NOTHING : mult_function_type := "0000"; constant MULT_READ_LO : mult_function_type := "0001"; constant MULT_READ_HI : mult_function_type := "0010"; constant MULT_WRITE_LO : mult_function_type := "0011"; constant MULT_WRITE_HI : mult_function_type := "0100"; constant MULT_MULT : mult_function_type := "0101"; constant MULT_SIGNED_MULT : mult_function_type := "0110"; constant MULT_DIVIDE : mult_function_type := "0111"; constant MULT_SIGNED_DIVIDE : mult_function_type := "1000"; subtype a_source_type is std_logic_vector(1 downto 0); constant A_FROM_REG_SOURCE : a_source_type := "00"; constant A_FROM_IMM10_6 : a_source_type := "01"; constant A_FROM_PC : a_source_type := "10"; subtype b_source_type is std_logic_vector(1 downto 0); constant B_FROM_REG_TARGET : b_source_type := "00"; constant B_FROM_IMM : b_source_type := "01"; constant B_FROM_SIGNED_IMM : b_source_type := "10"; constant B_FROM_IMMX4 : b_source_type := "11"; subtype c_source_type is std_logic_vector(2 downto 0); constant C_FROM_NULL : c_source_type := "000"; constant C_FROM_ALU : c_source_type := "001"; constant C_FROM_SHIFT : c_source_type := "001"; --same as alu constant C_FROM_MULT : c_source_type := "001"; --same as alu constant C_FROM_MEMORY : c_source_type := "010"; constant C_FROM_PC : c_source_type := "011"; constant C_FROM_PC_PLUS4 : c_source_type := "100"; constant C_FROM_IMM_SHIFT16: c_source_type := "101"; constant C_FROM_REG_SOURCEN: c_source_type := "110"; subtype pc_source_type is std_logic_vector(1 downto 0); constant FROM_INC4 : pc_source_type := "00"; constant FROM_OPCODE25_0 : pc_source_type := "01"; constant FROM_BRANCH : pc_source_type := "10"; constant FROM_LBRANCH : pc_source_type := "11"; subtype branch_function_type is std_logic_vector(2 downto 0); constant BRANCH_LTZ : branch_function_type := "000"; constant BRANCH_LEZ : branch_function_type := "001"; constant BRANCH_EQ : branch_function_type := "010"; constant BRANCH_NE : branch_function_type := "011"; constant BRANCH_GEZ : branch_function_type := "100"; constant BRANCH_GTZ : branch_function_type := "101"; constant BRANCH_YES : branch_function_type := "110"; constant BRANCH_NO : branch_function_type := "111"; -- mode(32=1,16=2,8=3), signed, write subtype mem_source_type is std_logic_vector(3 downto 0); constant MEM_FETCH : mem_source_type := "0000"; constant MEM_READ32 : mem_source_type := "0100"; constant MEM_WRITE32 : mem_source_type := "0101"; constant MEM_READ16 : mem_source_type := "1000"; constant MEM_READ16S : mem_source_type := "1010"; constant MEM_WRITE16 : mem_source_type := "1001"; constant MEM_READ8 : mem_source_type := "1100"; constant MEM_READ8S : mem_source_type := "1110"; constant MEM_WRITE8 : mem_source_type := "1101"; function bv_adder(a : in std_logic_vector; b : in std_logic_vector; do_add: in std_logic) return std_logic_vector; function bv_negate(a : in std_logic_vector) return std_logic_vector; function bv_increment(a : in std_logic_vector(31 downto 2) ) return std_logic_vector; function bv_inc(a : in std_logic_vector ) return std_logic_vector; -- For Altera COMPONENT lpm_ram_dp generic ( LPM_WIDTH : natural; -- MUST be greater than 0 LPM_WIDTHAD : natural; -- MUST be greater than 0 LPM_NUMWORDS : natural := 0; LPM_INDATA : string := "REGISTERED"; LPM_OUTDATA : string := "REGISTERED"; LPM_RDADDRESS_CONTROL : string := "REGISTERED"; LPM_WRADDRESS_CONTROL : string := "REGISTERED"; LPM_FILE : string := "UNUSED"; LPM_TYPE : string := "LPM_RAM_DP"; USE_EAB : string := "OFF"; INTENDED_DEVICE_FAMILY : string := "UNUSED"; RDEN_USED : string := "TRUE"; LPM_HINT : string := "UNUSED"); port ( RDCLOCK : in std_logic := '0'; RDCLKEN : in std_logic := '1'; RDADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); RDEN : in std_logic := '1'; DATA : in std_logic_vector(LPM_WIDTH-1 downto 0); WRADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); WREN : in std_logic; WRCLOCK : in std_logic := '0'; WRCLKEN : in std_logic := '1'; Q : out std_logic_vector(LPM_WIDTH-1 downto 0)); END COMPONENT; -- For Altera component LPM_RAM_DQ generic ( LPM_WIDTH : natural; -- MUST be greater than 0 LPM_WIDTHAD : natural; -- MUST be greater than 0 LPM_NUMWORDS : natural := 0; LPM_INDATA : string := "REGISTERED"; LPM_ADDRESS_CONTROL: string := "REGISTERED"; LPM_OUTDATA : string := "REGISTERED"; LPM_FILE : string := "UNUSED"; LPM_TYPE : string := "LPM_RAM_DQ"; USE_EAB : string := "OFF"; INTENDED_DEVICE_FAMILY : string := "UNUSED"; LPM_HINT : string := "UNUSED"); port ( DATA : in std_logic_vector(LPM_WIDTH-1 downto 0); ADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); INCLOCK : in std_logic := '0'; OUTCLOCK : in std_logic := '0'; WE : in std_logic; Q : out std_logic_vector(LPM_WIDTH-1 downto 0)); end component; -- For Xilinx component RAM16X1D -- synthesis translate_off generic (INIT : bit_vector := X"0000"); -- synthesis translate_on port (DPO : out STD_ULOGIC; SPO : out STD_ULOGIC; A0 : in STD_ULOGIC; A1 : in STD_ULOGIC; A2 : in STD_ULOGIC; A3 : in STD_ULOGIC; D : in STD_ULOGIC; DPRA0 : in STD_ULOGIC; DPRA1 : in STD_ULOGIC; DPRA2 : in STD_ULOGIC; DPRA3 : in STD_ULOGIC; WCLK : in STD_ULOGIC; WE : in STD_ULOGIC); end component; -- For Xilinx Virtex-5 component RAM32X1D -- synthesis translate_off generic (INIT : bit_vector := X"00000000"); -- synthesis translate_on port (DPO : out STD_ULOGIC; SPO : out STD_ULOGIC; A0 : in STD_ULOGIC; A1 : in STD_ULOGIC; A2 : in STD_ULOGIC; A3 : in STD_ULOGIC; A4 : in STD_ULOGIC; D : in STD_ULOGIC; DPRA0 : in STD_ULOGIC; DPRA1 : in STD_ULOGIC; DPRA2 : in STD_ULOGIC; DPRA3 : in STD_ULOGIC; DPRA4 : in STD_ULOGIC; WCLK : in STD_ULOGIC; WE : in STD_ULOGIC); end component; component pc_next port(clk : in std_logic; reset_in : in std_logic; pc_new : in std_logic_vector(31 downto 2); take_branch : in std_logic; pause_in : in std_logic; opcode25_0 : in std_logic_vector(25 downto 0); pc_source : in pc_source_type; pc_future : out std_logic_vector(31 downto 2); pc_current : out std_logic_vector(31 downto 2); pc_plus4 : out std_logic_vector(31 downto 2)); end component; component mem_ctrl port(clk : in std_logic; reset_in : in std_logic; pause_in : in std_logic; nullify_op : in std_logic; address_pc : in std_logic_vector(31 downto 2); opcode_out : out std_logic_vector(31 downto 0); address_in : in std_logic_vector(31 downto 0); mem_source : in mem_source_type; data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); pause_out : out std_logic; address_next : out std_logic_vector(31 downto 2); byte_we_next : out std_logic_vector(3 downto 0); address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_w : out std_logic_vector(31 downto 0); data_r : in std_logic_vector(31 downto 0)); end component; component control port(opcode : in std_logic_vector(31 downto 0); intr_signal : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; rs_index : out std_logic_vector(5 downto 0); rt_index : out std_logic_vector(5 downto 0); rd_index : out std_logic_vector(5 downto 0); imm_out : out std_logic_vector(15 downto 0); alu_func : out alu_function_type; shift_func : out shift_function_type; mult_func : out mult_function_type; branch_func : out branch_function_type; a_source_out : out a_source_type; b_source_out : out b_source_type; c_source_out : out c_source_type; pc_source_out: out pc_source_type; mem_source_out:out mem_source_type; exception_out: out std_logic); end component; component reg_bank generic(memory_type : string := "XILINX_16X"); port(clk : in std_logic; reset_in : in std_logic; pause : in std_logic; interrupt_in : in std_logic; -- modified rs_index : in std_logic_vector(5 downto 0); rt_index : in std_logic_vector(5 downto 0); rd_index : in std_logic_vector(5 downto 0); reg_source_out : out std_logic_vector(31 downto 0); reg_target_out : out std_logic_vector(31 downto 0); reg_dest_new : in std_logic_vector(31 downto 0); intr_enable : out std_logic); end component; component bus_mux port(imm_in : in std_logic_vector(15 downto 0); reg_source : in std_logic_vector(31 downto 0); a_mux : in a_source_type; a_out : out std_logic_vector(31 downto 0); reg_target : in std_logic_vector(31 downto 0); b_mux : in b_source_type; b_out : out std_logic_vector(31 downto 0); c_bus : in std_logic_vector(31 downto 0); c_memory : in std_logic_vector(31 downto 0); c_pc : in std_logic_vector(31 downto 2); c_pc_plus4 : in std_logic_vector(31 downto 2); c_mux : in c_source_type; reg_dest_out : out std_logic_vector(31 downto 0); branch_func : in branch_function_type; take_branch : out std_logic); end component; component alu generic(alu_type : string := "DEFAULT"); port(a_in : in std_logic_vector(31 downto 0); b_in : in std_logic_vector(31 downto 0); alu_function : in alu_function_type; c_alu : out std_logic_vector(31 downto 0)); end component; component shifter generic(shifter_type : string := "DEFAULT" ); port(value : in std_logic_vector(31 downto 0); shift_amount : in std_logic_vector(4 downto 0); shift_func : in shift_function_type; c_shift : out std_logic_vector(31 downto 0)); end component; component mult generic(mult_type : string := "DEFAULT"); port(clk : in std_logic; reset_in : in std_logic; a, b : in std_logic_vector(31 downto 0); mult_func : in mult_function_type; c_mult : out std_logic_vector(31 downto 0); pause_out : out std_logic); end component; component pipeline port(clk : in std_logic; reset : in std_logic; a_bus : in std_logic_vector(31 downto 0); a_busD : out std_logic_vector(31 downto 0); b_bus : in std_logic_vector(31 downto 0); b_busD : out std_logic_vector(31 downto 0); alu_func : in alu_function_type; alu_funcD : out alu_function_type; shift_func : in shift_function_type; shift_funcD : out shift_function_type; mult_func : in mult_function_type; mult_funcD : out mult_function_type; reg_dest : in std_logic_vector(31 downto 0); reg_destD : out std_logic_vector(31 downto 0); rd_index : in std_logic_vector(5 downto 0); rd_indexD : out std_logic_vector(5 downto 0); rs_index : in std_logic_vector(5 downto 0); rt_index : in std_logic_vector(5 downto 0); pc_source : in pc_source_type; mem_source : in mem_source_type; a_source : in a_source_type; b_source : in b_source_type; c_source : in c_source_type; c_bus : in std_logic_vector(31 downto 0); pause_any : in std_logic; pause_pipeline : out std_logic); end component; component mlite_cpu generic(memory_type : string := "XILINX_16X"; --ALTERA_LPM, or DUAL_PORT_ mult_type : string := "DEFAULT"; shifter_type : string := "DEFAULT"; alu_type : string := "DEFAULT"; pipeline_stages : natural := 2); --2 or 3 port(clk : in std_logic; reset_in : in std_logic; intr_in : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; address_next : out std_logic_vector(31 downto 2); --for synch ram byte_we_next : out std_logic_vector(3 downto 0); address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_w : out std_logic_vector(31 downto 0); data_r : in std_logic_vector(31 downto 0); mem_pause : in std_logic); end component; component cache generic(memory_type : string := "DEFAULT"); port(clk : in std_logic; reset : in std_logic; address_next : in std_logic_vector(31 downto 2); byte_we_next : in std_logic_vector(3 downto 0); cpu_address : in std_logic_vector(31 downto 2); mem_busy : in std_logic; cache_access : out std_logic; --access 4KB cache cache_checking : out std_logic; --checking if cache hit cache_miss : out std_logic); --cache miss end component; --cache component ram generic(memory_type : string := "DEFAULT"; stim_file: string :="code.txt"); port(clk : in std_logic; enable : in std_logic; reset : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0)); end component; --ram component NI generic(current_address : integer := 10; -- the current node's address reserved_address : std_logic_vector(29 downto 0) := "000000000000000001111111111111"; flag_address : std_logic_vector(29 downto 0) := "000000000000000010000000000000"; -- reserved address for the memory mapped I/O counter_address : std_logic_vector(29 downto 0) := "000000000000000010000000000001"); -- reserved address for the counter port(clk : in std_logic; reset : in std_logic; enable : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); --NI_read_flag : out std_logic; --NI_write_flag : out std_logic; irq_out : out std_logic; credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0) ); end component; --network interface component uart generic(log_file : string := "UNUSED"); port(clk : in std_logic; reset : in std_logic; enable_read : in std_logic; enable_write : in std_logic; data_in : in std_logic_vector(7 downto 0); data_out : out std_logic_vector(7 downto 0); uart_read : in std_logic; uart_write : out std_logic; busy_write : out std_logic; data_avail : out std_logic); end component; --uart component eth_dma port(clk : in std_logic; --25 MHz reset : in std_logic; enable_eth : in std_logic; select_eth : in std_logic; rec_isr : out std_logic; send_isr : out std_logic; address : out std_logic_vector(31 downto 2); --to DDR byte_we : out std_logic_vector(3 downto 0); data_write : out std_logic_vector(31 downto 0); data_read : in std_logic_vector(31 downto 0); pause_in : in std_logic; mem_address : in std_logic_vector(31 downto 2); --from CPU mem_byte_we : in std_logic_vector(3 downto 0); data_w : in std_logic_vector(31 downto 0); pause_out : out std_logic; E_RX_CLK : in std_logic; --2.5 MHz receive E_RX_DV : in std_logic; --data valid E_RXD : in std_logic_vector(3 downto 0); --receive nibble E_TX_CLK : in std_logic; --2.5 MHz transmit E_TX_EN : out std_logic; --transmit enable E_TXD : out std_logic_vector(3 downto 0)); --transmit nibble end component; --eth_dma component plasma generic(memory_type : string := "XILINX_X16"; --"DUAL_PORT_" "ALTERA_LPM"; log_file : string := "UNUSED"; ethernet : std_logic := '0'; use_cache : std_logic := '0'; current_address : integer := 10; stim_file: string :="code.txt"); port(clk : in std_logic; reset : in std_logic; uart_write : out std_logic; uart_read : in std_logic; address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_write : out std_logic_vector(31 downto 0); data_read : in std_logic_vector(31 downto 0); mem_pause_in : in std_logic; no_ddr_start : out std_logic; no_ddr_stop : out std_logic; gpio0_out : out std_logic_vector(31 downto 0); gpioA_in : in std_logic_vector(31 downto 0); credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0) ); end component; --plasma component ddr_ctrl port(clk : in std_logic; clk_2x : in std_logic; reset_in : in std_logic; address : in std_logic_vector(25 downto 2); byte_we : in std_logic_vector(3 downto 0); data_w : in std_logic_vector(31 downto 0); data_r : out std_logic_vector(31 downto 0); active : in std_logic; no_start : in std_logic; no_stop : in std_logic; pause : out std_logic; SD_CK_P : out std_logic; --clock_positive SD_CK_N : out std_logic; --clock_negative SD_CKE : out std_logic; --clock_enable SD_BA : out std_logic_vector(1 downto 0); --bank_address SD_A : out std_logic_vector(12 downto 0); --address(row or col) SD_CS : out std_logic; --chip_select SD_RAS : out std_logic; --row_address_strobe SD_CAS : out std_logic; --column_address_strobe SD_WE : out std_logic; --write_enable SD_DQ : inout std_logic_vector(15 downto 0); --data SD_UDM : out std_logic; --upper_byte_enable SD_UDQS : inout std_logic; --upper_data_strobe SD_LDM : out std_logic; --low_byte_enable SD_LDQS : inout std_logic); --low_data_strobe end component; --ddr end; --package mlite_pack package body mlite_pack is function bv_adder(a : in std_logic_vector; b : in std_logic_vector; do_add: in std_logic) return std_logic_vector is variable carry_in : std_logic; variable bb : std_logic_vector(a'length-1 downto 0); variable result : std_logic_vector(a'length downto 0); begin if do_add = '1' then bb := b; carry_in := '0'; else bb := not b; carry_in := '1'; end if; for index in 0 to a'length-1 loop result(index) := a(index) xor bb(index) xor carry_in; carry_in := (carry_in and (a(index) or bb(index))) or (a(index) and bb(index)); end loop; result(a'length) := carry_in xnor do_add; return result; end; --function function bv_negate(a : in std_logic_vector) return std_logic_vector is variable carry_in : std_logic; variable not_a : std_logic_vector(a'length-1 downto 0); variable result : std_logic_vector(a'length-1 downto 0); begin not_a := not a; carry_in := '1'; for index in a'reverse_range loop result(index) := not_a(index) xor carry_in; carry_in := carry_in and not_a(index); end loop; return result; end; --function function bv_increment(a : in std_logic_vector(31 downto 2) ) return std_logic_vector is variable carry_in : std_logic; variable result : std_logic_vector(31 downto 2); begin carry_in := '1'; for index in 2 to 31 loop result(index) := a(index) xor carry_in; carry_in := a(index) and carry_in; end loop; return result; end; --function function bv_inc(a : in std_logic_vector ) return std_logic_vector is variable carry_in : std_logic; variable result : std_logic_vector(a'length-1 downto 0); begin carry_in := '1'; for index in 0 to a'length-1 loop result(index) := a(index) xor carry_in; carry_in := a(index) and carry_in; end loop; return result; end; --function end; --package body
gpl-3.0
bd5d011202c33805df9d12def7603b66
0.542873
3.666476
false
false
false
false
elainemielas/CVUT_BI-PNO
project2/receiver.vhd
1
8,066
library IEEE; use IEEE.std_logic_1164.all; entity RECEIVER is port ( PS2_DATA : in std_logic; -- serial PS2 input PS2_CLK : in std_logic; -- serial PS2 clock CLK : in std_logic; -- standard 50MHz clock RESET : in std_logic; SCAN_CODE : out std_logic_vector ( 7 downto 0 ); NEW_SC : out std_logic ); end RECEIVER; architecture RECEIVER_BODY of RECEIVER is type T_STATE is ( W_START, R_START, W_0, R_0, W_1, R_1, W_2, R_2, W_3, R_3, W_4, R_4, W_5, R_5, W_6, R_6, W_7, R_7, W_PAR, R_PAR, W_END, R_END, VALID ); signal STATE, NEXT_STATE : T_STATE; signal PAR, PS2_PAR, PS2_END : std_logic; signal SC : std_logic_vector ( 7 downto 0 ); signal SC_LOAD : std_logic; signal SC_RESET : std_logic; signal PAR_LOAD : std_logic; signal END_LOAD : std_logic; signal SC_OUT : std_logic; begin SCPR : process ( CLK ) begin if CLK = '1' and CLK'event then if RESET = '1' then SC <= "00000000"; elsif SC_LOAD = '1' then SC <= PS2_DATA & SC ( 7 downto 1 ) ; end if; end if; end process; PARPR : process ( CLK ) begin if CLK = '1' and CLK'event then if RESET = '1' or SC_RESET = '1' then PAR <= '1'; elsif SC_LOAD = '1' then if PS2_DATA = '1' then PAR <= not PAR; else PAR <= PAR; end if; end if; end if; end process; PS2_PARPR : process ( CLK ) begin if CLK = '1' and CLK'event then if RESET = '1' or SC_RESET = '1' then PS2_PAR <= '0'; elsif PAR_LOAD = '1' then PS2_PAR <= PS2_DATA; else PS2_PAR <= PS2_PAR; end if; end if; end process; ENDPR : process ( CLK ) begin if CLK = '1' and CLK'event then if RESET = '1' or SC_RESET = '1' then PS2_END <= '0'; elsif END_LOAD = '1' then PS2_END <= PS2_DATA; else PS2_END <= PS2_END; end if; end if; end process; SC_OUT_PR : process ( CLK ) begin if CLK = '1' and CLK'event then if RESET = '1' then SCAN_CODE <= "00000000"; elsif SC_OUT = '1' then SCAN_CODE <= SC; end if; end if; end process; TRANP : process ( STATE, PS2_DATA, PS2_CLK, PAR, PS2_PAR, PS2_END ) begin case STATE is when W_START => if PS2_CLK = '1' then NEXT_STATE <= W_START; else NEXT_STATE <= R_START; end if; when R_START => if PS2_CLK = '0' then NEXT_STATE <= R_START; else NEXT_STATE <= W_0; end if; when W_0 => if PS2_CLK = '1' then NEXT_STATE <= W_0; else NEXT_STATE <= R_0; end if; when R_0 => if PS2_CLK = '0' then NEXT_STATE <= R_0; else NEXT_STATE <= W_1; end if; when W_1 => if PS2_CLK = '1' then NEXT_STATE <= W_1; else NEXT_STATE <= R_1; end if; when R_1 => if PS2_CLK = '0' then NEXT_STATE <= R_1; else NEXT_STATE <= W_2; end if; when W_2 => if PS2_CLK = '1' then NEXT_STATE <= W_2; else NEXT_STATE <= R_2; end if; when R_2 => if PS2_CLK = '0' then NEXT_STATE <= R_2; else NEXT_STATE <= W_3; end if; when W_3 => if PS2_CLK = '1' then NEXT_STATE <= W_3; else NEXT_STATE <= R_3; end if; when R_3 => if PS2_CLK = '0' then NEXT_STATE <= R_3; else NEXT_STATE <= W_4; end if; when W_4 => if PS2_CLK = '1' then NEXT_STATE <= W_4; else NEXT_STATE <= R_4; end if; when R_4 => if PS2_CLK = '0' then NEXT_STATE <= R_4; else NEXT_STATE <= W_5; end if; when W_5 => if PS2_CLK = '1' then NEXT_STATE <= W_5; else NEXT_STATE <= R_5; end if; when R_5 => if PS2_CLK = '0' then NEXT_STATE <= R_5; else NEXT_STATE <= W_6; end if; when W_6 => if PS2_CLK = '1' then NEXT_STATE <= W_6; else NEXT_STATE <= R_6; end if; when R_6 => if PS2_CLK = '0' then NEXT_STATE <= R_6; else NEXT_STATE <= W_7; end if; when W_7 => if PS2_CLK = '1' then NEXT_STATE <= W_7; else NEXT_STATE <= R_7; end if; when R_7 => if PS2_CLK = '0' then NEXT_STATE <= R_7; else NEXT_STATE <= W_PAR; end if; when W_PAR => if PS2_CLK = '1' then NEXT_STATE <= W_PAR; else NEXT_STATE <= R_PAR; end if; when R_PAR => if PS2_CLK = '0' then NEXT_STATE <= R_PAR; else NEXT_STATE <= W_END; end if; when W_END => if PS2_CLK = '1' then NEXT_STATE <= W_END; else NEXT_STATE <= R_END; end if; when R_END => if PS2_CLK = '0' then NEXT_STATE <= R_END; else if PAR = PS2_PAR and PS2_END = '1' then NEXT_STATE <= VALID; else NEXT_STATE <= W_START; end if; end if; when VALID => NEXT_STATE <= W_START; end case; end process; STATEP : process ( CLK ) begin if CLK = '1' and CLK'event then if RESET = '1' then STATE <= W_START; else STATE <= NEXT_STATE; end if; end if; end process; OUTP : process ( STATE, PS2_DATA, PS2_CLK, PAR, PS2_PAR, PS2_END, SC ) begin case STATE is when W_START => NEW_SC <= '0'; SC_LOAD <= '0'; SC_RESET <= '0'; PAR_LOAD <= '0'; END_LOAD <= '0'; SC_OUT <= '0'; when R_START => NEW_SC <= '0'; SC_LOAD <= '0'; SC_RESET <= '1'; PAR_LOAD <= '0'; END_LOAD <= '0'; SC_OUT <= '0'; when W_0 | W_1 | W_2 | W_3 | W_4 | W_5 | W_6 | W_7 => if PS2_CLK = '0' then SC_LOAD <= '1'; else SC_LOAD <= '0'; end if; NEW_SC <= '0'; SC_RESET <= '0'; PAR_LOAD <= '0'; END_LOAD <= '0'; SC_OUT <= '0'; when W_PAR => if PS2_CLK = '0' then PAR_LOAD <= '1'; else PAR_LOAD <= '0'; end if; NEW_SC <= '0'; SC_LOAD <= '0'; SC_RESET <= '0'; END_LOAD <= '0'; SC_OUT <= '0'; when W_END => if PS2_CLK = '0' then END_LOAD <= '1'; else END_LOAD <= '0'; end if; NEW_SC <= '0'; SC_LOAD <= '0'; SC_RESET <= '0'; PAR_LOAD <= '0'; SC_OUT <= '0'; when R_END => if PS2_CLK = '1' and PAR = PS2_PAR and PS2_END = '1' then SC_OUT <= '1'; else SC_OUT <= '0'; end if; NEW_SC <= '0'; SC_LOAD <= '0'; SC_RESET <= '0'; PAR_LOAD <= '0'; END_LOAD <= '0'; when VALID => NEW_SC <= '1'; SC_LOAD <= '0'; SC_RESET <= '0'; PAR_LOAD <= '0'; END_LOAD <= '0'; SC_OUT <= '0'; when others => NEW_SC <= '0'; SC_LOAD <= '0'; SC_RESET <= '0'; PAR_LOAD <= '0'; END_LOAD <= '0'; SC_OUT <= '0'; end case; end process; end RECEIVER_BODY;
mit
b7ef3244082cc28a577553b6e687b20e
0.401066
2.930959
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/FIFO_one_hot_credit_based_packet_drop_flit_saving.vhd
4
19,526
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_misc.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity FIFO_credit_based is generic ( DATA_WIDTH: integer := 32 ); port ( reset: in std_logic; clk: in std_logic; RX: in std_logic_vector(DATA_WIDTH-1 downto 0); valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; credit_out: out std_logic; empty_out: out std_logic; Data_out: out std_logic_vector(DATA_WIDTH-1 downto 0) ); end FIFO_credit_based; architecture behavior of FIFO_credit_based is signal read_pointer, read_pointer_in, write_pointer, write_pointer_in: std_logic_vector(3 downto 0); signal full, empty: std_logic; signal read_en, write_en: std_logic; signal FIFO_MEM_1, FIFO_MEM_1_in : std_logic_vector(DATA_WIDTH-1 downto 0); signal FIFO_MEM_2, FIFO_MEM_2_in : std_logic_vector(DATA_WIDTH-1 downto 0); signal FIFO_MEM_3, FIFO_MEM_3_in : std_logic_vector(DATA_WIDTH-1 downto 0); signal FIFO_MEM_4, FIFO_MEM_4_in : std_logic_vector(DATA_WIDTH-1 downto 0); constant fake_tail : std_logic_vector := "10000000000000000000000000000001"; alias flit_type : std_logic_vector(2 downto 0) is RX(DATA_WIDTH-1 downto DATA_WIDTH-3); signal faulty_packet_in, faulty_packet_out: std_logic; signal xor_all, fault_out: std_logic; type state_type is (Idle, Header_flit, Body_flit, Tail_flit, Packet_drop); signal state_out, state_in : state_type; signal fake_credit, credit_in, write_fake_flit: std_logic; signal fake_credit_counter, fake_credit_counter_in: std_logic_vector(1 downto 0); begin -------------------------------------------------------------------------------------------- -- block diagram of the FIFO! -------------------------------------------------------------------------------------------- -- circular buffer structure -- <--- WriteP -- --------------------------------- -- | 3 | 2 | 1 | 0 | -- --------------------------------- -- <--- readP -------------------------------------------------------------------------------------------- process (clk, reset)begin if reset = '0' then read_pointer <= "0001"; write_pointer <= "0001"; FIFO_MEM_1 <= (others=>'0'); FIFO_MEM_2 <= (others=>'0'); FIFO_MEM_3 <= (others=>'0'); FIFO_MEM_4 <= (others=>'0'); fake_credit_counter <= (others=>'0'); faulty_packet_out <= '0'; credit_out <= '0'; state_out <= Idle; elsif clk'event and clk = '1' then write_pointer <= write_pointer_in; read_pointer <= read_pointer_in; state_out <= state_in; faulty_packet_out <= faulty_packet_in; credit_out <= credit_in; fake_credit_counter <= fake_credit_counter_in; if write_en = '1' then --write into the memory FIFO_MEM_1 <= FIFO_MEM_1_in; FIFO_MEM_2 <= FIFO_MEM_2_in; FIFO_MEM_3 <= FIFO_MEM_3_in; FIFO_MEM_4 <= FIFO_MEM_4_in; end if; end if; end process; -- anything below here is pure combinational -- combinatorial part process(fake_credit, read_en, fake_credit_counter) begin fake_credit_counter_in <= fake_credit_counter; credit_in <= '0'; -- Is this actually credit_out from the router module ? if fake_credit = '1' and read_en = '1' then fake_credit_counter_in <= fake_credit_counter + 1 ; end if; if (read_en ='1' or fake_credit = '1') then credit_in <= '1'; -- Is this actually credit_out from the router module ? end if; if read_en = '0' and fake_credit = '0' and fake_credit_counter > 0 then fake_credit_counter_in <= fake_credit_counter - 1 ; credit_in <= '1'; end if; end process; process(valid_in, RX) begin if valid_in = '1' then xor_all <= XOR_REDUCE(RX(DATA_WIDTH-1 downto 1)); else xor_all <= '0'; -- Is this correct ? This means parity is zero. Or does it mean we don't care about parity in this case ? end if; end process; process(valid_in, RX, xor_all)begin fault_out <= '0'; if valid_in = '1' and xor_all /= RX(0) then -- Parity checker (integrated inside FIFO) fault_out <= '1'; end if; end process; process(RX, faulty_packet_out, fault_out, write_pointer, FIFO_MEM_1, FIFO_MEM_2, FIFO_MEM_3, FIFO_MEM_4, state_out, flit_type, valid_in)begin -- this is the default value of the memory! -- Store data from input (RX) to the appropriate FIFO slot, according to write pointer (which is encoded as one-hot) case( write_pointer ) is when "0001" => FIFO_MEM_1_in <= RX; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= RX; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= RX; FIFO_MEM_4_in <= FIFO_MEM_4; when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= RX; when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; end case ; -- Up to here, we have written the data (RX) in FIFO, but we do not know yet, if it is faulty or not -- The parity is checked later (in the FSM) --some defaults fake_credit <= '0'; state_in <= state_out; faulty_packet_in <= faulty_packet_out; write_fake_flit <= '0'; -- FSM for FIFO (including the packet dropping capability) case(state_out) is when Idle => -- fault_out is updated in another by checking the parity bit for input data (RX) -- if (xor_all /= RX(0)) => fault_out = 1. if fault_out = '0' then -- Input data is correct and parity bit matches the one integrated in the data -- The next expected flit (Header flit) is healthy if valid_in = '1' then -- There is a request from previous router/NI state_in <= Header_flit; else -- No packet (flit) state_in <= state_out; end if; else -- If the received data (RX) (Header flit) is faulty, and detected by parity checker in current router if flit_type /= "001" then faulty_packet_in <= '0'; case( write_pointer ) is -- Is this the place where we do the saving for packet drop ? when "0001" => FIFO_MEM_1_in <= "001"&RX(DATA_WIDTH-4 downto 0); FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= "001"&RX(DATA_WIDTH-4 downto 0); FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= "001"&RX(DATA_WIDTH-4 downto 0); FIFO_MEM_4_in <= FIFO_MEM_4; when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= "001"&RX(DATA_WIDTH-4 downto 0); when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; end case ; state_in <= Header_flit; else -- Fakely tell previous router/NI that FIFO has enough slots fake_credit <= '1'; FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; -- We must drop the packet (FSM must go to Packet_drop state) state_in <= Packet_drop; faulty_packet_in <= '1'; -- Shows the packet is faulty end if; end if; when Header_flit => if valid_in = '1' then if fault_out = '0' then -- We expect body or tail flit, and the flit is healthy (parity matches) if flit_type = "010" then state_in <= Body_flit; elsif flit_type ="100" then state_in <= Tail_flit; else -- Either flit type is invalid or there is no packet (but this should not happen) -- we should not be here! state_in <= state_out; end if; else -- Parity checker has detected a fault in body/tail flit (parity mismatch) -- (fault_out = 1) write_fake_flit <= '1'; if flit_type = "010" then -- the flit is faulty, but its flit type field is correct and valid -- But, the payload is faulty. faulty_packet_in <= '0'; -- We change state to Body Flit state_in <= Body_flit; elsif flit_type ="100" then faulty_packet_in <= '0'; state_in <= Tail_flit; else -- if flit type field is damaged (incorrect) case( write_pointer ) is -- we store a fake tail instead of the faulty data in -- the FIFO slot corresponding to the write pointer's location when "0001" => FIFO_MEM_1_in <= fake_tail; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= fake_tail; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= fake_tail; FIFO_MEM_4_in <= FIFO_MEM_4; when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= fake_tail; when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; end case ; -- And we still go to Packet drop state state_in <= Packet_drop; faulty_packet_in <= '1'; end if; end if; else state_in <= state_out; end if; when Body_flit => if valid_in = '1' then if fault_out = '0' then -- data (flit) is not faulty if flit_type = "010" then state_in <= state_out; -- We can also write (state_in <= Body_flit) ?? As the state is not changed. elsif flit_type = "100" then state_in <= Tail_flit; else -- we should not be here! state_in <= state_out; end if; else -- Parity mismatch (flit is faulty) write_fake_flit <= '1'; if flit_type = "010" then -- flit type is not damaged (only payload is damaged) -- Handling the error in payload is delegated to application level faulty_packet_in <= '0'; state_in <= state_out; elsif flit_type = "100" then -- flit type is not damaged (only payload is damaged) -- Handling the error in payload is delegated to application level faulty_packet_in <= '0'; state_in <= Tail_flit; else -- flit type is damaged (incorrect) -- makes fake tail and goes to packet drop state case( write_pointer ) is when "0001" => FIFO_MEM_1_in <= fake_tail; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= fake_tail; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= fake_tail; FIFO_MEM_4_in <= FIFO_MEM_4; when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= fake_tail; when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; end case ; state_in <= Packet_drop; faulty_packet_in <= '1'; end if; end if; else state_in <= state_out; end if; when Tail_flit => if valid_in = '1' then if fault_out = '0' then if flit_type = "001" then state_in <= Header_flit; else -- what is this case ?? -- we should not be here ?? state_in <= state_out; end if; else -- Parity mismatch (error in flit) fake_credit <= '1'; -- Dropping the flit (writing back previous values to FIFO slots) FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; state_in <= Packet_drop; faulty_packet_in <= '1'; end if; else state_in <= state_out; end if; when Packet_drop => if faulty_packet_out = '1' then if valid_in = '1' and flit_type = "001" and fault_out = '0' then -- next flit is header and parity matches faulty_packet_in <= '0'; state_in <= Header_flit; write_fake_flit <= '1'; case( write_pointer ) is when "0001" => FIFO_MEM_1_in <= RX; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0010" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= RX; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; when "0100" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= RX; FIFO_MEM_4_in <= FIFO_MEM_4; when "1000" => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= RX; when others => FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; end case ; elsif valid_in = '1' and flit_type ="100" and fault_out = '0' then -- next flit is Tail, and not faulty (parity matches) -- flit is dropped ?? Previous values of FIFO slots are re-written FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; faulty_packet_in <= '0'; state_in <= Idle; fake_credit <= '1'; else -- includes the case that packet is faulty (parity mismatch) if valid_in = '1' then fake_credit <= '1'; end if; -- previous values of FIFO slots are re-written (flit is dropped ??) FIFO_MEM_1_in <= FIFO_MEM_1; FIFO_MEM_2_in <= FIFO_MEM_2; FIFO_MEM_3_in <= FIFO_MEM_3; FIFO_MEM_4_in <= FIFO_MEM_4; state_in <= state_out; -- We stay in Packet Drop state end if; else -- we should not be here! state_in <= state_out; end if; when others => state_in <= state_out; end case; end process; process(read_pointer, FIFO_MEM_1, FIFO_MEM_2, FIFO_MEM_3, FIFO_MEM_4)begin case( read_pointer ) is when "0001" => Data_out <= FIFO_MEM_1; when "0010" => Data_out <= FIFO_MEM_2; when "0100" => Data_out <= FIFO_MEM_3; when "1000" => Data_out <= FIFO_MEM_4; when others => Data_out <= FIFO_MEM_1; end case ; end process; read_en <= (read_en_N or read_en_E or read_en_W or read_en_S or read_en_L) and not empty; empty_out <= empty; process(write_en, write_pointer) begin if write_en = '1' then write_pointer_in <= write_pointer(2 downto 0)&write_pointer(3); -- Rotate one bit to left else write_pointer_in <= write_pointer; end if; end process; process(read_en, empty, read_pointer) begin if (read_en = '1' and empty = '0') then read_pointer_in <= read_pointer(2 downto 0)&read_pointer(3); -- Rotate one bit to left else read_pointer_in <= read_pointer; end if; end process; process(full, valid_in, write_fake_flit, faulty_packet_out, fault_out) begin if valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full ='0' then write_en <= '1'; else write_en <= '0'; end if; end process; process(write_pointer, read_pointer) begin if read_pointer = write_pointer then empty <= '1'; else empty <= '0'; end if; -- if write_pointer = read_pointer>>1 then if write_pointer = read_pointer(0)&read_pointer(3 downto 1) then full <= '1'; else full <= '0'; end if; end process; end;
gpl-3.0
f685a4f7cb3b1839754a8538b1aa1116
0.477722
3.716407
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/archive/IMMORTAL_Chip_2017/With_checkers/TB_Package_32_bit_credit_based_NI.vhd
3
14,855
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use IEEE.NUMERIC_STD.all; use ieee.math_real.all; use std.textio.all; use ieee.std_logic_misc.all; package TB_Package is procedure NI_control(network_size, frame_length, current_address, initial_delay, min_packet_size, max_packet_size: in integer; finish_time: in time; signal clk: in std_logic; -- NI configuration signal reserved_address : in std_logic_vector(29 downto 0); signal flag_address : in std_logic_vector(29 downto 0) ; -- reserved address for the memory mapped I/O signal counter_address : in std_logic_vector(29 downto 0); signal reconfiguration_address : in std_logic_vector(29 downto 0); -- reserved address for reconfiguration register signal self_diagnosis_address : in std_logic_vector(29 downto 0); -- NI signals signal enable: out std_logic; signal write_byte_enable: out std_logic_vector(3 downto 0); signal address: out std_logic_vector(31 downto 2); signal data_write: out std_logic_vector(31 downto 0); signal data_read: in std_logic_vector(31 downto 0); signal test: out std_logic_vector(31 downto 0)); end TB_Package; package body TB_Package is constant Header_type : std_logic_vector := "001"; constant Body_type : std_logic_vector := "010"; constant Tail_type : std_logic_vector := "100"; procedure NI_control(network_size, frame_length, current_address, initial_delay, min_packet_size, max_packet_size: in integer; finish_time: in time; signal clk: in std_logic; -- NI configuration signal reserved_address : in std_logic_vector(29 downto 0); signal flag_address : in std_logic_vector(29 downto 0) ; -- reserved address for the memory mapped I/O signal counter_address : in std_logic_vector(29 downto 0); signal reconfiguration_address : in std_logic_vector(29 downto 0); -- reserved address for reconfiguration register signal self_diagnosis_address : in std_logic_vector(29 downto 0); -- NI signals signal enable: out std_logic; signal write_byte_enable: out std_logic_vector(3 downto 0); signal address: out std_logic_vector(31 downto 2); signal data_write: out std_logic_vector(31 downto 0); signal data_read: in std_logic_vector(31 downto 0); signal test: out std_logic_vector(31 downto 0)) is -- variables for random functions constant DATA_WIDTH : integer := 32; variable seed1 :positive ; variable seed2 :positive ; variable rand : real ; --file handling variables variable SEND_LINEVARIABLE : line; file SEND_FILE : text; variable RECEIVED_LINEVARIABLE : line; file RECEIVED_FILE : text; variable DIAGNOSIS_LINEVARIABLE : line; file DIAGNOSIS_FILE : text; -- receiving variables variable receive_source_node, receive_destination_node, receive_packet_id, receive_counter, receive_packet_length: integer; variable diagnosis_source_node, diagnosis_destination_node, diagnosis_packet_id, diagnosis_counter, diagnosis_packet_length: integer; -- sending variables variable send_destination_node, send_counter, send_id_counter: integer:= 0; variable send_packet_length: integer:= 8; type state_type is (Idle, Header_flit, Body_flit, Tail_flit); variable state : state_type; variable frame_starting_delay : integer:= 0; variable frame_counter: integer:= 0; variable diagnosis : std_logic := '0'; variable diagnosis_data: std_logic_vector(24 downto 0); begin file_open(DIAGNOSIS_FILE,"diagnosis.txt",WRITE_MODE); file_open(RECEIVED_FILE,"received.txt",WRITE_MODE); file_open(SEND_FILE,"sent.txt",WRITE_MODE); enable <= '1'; state := Idle; send_packet_length := min_packet_size; uniform(seed1, seed2, rand); frame_starting_delay := integer(((integer(rand*100.0)*(frame_length - 2*max_packet_size)))/100); while true loop if state = Idle and now > finish_time then wait; end if; -- read the flag status address <= flag_address; write_byte_enable <= "0000"; wait until clk'event and clk ='0'; --flag register is organized like this: -- .-------------------------------------------------. -- | N2P_empty | P2N_full | self_diagnosis_flag | ...| -- '-------------------------------------------------' if data_read(29) = '1' then -- self diagnosis data is ready! -- read the received self diagnosis data status address <= self_diagnosis_address; write_byte_enable <= "0000"; wait until clk'event and clk ='0'; test <= data_read; write(DIAGNOSIS_LINEVARIABLE, string'("Self diagnosis of SHMU Node:")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); if data_read(0) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("Local input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; if data_read(1) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("South input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; if data_read(2) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("West input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; if data_read(3) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("East input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; if data_read(4) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("North input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; write(DIAGNOSIS_LINEVARIABLE, string'("--------------------------------")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); wait until clk'event and clk ='0'; elsif data_read(31) = '0' then -- N2P is not empty, can receive flit -- read the received data status address <= reserved_address; write_byte_enable <= "0000"; wait until clk'event and clk ='0'; if (data_read(DATA_WIDTH-1 downto DATA_WIDTH-3) = "001") then -- got header flit receive_packet_length := to_integer(unsigned(data_read(28 downto 17))); receive_destination_node := to_integer(unsigned(data_read(16 downto 13))); receive_source_node := to_integer(unsigned(data_read(12 downto 9))); receive_packet_id := to_integer(unsigned(data_read(8 downto 1))); receive_counter := 1; diagnosis := '0'; diagnosis_data := (others => '0'); end if; if (data_read(DATA_WIDTH-1 downto DATA_WIDTH-3) = "010") then -- got body flit receive_counter := receive_counter+1; if data_read(28 downto 13) = "0100011001000100" then diagnosis := '1'; diagnosis_data(11 downto 0) := data_read(12 downto 1); end if; end if; if (data_read(DATA_WIDTH-1 downto DATA_WIDTH-3) = "100") then -- got tail flit receive_counter := receive_counter+1; if diagnosis = '0' then write(RECEIVED_LINEVARIABLE, "Packet received at " & time'image(now) & " From: " & integer'image(receive_source_node) & " to: " & integer'image(receive_destination_node) & " length: "& integer'image(receive_packet_length) & " actual length: "& integer'image(receive_counter) & " id: "& integer'image(receive_packet_id)); writeline(RECEIVED_FILE, RECEIVED_LINEVARIABLE); else diagnosis_data(24 downto 12) := data_read(28 downto 16); write(DIAGNOSIS_LINEVARIABLE, "Packet received at " & time'image(now) & " From: " & integer'image(receive_source_node) & " to: " & integer'image(receive_destination_node) & " length: "& integer'image(receive_packet_length) & " actual length: "& integer'image(receive_counter) & " id: "& integer'image(receive_packet_id) & " diagnosis: " ); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); write(DIAGNOSIS_LINEVARIABLE, to_bitvector(diagnosis_data)); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); if diagnosis_data(0) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("Local input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; if diagnosis_data(1) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("South input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; if diagnosis_data(2) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("West input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; if diagnosis_data(3) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("East input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; if diagnosis_data(4) = '1' then write(DIAGNOSIS_LINEVARIABLE, string'("North input is link broken!")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; write(DIAGNOSIS_LINEVARIABLE, string'("--------------------------------")); writeline(DIAGNOSIS_FILE, DIAGNOSIS_LINEVARIABLE); end if; end if; elsif data_read(30) = '0' then -- P2N is not full, can send flit if frame_counter >= frame_starting_delay then if state = Idle then if frame_counter < frame_starting_delay+1 then state := Header_flit; send_counter := send_counter+1; -- generating the destination address uniform(seed1, seed2, rand); send_destination_node := integer(rand*real((network_size**2)-1)); while (send_destination_node = current_address) loop uniform(seed1, seed2, rand); send_destination_node := integer(rand*real((network_size**2)-1)); end loop; --generating the packet length uniform(seed1, seed2, rand); send_packet_length := integer((integer(rand*100.0)*frame_length)/300); if (send_packet_length < min_packet_size) then send_packet_length:=min_packet_size; end if; if (send_packet_length > max_packet_size) then send_packet_length:=max_packet_size; end if; -- this is the header flit address <= reserved_address; write_byte_enable <= "1111"; data_write <= std_logic_vector(to_unsigned(send_destination_node, 4)) & "0000" & std_logic_vector(to_unsigned(send_packet_length, 8)) & "0000000000000000"; write(SEND_LINEVARIABLE, "Packet generated at " & time'image(now) & " From " & integer'image(current_address) & " to " & integer'image(send_destination_node) & " with length: "& integer'image(send_packet_length) & " id: " & integer'image(send_id_counter)); writeline(SEND_FILE, SEND_LINEVARIABLE); else state := Idle; end if; elsif state = Header_flit then -- first body flit address <= reserved_address; write_byte_enable <= "1111"; data_write <= "0000" & std_logic_vector(to_unsigned(integer(rand*1000.0), 28)); send_counter := send_counter+1; state := Body_flit; elsif state = Body_flit then -- rest of body flits address <= reserved_address; write_byte_enable <= "1111"; data_write <= "0000" & std_logic_vector(to_unsigned(integer(rand*1000.0), 28)); send_counter := send_counter+1; if send_counter = send_packet_length-1 then state := Tail_flit; else state := Body_flit; end if; elsif state = Tail_flit then -- tail flit address <= reserved_address; write_byte_enable <= "1111"; data_write <= "0000" & std_logic_vector(to_unsigned(integer(rand*1000.0), 28)); send_counter := 0; state := Idle; send_id_counter := send_id_counter + 1; end if; end if; frame_counter := frame_counter + 1; if frame_counter = frame_length then frame_counter := 0; frame_starting_delay := integer(((integer(rand*100.0)*(frame_length - 2*max_packet_size)))/100); end if; wait until clk'event and clk ='0'; end if; end loop; file_close(SEND_FILE); file_close(RECEIVED_FILE); file_close(DIAGNOSIS_FILE); end NI_control; end TB_Package;
gpl-3.0
141308e50851b501d495184f38f98ad7
0.532346
4.601921
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/Checkers/Control_Part_Checkers/Allocator_checkers/Allocator_logic_checkers/allocator_logic_pseudo_with_checkers_top.vhd
3
31,450
--Copyright (C) 2016 Siavoosh Payandeh Azad Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity allocator_logic_pseudo_with_checkers_top is port ( -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; grant_N_N_sig, grant_N_E_sig, grant_N_W_sig, grant_N_S_sig, grant_N_L_sig: in std_logic; grant_E_N_sig, grant_E_E_sig, grant_E_W_sig, grant_E_S_sig, grant_E_L_sig: in std_logic; grant_W_N_sig, grant_W_E_sig, grant_W_W_sig, grant_W_S_sig, grant_W_L_sig: in std_logic; grant_S_N_sig, grant_S_E_sig, grant_S_W_sig, grant_S_S_sig, grant_S_L_sig: in std_logic; grant_L_N_sig, grant_L_E_sig, grant_L_W_sig, grant_L_S_sig, grant_L_L_sig: in std_logic; valid_N, valid_E, valid_W, valid_S, valid_L : out std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: out std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: out std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: out std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: out std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: out std_logic; grant_N_out, grant_E_out, grant_W_out, grant_S_out, grant_L_out : out std_logic; -- Checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match : out std_logic ); end allocator_logic_pseudo_with_checkers_top; architecture behavior of allocator_logic_pseudo_with_checkers_top is component allocator_logic_pseudo is port ( -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; grant_N_N_sig, grant_N_E_sig, grant_N_W_sig, grant_N_S_sig, grant_N_L_sig: in std_logic; grant_E_N_sig, grant_E_E_sig, grant_E_W_sig, grant_E_S_sig, grant_E_L_sig: in std_logic; grant_W_N_sig, grant_W_E_sig, grant_W_W_sig, grant_W_S_sig, grant_W_L_sig: in std_logic; grant_S_N_sig, grant_S_E_sig, grant_S_W_sig, grant_S_S_sig, grant_S_L_sig: in std_logic; grant_L_N_sig, grant_L_E_sig, grant_L_W_sig, grant_L_S_sig, grant_L_L_sig: in std_logic; valid_N, valid_E, valid_W, valid_S, valid_L : out std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: out std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: out std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: out std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: out std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: out std_logic; grant_N_out, grant_E_out, grant_W_out, grant_S_out, grant_L_out : out std_logic ); end component; component allocator_logic_pseudo_checkers is port ( -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; grant_N_N_sig, grant_N_E_sig, grant_N_W_sig, grant_N_S_sig, grant_N_L_sig: in std_logic; grant_E_N_sig, grant_E_E_sig, grant_E_W_sig, grant_E_S_sig, grant_E_L_sig: in std_logic; grant_W_N_sig, grant_W_E_sig, grant_W_W_sig, grant_W_S_sig, grant_W_L_sig: in std_logic; grant_S_N_sig, grant_S_E_sig, grant_S_W_sig, grant_S_S_sig, grant_S_L_sig: in std_logic; grant_L_N_sig, grant_L_E_sig, grant_L_W_sig, grant_L_S_sig, grant_L_L_sig: in std_logic; valid_N, valid_E, valid_W, valid_S, valid_L : in std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: in std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: in std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: in std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: in std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: in std_logic; grant_N, grant_E, grant_W, grant_S, grant_L : in std_logic; -- Checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match : out std_logic ); end component; -- Signal(s) definition(s) for checkers signal valid_N_sig, valid_E_sig, valid_W_sig, valid_S_sig, valid_L_sig : std_logic; signal grant_N_N_signal, grant_N_E_signal, grant_N_W_signal, grant_N_S_signal, grant_N_L_signal: std_logic; signal grant_E_N_signal, grant_E_E_signal, grant_E_W_signal, grant_E_S_signal, grant_E_L_signal: std_logic; signal grant_W_N_signal, grant_W_E_signal, grant_W_W_signal, grant_W_S_signal, grant_W_L_signal: std_logic; signal grant_S_N_signal, grant_S_E_signal, grant_S_W_signal, grant_S_S_signal, grant_S_L_signal: std_logic; signal grant_L_N_signal, grant_L_E_signal, grant_L_W_signal, grant_L_S_signal, grant_L_L_signal: std_logic; signal grant_N_out_sig, grant_E_out_sig, grant_W_out_sig, grant_S_out_sig, grant_L_out_sig : std_logic; begin -- We did this because of the checkers valid_N <= valid_N_sig; valid_E <= valid_E_sig; valid_W <= valid_W_sig; valid_S <= valid_S_sig; valid_L <= valid_L_sig; grant_N_out <= grant_N_out_sig; grant_E_out <= grant_E_out_sig; grant_W_out <= grant_W_out_sig; grant_S_out <= grant_S_out_sig; grant_L_out <= grant_L_out_sig; grant_N_N <= grant_N_N_signal; grant_N_E <= grant_N_E_signal; grant_N_W <= grant_N_W_signal; grant_N_S <= grant_N_S_signal; grant_N_L <= grant_N_L_signal; grant_E_N <= grant_E_N_signal; grant_E_E <= grant_E_E_signal; grant_E_W <= grant_E_W_signal; grant_E_S <= grant_E_S_signal; grant_E_L <= grant_E_L_signal; grant_W_N <= grant_W_N_signal; grant_W_E <= grant_W_E_signal; grant_W_W <= grant_W_W_signal; grant_W_S <= grant_W_S_signal; grant_W_L <= grant_W_L_signal; grant_S_N <= grant_S_N_signal; grant_S_E <= grant_S_E_signal; grant_S_W <= grant_S_W_signal; grant_S_S <= grant_S_S_signal; grant_S_L <= grant_S_L_signal; grant_L_N <= grant_L_N_signal; grant_L_E <= grant_L_E_signal; grant_L_W <= grant_L_W_signal; grant_L_S <= grant_L_S_signal; grant_L_L <= grant_L_L_signal; -- Allocator logic (pseudo-combinational) module instantiation ALLOCATOR_LOGIC_PSEUDO0: allocator_logic_pseudo PORT MAP ( empty_N => empty_N, empty_E => empty_E, empty_W => empty_W, empty_S => empty_S, empty_L => empty_L, grant_N_N_sig => grant_N_N_sig, grant_N_E_sig => grant_N_E_sig, grant_N_W_sig => grant_N_W_sig, grant_N_S_sig => grant_N_S_sig, grant_N_L_sig => grant_N_L_sig, grant_E_N_sig => grant_E_N_sig, grant_E_E_sig => grant_E_E_sig, grant_E_W_sig => grant_E_W_sig, grant_E_S_sig => grant_E_S_sig, grant_E_L_sig => grant_E_L_sig, grant_W_N_sig => grant_W_N_sig, grant_W_E_sig => grant_W_E_sig, grant_W_W_sig => grant_W_W_sig, grant_W_S_sig => grant_W_S_sig, grant_W_L_sig => grant_W_L_sig, grant_S_N_sig => grant_S_N_sig, grant_S_E_sig => grant_S_E_sig, grant_S_W_sig => grant_S_W_sig, grant_S_S_sig => grant_S_S_sig, grant_S_L_sig => grant_S_L_sig, grant_L_N_sig => grant_L_N_sig, grant_L_E_sig => grant_L_E_sig, grant_L_W_sig => grant_L_W_sig, grant_L_S_sig => grant_L_S_sig, grant_L_L_sig => grant_L_L_sig, valid_N => valid_N_sig, valid_E => valid_E_sig, valid_W => valid_W_sig, valid_S => valid_S_sig, valid_L => valid_L_sig, grant_N_N => grant_N_N_signal, grant_N_E => grant_N_E_signal, grant_N_W => grant_N_W_signal, grant_N_S => grant_N_S_signal, grant_N_L => grant_N_L_signal, grant_E_N => grant_E_N_signal, grant_E_E => grant_E_E_signal, grant_E_W => grant_E_W_signal, grant_E_S => grant_E_S_signal, grant_E_L => grant_E_L_signal, grant_W_N => grant_W_N_signal, grant_W_E => grant_W_E_signal, grant_W_W => grant_W_W_signal, grant_W_S => grant_W_S_signal, grant_W_L => grant_W_L_signal, grant_S_N => grant_S_N_signal, grant_S_E => grant_S_E_signal, grant_S_W => grant_S_W_signal, grant_S_S => grant_S_S_signal, grant_S_L => grant_S_L_signal, grant_L_N => grant_L_N_signal, grant_L_E => grant_L_E_signal, grant_L_W => grant_L_W_signal, grant_L_S => grant_L_S_signal, grant_L_L => grant_L_L_signal, grant_N_out => grant_N_out_sig, grant_E_out => grant_E_out_sig, grant_W_out => grant_W_out_sig, grant_S_out => grant_S_out_sig, grant_L_out => grant_L_out_sig ); -- Allocator logic (pseudo-combinational) checkers instantiation CHECKERS: allocator_logic_pseudo_checkers PORT MAP ( empty_N => empty_N, empty_E => empty_E, empty_W => empty_W, empty_S => empty_S, empty_L => empty_L, grant_N_N_sig => grant_N_N_sig, grant_N_E_sig => grant_N_E_sig, grant_N_W_sig => grant_N_W_sig, grant_N_S_sig => grant_N_S_sig, grant_N_L_sig => grant_N_L_sig, grant_E_N_sig => grant_E_N_sig, grant_E_E_sig => grant_E_E_sig, grant_E_W_sig => grant_E_W_sig, grant_E_S_sig => grant_E_S_sig, grant_E_L_sig => grant_E_L_sig, grant_W_N_sig => grant_W_N_sig, grant_W_E_sig => grant_W_E_sig, grant_W_W_sig => grant_W_W_sig, grant_W_S_sig => grant_W_S_sig, grant_W_L_sig => grant_W_L_sig, grant_S_N_sig => grant_S_N_sig, grant_S_E_sig => grant_S_E_sig, grant_S_W_sig => grant_S_W_sig, grant_S_S_sig => grant_S_S_sig, grant_S_L_sig => grant_S_L_sig, grant_L_N_sig => grant_L_N_sig, grant_L_E_sig => grant_L_E_sig, grant_L_W_sig => grant_L_W_sig, grant_L_S_sig => grant_L_S_sig, grant_L_L_sig => grant_L_L_sig, valid_N => valid_N_sig, valid_E => valid_E_sig, valid_W => valid_W_sig, valid_S => valid_S_sig, valid_L => valid_L_sig, grant_N_N => grant_N_N_signal, grant_N_E => grant_N_E_signal, grant_N_W => grant_N_W_signal, grant_N_S => grant_N_S_signal, grant_N_L => grant_N_L_signal, grant_E_N => grant_E_N_signal, grant_E_E => grant_E_E_signal, grant_E_W => grant_E_W_signal, grant_E_S => grant_E_S_signal, grant_E_L => grant_E_L_signal, grant_W_N => grant_W_N_signal, grant_W_E => grant_W_E_signal, grant_W_W => grant_W_W_signal, grant_W_S => grant_W_S_signal, grant_W_L => grant_W_L_signal, grant_S_N => grant_S_N_signal, grant_S_E => grant_S_E_signal, grant_S_W => grant_S_W_signal, grant_S_S => grant_S_S_signal, grant_S_L => grant_S_L_signal, grant_L_N => grant_L_N_signal, grant_L_E => grant_L_E_signal, grant_L_W => grant_L_W_signal, grant_L_S => grant_L_S_signal, grant_L_L => grant_L_L_signal, grant_N => grant_N_out_sig, grant_E => grant_E_out_sig, grant_W => grant_W_out_sig, grant_S => grant_S_out_sig, grant_L => grant_L_out_sig, -- Checker Outputs err_grant_N_N_sig_not_empty_N_grant_N_N => err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N => err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E => err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E => err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W => err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W => err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S => err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S => err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L => err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L => err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N => err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N => err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E => err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E => err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W => err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W => err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S => err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S => err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L => err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L => err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N => err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N => err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E => err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E => err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W => err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W => err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S => err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S => err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L => err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L => err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N => err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N => err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E => err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E => err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W => err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W => err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S => err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S => err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L => err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L => err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N => err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N => err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E => err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E => err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W => err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W => err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S => err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S => err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L => err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L => err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N => err_grant_signals_not_empty_grant_N , err_not_grant_signals_empty_not_grant_N => err_not_grant_signals_empty_not_grant_N , err_grant_signals_not_empty_grant_E => err_grant_signals_not_empty_grant_E , err_not_grant_signals_empty_not_grant_E => err_not_grant_signals_empty_not_grant_E , err_grant_signals_not_empty_grant_W => err_grant_signals_not_empty_grant_W , err_not_grant_signals_empty_not_grant_W => err_not_grant_signals_empty_not_grant_W , err_grant_signals_not_empty_grant_S => err_grant_signals_not_empty_grant_S , err_not_grant_signals_empty_not_grant_S => err_not_grant_signals_empty_not_grant_S , err_grant_signals_not_empty_grant_L => err_grant_signals_not_empty_grant_L , err_not_grant_signals_empty_not_grant_L => err_not_grant_signals_empty_not_grant_L , err_grants_valid_not_match => err_grants_valid_not_match ); END;
gpl-3.0
a9a482014d6e15f0c35b0b27434f7353
0.453132
3.061125
false
false
false
false
AndyMcC0/UVVM_All
uvvm_util/src/bfm_common_pkg.vhd
1
20,585
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.math_real.all; use ieee.numeric_std.all; use std.textio.all; use work.types_pkg.all; use work.string_methods_pkg.all; use work.methods_pkg.all; use work.adaptations_pkg.all; package bfm_common_pkg is -- General declarations related to BFMs type t_normalization_mode is (ALLOW_WIDER, ALLOW_NARROWER, ALLOW_WIDER_NARROWER, ALLOW_EXACT_ONLY); alias t_normalisation_mode is t_normalization_mode; -- Functions/procedures impure function normalise( constant value : in std_logic_vector; constant target : in std_logic_vector; constant mode : in t_normalisation_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "slv" ) return std_logic_vector; impure function normalise( constant value : in unsigned; constant target : in unsigned; constant mode : in t_normalisation_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "unsigned" ) return unsigned; impure function normalise( constant value : in signed; constant target : in signed; constant mode : in t_normalisation_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "signed" ) return signed; -- Functions/procedures impure function normalize_and_check( constant value : in std_logic_vector; constant target : in std_logic_vector; constant mode : in t_normalization_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "slv" ) return std_logic_vector; impure function normalize_and_check( constant value : in unsigned; constant target : in unsigned; constant mode : in t_normalization_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "unsigned" ) return unsigned; impure function normalize_and_check( constant value : in signed; constant target : in signed; constant mode : in t_normalization_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "signed" ) return signed; procedure wait_until_given_time_after_rising_edge ( signal clk : in std_logic; constant wait_time : in time ); procedure wait_until_given_time_before_rising_edge ( signal clk : in std_logic; constant time_to_edge : in time; constant clk_period : in time ); procedure wait_num_rising_edge ( signal clk : in std_logic; constant num_rising_edge : in natural ); procedure wait_num_rising_edge_plus_margin ( signal clk : in std_logic; constant num_rising_edge : in natural; constant margin : in time ); end package bfm_common_pkg; --================================================================================================= package body bfm_common_pkg is constant C_SCOPE : string := "bfm_common"; -- Normalize 'value' to the width given by 'target' and perform sanity check. impure function normalize_and_check( constant value : in std_logic_vector; constant target : in std_logic_vector; constant mode : in t_normalization_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "slv" ) return std_logic_vector is constant name : string := "normalize_and_check(" & val_type & ": " & value_name & "=" & to_string(value, HEX, AS_IS) & ", " & target_name & "=" & to_string(target, HEX, AS_IS) & ")"; alias a_value : std_logic_vector(value'length - 1 downto 0) is value; alias a_target : std_logic_vector(target'length - 1 downto 0) is target; variable v_normalized_value : std_logic_vector(target'length - 1 downto 0); begin -- Verify that value and target are not zero-length vectors if value'length = 0 then tb_error(name & " => Value length is zero! " & add_msg_delimiter(msg), C_SCOPE); return v_normalized_value; elsif target'length = 0 then tb_error(name & " => Target length is zero! " & add_msg_delimiter(msg), C_SCOPE); return v_normalized_value; end if; -- If value'length > target'length, remove leading zeros from value if (a_value'length > a_target'length) then v_normalized_value := a_value(a_target'length - 1 downto 0); -- Sanity checks if not (mode = ALLOW_WIDER or mode = ALLOW_WIDER_NARROWER) then tb_error(name & " => " & value_name & " is wider than " & target_name & " without using ALLOW_WIDER mode. " & add_msg_delimiter(msg), C_SCOPE); end if; if not matching_widths(a_value, a_target) then tb_error(name & " => " & value_name & " is wider than " & target_name & " and has non-zeros in the extended MSB. " & add_msg_delimiter(msg), C_SCOPE); end if; -- If value'length = target'length elsif (a_value'length = a_target'length) then v_normalized_value := a_value; -- If value'length < target'length, add padding (leading zeros) to value elsif (a_value'length < a_target'length) then v_normalized_value := (others => '0'); v_normalized_value(a_value'length - 1 downto 0) := a_value; -- Sanity check if not (mode = ALLOW_NARROWER or mode = ALLOW_WIDER_NARROWER) then tb_error(name & " => " & value_name & " is narrower than " & target_name & " without using ALLOW_NARROWER mode. " & add_msg_delimiter(msg), C_SCOPE); end if; end if; return v_normalized_value; end; impure function normalize_and_check( constant value : in unsigned; constant target : in unsigned; constant mode : in t_normalization_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "unsigned" ) return unsigned is begin return unsigned( normalize_and_check(std_logic_vector(value), std_logic_vector(target), mode, value_name, target_name, msg, val_type) ); end; impure function normalize_and_check( constant value : in signed; constant target : in signed; constant mode : in t_normalization_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "signed" ) return signed is constant name : string := "normalize_and_check(" & val_type & ": " & value_name & "=" & to_string(std_logic_vector(value)) & ", " & target_name & "=" & to_string(std_logic_vector(target)) & ")"; alias a_value : signed(value'length - 1 downto 0) is value; alias a_target : signed(target'length - 1 downto 0) is target; variable v_normalized_value : signed(target'length - 1 downto 0); begin -- Verify that value and target are not zero-length vectors if value'length = 0 then tb_error(name & " => Value length is zero! " & add_msg_delimiter(msg), C_SCOPE); return v_normalized_value; elsif target'length = 0 then tb_error(name & " => Target length is zero! " & add_msg_delimiter(msg), C_SCOPE); return v_normalized_value; end if; -- If value'length > target'length, remove leading zeros/ones from value if a_value'length > a_target'length then v_normalized_value := a_value(a_target'length - 1 downto 0); -- Sanity checks if not (mode = ALLOW_WIDER or mode = ALLOW_WIDER_NARROWER) then tb_error(name & " => " & value_name & " is wider than " & target_name & " without using ALLOW_WIDER mode. " & add_msg_delimiter(msg), C_SCOPE); end if; if a_value(a_value'high) = '0' then -- positive value if not matching_widths(a_value, a_target) then tb_error(name & " => " & value_name & " is wider than " & target_name & " and has non-zeros in the extended MSB. " & add_msg_delimiter(msg), C_SCOPE); end if; elsif a_value(a_value'high) = '1' then -- negative value for i in a_value'high downto a_target'length loop if a_value(i) = '0' then tb_error(name & " => " & value_name & " is wider than " & target_name & " and has non-sign bits in the extended MSB. " & add_msg_delimiter(msg), C_SCOPE); end if; end loop; end if; -- If value'length = target'length elsif a_value'length = a_target'length then v_normalized_value := a_value; -- If value'length < target'length, add padding (leading zeros/ones) to value elsif a_value'length < a_target'length then if a_value(a_value'high) = '0' then -- positive value v_normalized_value := (others => '0'); elsif a_value(a_value'high) = '1' then -- negative value v_normalized_value := (others => '1'); end if; v_normalized_value(a_value'length - 1 downto 0) := a_value; -- Sanity check if not (mode = ALLOW_NARROWER or mode = ALLOW_WIDER_NARROWER) then tb_error(name & " => " & value_name & " is narrower than " & target_name & " without using ALLOW_NARROWER mode. " & add_msg_delimiter(msg), C_SCOPE); end if; end if; return v_normalized_value; end; -- Normalise 'value' to the width given by 'target'. impure function normalise( constant value : in std_logic_vector; constant target : in std_logic_vector; constant mode : in t_normalisation_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "slv" ) return std_logic_vector is constant name : string := "normalise(" & val_type & ": " & value_name & "=" & to_string(value, HEX, AS_IS) & ", " & target_name & "=" & to_string(target, HEX, AS_IS) & ")"; alias a_value : std_logic_vector(value'length - 1 downto 0) is value; alias a_target : std_logic_vector(target'length - 1 downto 0) is target; variable v_normalised_value : std_logic_vector(target'length - 1 downto 0); begin deprecate(get_procedure_name_from_instance_name(value'instance_name), "Use normalize_and_check()."); -- Verify that value and target are not zero-length vectors if value'length = 0 then tb_error(name & " => Value length is zero! " & add_msg_delimiter(msg), C_SCOPE); return v_normalised_value; elsif target'length = 0 then tb_error(name & " => Target length is zero! " & add_msg_delimiter(msg), C_SCOPE); return v_normalised_value; end if; -- If value'length > target'length, remove leading zeros from value if (a_value'length > a_target'length) then v_normalised_value := a_value(a_target'length - 1 downto 0); -- Sanity checks if not (mode = ALLOW_WIDER or mode = ALLOW_WIDER_NARROWER) then tb_error(name & " => " & value_name & " is wider than " & target_name & " without using ALLOW_WIDER mode. " & add_msg_delimiter(msg), C_SCOPE); end if; if not matching_widths(a_value, a_target) then tb_error(name & " => " & value_name & " is wider than " & target_name & " and has non-zeros in the extended MSB. " & add_msg_delimiter(msg), C_SCOPE); end if; -- If value'length = target'length elsif (a_value'length = a_target'length) then v_normalised_value := a_value; -- If value'length < target'length, add padding (leading zeros) to value elsif (a_value'length < a_target'length) then v_normalised_value := (others => '0'); v_normalised_value(a_value'length - 1 downto 0) := a_value; -- Sanity check if not (mode = ALLOW_NARROWER or mode = ALLOW_WIDER_NARROWER) then tb_error(name & " => " & value_name & " is narrower than " & target_name & " without using ALLOW_NARROWER mode. " & add_msg_delimiter(msg), C_SCOPE); end if; end if; return v_normalised_value; end; impure function normalise( constant value : in unsigned; constant target : in unsigned; constant mode : in t_normalisation_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "unsigned" ) return unsigned is begin return unsigned( normalise(std_logic_vector(value), std_logic_vector(target), mode, value_name, target_name, msg, val_type) ); end; impure function normalise( constant value : in signed; constant target : in signed; constant mode : in t_normalisation_mode; constant value_name : string; constant target_name : string; constant msg : string; constant val_type : string := "signed" ) return signed is constant name : string := "normalise(" & val_type & ": " & value_name & "=" & to_string(std_logic_vector(value)) & ", " & target_name & "=" & to_string(std_logic_vector(target)) & ")"; alias a_value : signed(value'length - 1 downto 0) is value; alias a_target : signed(target'length - 1 downto 0) is target; variable v_normalised_value : signed(target'length - 1 downto 0); begin deprecate(get_procedure_name_from_instance_name(value'instance_name), "Use normalize_and_check()."); -- Verify that value and target are not zero-length vectors if value'length = 0 then tb_error(name & " => Value length is zero! " & add_msg_delimiter(msg), C_SCOPE); return v_normalised_value; elsif target'length = 0 then tb_error(name & " => Target length is zero! " & add_msg_delimiter(msg), C_SCOPE); return v_normalised_value; end if; -- If value'length > target'length, remove leading zeros/ones from value if a_value'length > a_target'length then v_normalised_value := a_value(a_target'length - 1 downto 0); -- Sanity checks if not (mode = ALLOW_WIDER or mode = ALLOW_WIDER_NARROWER) then tb_error(name & " => " & value_name & " is wider than " & target_name & " without using ALLOW_WIDER mode. " & add_msg_delimiter(msg), C_SCOPE); end if; if a_value(a_value'high) = '0' then -- positive value if not matching_widths(a_value, a_target) then tb_error(name & " => " & value_name & " is wider than " & target_name & " and has non-zeros in the extended MSB. " & add_msg_delimiter(msg), C_SCOPE); end if; elsif a_value(a_value'high) = '1' then -- negative value for i in a_value'high downto a_target'length loop if a_value(i) = '0' then tb_error(name & " => " & value_name & " is wider than " & target_name & " and has non-sign bits in the extended MSB. " & add_msg_delimiter(msg), C_SCOPE); end if; end loop; end if; -- If value'length = target'length elsif a_value'length = a_target'length then v_normalised_value := a_value; -- If value'length < target'length, add padding (leading zeros/ones) to value elsif a_value'length < a_target'length then if a_value(a_value'high) = '0' then -- positive value v_normalised_value := (others => '0'); elsif a_value(a_value'high) = '1' then -- negative value v_normalised_value := (others => '1'); end if; v_normalised_value(a_value'length - 1 downto 0) := a_value; -- Sanity check if not (mode = ALLOW_NARROWER or mode = ALLOW_WIDER_NARROWER) then tb_error(name & " => " & value_name & " is narrower than " & target_name & " without using ALLOW_NARROWER mode. " & add_msg_delimiter(msg), C_SCOPE); end if; end if; return v_normalised_value; end; -- Wait until wait_time after rising_edge(clk) procedure wait_until_given_time_after_rising_edge ( signal clk : in std_logic; constant wait_time : in time ) is variable v_remaining_wait_time : time; begin -- If the time since the previous rising_edge is less than wait_time, -- we don't have to wait until the next rising_edge, -- only wait_time minus the time already passed since rising_edge if (clk'last_event <= wait_time and -- less than wait_time has passed since last event clk'last_value = '0' and clk = '1' -- last event was a rising_edge ) then v_remaining_wait_time := wait_time - clk'last_event; -- Wait until wait_time after rising_edge else wait until rising_edge(clk); v_remaining_wait_time := wait_time; -- Wait until wait_time after rising_edge end if; wait for v_remaining_wait_time; end; -- Wait until time_to_edge before rising_edge(clk) procedure wait_until_given_time_before_rising_edge ( signal clk : in std_logic; constant time_to_edge : in time; constant clk_period : in time ) is variable v_remaining_wait_time : time; begin check_value(clk_period > 2*time_to_edge, TB_ERROR, "time_to_edge must be less than half clk_period", C_SCOPE, ID_NEVER); -- If the time to the next rising edge is greater than time_to_edge and clk is low, -- we don't have to wait until the next falling_edge, -- only wait_time minus the time already passed since falling_edge if (clk'last_event <= clk_period/2 - time_to_edge and clk'last_value = '1' and clk = '0') then v_remaining_wait_time := (clk_period/2 - time_to_edge) - clk'last_event; -- Wait until time_to_edge before rising_edge else wait until falling_edge(clk); v_remaining_wait_time := (clk_period/2 - time_to_edge); -- Wait until time_to_edge before rising_edge end if; wait for v_remaining_wait_time; end; procedure wait_num_rising_edge ( signal clk : in std_logic; constant num_rising_edge : in natural ) is begin wait_num_rising_edge_plus_margin(clk,num_rising_edge, 0 ns); end procedure; procedure wait_num_rising_edge_plus_margin ( signal clk : in std_logic; constant num_rising_edge : in natural; constant margin : in time ) is begin -- Wait for number of rising edges if num_rising_edge /= 0 then for i in 1 to num_rising_edge loop wait until rising_edge(clk); end loop; end if; -- Wait for remaining margin, if any wait for margin; end procedure; end package body bfm_common_pkg;
mit
cba9fe52fbe7d6401c664f2e4d54edc5
0.597328
3.849822
false
false
false
false
ashtonchase/logic_analyzer
test/capture_ctrl_tb.vhd
1
6,755
------------------------------------------------------------------------------- -- Title : Testbench for design "capture_ctrl" -- Project : fpga_logic_analyzer ------------------------------------------------------------------------------- -- File : capture_ctrl_tb.vhd -- Created : 2016-02-27 -- Last update: 2016-02-27 -- Standard : VHDL'08 ------------------------------------------------------------------------------- -- Description: ------------------------------------------------------------------------------- -- Copyright (c) 2016 Ashton Johnson, Paul Henny, Ian Swepston, David Hurt ----------------------------------------------------------------------------- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- This program 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 General Public License for more details. -- You should have received a copy of the GNU General Public License along -- with this program; if not, write to the Free Software Foundation, Inc., -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ------------------------------------------------------------------------------- -- Revisions : -- Date Version Author Description -- 2016-02-27 1.0 ashton Created ------------------------------------------------------------------------------- USE std.textio.ALL; LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; USE ieee.std_logic_textio.ALL; --------------------------------------------- ENTITY capture_ctrl_tb IS END ENTITY capture_ctrl_tb; ------------------------------------------------------------------------------- ARCHITECTURE acj_func_test OF capture_ctrl_tb IS -- component generics CONSTANT DATA_WIDTH : POSITIVE RANGE 1 TO 32 := 8; -- component ports SIGNAL rst : STD_LOGIC := '1'; SIGNAL din : STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0) := (OTHERS => '0'); SIGNAL armed : STD_LOGIC; SIGNAL triggered : STD_LOGIC; SIGNAL rst_cmd : STD_LOGIC := '0'; SIGNAL arm_cmd : STD_LOGIC := '0'; SIGNAL id_cmd : STD_LOGIC := '0'; SIGNAL debug_cmd : STD_LOGIC := '0'; SIGNAL sample_enable : STD_LOGIC := '1'; SIGNAL sample_cnt_rst : STD_LOGIC; SIGNAL read_cnt_4x : STD_LOGIC_VECTOR(16-1 DOWNTO 0) := STD_LOGIC_VECTOR(to_unsigned(1000,16)); SIGNAL par_trig_msk : STD_LOGIC_VECTOR(32-1 DOWNTO 0) := X"FE_6B_28_40"; SIGNAL par_trig_val : STD_LOGIC_VECTOR(32-1 DOWNTO 0) := (OTHERS => '1'); SIGNAL capture_rdy : STD_LOGIC; SIGNAL fifo_tdata : STD_LOGIC_VECTOR(32-1 DOWNTO 0); SIGNAL fifo_tvalid : STD_LOGIC; SIGNAL fifo_tlast : STD_LOGIC; SIGNAL fifo_tready : STD_LOGIC := '0'; SIGNAL fifo_tfull : STD_LOGIC := '0'; SIGNAL placeholder : STD_LOGIC := '0'; -- clock SIGNAL Clk : STD_LOGIC := '1'; BEGIN -- ARCHITECTURE acj_func_test -- component instantiation DUT : ENTITY work.capture_ctrl GENERIC MAP ( DATA_WIDTH => DATA_WIDTH) PORT MAP ( clk => clk, rst => rst, din => din, armed => armed, triggered => triggered, rst_cmd => rst_cmd, arm_cmd => arm_cmd, id_cmd => id_cmd, debug_cmd => debug_cmd, sample_enable => sample_enable, sample_cnt_rst => sample_cnt_rst, delay_cnt_4x => read_cnt_4x, read_cnt_4x => read_cnt_4x, par_trig_msk => par_trig_msk, par_trig_val => par_trig_val, capture_rdy => capture_rdy, fifo_tdata => fifo_tdata, fifo_tvalid => fifo_tvalid, fifo_tlast => fifo_tlast, fifo_tready => fifo_tready, fifo_tfull => fifo_tfull, placeholder => placeholder); rst <= '0' AFTER 5 US; -- clock generation Clk <= NOT Clk AFTER 2 NS; sample_rate_sim : process begin wait UNTIL falling_edge(sample_cnt_rst); loop sample_enable<='0'; wait for 30ns; WAIT UNTIL rising_edge(clk); sample_enable<='1'; WAIT UNTIL rising_edge(clk); end loop; end process; -- waveform generation WaveGen_Proc : PROCESS BEGIN -- insert signal assignments here WAIT UNTIL rst = '0'; FOR cycle IN 0 TO 20 LOOP WAIT UNTIL rising_edge(clk); END LOOP; -- cycle WAIT UNTIL rising_edge(capture_rdy); WAIT UNTIL rising_edge(clk); arm_cmd <= '1'; WAIT UNTIL rising_edge(clk); arm_cmd <= '0'; rst_cmd<='1'; WAIT UNTIL rising_edge(clk); rst_cmd<='0'; wait for 10 us; WAIT UNTIL rising_edge(clk); id_cmd<='1'; WAIT UNTIL rising_edge(clk); id_cmd<='0'; wait for 10 us; WAIT UNTIL rising_edge(clk); debug_cmd<='1'; WAIT UNTIL rising_edge(clk); debug_cmd<='0'; wait for 10 us; FOR cycle IN 0 TO 20 LOOP WAIT UNTIL rising_edge(clk); END LOOP; -- cycle WAIT UNTIL rising_edge(clk); arm_cmd <= '1'; WAIT UNTIL rising_edge(clk); arm_cmd <= '0'; WAIT; END PROCESS WaveGen_Proc; din_gen : PROCESS (clk) IS BEGIN -- PROCESS din_gen IF rising_edge(clk) THEN -- rising clock edge IF rst = '1' THEN -- synchronous reset (active high) din <= (OTHERS => '0'); ELSE din <= STD_LOGIC_VECTOR(UNSIGNED(din)+1); END IF; END IF; END PROCESS din_gen; PROCESS (armed) IS BEGIN -- PROCESS IF rising_edge(armed) THEN REPORT "system has armed" SEVERITY NOTE; END IF; END PROCESS; PROCESS (triggered) IS BEGIN -- PROCESS IF rising_edge(triggered) THEN REPORT "system has triggered" SEVERITY NOTE; ASSERT din = X"40" REPORT "system triggered on incorrect value" SEVERITY ERROR; END IF; END PROCESS; PROCESS IS BEGIN -- PROCESS WAIT UNTIL falling_edge(rst); WAIT FOR 1 US; fifo_tready <= '1'; WAIT; END PROCESS; END ARCHITECTURE acj_func_test; ------------------------------------------------------------------------------- ------------------------------------------------
gpl-2.0
c46bc9b4d654367100424dd96cacfcbb
0.504811
4.182663
false
false
false
false
AndyMcC0/UVVM_All
bitvis_vip_i2c/src/vvc_cmd_pkg.vhd
1
7,485
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_vvc_framework_support_pkg.all; --================================================================================================= --================================================================================================= --================================================================================================= package vvc_cmd_pkg is --=============================================================================================== -- t_operation -- - Bitvis defined BFM operations --=============================================================================================== type t_operation is ( -- UVVM common NO_OPERATION, AWAIT_COMPLETION, AWAIT_ANY_COMPLETION, ENABLE_LOG_MSG, DISABLE_LOG_MSG, FLUSH_COMMAND_QUEUE, FETCH_RESULT, INSERT_DELAY, TERMINATE_CURRENT_COMMAND, -- VVC local MASTER_TRANSMIT, MASTER_RECEIVE, MASTER_CHECK, SLAVE_TRANSMIT, SLAVE_RECEIVE, SLAVE_CHECK, MASTER_QUICK_CMD); constant C_VVC_CMD_STRING_MAX_LENGTH : natural := 300; constant C_VVC_CMD_DATA_MAX_LENGTH : natural := 64; constant C_VVC_CMD_ADDR_MAX_LENGTH : natural := 10; --=============================================================================================== -- t_vvc_cmd_record -- - Record type used for communication with the VVC --=============================================================================================== type t_vvc_cmd_record is record -- VVC dedicated fields addr : unsigned(C_VVC_CMD_ADDR_MAX_LENGTH-1 downto 0); data : t_byte_array(0 to C_VVC_CMD_DATA_MAX_LENGTH-1); num_bytes : natural; continue : t_action_when_transfer_is_done; exp_ack : boolean; rw_bit : std_logic; -- Common VVC fields (Used by td_vvc_framework_common_methods_pkg procedures, and thus mandatory) operation : t_operation; proc_call : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); msg : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); cmd_idx : natural; command_type : t_immediate_or_queued; -- QUEUED/IMMEDIATE msg_id : t_msg_id; gen_integer_array : t_integer_array(0 to 1); -- Increase array length if needed gen_boolean : boolean; -- Generic boolean timeout : time; alert_level : t_alert_level; delay : time; quietness : t_quietness; end record; constant C_VVC_CMD_DEFAULT : t_vvc_cmd_record := ( addr => (others => '0'), data => (others => (others => '0')), num_bytes => 0, continue => RELEASE_LINE_AFTER_TRANSFER, exp_ack => true, rw_bit => '0', -- Common VVC fields operation => NO_OPERATION, proc_call => (others => NUL), msg => (others => NUL), cmd_idx => 0, command_type => NO_COMMAND_TYPE, msg_id => NO_ID, gen_integer_array => (others => -1), gen_boolean => false, timeout => 0 ns, alert_level => failure, delay => 0 ns, quietness => NON_QUIET ); --=============================================================================================== -- shared_vvc_cmd -- - Shared variable used for transmitting VVC commands --=============================================================================================== shared variable shared_vvc_cmd : t_vvc_cmd_record := C_VVC_CMD_DEFAULT; --=============================================================================================== -- t_vvc_result, t_vvc_result_queue_element, t_vvc_response and shared_vvc_response : -- -- - These are used for storing the result of f.ex. read/receive BFM procedures called by the VVC, -- so that the result can be transported from the VVC to the sequencer via a -- a fetch_result() call as described in VVC_Framework_common_methods_QuickRef -- -- - t_vvc_result matches the return value of read/receive procedure in the BFM. -- It can also be defined as a record if multiple return values shall be transported from the BFM --=============================================================================================== subtype t_vvc_result is t_byte_array(0 to C_VVC_CMD_DATA_MAX_LENGTH-1); type t_vvc_result_queue_element is record cmd_idx : natural; -- from UVVM handshake mechanism result : t_vvc_result; end record; type t_vvc_response is record fetch_is_accepted : boolean; transaction_result : t_transaction_result; result : t_vvc_result; end record; shared variable shared_vvc_response : t_vvc_response; --=============================================================================================== -- t_last_received_cmd_idx : -- - Used to store the last queued cmd in vvc interpreter. --=============================================================================================== type t_last_received_cmd_idx is array (t_channel range <>, natural range <>) of integer; --=============================================================================================== -- shared_vvc_last_received_cmd_idx -- - Shared variable used to get last queued index from vvc to sequencer --=============================================================================================== shared variable shared_vvc_last_received_cmd_idx : t_last_received_cmd_idx(t_channel'left to t_channel'right, 0 to C_MAX_VVC_INSTANCE_NUM) := (others => (others => -1)); end package vvc_cmd_pkg; --================================================================================================= --================================================================================================= package body vvc_cmd_pkg is function to_string( value : t_operation ) return string is begin return t_operation'image(value); end; end package body vvc_cmd_pkg;
mit
05f6a5a98a6da3a6e5ea0740cc883496
0.454643
5.006689
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/With_checkers/Arbiter_in_one_hot_checkers.vhd
10
23,865
library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity Arbiter_in_one_hot_checkers is port ( req_X_N, req_X_E, req_X_W, req_X_S, req_X_L :in std_logic; state: in std_logic_vector (5 downto 0); state_in: in std_logic_vector (5 downto 0); X_N, X_E, X_W, X_S, X_L :in std_logic; -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_Req_N, err_IDLE_grant_N, err_North_Req_N, err_North_grant_N, err_East_Req_E, err_East_grant_E, err_West_Req_W, err_West_grant_W, err_South_Req_S, err_South_grant_S, err_Local_Req_L, err_Local_grant_L, err_IDLE_Req_E, err_IDLE_grant_E, err_North_Req_E, err_North_grant_E, err_East_Req_W, err_East_grant_W, err_West_Req_S, err_West_grant_S, err_South_Req_L, err_South_grant_L, err_Local_Req_N, err_Local_grant_N, err_IDLE_Req_W, err_IDLE_grant_W, err_North_Req_W, err_North_grant_W, err_East_Req_S, err_East_grant_S, err_West_Req_L, err_West_grant_L, err_South_Req_N, err_South_grant_N, err_Local_Req_E, err_Local_grant_E, err_IDLE_Req_S, err_IDLE_grant_S, err_North_Req_S, err_North_grant_S, err_East_Req_L, err_East_grant_L, err_West_Req_N, err_West_grant_N, err_South_Req_E, err_South_grant_E, err_Local_Req_W, err_Local_grant_W, err_IDLE_Req_L, err_IDLE_grant_L, err_North_Req_L, err_North_grant_L, err_East_Req_N, err_East_grant_N, err_West_Req_E, err_West_grant_E, err_South_Req_W, err_South_grant_W, err_Local_Req_S, err_Local_grant_S, err_state_in_onehot, err_no_request_grants, err_request_no_grants, err_no_Req_N_grant_N, err_no_Req_E_grant_E, err_no_Req_W_grant_W, err_no_Req_S_grant_S, err_no_Req_L_grant_L : out std_logic ); end Arbiter_in_one_hot_checkers; architecture behavior of Arbiter_in_one_hot_checkers is CONSTANT IDLE: std_logic_vector (5 downto 0) := "000001"; CONSTANT Local: std_logic_vector (5 downto 0) := "000010"; CONSTANT North: std_logic_vector (5 downto 0) := "000100"; CONSTANT East: std_logic_vector (5 downto 0) := "001000"; CONSTANT West: std_logic_vector (5 downto 0) := "010000"; CONSTANT South: std_logic_vector (5 downto 0) := "100000"; SIGNAL Requests: std_logic_vector (4 downto 0); SIGNAL Grants: std_logic_vector (4 downto 0); begin Requests <= req_X_N & req_X_E & req_X_W & req_X_S & req_X_L; Grants <= X_N & X_E & X_W & X_S & X_L; -- Checkers --checked process (state, Requests, state_in) begin --if ( (state = North or state = East or state = West or state = South or state = Local or state = IDLE) and Requests = "00000" and state_in /= state ) then if (Requests = "00000" and state_in /= state ) then err_Requests_state_in_state_not_equal <= '1'; else err_Requests_state_in_state_not_equal <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 1 --checked -- N has highest priority, then E, W, S and L (and then again N). process (state, req_X_N, state_in) begin if ( state = IDLE and req_X_N = '1' and state_in /= North ) then err_IDLE_Req_N <= '1'; else err_IDLE_Req_N <= '0'; end if; end process; process (state, req_X_N, X_N) begin if ( state = IDLE and req_X_N = '1' and X_N = '0' ) then err_IDLE_grant_N <= '1'; else err_IDLE_grant_N <= '0'; end if; end process; process (state, req_X_N, state_in) begin if (state = North and req_X_N = '1' and state_in /= North) then err_North_Req_N <= '1'; else err_North_Req_N <= '0'; end if; end process; process (state, req_X_N, X_N) begin if ( state = North and req_X_N = '1' and X_N = '0' ) then err_North_grant_N <= '1'; else err_North_grant_N <= '0'; end if; end process; process (state, req_X_E, state_in) begin if (state = East and req_X_E = '1' and state_in /= East) then err_East_Req_E <= '1'; else err_East_Req_E <= '0'; end if; end process; process (state, req_X_E, X_E) begin if ( state = East and req_X_E = '1' and X_E = '0' ) then err_East_grant_E <= '1'; else err_East_grant_E <= '0'; end if; end process; process (state, req_X_W, state_in) begin if (state = West and req_X_W = '1' and state_in /= West) then err_West_Req_W <= '1'; else err_West_Req_W <= '0'; end if; end process; process (state, req_X_W, X_W) begin if ( state = West and req_X_W = '1' and X_W = '0' ) then err_West_grant_W <= '1'; else err_West_grant_W <= '0'; end if; end process; process (state, req_X_S, state_in) begin if (state = South and req_X_S = '1' and state_in /= South) then err_South_Req_S <= '1'; else err_South_Req_S <= '0'; end if; end process; process (state, req_X_S, X_S) begin if ( state = South and req_X_S = '1' and X_S = '0' ) then err_South_grant_S <= '1'; else err_South_grant_S <= '0'; end if; end process; -- Local is a bit different (including others case) process (state, req_X_L, state_in) begin if ( state /= IDLE and state /= North and state /=East and state /= West and state /= South and req_X_L = '1' and state_in /= Local) then err_Local_Req_L <= '1'; else err_Local_Req_L <= '0'; end if; end process; process (state, req_X_L, X_L) begin if ( state /= IDLE and state /= North and state /=East and state /= West and state /= South and req_X_L = '1' and X_L = '0' ) then err_Local_grant_L <= '1'; else err_Local_grant_L <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 2 --checked process (state, req_X_N, req_X_E, state_in) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_IDLE_Req_E <= '1'; else err_IDLE_Req_E <= '0'; end if; end process; process (state, req_X_N, req_X_E, X_E) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '1' and X_E = '0' ) then err_IDLE_grant_E <= '1'; else err_IDLE_grant_E <= '0'; end if; end process; process (state, req_X_N, req_X_E, state_in) begin if ( state = North and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_North_Req_E <= '1'; else err_North_Req_E <= '0'; end if; end process; process (state, req_X_N, req_X_E, X_E) begin if ( state = North and req_X_N = '0' and req_X_E = '1' and X_E = '0' ) then err_North_grant_E <= '1'; else err_North_grant_E <= '0'; end if; end process; process (state, req_X_E, req_X_W, state_in) begin if ( state = East and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_East_Req_W <= '1'; else err_East_Req_W <= '0'; end if; end process; process (state, req_X_E, req_X_W, X_W) begin if ( state = East and req_X_E = '0' and req_X_W = '1' and X_W = '0' ) then err_East_grant_W <= '1'; else err_East_grant_W <= '0'; end if; end process; process (state, req_X_W, req_X_S, state_in) begin if ( state = West and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_West_Req_S <= '1'; else err_West_Req_S <= '0'; end if; end process; process (state, req_X_W, req_X_S, X_S) begin if ( state = West and req_X_W = '0' and req_X_S = '1' and X_S = '0' ) then err_West_grant_S <= '1'; else err_West_grant_S <= '0'; end if; end process; -- Shall I consider local for this case or the others case ? I guess local, according to the previous checkers -- for the router with CTS/RTS handshaking Flow Control process (state, req_X_S, req_X_L, state_in) begin if ( state = South and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_South_Req_L <= '1'; else err_South_Req_L <= '0'; end if; end process; process (state, req_X_S, req_X_L, X_L) begin if ( state = South and req_X_S = '0' and req_X_L = '1' and X_L = '0' ) then err_South_grant_L <= '1'; else err_South_grant_L <= '0'; end if; end process; -- Local and invalid states (others case) process (state, req_X_L, req_X_N, state_in) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '1' and state_in /= North) then err_Local_Req_N <= '1'; else err_Local_Req_N <= '0'; end if; end process; process (state, req_X_L, req_X_N, X_N) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '1' and X_N = '0' ) then err_Local_grant_N <= '1'; else err_Local_grant_N <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 3 process (state, req_X_N, req_X_E, req_X_W, state_in) begin if (state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_IDLE_Req_W <= '1'; else err_IDLE_Req_W <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, X_W) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and X_W = '0' ) then err_IDLE_grant_W <= '1'; else err_IDLE_grant_W <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, state_in) begin if (state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_North_Req_W <= '1'; else err_North_Req_W <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, X_W) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and X_W = '0' ) then err_North_grant_W <= '1'; else err_North_grant_W <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, state_in) begin if (state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_East_Req_S <= '1'; else err_East_Req_S <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, X_S) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and X_S = '0' ) then err_East_grant_S <= '1'; else err_East_grant_S <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, state_in) begin if (state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_West_Req_L <= '1'; else err_West_Req_L <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, X_L) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and X_L = '0' ) then err_West_grant_L <= '1'; else err_West_grant_L <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, state_in) begin if (state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and state_in /= North) then err_South_Req_N <= '1'; else err_South_Req_N <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, X_N) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and X_N = '0' ) then err_South_grant_N <= '1'; else err_South_grant_N <= '0'; end if; end process; -- Local and invalid state(s) (others case) process (state, req_X_L, req_X_N, req_X_E, state_in) begin if (state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_Local_Req_E <= '1'; else err_Local_Req_E <= '0'; end if; end process; process (state, req_X_L, req_X_N, req_X_E, X_E) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and X_E = '0' ) then err_Local_grant_E <= '1'; else err_Local_grant_E <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 4 process (state, req_X_N, req_X_E, req_X_W, req_X_S, state_in) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_IDLE_Req_S <= '1'; else err_IDLE_Req_S <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, X_S) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and X_S = '0') then err_IDLE_grant_S <= '1'; else err_IDLE_grant_S <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, state_in) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_North_Req_S <= '1'; else err_North_Req_S <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, X_S) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and X_S = '0') then err_North_grant_S <= '1'; else err_North_grant_S <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, req_X_L, state_in) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_East_Req_L <= '1'; else err_East_Req_L <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, req_X_L, X_L) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and X_L = '0') then err_East_grant_L <= '1'; else err_East_grant_L <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, req_X_N, state_in) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and state_in /= North) then err_West_Req_N <= '1'; else err_West_Req_N <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, req_X_N, X_N) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and X_N = '0') then err_West_grant_N <= '1'; else err_West_grant_N <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, req_X_E, state_in) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_South_Req_E <= '1'; else err_South_Req_E <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, req_X_E, X_E) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and X_E = '0') then err_South_grant_E <= '1'; else err_South_grant_E <= '0'; end if; end process; -- Local state or invalid state(s) (others case) process (state, req_X_L, req_X_N, req_X_E, req_X_W, state_in) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_Local_Req_W <= '1'; else err_Local_Req_W <= '0'; end if; end process; process (state, req_X_L, req_X_N, req_X_E, req_X_W, X_W) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and X_W = '0') then err_Local_grant_W <= '1'; else err_Local_grant_W <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 5 process (state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, state_in) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_IDLE_Req_L <= '1'; else err_IDLE_Req_L <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, X_L) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and X_L = '0' ) then err_IDLE_grant_L <= '1'; else err_IDLE_grant_L <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, state_in) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_North_Req_L <= '1'; else err_North_Req_L <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, X_L) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and X_L = '0' ) then err_North_grant_L <= '1'; else err_North_grant_L <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, req_X_L, req_X_N, state_in) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and state_in /= North) then err_East_Req_N <= '1'; else err_East_Req_N <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, req_X_L, req_X_N, X_N) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and X_N = '0' ) then err_East_grant_N <= '1'; else err_East_grant_N <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, req_X_N, req_X_E, state_in) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_West_Req_E <= '1'; else err_West_Req_E <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, req_X_N, req_X_E, X_E) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and X_E = '0' ) then err_West_grant_E <= '1'; else err_West_grant_E <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, req_X_E, req_X_W, state_in) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_South_Req_W <= '1'; else err_South_Req_W <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, req_X_E, req_X_W, X_W) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and X_W = '0' ) then err_South_grant_W <= '1'; else err_South_grant_W <= '0'; end if; end process; -- Local state or invalid state(s) (others case) process (state, req_X_L, req_X_N, req_X_E, req_X_W, req_X_S, state_in) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_Local_Req_S <= '1'; else err_Local_Req_S <= '0'; end if; end process; process (state, req_X_L, req_X_N, req_X_E, req_X_W, req_X_S, X_S) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and X_S = '0' ) then err_Local_grant_S <= '1'; else err_Local_grant_S <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- process (state_in) begin if (state_in /= IDLE and state_in /= North and state_in /= East and state_in /= West and state_in /= South and state_in /= Local) then err_state_in_onehot <= '1'; else err_state_in_onehot <= '0'; end if; end process; process (Requests, Grants) begin if ( Requests = "00000" and Grants /= "00000") then err_no_request_grants <= '1'; else err_no_request_grants <= '0'; end if; end process; process (Requests, Grants) begin if ( Requests /= "00000" and Grants = "00000") then err_request_no_grants <= '1'; else err_request_no_grants <= '0'; end if; end process; process (req_X_N, X_N) begin if (req_X_N = '0' and X_N = '1') then err_no_Req_N_grant_N <= '1'; else err_no_Req_N_grant_N <= '0'; end if; end process; process (req_X_E, X_E) begin if (req_X_E = '0' and X_E = '1') then err_no_Req_E_grant_E <= '1'; else err_no_Req_E_grant_E <= '0'; end if; end process; process (req_X_W, X_W) begin if (req_X_W = '0' and X_W = '1') then err_no_Req_W_grant_W <= '1'; else err_no_Req_W_grant_W <= '0'; end if; end process; process (req_X_S, X_S) begin if (req_X_S = '0' and X_S = '1') then err_no_Req_S_grant_S <= '1'; else err_no_Req_S_grant_S <= '0'; end if; end process; process (req_X_L, X_L) begin if (req_X_L = '0' and X_L = '1') then err_no_Req_L_grant_L <= '1'; else err_no_Req_L_grant_L <= '0'; end if; end process; end behavior;
gpl-3.0
4bd7173f876b74e17804f283f1865738
0.492437
2.61105
false
false
false
false
Joozty/FIT-VUT
3. Semester/INP - Design of Computer Systems/1. Project/fpga/sim/ledc8x8_tb.vhd
1
774
library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity testbench is end testbench; architecture behv of testbench is component ledc8x8 is port ( SMCLK, RESET: in std_logic; ROW, LED: out std_logic_vector(0 to 7) ); end component; signal smclk: std_logic := '0'; signal reset: std_logic; signal row, led: std_logic_vector(0 to 7); constant period: time := 135.6 ns; -- odvozeno od f(SMCLK) = 7.3728 MHz begin uut: ledc8x8 port map(smclk, reset, row, led); smclk <= not smclk after period / 2; test: process begin reset <= '1'; wait until smclk'event and smclk = '1'; reset <= '0'; wait; end process; end behv;
gpl-3.0
8cc1a6a6d0f85f1c3ebb134aa3424a21
0.617571
3.336207
false
true
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/NI_Test/deep_NI.vhd
3
25,517
--------------------------------------------------------------------- -- Copyright (C) 2016 Siavoosh Payandeh Azad -- -- Network interface: Its an interrupt based memory mapped I/O for sending and recieving packets. -- the data that is sent to NI should be of the following form: -- FIRST write: 4bit source(31-28), 4 bit destination(27-14), 8bit packet length(23-16) -- Body write: 28 bit data(27-0) -- Last write: 28 bit data(27-0) --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_misc.all; --use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; use IEEE.NUMERIC_STD.all; use ieee.std_logic_textio.all; use std.textio.all; use work.mlite_pack.all; use ieee.std_logic_misc.all; entity NI is generic(current_address : integer := 10; -- the current node's address SHMU_address : integer := 0; reserved_address : std_logic_vector(29 downto 0) := "000000000000000001111111111111"; -- Behrad: NI's reserved address ? flag_address : std_logic_vector(29 downto 0) := "000000000000000010000000000000"; -- reserved address for the memory mapped I/O counter_address : std_logic_vector(29 downto 0) := "000000000000000010000000000001"; reconfiguration_address : std_logic_vector(29 downto 0) := "000000000000000010000000000010"; -- reserved address for reconfiguration register self_diagnosis_address : std_logic_vector(29 downto 0) := "000000000000000010000000000011"); -- reserved address for self diagnosis register port(clk : in std_logic; reset : in std_logic; enable : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); -- Flags used by JNIFR and JNIFW instructions --NI_read_flag : out std_logic; -- One if the N2P fifo is empty. No read should be performed if one. --NI_write_flag : out std_logic; -- One if P2N fifo is full. no write should be performed if one. -- interrupt signal: generated evertime a packet is recieved! irq_out : out std_logic; -- signals for sending packets to network credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); -- data sent to the NoC -- signals for reciving packets from the network credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); -- data recieved form the NoC -- fault information signals from the router link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(19 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); -- if you are not going to update Cx you should write all ones! (it will be and will the current Cx bits) Reconfig_command : out std_logic ); end; --entity NI architecture logic of NI is -- all the following signals are for sending data from processor to NoC signal storage, storage_in : std_logic_vector(31 downto 0); signal valid_data_in, valid_data: std_logic; signal old_address: std_logic_vector(31 downto 2); -- Behrad: What is old address ? signal P2N_FIFO_read_pointer, P2N_FIFO_read_pointer_in, P2N_FIFO_write_pointer, P2N_FIFO_write_pointer_in: std_logic_vector(6 downto 0); signal P2N_write_en: std_logic; type MEM is array (0 to 128) of std_logic_vector(31 downto 0); signal P2N_FIFO, P2N_FIFO_in : MEM; --signal P2N_FIFO_MEM_1, P2N_FIFO_MEM_1_in : std_logic_vector(31 downto 0); --signal P2N_FIFO_MEM_2, P2N_FIFO_MEM_2_in : std_logic_vector(31 downto 0); --signal P2N_FIFO_MEM_3, P2N_FIFO_MEM_3_in : std_logic_vector(31 downto 0); --signal P2N_FIFO_MEM_4, P2N_FIFO_MEM_4_in : std_logic_vector(31 downto 0); signal P2N_full, P2N_empty: std_logic; signal credit_counter_in, credit_counter_out: std_logic_vector(1 downto 0); signal packet_counter_in, packet_counter_out: std_logic_vector(13 downto 0); signal packet_length_counter_in, packet_length_counter_out: std_logic_vector(13 downto 0); signal grant : std_logic; type STATE_TYPE IS (IDLE, HEADER_FLIT, BODY_FLIT_1, BODY_FLIT, TAIL_FLIT, DIAGNOSIS_HEADER, DIAGNOSIS_BODY, DIAGNOSIS_BODY_1, DIAGNOSIS_TAIL); signal state, state_in : STATE_TYPE := IDLE; signal FIFO_Data_out : std_logic_vector(31 downto 0); signal flag_register, flag_register_in : std_logic_vector(31 downto 0); -- all the following signals are for sending the packets from NoC to processor signal N2P_FIFO, N2P_FIFO_in : MEM; --signal N2P_FIFO_MEM_1, N2P_FIFO_MEM_1_in : std_logic_vector(31 downto 0); --signal N2P_FIFO_MEM_2, N2P_FIFO_MEM_2_in : std_logic_vector(31 downto 0); --signal N2P_FIFO_MEM_3, N2P_FIFO_MEM_3_in : std_logic_vector(31 downto 0); --signal N2P_FIFO_MEM_4, N2P_FIFO_MEM_4_in : std_logic_vector(31 downto 0); signal N2P_Data_out : std_logic_vector(31 downto 0); signal N2P_FIFO_read_pointer, N2P_FIFO_read_pointer_in: std_logic_vector(4 downto 0); signal N2P_FIFO_write_pointer, N2P_FIFO_write_pointer_in: std_logic_vector(4 downto 0); signal N2P_full, N2P_empty: std_logic; signal N2P_read_en, N2P_read_en_in, N2P_write_en: std_logic; signal counter_register_in, counter_register : std_logic_vector(1 downto 0); signal fault_info, fault_info_in: std_logic_vector(24 downto 0); signal sent_info, fault_info_ready, fault_info_ready_in: std_logic; signal self_diagnosis_reg_out, self_diagnosis_reg_in: std_logic_vector(31 downto 0); signal self_diagnosis_flag, self_diagnosis_flag_in: std_logic; begin process(clk, enable, write_byte_enable) begin if reset = '1' then storage <= (others => '0'); valid_data <= '0'; P2N_FIFO_read_pointer <= (others=>'0'); P2N_FIFO_write_pointer <= (others=>'0'); -- P2N_FIFO_MEM_1 <= (others=>'0'); -- P2N_FIFO_MEM_2 <= (others=>'0'); -- P2N_FIFO_MEM_3 <= (others=>'0'); -- P2N_FIFO_MEM_4 <= (others=>'0'); P2N_FIFO <= (others => (others=>'0')); credit_counter_out <= "11"; packet_length_counter_out <= "00000000000000"; state <= IDLE; packet_counter_out <= "00000000000000"; ------------------------------------------------ N2P_FIFO <= (others => (others=>'0')); --N2P_FIFO_MEM_1 <= (others=>'0'); --N2P_FIFO_MEM_2 <= (others=>'0'); --N2P_FIFO_MEM_3 <= (others=>'0'); --N2P_FIFO_MEM_4 <= (others=>'0'); N2P_FIFO_read_pointer <= (others=>'0'); N2P_FIFO_write_pointer <= (others=>'0'); credit_out <= '0'; counter_register <= (others => '0'); N2P_read_en <= '0'; flag_register <= (others =>'0'); old_address <= (others =>'0'); fault_info <= (others => '0'); fault_info_ready <= '0'; self_diagnosis_reg_out <= (others => '0'); self_diagnosis_flag <= '0'; elsif clk'event and clk = '1' then old_address <= address; P2N_FIFO_write_pointer <= P2N_FIFO_write_pointer_in; P2N_FIFO_read_pointer <= P2N_FIFO_read_pointer_in; credit_counter_out <= credit_counter_in; packet_length_counter_out <= packet_length_counter_in; valid_data <= valid_data_in; if P2N_write_en = '1' then --write into the memory P2N_FIFO <= P2N_FIFO_in; --P2N_FIFO_MEM_1 <= P2N_FIFO_MEM_1_in; --P2N_FIFO_MEM_2 <= P2N_FIFO_MEM_2_in; --P2N_FIFO_MEM_3 <= P2N_FIFO_MEM_3_in; --P2N_FIFO_MEM_4 <= P2N_FIFO_MEM_4_in; end if; packet_counter_out <= packet_counter_in; if write_byte_enable /= "0000" then storage <= storage_in; end if; state <= state_in; ------------------------------------------------ if N2P_write_en = '1' then N2P_FIFO <= N2P_FIFO_in; --write into the memory --N2P_FIFO_MEM_1 <= N2P_FIFO_MEM_1_in; --N2P_FIFO_MEM_2 <= N2P_FIFO_MEM_2_in; --N2P_FIFO_MEM_3 <= N2P_FIFO_MEM_3_in; --N2P_FIFO_MEM_4 <= N2P_FIFO_MEM_4_in; end if; counter_register <= counter_register_in; N2P_FIFO_write_pointer <= N2P_FIFO_write_pointer_in; N2P_FIFO_read_pointer <= N2P_FIFO_read_pointer_in; credit_out <= '0'; N2P_read_en <= N2P_read_en_in; if N2P_read_en = '1' then credit_out <= '1'; end if; flag_register <= flag_register_in; fault_info <= fault_info_in; fault_info_ready <= fault_info_ready_in; self_diagnosis_reg_out <= self_diagnosis_reg_in; self_diagnosis_flag <= self_diagnosis_flag_in; end if; end process; -- everything bellow this line is pure combinatorial! --------------------------------------------------------------------------------------- --below this is code for communication from PE 2 NoC -- Process used for sending reconfiguration command from PE to router (which is part of NoC) process(enable, address, write_byte_enable) begin -- Some initializations Reconfig_command <= '0'; Rxy_reconf_PE <= (others =>'0'); Cx_reconf_PE <= (others =>'0'); if address = reconfiguration_address and enable = '1' then if write_byte_enable /= "0000" then -- In this case, data_write definitely includes the connectivity bits and routing bits for -- reconfiguring LBDR logic. Rxy_reconf_PE <= data_write(7 downto 0); -- Rxy is 8 bits long Cx_reconf_PE <= data_write(11 downto 8); -- Cx is 4 bits long Reconfig_command <= '1'; end if; end if; end process; process(write_byte_enable, enable, address, storage, data_write, valid_data, P2N_write_en) begin storage_in <= storage ; valid_data_in <= valid_data; -- If PE wants to send data to NoC via NI (data is valid) if enable = '1' and address = reserved_address then if write_byte_enable /= "0000" then valid_data_in <= '1'; end if; -- Behrad: So according to Plasma, is write_byte_enable always one-hot ? -- (of course it can also be "0000") if write_byte_enable(0) = '1' then storage_in(7 downto 0) <= data_write(7 downto 0); end if; if write_byte_enable(1) = '1' then storage_in(15 downto 8) <= data_write(15 downto 8); end if; if write_byte_enable(2) = '1' then storage_in(23 downto 16) <= data_write(23 downto 16); end if; if write_byte_enable(3) = '1' then storage_in(31 downto 24) <= data_write(31 downto 24); end if; end if; if P2N_write_en = '1' then valid_data_in <= '0'; end if; end process; -- Process for storing in FIFO (based on the position write pointer is pointing to) -- Write pointer is encoded as one-hot! --process(storage, P2N_FIFO_write_pointer, P2N_FIFO_MEM_1, P2N_FIFO_MEM_2, P2N_FIFO_MEM_3, P2N_FIFO_MEM_4)begin -- case(P2N_FIFO_write_pointer) is -- when "0001" => P2N_FIFO_MEM_1_in <= storage; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; -- when "0010" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= storage; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; -- when "0100" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= storage; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; -- when "1000" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= storage; -- when others => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; -- end case ; --end process; process(storage, P2N_FIFO_write_pointer, P2N_FIFO) begin P2N_FIFO_in <= P2N_FIFO; P2N_FIFO_in(to_integer(unsigned(P2N_FIFO_write_pointer))) <= storage; end process; FIFO_Data_out <= P2N_FIFO(to_integer(unsigned(P2N_FIFO_read_pointer))); -- Process for reading from FIFO (based on the position read pointer is pointing to) -- read pointer is encoded as one-hot! --process(P2N_FIFO_read_pointer, P2N_FIFO_MEM_1, P2N_FIFO_MEM_2, P2N_FIFO_MEM_3, P2N_FIFO_MEM_4)begin -- case( P2N_FIFO_read_pointer ) is -- when "0001" => FIFO_Data_out <= P2N_FIFO_MEM_1; -- when "0010" => FIFO_Data_out <= P2N_FIFO_MEM_2; -- when "0100" => FIFO_Data_out <= P2N_FIFO_MEM_3; -- when "1000" => FIFO_Data_out <= P2N_FIFO_MEM_4; -- when others => FIFO_Data_out <= P2N_FIFO_MEM_1; -- end case ; -- end process; -- Write pointer update process (after each write operation, write pointer is rotated one bit to the left) process(P2N_write_en, P2N_FIFO_write_pointer)begin if P2N_write_en = '1' then P2N_FIFO_write_pointer_in <= P2N_FIFO_write_pointer +1 ; else P2N_FIFO_write_pointer_in <= P2N_FIFO_write_pointer; end if; end process; -- Read pointer update process (after each read operation, read pointer is rotated one bit to the left) process(P2N_FIFO_read_pointer, grant, fault_info_ready)begin P2N_FIFO_read_pointer_in <= P2N_FIFO_read_pointer; if grant = '1' and fault_info_ready = '0' then -- Behrad: so grant here works somehow like read_en signal for FIFO ? P2N_FIFO_read_pointer_in <= P2N_FIFO_read_pointer +1; end if; end process; process(P2N_full, valid_data) begin if valid_data = '1' and P2N_full ='0' then P2N_write_en <= '1'; else P2N_write_en <= '0'; end if; end process; -- Process for updating full and empty signals process(P2N_FIFO_write_pointer, P2N_FIFO_read_pointer) begin P2N_empty <= '0'; P2N_full <= '0'; if P2N_FIFO_read_pointer = P2N_FIFO_write_pointer then P2N_empty <= '1'; end if; if P2N_FIFO_write_pointer = P2N_FIFO_read_pointer - 1 then P2N_full <= '1'; end if; end process; process (credit_in, credit_counter_out, grant)begin credit_counter_in <= credit_counter_out; if credit_in = '1' and grant = '1' then credit_counter_in <= credit_counter_out; elsif credit_in = '1' and credit_counter_out < 3 then credit_counter_in <= credit_counter_out + 1; elsif grant = '1' and credit_counter_out > 0 then credit_counter_in <= credit_counter_out - 1; end if; end process; -- flag setting and clearing for self diagnosis process(link_faults, turn_faults, self_diagnosis_flag, old_address)begin if (link_faults /= "00000" or turn_faults /= "00000000000000000000") and SHMU_address = current_address then self_diagnosis_flag_in <= '1'; elsif old_address = self_diagnosis_address then self_diagnosis_flag_in <= '0'; else self_diagnosis_flag_in <= self_diagnosis_flag; end if; end process; -- handling fault information! process(link_faults, turn_faults, sent_info, fault_info_ready, fault_info)begin self_diagnosis_reg_in <= self_diagnosis_reg_out; -- If current node is not SHMU, we need to send fault information to SHMU if (link_faults /= "00000" or turn_faults /= "00000000") and SHMU_address /= current_address then fault_info_in <= turn_faults & link_faults; fault_info_ready_in <= '1'; -- If current node is SHMU, we handle it locally elsif (link_faults /= "00000" or turn_faults /= "00000000") and SHMU_address = current_address then self_diagnosis_reg_in <= "0000000" & turn_faults & link_faults; else fault_info_in <= fault_info; fault_info_ready_in <= fault_info_ready; end if; if sent_info = '1' then fault_info_ready_in <= '0'; end if; end process; process(P2N_empty, state, credit_counter_out, packet_length_counter_out, packet_counter_out, FIFO_Data_out, fault_info_ready) begin -- Some initializations sent_info <= '0'; TX <= (others => '0'); grant<= '0'; packet_length_counter_in <= packet_length_counter_out; packet_counter_in <= packet_counter_out; case(state) is when IDLE => if fault_info_ready = '1' then state_in <= DIAGNOSIS_HEADER; elsif P2N_empty = '0' then state_in <= HEADER_FLIT; else state_in <= IDLE; end if; when HEADER_FLIT => if credit_counter_out /= "00" and P2N_empty = '0' then grant <= '1'; TX <= "001" & std_logic_vector(to_unsigned(current_address, 14)) & FIFO_Data_out(13 downto 0) & XOR_REDUCE("001" & std_logic_vector(to_unsigned(current_address, 14)) & FIFO_Data_out(13 downto 0)); state_in <= BODY_FLIT_1; else state_in <= HEADER_FLIT; end if; when BODY_FLIT_1 => if credit_counter_out /= "00" and P2N_empty = '0'then packet_length_counter_in <= (FIFO_Data_out(27 downto 14))-2; grant <= '1'; TX <= "010" &FIFO_Data_out(27 downto 14) & packet_counter_out & XOR_REDUCE( "010" &FIFO_Data_out(27 downto 14) & packet_counter_out); state_in <= BODY_FLIT; else state_in <= BODY_FLIT_1; end if; when BODY_FLIT => if credit_counter_out /= "00" and P2N_empty = '0'then grant <= '1'; TX <= "010" & FIFO_Data_out(27 downto 0) & XOR_REDUCE("010" & FIFO_Data_out(27 downto 0)); packet_length_counter_in <= packet_length_counter_out - 1; if packet_length_counter_out > 2 then state_in <= BODY_FLIT; else state_in <= TAIL_FLIT; end if; else state_in <= BODY_FLIT; end if; when TAIL_FLIT => if credit_counter_out /= "00" and P2N_empty = '0' then grant <= '1'; packet_length_counter_in <= packet_length_counter_out - 1; TX <= "100" & FIFO_Data_out(27 downto 0) & XOR_REDUCE("100" & FIFO_Data_out(27 downto 0)); packet_counter_in <= packet_counter_out +1; state_in <= IDLE; else state_in <= TAIL_FLIT; end if; -- SHMU stuff ---------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------ when DIAGNOSIS_HEADER => if credit_counter_out /= "00" then grant <= '1'; TX <= "001" & std_logic_vector(to_unsigned(current_address, 14)) & FIFO_Data_out(13 downto 0) & XOR_REDUCE("001" & std_logic_vector(to_unsigned(current_address, 14)) & FIFO_Data_out(13 downto 0)); state_in <= DIAGNOSIS_BODY_1; else state_in <= DIAGNOSIS_HEADER; end if; when DIAGNOSIS_BODY_1 => if credit_counter_out /= "00" then grant <= '1'; state_in <= DIAGNOSIS_BODY; TX <= "010" & std_logic_vector(to_unsigned(4, 14)) & packet_counter_out & XOR_REDUCE( "010" & std_logic_vector(to_unsigned(4, 14)) & packet_counter_out ); else state_in <= DIAGNOSIS_BODY_1; end if; when DIAGNOSIS_BODY => if credit_counter_out /= "00" then grant <= '1'; --FD (Fault Diagnosis) : 01000110 01000100 -- fault info is 13 bits TX <= "010" & "0100011001000100" & fault_info(11 downto 0) & XOR_REDUCE("010" & "0100011001000100" & fault_info(11 downto 0)); state_in <= DIAGNOSIS_TAIL; else state_in <= DIAGNOSIS_BODY; end if; when DIAGNOSIS_TAIL => if credit_counter_out /= "00" then grant <= '1'; TX <= "100" & fault_info(24 downto 12) & "000000000000000" & XOR_REDUCE("100" & fault_info(24 downto 12) & "000000000000000"); state_in <= IDLE; sent_info <= '1'; packet_counter_in <= packet_counter_out +1; else state_in <= DIAGNOSIS_TAIL; end if; when others => state_in <= IDLE; end case ; end procesS; valid_out <= grant; ---------------------------------------------------------------------------------------- --below this is code for communication from NoC 2 PE -- process(RX, N2P_FIFO_write_pointer, N2P_FIFO_MEM_1, N2P_FIFO_MEM_2, N2P_FIFO_MEM_3, N2P_FIFO_MEM_4)begin -- case( N2P_FIFO_write_pointer ) is -- when "0001" => N2P_FIFO_MEM_1_in <= RX; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; -- when "0010" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= RX; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; -- when "0100" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= RX; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; -- when "1000" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= RX; -- when others => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; -- end case ; -- end process; -- process(N2P_FIFO_read_pointer, N2P_FIFO_MEM_1, N2P_FIFO_MEM_2, N2P_FIFO_MEM_3, N2P_FIFO_MEM_4)begin -- case( N2P_FIFO_read_pointer ) is -- when "0001" => N2P_Data_out <= N2P_FIFO_MEM_1; -- when "0010" => N2P_Data_out <= N2P_FIFO_MEM_2; -- when "0100" => N2P_Data_out <= N2P_FIFO_MEM_3; -- when "1000" => N2P_Data_out <= N2P_FIFO_MEM_4; -- when others => N2P_Data_out <= N2P_FIFO_MEM_1; -- end case ; -- end process; process(RX, N2P_FIFO_write_pointer, N2P_FIFO) begin N2P_FIFO_in <= N2P_FIFO; N2P_FIFO_in(to_integer(unsigned(N2P_FIFO_write_pointer))) <= RX; end process; N2P_Data_out <= N2P_FIFO(to_integer(unsigned(N2P_FIFO_read_pointer))); process(address, write_byte_enable, N2P_empty)begin if address = reserved_address and write_byte_enable = "0000" and N2P_empty = '0' then N2P_read_en_in <= '1'; else N2P_read_en_in <= '0'; end if; end process; process(N2P_write_en, N2P_FIFO_write_pointer)begin if N2P_write_en = '1'then N2P_FIFO_write_pointer_in <= N2P_FIFO_write_pointer + 1; else N2P_FIFO_write_pointer_in <= N2P_FIFO_write_pointer; end if; end process; process(N2P_read_en, N2P_empty, N2P_FIFO_read_pointer)begin if (N2P_read_en = '1' and N2P_empty = '0') then N2P_FIFO_read_pointer_in <= N2P_FIFO_read_pointer + 1; else N2P_FIFO_read_pointer_in <= N2P_FIFO_read_pointer; end if; end process; process(N2P_full, valid_in) begin if (valid_in = '1' and N2P_full ='0') then N2P_write_en <= '1'; else N2P_write_en <= '0'; end if; end process; process(N2P_FIFO_write_pointer, N2P_FIFO_read_pointer) begin if N2P_FIFO_read_pointer = N2P_FIFO_write_pointer then N2P_empty <= '1'; else N2P_empty <= '0'; end if; if N2P_FIFO_write_pointer = N2P_FIFO_read_pointer-1 then N2P_full <= '1'; else N2P_full <= '0'; end if; end process; process(N2P_read_en, N2P_Data_out, old_address, flag_register) begin if old_address = reserved_address and N2P_read_en = '1' then data_read <= N2P_Data_out; elsif old_address = flag_address then data_read <= flag_register; elsif old_address = counter_address then data_read <= "000000000000000000000000000000" & counter_register; elsif old_address = self_diagnosis_address then data_read <= self_diagnosis_reg_out; else data_read <= (others => 'U'); end if; end process; process(N2P_write_en, N2P_read_en, RX, N2P_Data_out)begin counter_register_in <= counter_register; if N2P_write_en = '1' and RX(31 downto 29) = "001" and N2P_read_en = '1' and N2P_Data_out(31 downto 29) = "100" then counter_register_in <= counter_register; elsif N2P_write_en = '1' and RX(31 downto 29) = "001" then counter_register_in <= counter_register +1; elsif N2P_read_en = '1' and N2P_Data_out(31 downto 29) = "100" then counter_register_in <= counter_register -1; end if; end process; flag_register_in <= N2P_empty & P2N_full & self_diagnosis_flag & "00000000000000000000000000000"; --NI_read_flag <= N2P_empty; --NI_write_flag <= P2N_full; irq_out <= '0'; end; --architecture logic
gpl-3.0
81d3e3d59bd5410c20cd889cfad2e1c4
0.580084
3.139395
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/reg_bank.vhd
6
17,338
--------------------------------------------------------------------- -- TITLE: Register Bank -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 2/2/01 -- FILENAME: reg_bank.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Implements a register bank with 32 registers that are 32-bits wide. -- There are two read-ports and one write port. --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use work.mlite_pack.all; --library UNISIM; --May need to uncomment for ModelSim --use UNISIM.vcomponents.all; --May need to uncomment for ModelSim entity reg_bank is generic(memory_type : string := "TRI_PORT_X"); port(clk : in std_logic; reset_in : in std_logic; pause : in std_logic; interrupt_in : in std_logic; -- modified rs_index : in std_logic_vector(5 downto 0); rt_index : in std_logic_vector(5 downto 0); rd_index : in std_logic_vector(5 downto 0); reg_source_out : out std_logic_vector(31 downto 0); reg_target_out : out std_logic_vector(31 downto 0); reg_dest_new : in std_logic_vector(31 downto 0); intr_enable : out std_logic); end; --entity reg_bank -------------------------------------------------------------------- -- The ram_block architecture attempts to use TWO dual-port memories. -- Different FPGAs and ASICs need different implementations. -- Choose one of the RAM implementations below. -- I need feedback on this section! -------------------------------------------------------------------- architecture ram_block of reg_bank is signal intr_enable_reg : std_logic; type ram_type is array(31 downto 0) of std_logic_vector(31 downto 0); signal tri_port_ram : ram_type := (others => ZERO); --controls access to dual-port memories signal addr_read1, addr_read2 : std_logic_vector(4 downto 0); signal addr_write : std_logic_vector(4 downto 0); signal data_out1, data_out2 : std_logic_vector(31 downto 0); signal write_enable : std_logic; begin reg_proc: process(clk, rs_index, rt_index, rd_index, reg_dest_new, intr_enable_reg, data_out1, data_out2, reset_in, pause) begin --setup for first dual-port memory if rs_index = "101110" then --reg_epc CP0 14 addr_read1 <= "00000"; else addr_read1 <= rs_index(4 downto 0); end if; case rs_index is when "000000" => reg_source_out <= ZERO; when "101100" => reg_source_out <= ZERO(31 downto 1) & intr_enable_reg; --interrupt vector address = 0x3c when "111111" => reg_source_out <= ZERO(31 downto 8) & "00111100"; when others => reg_source_out <= data_out1; end case; --setup for second dual-port memory addr_read2 <= rt_index(4 downto 0); case rt_index is when "000000" => reg_target_out <= ZERO; when others => reg_target_out <= data_out2; end case; --setup write port for both dual-port memories if rd_index /= "000000" and rd_index /= "101100" and pause = '0' then write_enable <= '1'; else write_enable <= '0'; end if; if rd_index = "101110" then --reg_epc CP0 14 addr_write <= "01110";--"11010"; -- Reg $26 to save PC when interrupt occurs, but is it safe ?? else addr_write <= rd_index(4 downto 0); end if; if reset_in = '1' then intr_enable_reg <= '0'; elsif rising_edge(clk) then if rd_index = "101110" then --reg_epc CP0 14 intr_enable_reg <= '0'; --disable interrupts elsif rd_index = "101100" then intr_enable_reg <= reg_dest_new(0); -- Check the IEc (Interrupt Enable current) bit (bit 0 of the status register) end if; -- Added by Behrad --if interrupt_in = '1' then -- ?? -- intr_enable_reg <= '1'; --end if; -- Added by Behrad end if; intr_enable <= intr_enable_reg; end process; -------------------------------------------------------------- ---- Pick only ONE of the dual-port RAM implementations below! -------------------------------------------------------------- -- Option #1 -- One tri-port RAM, two read-ports, one write-port -- 32 registers 32-bits wide tri_port_mem: if memory_type = "TRI_PORT_X" generate ram_proc: process(clk, addr_read1, addr_read2, addr_write, reg_dest_new, write_enable) begin data_out1 <= tri_port_ram(conv_integer(addr_read1)); data_out2 <= tri_port_ram(conv_integer(addr_read2)); if rising_edge(clk) then if write_enable = '1' then tri_port_ram(conv_integer(addr_write)) <= reg_dest_new; end if; end if; end process; end generate; --tri_port_mem -- Option #2 -- Two dual-port RAMs, each with one read-port and one write-port dual_port_mem: if memory_type = "DUAL_PORT_" generate ram_proc2: process(clk, addr_read1, addr_read2, addr_write, reg_dest_new, write_enable) variable dual_port_ram1 : ram_type := (others => ZERO); variable dual_port_ram2 : ram_type := (others => ZERO); begin data_out1 <= dual_port_ram1(conv_integer(addr_read1)); data_out2 <= dual_port_ram2(conv_integer(addr_read2)); if rising_edge(clk) then if write_enable = '1' then dual_port_ram1(conv_integer(addr_write)) := reg_dest_new; dual_port_ram2(conv_integer(addr_write)) := reg_dest_new; end if; end if; end process; end generate; --dual_port_mem ---- Option #3 ---- RAM16X1D: 16 x 1 positive edge write, asynchronous read dual-port ---- distributed RAM for all Xilinx FPGAs ---- From library UNISIM; use UNISIM.vcomponents.all; --xilinx_16x1d: --if memory_type = "XILINX_16X" generate -- signal data_out1A, data_out1B : std_logic_vector(31 downto 0); -- signal data_out2A, data_out2B : std_logic_vector(31 downto 0); -- signal weA, weB : std_logic; -- signal no_connect : std_logic_vector(127 downto 0); --begin -- weA <= write_enable and not addr_write(4); --lower 16 registers -- weB <= write_enable and addr_write(4); --upper 16 registers -- reg_loop: for i in 0 to 31 generate -- begin -- --Read port 1 lower 16 registers -- reg_bit1a : RAM16X1D -- port map ( -- WCLK => clk, -- Port A write clock input -- WE => weA, -- Port A write enable input -- A0 => addr_write(0), -- Port A address[0] input bit -- A1 => addr_write(1), -- Port A address[1] input bit -- A2 => addr_write(2), -- Port A address[2] input bit -- A3 => addr_write(3), -- Port A address[3] input bit -- D => reg_dest_new(i), -- Port A 1-bit data input -- DPRA0 => addr_read1(0), -- Port B address[0] input bit -- DPRA1 => addr_read1(1), -- Port B address[1] input bit -- DPRA2 => addr_read1(2), -- Port B address[2] input bit -- DPRA3 => addr_read1(3), -- Port B address[3] input bit -- DPO => data_out1A(i), -- Port B 1-bit data output -- SPO => no_connect(i) -- Port A 1-bit data output -- ); -- --Read port 1 upper 16 registers -- reg_bit1b : RAM16X1D -- port map ( -- WCLK => clk, -- Port A write clock input -- WE => weB, -- Port A write enable input -- A0 => addr_write(0), -- Port A address[0] input bit -- A1 => addr_write(1), -- Port A address[1] input bit -- A2 => addr_write(2), -- Port A address[2] input bit -- A3 => addr_write(3), -- Port A address[3] input bit -- D => reg_dest_new(i), -- Port A 1-bit data input -- DPRA0 => addr_read1(0), -- Port B address[0] input bit -- DPRA1 => addr_read1(1), -- Port B address[1] input bit -- DPRA2 => addr_read1(2), -- Port B address[2] input bit -- DPRA3 => addr_read1(3), -- Port B address[3] input bit -- DPO => data_out1B(i), -- Port B 1-bit data output -- SPO => no_connect(32+i) -- Port A 1-bit data output -- ); -- --Read port 2 lower 16 registers -- reg_bit2a : RAM16X1D -- port map ( -- WCLK => clk, -- Port A write clock input -- WE => weA, -- Port A write enable input -- A0 => addr_write(0), -- Port A address[0] input bit -- A1 => addr_write(1), -- Port A address[1] input bit -- A2 => addr_write(2), -- Port A address[2] input bit -- A3 => addr_write(3), -- Port A address[3] input bit -- D => reg_dest_new(i), -- Port A 1-bit data input -- DPRA0 => addr_read2(0), -- Port B address[0] input bit -- DPRA1 => addr_read2(1), -- Port B address[1] input bit -- DPRA2 => addr_read2(2), -- Port B address[2] input bit -- DPRA3 => addr_read2(3), -- Port B address[3] input bit -- DPO => data_out2A(i), -- Port B 1-bit data output -- SPO => no_connect(64+i) -- Port A 1-bit data output -- ); -- --Read port 2 upper 16 registers -- reg_bit2b : RAM16X1D -- port map ( -- WCLK => clk, -- Port A write clock input -- WE => weB, -- Port A write enable input -- A0 => addr_write(0), -- Port A address[0] input bit -- A1 => addr_write(1), -- Port A address[1] input bit -- A2 => addr_write(2), -- Port A address[2] input bit -- A3 => addr_write(3), -- Port A address[3] input bit -- D => reg_dest_new(i), -- Port A 1-bit data input -- DPRA0 => addr_read2(0), -- Port B address[0] input bit -- DPRA1 => addr_read2(1), -- Port B address[1] input bit -- DPRA2 => addr_read2(2), -- Port B address[2] input bit -- DPRA3 => addr_read2(3), -- Port B address[3] input bit -- DPO => data_out2B(i), -- Port B 1-bit data output -- SPO => no_connect(96+i) -- Port A 1-bit data output -- ); -- end generate; --reg_loop -- data_out1 <= data_out1A when addr_read1(4)='0' else data_out1B; -- data_out2 <= data_out2A when addr_read2(4)='0' else data_out2B; --end generate; --xilinx_16x1d ---- Option #4 ---- RAM32X1D: 32 x 1 positive edge write, asynchronous read dual-port ---- distributed RAM for 5-LUT Xilinx FPGAs such as Virtex-5 ---- From library UNISIM; use UNISIM.vcomponents.all; --xilinx_32x1d: --if memory_type = "XILINX_32X" generate -- signal no_connect : std_logic_vector(63 downto 0); --begin -- reg_loop: for i in 0 to 31 generate -- begin -- --Read port 1 -- reg_bit1 : RAM32X1D -- port map ( -- WCLK => clk, -- Port A write clock input -- WE => write_enable, -- Port A write enable input -- A0 => addr_write(0), -- Port A address[0] input bit -- A1 => addr_write(1), -- Port A address[1] input bit -- A2 => addr_write(2), -- Port A address[2] input bit -- A3 => addr_write(3), -- Port A address[3] input bit -- A4 => addr_write(4), -- Port A address[4] input bit -- D => reg_dest_new(i), -- Port A 1-bit data input -- DPRA0 => addr_read1(0), -- Port B address[0] input bit -- DPRA1 => addr_read1(1), -- Port B address[1] input bit -- DPRA2 => addr_read1(2), -- Port B address[2] input bit -- DPRA3 => addr_read1(3), -- Port B address[3] input bit -- DPRA4 => addr_read1(4), -- Port B address[4] input bit -- DPO => data_out1(i), -- Port B 1-bit data output -- SPO => no_connect(i) -- Port A 1-bit data output -- ); -- --Read port 2 -- reg_bit2 : RAM32X1D -- port map ( -- WCLK => clk, -- Port A write clock input -- WE => write_enable, -- Port A write enable input -- A0 => addr_write(0), -- Port A address[0] input bit -- A1 => addr_write(1), -- Port A address[1] input bit -- A2 => addr_write(2), -- Port A address[2] input bit -- A3 => addr_write(3), -- Port A address[3] input bit -- A4 => addr_write(4), -- Port A address[4] input bit -- D => reg_dest_new(i), -- Port A 1-bit data input -- DPRA0 => addr_read2(0), -- Port B address[0] input bit -- DPRA1 => addr_read2(1), -- Port B address[1] input bit -- DPRA2 => addr_read2(2), -- Port B address[2] input bit -- DPRA3 => addr_read2(3), -- Port B address[3] input bit -- DPRA4 => addr_read2(4), -- Port B address[4] input bit -- DPO => data_out2(i), -- Port B 1-bit data output -- SPO => no_connect(32+i) -- Port A 1-bit data output -- ); -- end generate; --reg_loop --end generate; --xilinx_32x1d ---- Option #5 ---- Altera LPM_RAM_DP --altera_mem: --if memory_type = "ALTERA_LPM" generate -- signal clk_delayed : std_logic; -- signal addr_reg : std_logic_vector(4 downto 0); -- signal data_reg : std_logic_vector(31 downto 0); -- signal q1 : std_logic_vector(31 downto 0); -- signal q2 : std_logic_vector(31 downto 0); --begin -- -- Altera dual port RAMs must have the addresses registered (sampled -- -- at the rising edge). This is very unfortunate. -- -- Therefore, the dual port RAM read clock must delayed so that -- -- the read address signal can be sent from the mem_ctrl block. -- -- This solution also delays the how fast the registers are read so the -- -- maximum clock speed is cut in half (12.5 MHz instead of 25 MHz). -- clk_delayed <= not clk; --Could be delayed by 1/4 clock cycle instead -- dpram_bypass: process(clk, addr_write, reg_dest_new, write_enable) -- begin -- if rising_edge(clk) and write_enable = '1' then -- addr_reg <= addr_write; -- data_reg <= reg_dest_new; -- end if; -- end process; --dpram_bypass -- -- Bypass dpram if reading what was just written (Altera limitation) -- data_out1 <= q1 when addr_read1 /= addr_reg else data_reg; -- data_out2 <= q2 when addr_read2 /= addr_reg else data_reg; -- lpm_ram_dp_component1 : lpm_ram_dp -- generic map ( -- LPM_WIDTH => 32, -- LPM_WIDTHAD => 5, -- --LPM_NUMWORDS => 0, -- LPM_INDATA => "REGISTERED", -- LPM_OUTDATA => "UNREGISTERED", -- LPM_RDADDRESS_CONTROL => "REGISTERED", -- LPM_WRADDRESS_CONTROL => "REGISTERED", -- LPM_FILE => "UNUSED", -- LPM_TYPE => "LPM_RAM_DP", -- USE_EAB => "ON", -- INTENDED_DEVICE_FAMILY => "UNUSED", -- RDEN_USED => "FALSE", -- LPM_HINT => "UNUSED") -- port map ( -- RDCLOCK => clk_delayed, -- RDCLKEN => '1', -- RDADDRESS => addr_read1, -- RDEN => '1', -- DATA => reg_dest_new, -- WRADDRESS => addr_write, -- WREN => write_enable, -- WRCLOCK => clk, -- WRCLKEN => '1', -- Q => q1); -- lpm_ram_dp_component2 : lpm_ram_dp -- generic map ( -- LPM_WIDTH => 32, -- LPM_WIDTHAD => 5, -- --LPM_NUMWORDS => 0, -- LPM_INDATA => "REGISTERED", -- LPM_OUTDATA => "UNREGISTERED", -- LPM_RDADDRESS_CONTROL => "REGISTERED", -- LPM_WRADDRESS_CONTROL => "REGISTERED", -- LPM_FILE => "UNUSED", -- LPM_TYPE => "LPM_RAM_DP", -- USE_EAB => "ON", -- INTENDED_DEVICE_FAMILY => "UNUSED", -- RDEN_USED => "FALSE", -- LPM_HINT => "UNUSED") -- port map ( -- RDCLOCK => clk_delayed, -- RDCLKEN => '1', -- RDADDRESS => addr_read2, -- RDEN => '1', -- DATA => reg_dest_new, -- WRADDRESS => addr_write, -- WREN => write_enable, -- WRCLOCK => clk, -- WRCLKEN => '1', -- Q => q2); --end generate; --altera_mem end; --architecture ram_block
gpl-3.0
0918cdda3b4c0aca074fc4e9aa403a3d
0.507556
3.478034
false
false
false
false
AndyMcC0/UVVM_All
uvvm_vvc_framework/src/ti_data_stack_pkg.vhd
3
8,489
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_data_queue_pkg.all; package ti_data_stack_pkg is shared variable shared_data_stack : t_data_queue; ------------------------------------------ -- uvvm_stack_init ------------------------------------------ -- This function allocates space in the buffer and returns an index that -- must be used to access the stack. -- -- - Parameters: -- - buffer_size_in_bits (natural) - The size of the stack -- -- - Returns: The index of the initiated stack (natural). -- Returns 0 on error. -- impure function uvvm_stack_init( buffer_size_in_bits : natural ) return natural; ------------------------------------------ -- uvvm_stack_init ------------------------------------------ -- This procedure allocates space in the buffer at the given buffer_idx. -- -- - Parameters: -- - buffer_idx - The index of the stack (natural) -- that shall be initialized. -- - buffer_size_in_bits (natural) - The size of the stack -- procedure uvvm_stack_init( buffer_index : natural; buffer_size_in_bits : natural ); ------------------------------------------ -- uvvm_stack_push ------------------------------------------ -- This procedure puts data into a stack with index buffer_idx. -- The size of the data is unconstrained, meaning that -- it can be any size. Pushing data with a size that is -- larger than the stack size results in wrapping, i.e., -- that when reaching the end the data remaining will over- -- write the data that was written first. -- -- - Parameters: -- - buffer_idx - The index of the stack (natural) -- that shall be pushed to. -- - data - The data that shall be pushed (slv) -- procedure uvvm_stack_push( buffer_index : natural; data : std_logic_vector ); ------------------------------------------ -- uvvm_stack_pop ------------------------------------------ -- This function returns the data from the stack -- and removes the returned data from the stack. -- -- - Parameters: -- - buffer_idx - The index of the stack (natural) -- that shall be read. -- - entry_size_in_bits - The size of the returned slv (natural) -- -- - Returns: Data from the stack (slv). The size of the -- return data is given by the entry_size_in_bits parameter. -- Attempting to pop from an empty stack is allowed but triggers a -- TB_WARNING and returns garbage. -- Attempting to pop a larger value than the stack size is allowed -- but triggers a TB_WARNING. -- -- impure function uvvm_stack_pop( buffer_index : natural; entry_size_in_bits : natural ) return std_logic_vector; ------------------------------------------ -- uvvm_stack_flush ------------------------------------------ -- This procedure empties the stack given -- by buffer_idx. -- -- - Parameters: -- - buffer_idx - The index of the stack (natural) -- that shall be flushed. -- procedure uvvm_stack_flush( buffer_index : natural ); ------------------------------------------ -- uvvm_stack_peek ------------------------------------------ -- This function returns the data from the stack -- without removing it. -- -- - Parameters: -- - buffer_idx - The index of the stack (natural) -- that shall be read. -- - entry_size_in_bits - The size of the returned slv (natural) -- -- - Returns: Data from the stack. The size of the -- return data is given by the entry_size_in_bits parameter. -- Attempting to peek from an empty stack is allowed but triggers a -- TB_WARNING and returns garbage. -- Attempting to peek a larger value than the stack size is allowed -- but triggers a TB_WARNING. Will wrap. -- -- impure function uvvm_stack_peek( buffer_index : natural; entry_size_in_bits : natural ) return std_logic_vector; ------------------------------------------ -- uvvm_stack_get_count ------------------------------------------ -- This function returns a natural indicating the number of elements -- currently occupying the stack given by buffer_idx. -- -- - Parameters: -- - buffer_idx - The index of the stack (natural) -- -- - Returns: The number of elements occupying the stack (natural). -- -- impure function uvvm_stack_get_count( buffer_idx : natural ) return natural; ------------------------------------------ -- uvvm_stack_get_max_count ------------------------------------------ -- This function returns a natural indicating the maximum number -- of elements that can occupy the stack given by buffer_idx. -- -- - Parameters: -- - buffer_idx - The index of the stack (natural) -- -- - Returns: The maximum number of elements that can be placed -- in the stack (natural). -- -- impure function uvvm_stack_get_max_count( buffer_index : natural ) return natural; end package ti_data_stack_pkg; package body ti_data_stack_pkg is impure function uvvm_stack_init( buffer_size_in_bits : natural ) return natural is begin return shared_data_stack.init_queue(buffer_size_in_bits, "UVVM_STACK"); end function; procedure uvvm_stack_init( buffer_index : natural; buffer_size_in_bits : natural ) is begin shared_data_stack.init_queue(buffer_index, buffer_size_in_bits, "UVVM_STACK"); end procedure; procedure uvvm_stack_push( buffer_index : natural; data : std_logic_vector ) is begin shared_data_stack.push_back(buffer_index,data); end procedure; impure function uvvm_stack_pop( buffer_index : natural; entry_size_in_bits : natural ) return std_logic_vector is begin return shared_data_stack.pop_back(buffer_index, entry_size_in_bits); end function; procedure uvvm_stack_flush( buffer_index : natural ) is begin shared_data_stack.flush(buffer_index); end procedure; impure function uvvm_stack_peek( buffer_index : natural; entry_size_in_bits : natural ) return std_logic_vector is begin return shared_data_stack.peek_back(buffer_index, entry_size_in_bits); end function; impure function uvvm_stack_get_count( buffer_idx : natural ) return natural is begin return shared_data_stack.get_count(buffer_idx); end function; impure function uvvm_stack_get_max_count( buffer_index : natural ) return natural is begin return shared_data_stack.get_queue_count_max(buffer_index); end function; end package body ti_data_stack_pkg;
mit
ea9d8e05228999ad346f9f55c4c1f17d
0.539875
4.510627
false
false
false
false
AndyMcC0/UVVM_All
bitvis_vip_axistream/src/vvc_methods_pkg.vhd
1
19,899
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_vvc_framework_support_pkg.all; use work.axistream_bfm_pkg.all; use work.vvc_cmd_pkg.all; use work.td_target_support_pkg.all; --======================================================================================================================== --======================================================================================================================== package vvc_methods_pkg is --======================================================================================================================== -- Types and constants for the AXISTREAM VVC --======================================================================================================================== constant C_VVC_NAME : string := "AXISTREAM_VVC"; signal AXISTREAM_VVCT : t_vvc_target_record := set_vvc_target_defaults(C_VVC_NAME); alias THIS_VVCT : t_vvc_target_record is AXISTREAM_VVCT; alias t_bfm_config is t_axistream_bfm_config; -- Type found in UVVM-Util types_pkg constant C_AXISTREAM_INTER_BFM_DELAY_DEFAULT : t_inter_bfm_delay := ( delay_type => NO_DELAY, delay_in_time => 0 ns, inter_bfm_delay_violation_severity => warning ); type t_vvc_config is record inter_bfm_delay : t_inter_bfm_delay; -- Minimum delay between BFM accesses from the VVC. If parameter delay_type is set to NO_DELAY, BFM accesses will be back to back, i.e. no delay. cmd_queue_count_max : natural; -- Maximum pending number in command queue before queue is full. Adding additional commands will result in an ERROR. cmd_queue_count_threshold : natural; -- An alert with severity 'cmd_queue_count_threshold_severity' will be issued if command queue exceeds this count. Used for early warning if command queue is almost full. Will be ignored if set to 0. cmd_queue_count_threshold_severity : t_alert_level; -- Severity of alert to be initiated if exceeding cmd_queue_count_threshold result_queue_count_max : natural; -- Maximum number of unfetched results before result_queue is full. result_queue_count_threshold_severity : t_alert_level; -- An alert with severity 'result_queue_count_threshold_severity' will be issued if command queue exceeds this count. Used for early warning if result queue is almost full. Will be ignored if set to 0. result_queue_count_threshold : natural; -- Severity of alert to be initiated if exceeding result_queue_count_threshold bfm_config : t_axistream_bfm_config; -- Configuration for the BFM. See BFM quick reference msg_id_panel : t_msg_id_panel; -- VVC dedicated message ID panel end record; type t_vvc_config_array is array (natural range <>) of t_vvc_config; constant C_AXISTREAM_VVC_CONFIG_DEFAULT : t_vvc_config := ( inter_bfm_delay => C_AXISTREAM_INTER_BFM_DELAY_DEFAULT, cmd_queue_count_max => C_CMD_QUEUE_COUNT_MAX, cmd_queue_count_threshold => C_CMD_QUEUE_COUNT_THRESHOLD, cmd_queue_count_threshold_severity => C_CMD_QUEUE_COUNT_THRESHOLD_SEVERITY, result_queue_count_max => C_RESULT_QUEUE_COUNT_MAX, result_queue_count_threshold_severity => C_RESULT_QUEUE_COUNT_THRESHOLD_SEVERITY, result_queue_count_threshold => C_RESULT_QUEUE_COUNT_THRESHOLD, bfm_config => C_AXISTREAM_BFM_CONFIG_DEFAULT, msg_id_panel => C_VVC_MSG_ID_PANEL_DEFAULT ); type t_vvc_status is record current_cmd_idx : natural; previous_cmd_idx : natural; pending_cmd_cnt : natural; end record; type t_vvc_status_array is array (natural range <>) of t_vvc_status; constant C_VVC_STATUS_DEFAULT : t_vvc_status := ( current_cmd_idx => 0, previous_cmd_idx => 0, pending_cmd_cnt => 0 ); type t_transaction_info is record operation : t_operation; numPacketsSent : natural; msg : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); end record; type t_transaction_info_array is array (natural range <>) of t_transaction_info; constant C_TRANSACTION_INFO_DEFAULT : t_transaction_info := ( operation => NO_OPERATION, numPacketsSent => 0, msg => (others => ' ') ); shared variable shared_axistream_vvc_config : t_vvc_config_array(0 to C_MAX_VVC_INSTANCE_NUM-1) := (others => C_AXISTREAM_VVC_CONFIG_DEFAULT); shared variable shared_axistream_vvc_status : t_vvc_status_array(0 to C_MAX_VVC_INSTANCE_NUM-1) := (others => C_VVC_STATUS_DEFAULT); shared variable shared_axistream_transaction_info : t_transaction_info_array(0 to C_MAX_VVC_INSTANCE_NUM-1) := (others => C_TRANSACTION_INFO_DEFAULT); --======================================================================================================================== -- Methods dedicated to this VVC -- - These procedures are called from the testbench in order to queue BFM calls -- in the VVC command queue. The VVC will store and forward these calls to the -- AXISTREAM BFM when the command is at the from of the VVC command queue. --======================================================================================================================== procedure axistream_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant user_array : in t_user_array; -- If you need support for more bits per data byte, edit axistream_bfm_pkg.t_user_array constant strb_array : in t_strb_array; -- If you need support for more bits per data byte, edit axistream_bfm_pkg.t_strb_array constant id_array : in t_id_array; -- If you need support for more bits per data byte, edit axistream_bfm_pkg.t_id_array constant dest_array : in t_dest_array; -- If you need support for more bits per data byte, edit axistream_bfm_pkg.t_dest_array constant msg : in string ); procedure axistream_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant user_array : in t_user_array; -- If you need support for more bits per data byte, replace this with a wider type: constant msg : in string ); procedure axistream_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant msg : in string ); procedure axistream_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant msg : in string ); procedure axistream_expect( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant user_array : in t_user_array; constant strb_array : in t_strb_array; constant id_array : in t_id_array; constant dest_array : in t_dest_array; constant msg : in string; constant alert_level : in t_alert_level := error ); procedure axistream_expect( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant user_array : in t_user_array; constant msg : in string; constant alert_level : in t_alert_level := error ); procedure axistream_expect( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant msg : in string; constant alert_level : in t_alert_level := error ); end package vvc_methods_pkg; package body vvc_methods_pkg is --======================================================================================================================== -- Methods dedicated to this VVC --======================================================================================================================== -- These procedures will be used to forward commands to the VVC executor, which will -- call the corresponding BFM procedures. procedure axistream_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant user_array : in t_user_array; -- If you need support for more bits per data byte, edit axistream_bfm_pkg.t_user_array constant strb_array : in t_strb_array; -- If you need support for more bits per data byte, edit axistream_bfm_pkg.t_strb_array constant id_array : in t_id_array; -- If you need support for more bits per data byte, edit axistream_bfm_pkg.t_id_array constant dest_array : in t_dest_array; -- If you need support for more bits per data byte, edit axistream_bfm_pkg.t_dest_array constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) -- First part common for all & ", " & to_string(data_array'length, 5) & " bytes)"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, TRANSMIT); -- Sanity check to avoid confusing fatal error check_value(data_array'length > 0, TB_ERROR, proc_call & "data_array length must be > 0", "VVC"); -- Generate cmd record shared_vvc_cmd.data_array(0 to data_array'high) := data_array; shared_vvc_cmd.user_array(0 to user_array'high) := user_array; shared_vvc_cmd.strb_array(0 to strb_array'high) := strb_array; shared_vvc_cmd.id_array(0 to id_array'high) := id_array; shared_vvc_cmd.dest_array(0 to dest_array'high) := dest_array; shared_vvc_cmd.data_array_length := data_array'length; shared_vvc_cmd.user_array_length := user_array'length; shared_vvc_cmd.strb_array_length := strb_array'length; shared_vvc_cmd.id_array_length := id_array'length; shared_vvc_cmd.dest_array_length := dest_array'length; -- Send command record send_command_to_vvc(VVCT); end procedure; -- Overload, without the strb_array, id_array, dest_array arguments procedure axistream_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant user_array : in t_user_array; constant msg : in string ) is -- Default user data : We don't know c_user_array length (how many words to send), so assume worst case: tdata = 8 bits (one data_array byte per word) constant c_strb_array : t_strb_array(0 to C_VVC_CMD_DATA_MAX_WORDS-1) := (others => (others => '0')); constant c_id_array : t_id_array(0 to C_VVC_CMD_DATA_MAX_WORDS-1) := (others => (others => '0')); constant c_dest_array : t_dest_array(0 to C_VVC_CMD_DATA_MAX_WORDS-1) := (others => (others => '0')); begin axistream_transmit(VVCT, vvc_instance_idx, data_array, user_array, c_strb_array, c_id_array, c_dest_array, msg); end procedure; -- Overload, without the user_array, strb_array, id_array, dest_array arguments procedure axistream_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant msg : in string ) is -- Default user data : We don't know c_user_array length (how many words to send), so assume tdata = 8 bits (one data_array byte per word) constant c_user_array : t_user_array(0 to C_VVC_CMD_DATA_MAX_WORDS-1) := (others => (others => '0')); begin -- Use another overload to fill in the rest axistream_transmit(VVCT, vvc_instance_idx, data_array, c_user_array, msg); end procedure; procedure axistream_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "()"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, RECEIVE); send_command_to_vvc(VVCT); end procedure; -- Expect, receive and compare to specified data_array, user_array, strb_array, id_array, dest_array procedure axistream_expect( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant user_array : in t_user_array; constant strb_array : in t_strb_array; constant id_array : in t_id_array; constant dest_array : in t_dest_array; constant msg : in string; constant alert_level : in t_alert_level := error ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) -- First part common for all & ", " & to_string(data_array'length) & "B)"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, EXPECT); -- Generate cmd record shared_vvc_cmd.data_array(0 to data_array'high) := data_array; shared_vvc_cmd.user_array(0 to user_array'high) := user_array; -- user_array Length = data_array_length shared_vvc_cmd.strb_array(0 to strb_array'high) := strb_array; shared_vvc_cmd.id_array(0 to id_array'high) := id_array; shared_vvc_cmd.dest_array(0 to dest_array'high) := dest_array; shared_vvc_cmd.data_array_length := data_array'length; shared_vvc_cmd.user_array_length := user_array'length; shared_vvc_cmd.strb_array_length := strb_array'length; shared_vvc_cmd.id_array_length := id_array'length; shared_vvc_cmd.dest_array_length := dest_array'length; -- shared_vvc_cmd.readyLowArray(0 to data_array'high) := (others => 0); -- default no ready deassertion shared_vvc_cmd.alert_level := alert_level; send_command_to_vvc(VVCT); end procedure; -- Overload for calling axiStreamExpect() without a value for strb_array, id_array, dest_array -- (will be set to don't care) procedure axistream_expect( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant user_array : in t_user_array; constant msg : in string; constant alert_level : in t_alert_level := error ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) -- First part common for all & ", " & to_string(data_array'length) & "B)"; -- Default expected strb, id, dest -- Don't know #bytes in AXIStream tdata, so *_array length is unknown. -- Make the array as short as possible for best simulation time during the check performed in the BFM. constant c_strb_array : t_strb_array(0 downto 0) := (others => (others => '-')); constant c_id_array : t_id_array(0 downto 0) := (others => (others => '-')); constant c_dest_array : t_dest_array(0 downto 0) := (others => (others => '-')); begin axistream_expect(VVCT, vvc_instance_idx, data_array, user_array, c_strb_array, c_id_array, c_dest_array, msg, alert_level); end procedure; -- Overload, without the user_array, strb_array, id_array, dest_array arguments procedure axistream_expect( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data_array : in t_byte_array; constant msg : in string; constant alert_level : in t_alert_level := error ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) -- First part common for all & ", " & to_string(data_array'length) & "B)"; -- Default user data -- Don't know #bytes in AXIStream tdata, so user_array length is unknown. -- Make the array as short as possible for best simulation time during the check performed in the BFM. constant c_user_array : t_user_array(0 downto 0) := (others => (others => '-')); begin -- Use another overload to fill in the rest: strb_array, id_array, dest_array axistream_expect(VVCT, vvc_instance_idx, data_array, c_user_array, msg, alert_level); end procedure; end package body vvc_methods_pkg;
mit
90d866070244b1cf7eeb03296c3ef9a3
0.599126
3.992576
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/plasma_RTL/control.vhd
3
23,321
--------------------------------------------------------------------- -- TITLE: Controller / Opcode Decoder -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 2/8/01 -- FILENAME: control.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- NOTE: MIPS(tm) is a registered trademark of MIPS Technologies. -- MIPS Technologies does not endorse and is not associated with -- this project. -- DESCRIPTION: -- Controls the CPU by decoding the opcode and generating control -- signals to the rest of the CPU. -- This entity decodes the MIPS(tm) opcode into a -- Very-Long-Word-Instruction. -- The 32-bit opcode is converted to a -- 6+6+6+16+4+2+4+3+2+2+3+2+4 = 60 bit VLWI opcode. -- Based on information found in: -- "MIPS RISC Architecture" by Gerry Kane and Joe Heinrich -- and "The Designer's Guide to VHDL" by Peter J. Ashenden -- modified by: Siavoosh Payandeh Azad -- Change logs: -- * EPC register have been changed! It used to be R0, now it is R26 -- * added the instruction type and signal for debuging the CPU behaviour! --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use work.mlite_pack.all; entity control is port(opcode : in std_logic_vector(31 downto 0); -- not opcode, but the whole instruction !!! (opcode is the first 6 most significant bits of the instruction.) intr_signal : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; rs_index : out std_logic_vector(5 downto 0); rt_index : out std_logic_vector(5 downto 0); rd_index : out std_logic_vector(5 downto 0); imm_out : out std_logic_vector(15 downto 0); alu_func : out alu_function_type; shift_func : out shift_function_type; mult_func : out mult_function_type; branch_func : out branch_function_type; a_source_out : out a_source_type; b_source_out : out b_source_type; c_source_out : out c_source_type; pc_source_out: out pc_source_type; mem_source_out:out mem_source_type; exception_out: out std_logic); end; --entity control architecture logic of control is -- this type and the signal after it has been added for debugging! -- you can comment this if you dont want to debug! type instruction_name is (i_None, i_SLL, i_SRL, i_SRA, i_SLLV, i_SRLV, i_SRAV, i_JR, i_JALR, i_SYSCALL, i_BREAK, i_SYNC, i_MFHI, i_MTHI, i_MFLO, i_MTLO, i_MULT, i_MULTU, i_DIV, i_DIVU, i_ADD, i_ADDU, i_SUB, i_SUBU, i_AND, i_OR, i_XOR, i_NOR, i_SLT, i_SLTU, i_DADDU, i_BLTZAL, i_BLTZ, i_BGEZAL, i_BGEZ, i_JAL, i_J, i_BEQ, i_BNE, i_BLEZ, i_BGTZ, i_ADDI, i_ADDIU, i_SLTI, i_SLTIU, i_ANDI, i_ORI, i_XORI, i_LUI, i_MFC0, i_MTC0, i_SUBI, i_LB, i_LH, i_LWL, i_LW, i_LBU, i_LHU, i_SB, i_SH, i_SWL, i_SW); signal instruction : instruction_name; -- end of debugging block begin control_proc: process(opcode, intr_signal) variable op, func : std_logic_vector(5 downto 0); variable rs, rt, rd : std_logic_vector(5 downto 0); variable rtx : std_logic_vector(4 downto 0); variable imm : std_logic_vector(15 downto 0); variable alu_function : alu_function_type; variable shift_function : shift_function_type; variable mult_function : mult_function_type; variable a_source : a_source_type; variable b_source : b_source_type; variable c_source : c_source_type; variable pc_source : pc_source_type; variable branch_function: branch_function_type; variable mem_source : mem_source_type; variable is_syscall : std_logic; begin alu_function := ALU_NOTHING; shift_function := SHIFT_NOTHING; mult_function := MULT_NOTHING; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_REG_TARGET; c_source := C_FROM_NULL; pc_source := FROM_INC4; branch_function := BRANCH_EQ; mem_source := MEM_FETCH; op := opcode(31 downto 26); rs := '0' & opcode(25 downto 21); rt := '0' & opcode(20 downto 16); rtx := opcode(20 downto 16); rd := '0' & opcode(15 downto 11); func := opcode(5 downto 0); imm := opcode(15 downto 0); is_syscall := '0'; instruction <= i_None; case op is when "000000" => --SPECIAL case func is when "000000" => --SLL r[rd]=r[rt]<<re; -- This is overlapping with NOP instruction in which all bits are zero, so opcode is zero and the last 6 bits (funct) are also zero, -- does this mean that NOP acts as SLL ??? a_source := A_FROM_IMM10_6; c_source := C_FROM_SHIFT; shift_function := SHIFT_LEFT_UNSIGNED; --Comment the next line if you dont want to debug! instruction <= i_SLL; when "000010" => --SRL r[rd]=u[rt]>>re; a_source := A_FROM_IMM10_6; c_source := C_FROM_shift; shift_function := SHIFT_RIGHT_UNSIGNED; --Comment the next line if you dont want to debug! instruction <= i_SRL; when "000011" => --SRA r[rd]=r[rt]>>re; a_source := A_FROM_IMM10_6; c_source := C_FROM_SHIFT; shift_function := SHIFT_RIGHT_SIGNED; --Comment the next line if you dont want to debug! instruction <= i_SRL; when "000100" => --SLLV r[rd]=r[rt]<<r[rs]; c_source := C_FROM_SHIFT; shift_function := SHIFT_LEFT_UNSIGNED; --Comment the next line if you dont want to debug! instruction <= i_SLLV; when "000110" => --SRLV r[rd]=u[rt]>>r[rs]; c_source := C_FROM_SHIFT; shift_function := SHIFT_RIGHT_UNSIGNED; --Comment the next line if you dont want to debug! instruction <= i_SRLV; when "000111" => --SRAV r[rd]=r[rt]>>r[rs]; c_source := C_FROM_SHIFT; shift_function := SHIFT_RIGHT_SIGNED; --Comment the next line if you dont want to debug! instruction <= i_SRAV; when "001000" => --JR s->pc_next=r[rs]; pc_source := FROM_BRANCH; alu_function := ALU_ADD; branch_function := BRANCH_YES; --Comment the next line if you dont want to debug! instruction <= i_JR; when "001001" => --JALR r[rd]=s->pc_next; s->pc_next=r[rs]; c_source := C_FROM_PC_PLUS4; pc_source := FROM_BRANCH; alu_function := ALU_ADD; branch_function := BRANCH_YES; --Comment the next line if you dont want to debug! instruction <= i_JALR; --when "001010" => --MOVZ if(!r[rt]) r[rd]=r[rs]; /*IV*/ --when "001011" => --MOVN if(r[rt]) r[rd]=r[rs]; /*IV*/ when "001100" => --SYSCALL is_syscall := '1'; --Comment the next line if you dont want to debug! instruction <= i_SYSCALL; when "001101" => --BREAK s->wakeup=1; is_syscall := '1'; --Comment the next line if you dont want to debug! instruction <= i_BREAK; --when "001111" => --SYNC s->wakeup=1; when "010000" => --MFHI r[rd]=s->hi; c_source := C_FROM_MULT; mult_function := MULT_READ_HI; --Comment the next line if you dont want to debug! instruction <= i_MFHI; when "010001" => --MTHI s->hi=r[rs]; mult_function := MULT_WRITE_HI; --Comment the next line if you dont want to debug! instruction <= i_MTHI; when "010010" => --MFLO r[rd]=s->lo; c_source := C_FROM_MULT; mult_function := MULT_READ_LO; --Comment the next line if you dont want to debug! instruction <= i_MFLO; when "010011" => --MTLO s->lo=r[rs]; mult_function := MULT_WRITE_LO; --Comment the next line if you dont want to debug! instruction <= i_MTLO; when "011000" => --MULT s->lo=r[rs]*r[rt]; s->hi=0; mult_function := MULT_SIGNED_MULT; --Comment the next line if you dont want to debug! instruction <= i_MULT; when "011001" => --MULTU s->lo=r[rs]*r[rt]; s->hi=0; mult_function := MULT_MULT; --Comment the next line if you dont want to debug! instruction <= i_MULTU; when "011010" => --DIV s->lo=r[rs]/r[rt]; s->hi=r[rs]%r[rt]; mult_function := MULT_SIGNED_DIVIDE; --Comment the next line if you dont want to debug! instruction <= i_DIV; when "011011" => --DIVU s->lo=r[rs]/r[rt]; s->hi=r[rs]%r[rt]; mult_function := MULT_DIVIDE; --Comment the next line if you dont want to debug! instruction <= i_DIVU; when "100000" => --ADD r[rd]=r[rs]+r[rt]; c_source := C_FROM_ALU; alu_function := ALU_ADD; --Comment the next line if you dont want to debug! instruction <= i_ADD; when "100001" => --ADDU r[rd]=r[rs]+r[rt]; c_source := C_FROM_ALU; alu_function := ALU_ADD; --Comment the next line if you dont want to debug! instruction <= i_ADDU; when "100010" => --SUB r[rd]=r[rs]-r[rt]; c_source := C_FROM_ALU; alu_function := ALU_SUBTRACT; --Comment the next line if you dont want to debug! instruction <= i_SUB; when "100011" => --SUBU r[rd]=r[rs]-r[rt]; c_source := C_FROM_ALU; alu_function := ALU_SUBTRACT; --Comment the next line if you dont want to debug! instruction <= i_SUBU; when "100100" => --AND r[rd]=r[rs]&r[rt]; c_source := C_FROM_ALU; alu_function := ALU_AND; --Comment the next line if you dont want to debug! instruction <= i_AND; when "100101" => --OR r[rd]=r[rs]|r[rt]; c_source := C_FROM_ALU; alu_function := ALU_OR; --Comment the next line if you dont want to debug! instruction <= i_OR; when "100110" => --XOR r[rd]=r[rs]^r[rt]; c_source := C_FROM_ALU; alu_function := ALU_XOR; --Comment the next line if you dont want to debug! instruction <= i_XOR; when "100111" => --NOR r[rd]=~(r[rs]|r[rt]); c_source := C_FROM_ALU; alu_function := ALU_NOR; --Comment the next line if you dont want to debug! instruction <= i_NOR; when "101010" => --SLT r[rd]=r[rs]<r[rt]; c_source := C_FROM_ALU; alu_function := ALU_LESS_THAN_SIGNED; --Comment the next line if you dont want to debug! instruction <= i_SLT; when "101011" => --SLTU r[rd]=u[rs]<u[rt]; c_source := C_FROM_ALU; alu_function := ALU_LESS_THAN; --Comment the next line if you dont want to debug! instruction <= i_SLTU; when "101101" => --DADDU r[rd]=r[rs]+u[rt]; c_source := C_FROM_ALU; alu_function := ALU_ADD; --Comment the next line if you dont want to debug! instruction <= i_DADDU; --when "110001" => --TGEU --when "110010" => --TLT --when "110011" => --TLTU --when "110100" => --TEQ --when "110110" => --TNE when others => end case; when "000001" => --REGIMM rt := "000000"; rd := "011111"; a_source := A_FROM_PC; b_source := B_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_GTZ; --if(test) pc=pc+imm*4 case rtx is when "10000" => --BLTZAL r[31]=s->pc_next; branch=r[rs]<0; c_source := C_FROM_PC_PLUS4; branch_function := BRANCH_LTZ; --Comment the next line if you dont want to debug! instruction <= i_BLTZAL; when "00000" => --BLTZ branch=r[rs]<0; branch_function := BRANCH_LTZ; --Comment the next line if you dont want to debug! instruction <= i_BLTZ; when "10001" => --BGEZAL r[31]=s->pc_next; branch=r[rs]>=0; c_source := C_FROM_PC_PLUS4; branch_function := BRANCH_GEZ; --Comment the next line if you dont want to debug! instruction <= i_BGEZAL; when "00001" => --BGEZ branch=r[rs]>=0; branch_function := BRANCH_GEZ; --Comment the next line if you dont want to debug! instruction <= i_BGEZ; --when "10010" => --BLTZALL r[31]=s->pc_next; lbranch=r[rs]<0; --when "00010" => --BLTZL lbranch=r[rs]<0; --when "10011" => --BGEZALL r[31]=s->pc_next; lbranch=r[rs]>=0; --when "00011" => --BGEZL lbranch=r[rs]>=0; when others => end case; when "000011" => --JAL r[31]=s->pc_next; s->pc_next=(s->pc&0xf0000000)|target; c_source := C_FROM_PC_PLUS4; rd := "011111"; pc_source := FROM_OPCODE25_0; --Comment the next line if you dont want to debug! instruction <= i_JAL; when "000010" => --J s->pc_next=(s->pc&0xf0000000)|target; pc_source := FROM_OPCODE25_0; --Comment the next line if you dont want to debug! instruction <= i_J; when "000100" => --BEQ branch=r[rs]==r[rt]; a_source := A_FROM_PC; b_source := B_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_EQ; --Comment the next line if you dont want to debug! instruction <= i_BEQ; when "000101" => --BNE branch=r[rs]!=r[rt]; a_source := A_FROM_PC; b_source := B_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_NE; --Comment the next line if you dont want to debug! instruction <= i_BNE; when "000110" => --BLEZ branch=r[rs]<=0; a_source := A_FROM_PC; b_source := b_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_LEZ; --Comment the next line if you dont want to debug! instruction <= i_BLEZ; when "000111" => --BGTZ branch=r[rs]>0; a_source := A_FROM_PC; b_source := B_FROM_IMMX4; alu_function := ALU_ADD; pc_source := FROM_BRANCH; branch_function := BRANCH_GTZ; --Comment the next line if you dont want to debug! instruction <= i_BGTZ; when "001000" => --ADDI r[rt]=r[rs]+(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_ADD; --Comment the next line if you dont want to debug! instruction <= i_ADDI; when "001001" => --ADDIU u[rt]=u[rs]+(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_ADD; --Comment the next line if you dont want to debug! instruction <= i_ADDIU; when "001010" => --SLTI r[rt]=r[rs]<(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_LESS_THAN_SIGNED; --Comment the next line if you dont want to debug! instruction <= i_SLTI; when "001011" => --SLTIU u[rt]=u[rs]<(unsigned long)(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_LESS_THAN; --Comment the next line if you dont want to debug! instruction <= i_SLTIU; when "001100" => --ANDI r[rt]=r[rs]&imm; b_source := B_FROM_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_AND; --Comment the next line if you dont want to debug! instruction <= i_ANDI; when "001101" => --ORI r[rt]=r[rs]|imm; b_source := B_FROM_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_OR; --Comment the next line if you dont want to debug! instruction <= i_ORI; when "001110" => --XORI r[rt]=r[rs]^imm; b_source := B_FROM_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_XOR; --Comment the next line if you dont want to debug! instruction <= i_XORI; when "001111" => --LUI r[rt]=(imm<<16); c_source := C_FROM_IMM_SHIFT16; rd := rt; --Comment the next line if you dont want to debug! instruction <= i_LUI; when "010000" => --COP0 alu_function := ALU_OR; c_source := C_FROM_ALU; if opcode(23) = '0' then --move from CP0 rs := '1' & opcode(15 downto 11); rt := "000000"; rd := '0' & opcode(20 downto 16); --Comment the next line if you dont want to debug! instruction <= i_MFC0; else --move to CP0 rs := "000000"; rd(5) := '1'; pc_source := FROM_BRANCH; --delay possible interrupt branch_function := BRANCH_NO; --Comment the next line if you dont want to debug! instruction <= i_MTC0; end if; --when "010001" => --COP1 --when "010010" => --COP2 --when "010011" => --COP3 --when "010100" => --BEQL lbranch=r[rs]==r[rt]; --when "010101" => --BNEL lbranch=r[rs]!=r[rt]; --when "010110" => --BLEZL lbranch=r[rs]<=0; --when "010111" => --BGTZL lbranch=r[rs]>0; when "011010" => -- SUBI r[rt]=r[rs]-(short)imm; b_source := B_FROM_SIGNED_IMM; c_source := C_FROM_ALU; rd := rt; alu_function := ALU_SUBTRACT; --Comment the next line if you dont want to debug! instruction <= i_SUBI; when "100000" => --LB r[rt]=*(signed char*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ8S; --address=(short)imm+r[rs]; --Comment the next line if you dont want to debug! instruction <= i_LB; when "100001" => --LH r[rt]=*(signed short*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ16S; --address=(short)imm+r[rs]; --Comment the next line if you dont want to debug! instruction <= i_LH; when "100010" => --LWL //Not Implemented a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ32; --Comment the next line if you dont want to debug! instruction <= i_LWL; when "100011" => --LW r[rt]=*(long*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ32; --Comment the next line if you dont want to debug! instruction <= i_LW; when "100100" => --LBU r[rt]=*(unsigned char*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ8; --address=(short)imm+r[rs]; --Comment the next line if you dont want to debug! instruction <= i_LBU; when "100101" => --LHU r[rt]=*(unsigned short*)ptr; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; rd := rt; c_source := C_FROM_MEMORY; mem_source := MEM_READ16; --address=(short)imm+r[rs]; --Comment the next line if you dont want to debug! instruction <= i_LHU; --when "100110" => --LWR //Not Implemented when "101000" => --SB *(char*)ptr=(char)r[rt]; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; mem_source := MEM_WRITE8; --address=(short)imm+r[rs]; --Comment the next line if you dont want to debug! instruction <= i_SB; when "101001" => --SH *(short*)ptr=(short)r[rt]; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; mem_source := MEM_WRITE16; --Comment the next line if you dont want to debug! instruction <= i_SH; when "101010" => --SWL //Not Implemented a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; mem_source := MEM_WRITE32; --address=(short)imm+r[rs]; --Comment the next line if you dont want to debug! instruction <= i_SWL; when "101011" => --SW *(long*)ptr=r[rt]; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_SIGNED_IMM; alu_function := ALU_ADD; mem_source := MEM_WRITE32; --address=(short)imm+r[rs]; --Comment the next line if you dont want to debug! instruction <= i_SW; --when "101110" => --SWR //Not Implemented --when "101111" => --CACHE --when "110000" => --LL r[rt]=*(long*)ptr; --when "110001" => --LWC1 --when "110010" => --LWC2 --when "110011" => --LWC3 --when "110101" => --LDC1 --when "110110" => --LDC2 --when "110111" => --LDC3 --when "111000" => --SC *(long*)ptr=r[rt]; r[rt]=1; --when "111001" => --SWC1 --when "111010" => --SWC2 --when "111011" => --SWC3 --when "111101" => --SDC1 --when "111110" => --SDC2 --when "111111" => --SDC3 when others => end case; if c_source = C_FROM_NULL then rd := "000000"; end if; if intr_signal = '1' or is_syscall = '1' then rs := "111111"; --interrupt vector rt := "000000"; rd := "101110"; --save PC in EPC alu_function := ALU_OR; shift_function := SHIFT_NOTHING; mult_function := MULT_NOTHING; branch_function := BRANCH_YES; a_source := A_FROM_REG_SOURCE; b_source := B_FROM_REG_TARGET; c_source := C_FROM_PC; pc_source := FROM_LBRANCH; -- "11" mem_source := MEM_FETCH; exception_out <= '1'; else exception_out <= '0'; end if; rs_index <= rs; rt_index <= rt; rd_index <= rd; imm_out <= imm; alu_func <= alu_function; shift_func <= shift_function; mult_func <= mult_function; branch_func <= branch_function; a_source_out <= a_source; b_source_out <= b_source; c_source_out <= c_source; pc_source_out <= pc_source; mem_source_out <= mem_source; end process; end; --logic
gpl-3.0
63c9501e8ca0675cce6c5d2bd351890b
0.532824
3.412996
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/mlite_cpu.vhd
12
13,651
--------------------------------------------------------------------- -- TITLE: Plasma CPU core -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 2/15/01 -- FILENAME: mlite_cpu.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- NOTE: MIPS(tm) and MIPS I(tm) are registered trademarks of MIPS -- Technologies. MIPS Technologies does not endorse and is not -- associated with this project. -- DESCRIPTION: -- Top level VHDL document that ties the nine other entities together. -- -- Executes all MIPS I(tm) opcodes but exceptions and non-aligned -- memory accesses. Based on information found in: -- "MIPS RISC Architecture" by Gerry Kane and Joe Heinrich -- and "The Designer's Guide to VHDL" by Peter J. Ashenden -- -- The CPU is implemented as a two or three stage pipeline. -- An add instruction would take the following steps (see cpu.gif): -- Stage #0: -- 1. The "pc_next" entity passes the program counter (PC) to the -- "mem_ctrl" entity which fetches the opcode from memory. -- Stage #1: -- 2. The memory returns the opcode. -- Stage #2: -- 3. "Mem_ctrl" passes the opcode to the "control" entity. -- 4. "Control" converts the 32-bit opcode to a 60-bit VLWI opcode -- and sends control signals to the other entities. -- 5. Based on the rs_index and rt_index control signals, "reg_bank" -- sends the 32-bit reg_source and reg_target to "bus_mux". -- 6. Based on the a_source and b_source control signals, "bus_mux" -- multiplexes reg_source onto a_bus and reg_target onto b_bus. -- Stage #3 (part of stage #2 if using two stage pipeline): -- 7. Based on the alu_func control signals, "alu" adds the values -- from a_bus and b_bus and places the result on c_bus. -- 8. Based on the c_source control signals, "bus_bux" multiplexes -- c_bus onto reg_dest. -- 9. Based on the rd_index control signal, "reg_bank" saves -- reg_dest into the correct register. -- Stage #3b: -- 10. Read or write memory if needed. -- -- All signals are active high. -- Here are the signals for writing a character to address 0xffff -- when using a two stage pipeline: -- -- Program: -- addr value opcode -- ============================= -- 3c: 00000000 nop -- 40: 34040041 li $a0,0x41 -- 44: 3405ffff li $a1,0xffff -- 48: a0a40000 sb $a0,0($a1) -- 4c: 00000000 nop -- 50: 00000000 nop -- -- intr_in mem_pause -- reset_in byte_we Stages -- ns address data_w data_r 40 44 48 4c 50 -- 3600 0 0 00000040 00000000 34040041 0 0 1 -- 3700 0 0 00000044 00000000 3405FFFF 0 0 2 1 -- 3800 0 0 00000048 00000000 A0A40000 0 0 2 1 -- 3900 0 0 0000004C 41414141 00000000 0 0 2 1 -- 4000 0 0 0000FFFC 41414141 XXXXXX41 1 0 3 2 -- 4100 0 0 00000050 00000000 00000000 0 0 1 -- modified by: Siavoosh Payandeh Azad -- Change logs: -- * An NI has been Instantiated -- * some changes has been applied to the ports of the older modules -- to facilitate the new module! -- * A specific memory address in external ram has been blocked to be used by the NI -- * IRQ return address register have been changed! It used to be saved in R0, now it is R26 --------------------------------------------------------------------- library ieee; use work.mlite_pack.all; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity mlite_cpu is generic(memory_type : string := "XILINX_16X"; --ALTERA_LPM, or DUAL_PORT_ mult_type : string := "DEFAULT"; --AREA_OPTIMIZED shifter_type : string := "DEFAULT"; --AREA_OPTIMIZED alu_type : string := "DEFAULT"; --AREA_OPTIMIZED pipeline_stages : natural := 2); --2 or 3 port(clk : in std_logic; reset_in : in std_logic; intr_in : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; address_next : out std_logic_vector(31 downto 2); --for synch ram byte_we_next : out std_logic_vector(3 downto 0); address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_w : out std_logic_vector(31 downto 0); data_r : in std_logic_vector(31 downto 0); mem_pause : in std_logic); end; --entity mlite_cpu architecture logic of mlite_cpu is --When using a two stage pipeline "sigD <= sig". --When using a three stage pipeline "sigD <= sig when rising_edge(clk)", -- so sigD is delayed by one clock cycle. signal opcode : std_logic_vector(31 downto 0); signal rs_index : std_logic_vector(5 downto 0); signal rt_index : std_logic_vector(5 downto 0); signal rd_index : std_logic_vector(5 downto 0); signal rd_indexD : std_logic_vector(5 downto 0); signal reg_source : std_logic_vector(31 downto 0); signal reg_target : std_logic_vector(31 downto 0); signal reg_dest : std_logic_vector(31 downto 0); signal reg_destD : std_logic_vector(31 downto 0); signal a_bus : std_logic_vector(31 downto 0); signal a_busD : std_logic_vector(31 downto 0); signal b_bus : std_logic_vector(31 downto 0); signal b_busD : std_logic_vector(31 downto 0); signal c_bus : std_logic_vector(31 downto 0); signal c_alu : std_logic_vector(31 downto 0); signal c_shift : std_logic_vector(31 downto 0); signal c_mult : std_logic_vector(31 downto 0); signal c_memory : std_logic_vector(31 downto 0); signal imm : std_logic_vector(15 downto 0); signal pc_future : std_logic_vector(31 downto 2); signal pc_current : std_logic_vector(31 downto 2); signal pc_plus4 : std_logic_vector(31 downto 2); signal alu_func : alu_function_type; signal alu_funcD : alu_function_type; signal shift_func : shift_function_type; signal shift_funcD : shift_function_type; signal mult_func : mult_function_type; signal mult_funcD : mult_function_type; signal branch_func : branch_function_type; signal take_branch : std_logic; signal a_source : a_source_type; signal b_source : b_source_type; signal c_source : c_source_type; signal pc_source : pc_source_type; signal mem_source : mem_source_type; signal pause_mult : std_logic; signal pause_ctrl : std_logic; signal pause_pipeline : std_logic; signal pause_any : std_logic; signal pause_non_ctrl : std_logic; signal pause_bank : std_logic; signal nullify_op : std_logic; signal intr_enable : std_logic; signal intr_signal : std_logic; signal exception_sig : std_logic; signal reset_reg : std_logic_vector(3 downto 0); signal reset : std_logic; begin --architecture pause_any <= (mem_pause or pause_ctrl) or (pause_mult or pause_pipeline); pause_non_ctrl <= (mem_pause or pause_mult) or pause_pipeline; pause_bank <= ((mem_pause or pause_ctrl or pause_mult) and not pause_pipeline); nullify_op <= '1' when (pc_source = FROM_LBRANCH and take_branch = '0') or intr_signal = '1' or exception_sig = '1' else '0'; c_bus <= c_alu or c_shift or c_mult; reset <= '1' when reset_in = '1' or reset_reg /= "1111" else '0'; --synchronize reset and interrupt pins intr_proc: process(clk, reset_in, reset_reg, intr_in, intr_enable, pc_source, pc_current, pause_any) begin if reset_in = '1' then reset_reg <= "0000"; intr_signal <= '0'; elsif rising_edge(clk) then if reset_reg /= "1111" then reset_reg <= reset_reg + 1; end if; --don't try to interrupt a multi-cycle instruction if pause_any = '0' then if intr_in = '1' and intr_enable = '1' and pc_source = FROM_INC4 then -- pc_source = "00" --the epc will contain pc+4 intr_signal <= '1'; else intr_signal <= '0'; end if; end if; end if; end process; u1_pc_next: pc_next PORT MAP ( clk => clk, reset_in => reset, take_branch => take_branch, pause_in => pause_any, pc_new => c_bus(31 downto 2), opcode25_0 => opcode(25 downto 0), pc_source => pc_source, pc_future => pc_future, pc_current => pc_current, pc_plus4 => pc_plus4); u2_mem_ctrl: mem_ctrl PORT MAP ( clk => clk, reset_in => reset, pause_in => pause_non_ctrl, nullify_op => nullify_op, address_pc => pc_future, opcode_out => opcode, address_in => c_bus, mem_source => mem_source, data_write => reg_target, data_read => c_memory, pause_out => pause_ctrl, address_next => address_next, byte_we_next => byte_we_next, address => address, byte_we => byte_we, data_w => data_w, data_r => data_r); u3_control: control PORT MAP ( opcode => opcode, -- is it opcode or the whole instruction ?? intr_signal => intr_signal, --NI_read_flag => NI_read_flag, --NI_write_flag => NI_write_flag, rs_index => rs_index, rt_index => rt_index, rd_index => rd_index, imm_out => imm, alu_func => alu_func, shift_func => shift_func, mult_func => mult_func, branch_func => branch_func, a_source_out => a_source, b_source_out => b_source, c_source_out => c_source, pc_source_out=> pc_source, mem_source_out=> mem_source, exception_out=> exception_sig); u4_reg_bank: reg_bank generic map(memory_type => memory_type) port map ( clk => clk, reset_in => reset, pause => pause_bank, interrupt_in => intr_in, rs_index => rs_index, rt_index => rt_index, rd_index => rd_indexD, reg_source_out => reg_source, reg_target_out => reg_target, reg_dest_new => reg_destD, intr_enable => intr_enable); u5_bus_mux: bus_mux port map ( imm_in => imm, reg_source => reg_source, a_mux => a_source, a_out => a_bus, reg_target => reg_target, b_mux => b_source, b_out => b_bus, c_bus => c_bus, c_memory => c_memory, c_pc => pc_current, c_pc_plus4 => pc_plus4, c_mux => c_source, reg_dest_out => reg_dest, branch_func => branch_func, take_branch => take_branch); u6_alu: alu generic map (alu_type => alu_type) port map ( a_in => a_busD, b_in => b_busD, alu_function => alu_funcD, c_alu => c_alu); u7_shifter: shifter generic map (shifter_type => shifter_type) port map ( value => b_busD, shift_amount => a_busD(4 downto 0), shift_func => shift_funcD, c_shift => c_shift); u8_mult: mult generic map (mult_type => mult_type) port map ( clk => clk, reset_in => reset, a => a_busD, b => b_busD, mult_func => mult_funcD, c_mult => c_mult, pause_out => pause_mult); pipeline2: if pipeline_stages <= 2 generate a_busD <= a_bus; b_busD <= b_bus; alu_funcD <= alu_func; shift_funcD <= shift_func; mult_funcD <= mult_func; rd_indexD <= rd_index; reg_destD <= reg_dest; pause_pipeline <= '0'; end generate; --pipeline2 pipeline3: if pipeline_stages > 2 generate --When operating in three stage pipeline mode, the following signals --are delayed by one clock cycle: a_bus, b_bus, alu/shift/mult_func, --c_source, and rd_index. u9_pipeline: pipeline port map ( clk => clk, reset => reset, a_bus => a_bus, a_busD => a_busD, b_bus => b_bus, b_busD => b_busD, alu_func => alu_func, alu_funcD => alu_funcD, shift_func => shift_func, shift_funcD => shift_funcD, mult_func => mult_func, mult_funcD => mult_funcD, reg_dest => reg_dest, reg_destD => reg_destD, rd_index => rd_index, rd_indexD => rd_indexD, rs_index => rs_index, rt_index => rt_index, pc_source => pc_source, mem_source => mem_source, a_source => a_source, b_source => b_source, c_source => c_source, c_bus => c_bus, pause_any => pause_any, pause_pipeline => pause_pipeline); end generate; --pipeline3 end; --architecture logic
gpl-3.0
f21f04a30f859b2e1a5dc2075fa55a4c
0.542598
3.536528
false
false
false
false
camacazio/de0_nano_DAC
DE0_12bitDAC_controller/adc_interlock.vhd
1
2,623
---------------------------------------------------------------------------------- -- Takes 12 bit input from ADC process and triggers a logic line based on the value -- Intended to protect devices from an unsafe source (physically, protect fiber optic cable from bad alignment) -- Runs with the clock rate of the ADC process to check ADC values and update logic accordingly ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; -- Physical ports to the entity entity ADC_INTERLOCK is port ( iLOGIC_CLK : in std_logic; -- clock rate iADC_data : in std_logic_vector(11 downto 0); iCH_count : in std_logic_vector(2 downto 0); iActive : in std_logic; -- toggles if we want the threshold trigger oLED : out std_logic_vector(1 downto 0); oLOGIC0 : out std_logic; -- '1' deactivates device oLOGIC1 : out std_logic -- '1' deactivates device ); end entity; -- Behavioral architecture rtl of ADC_INTERLOCK is ---------------------------------------------------------------------------------- -- SIGNALS ---------------------------------------------------------------------------------- signal LOGIC0 : std_logic := '1'; -- channel 0 value signal LOGIC1 : std_logic := '1'; -- channel 1 value signal led : std_logic_vector(1 downto 0); -- lights for each channel -- threshold value, measured based on ADC values at 1/3 -- might need to be different for each channel constant ADC_THRESHOLD : std_logic_vector(11 downto 0) := "010101010101"; ---------------------------------------------------------------------------------- -- BEGIN ---------------------------------------------------------------------------------- begin -- latch outputs, "high" deactivates the physical device oLOGIC0 <= not(LOGIC0) when iActive = '1' else '0'; oLOGIC1 <= not(LOGIC1) when iActive = '1' else '0'; oLED <= led; -- LEDs follow logic levels -- Interpret ADC data for logic levels process(iLOGIC_CLK) begin if(rising_edge(iLOGIC_CLK)) then -- update logic to be FALSE if the ADC data is below a threshold if(iCH_count = "000") then if(iADC_data < ADC_THRESHOLD) then -- flip logic to FALSE LOGIC0 <= '0'; led(0) <= '0'; else LOGIC0 <= '1'; led(0) <= '1'; end if; elsif(iCH_count = "001") then if(iADC_data < ADC_THRESHOLD) then -- flip logic to FALSE LOGIC1 <= '0'; led(1) <= '0'; else LOGIC1 <= '1'; led(1) <= '1'; end if; end if; end if; end process; end rtl;
gpl-3.0
6426a537e78b4d8df1d650544390e1e8
0.523065
3.663408
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/IJTAG_files/ScanRegister.vhd
3
2,000
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity ScanRegister is Generic (Size : positive; BitOrder : string; -- MSBLSB / LSBMSB SOSource : natural; ResetValue : STD_LOGIC_VECTOR); Port ( SI : in STD_LOGIC; CE : in STD_LOGIC; SE : in STD_LOGIC; UE : in STD_LOGIC; SEL : in STD_LOGIC; RST : in STD_LOGIC; TCK : in STD_LOGIC; SO : out STD_LOGIC; CaptureSource : in STD_LOGIC_VECTOR (Size-1 downto 0); ScanRegister_out : out STD_LOGIC_VECTOR (Size-1 downto 0)); end ScanRegister; architecture ScanRegister_arch of ScanRegister is signal and_ce, and_se, and_ue: std_logic; signal internal_si: std_logic_vector(Size downto 0); signal cs_reg: std_logic_vector(Size-1 downto 0); signal u_reg: std_logic_vector(Size-1 downto 0):=ResetValue; signal se_mux, ce_mux, ue_mux: std_logic_vector(Size-1 downto 0); begin -- Basic Combinational Logic and_ce <= CE and SEL; and_se <= SE and SEL; and_ue <= UE and SEL; internal_si(Size) <= SI; -- TDR Shift Register Core SCAN_REGISTER: for i in Size-1 downto 0 generate -- Multiplexers se_mux(i) <= internal_si(i+1) when and_se = '1' else cs_reg(i); ce_mux(i) <= CaptureSource(i) when and_ce = '1' else se_mux(i); ue_mux(i) <= cs_reg(i) when and_ue = '1' else u_reg(i); -- Flip-Flops cs_reg(i) <= ce_mux(i) when TCK'event and TCK = '1'; process(RST,TCK) begin if RST = '1' then u_reg(i) <= ResetValue(Size-1-i); elsif TCK'event and TCK = '0' then u_reg(i) <= ue_mux(i); end if; end process; -- Internal Connections internal_si(i) <= cs_reg(i); end generate; -- Outputs MSBLSB_SO : if BitOrder = "MSBLSB" generate SO <= internal_si(SOSource); end generate; LSBMSB_SO : if BitOrder = "LSBMSB" generate SO <= internal_si(Size-1-SOSource); end generate; ScanRegister_out <= u_reg; end ScanRegister_arch;
gpl-3.0
06e1e854a0352959a55b9d2786be4dbe
0.6045
3.095975
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/archive/IMMORTAL_Chip_2017/With_checkers/FIFO_one_hot_credit_based_packet_drop_classifier_support_with_checkers/FIFO_one_hot_credit_based_packet_drop_classifier_support_checkers.vhd
3
54,996
--Copyright (C) 2016 Siavoosh Payandeh Azad and Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity FIFO_credit_based_control_part_checkers is port ( valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; read_pointer: in std_logic_vector(3 downto 0); read_pointer_in: in std_logic_vector(3 downto 0); write_pointer: in std_logic_vector(3 downto 0); write_pointer_in: in std_logic_vector(3 downto 0); credit_out: in std_logic; -- Behrad: In FIFO, this is actually an internal signal "named as credit_in", which I guess should keep the previous value of credit_out. empty_out: in std_logic; full_out: in std_logic; read_en_out: in std_logic; write_en_out: in std_logic; fake_credit: in std_logic; fake_credit_counter: in std_logic_vector(1 downto 0); fake_credit_counter_in: in std_logic_vector(1 downto 0); state_out: in std_logic_vector(4 downto 0); state_in: in std_logic_vector(4 downto 0); fault_info: in std_logic; fault_info_out: in std_logic; fault_info_in: in std_logic; health_info: in std_logic; faulty_packet_out: in std_logic; faulty_packet_in: in std_logic; flit_type: in std_logic_vector(2 downto 0); fault_out: in std_logic; write_fake_flit: in std_logic; -- Functional checkers err_empty_full, err_empty_read_en, err_full_write_en, err_state_in_onehot, err_read_pointer_in_onehot, err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer, err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full, err_read_pointer_increment, err_read_pointer_not_increment, err_write_en, err_not_write_en, err_not_write_en1, err_not_write_en2, err_read_en_mismatch, err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in : out std_logic ); end FIFO_credit_based_control_part_checkers; architecture behavior of FIFO_credit_based_control_part_checkers is CONSTANT Idle: std_logic_vector (4 downto 0) := "00001"; CONSTANT Header_flit: std_logic_vector (4 downto 0) := "00010"; CONSTANT Body_flit: std_logic_vector (4 downto 0) := "00100"; CONSTANT Tail_flit: std_logic_vector (4 downto 0) := "01000"; CONSTANT Packet_drop: std_logic_vector (4 downto 0) := "10000"; begin -- Functional Checkers (Might cover or be covered by some of the structural checkers) -- Empty and full cannot be high at the same time! process (empty_out, full_out) begin if (empty_out = '1' and full_out = '1') then err_empty_full <= '1'; else err_empty_full <= '0'; end if; end process; -- Checked! -- Reading from an empty FIFO is not possible! process (empty_out, read_en_out) begin if (empty_out = '1' and read_en_out = '1') then err_empty_read_en <= '1'; else err_empty_read_en <= '0'; end if; end process; -- Checked! -- Writing to a full FIFO is not possible! process (full_out, write_en_out) begin if (full_out = '1' and write_en_out = '1') then err_full_write_en <= '1'; else err_full_write_en <= '0'; end if; end process; -- Checked! -- The states of the packet dropping FSM of FIFO must always be one-hot (state_in)! process (state_in) begin if (state_in /= Idle and state_in /= Header_flit and state_in /= Body_flit and state_in /= Tail_flit and state_in /= Packet_drop) then err_state_in_onehot <= '1'; else err_state_in_onehot <= '0'; end if; end process; -- Checked! -- Read pointer must always be one-hot! process (read_pointer_in) begin if (read_pointer_in /= "0001" and read_pointer_in /= "0010" and read_pointer_in /= "0100" and read_pointer_in /= "1000") then err_read_pointer_in_onehot <= '1'; else err_read_pointer_in_onehot <= '0'; end if; end process; -- Checked! -- Write pointer must always be one-hot! process (write_pointer_in) begin if (write_pointer_in /= "0001" and write_pointer_in /= "0010" and write_pointer_in /= "0100" and write_pointer_in /= "1000") then err_write_pointer_in_onehot <= '1'; else err_write_pointer_in_onehot <= '0'; end if; end process; -- Checked! --------------------------------------------------------------------------------------------------------- -- Structural Checkers -- Write pointer and Read pointer checkers process (write_en_out, write_pointer_in, write_pointer) begin if (write_en_out = '1' and write_pointer_in /= (write_pointer(2 downto 0) & write_pointer(3)) ) then err_write_en_write_pointer <= '1'; else err_write_en_write_pointer <= '0'; end if; end process; -- Double Checked ! process (write_en_out, write_pointer_in, write_pointer) begin if (write_en_out = '0' and write_pointer_in /= write_pointer ) then err_not_write_en_write_pointer <= '1'; else err_not_write_en_write_pointer <= '0'; end if; end process; -- Double Checked ! process (read_pointer, write_pointer, empty_out) begin if (read_pointer = write_pointer and empty_out = '0' ) then err_read_pointer_write_pointer_not_empty <= '1'; else err_read_pointer_write_pointer_not_empty <= '0'; end if; end process; -- Double Checked ! process (read_pointer, write_pointer, empty_out) begin if (read_pointer /= write_pointer and empty_out = '1' ) then err_read_pointer_write_pointer_empty <= '1'; else err_read_pointer_write_pointer_empty <= '0'; end if; end process; -- Double Checked ! process (write_pointer, read_pointer, full_out) begin if (write_pointer = (read_pointer(0)&read_pointer(3 downto 1)) and full_out = '0' ) then err_read_pointer_write_pointer_not_full <= '1'; else err_read_pointer_write_pointer_not_full <= '0'; end if; end process; -- Double Checked ! process (write_pointer, read_pointer, full_out) begin if (write_pointer /= (read_pointer(0)&read_pointer(3 downto 1)) and full_out = '1' ) then err_read_pointer_write_pointer_full <= '1'; else err_read_pointer_write_pointer_full <= '0'; end if; end process; -- Double Checked ! process (read_en_out, empty_out, read_pointer_in, read_pointer) begin if (read_en_out = '1' and empty_out = '0' and read_pointer_in /= (read_pointer(2 downto 0)&read_pointer(3)) ) then err_read_pointer_increment <= '1'; else err_read_pointer_increment <= '0'; end if; end process; -- Double Checked ! process (read_en_out, empty_out, read_pointer_in, read_pointer) begin if ( (read_en_out = '0' or empty_out = '1') and read_pointer_in /= read_pointer ) then err_read_pointer_not_increment <= '1'; else err_read_pointer_not_increment <= '0'; end if; end process; -- Double Checked ! process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if (valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full_out ='0' and write_en_out = '0') then err_write_en <= '1'; else err_write_en <= '0'; end if; end process; -- Double Checked ! process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( (valid_in = '0' or (((faulty_packet_out = '1' or fault_out = '1') and write_fake_flit = '0')) or full_out = '1') and write_en_out = '1') then err_not_write_en <= '1'; else err_not_write_en <= '0'; end if; end process; -- Checked! process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( valid_in = '1' and ((faulty_packet_out = '1' or fault_out = '1') and write_fake_flit = '0') and write_en_out = '1') then err_not_write_en1 <= '1'; else err_not_write_en1 <= '0'; end if; end process; -- Checked! process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full_out = '1' and write_en_out = '1') then err_not_write_en2 <= '1'; else err_not_write_en2 <= '0'; end if; end process; -- Checked! (Not sure yet if actually needed!) process (read_en_N, read_en_E, read_en_W, read_en_S, read_en_L, empty_out, read_en_out) begin if ( (read_en_N = '1' or read_en_E = '1' or read_en_W = '1' or read_en_S = '1' or read_en_L = '1') and empty_out = '0' and read_en_out = '0' ) then err_read_en_mismatch <= '1'; else err_read_en_mismatch <= '0'; end if; end process; -- Checked! process (read_en_N, read_en_E, read_en_W, read_en_S, read_en_L, empty_out, read_en_out) begin if ( ((read_en_N = '0' and read_en_E = '0' and read_en_W = '0' and read_en_S = '0' and read_en_L = '0') or empty_out = '1') and read_en_out = '1' ) then err_read_en_mismatch1 <= '1'; else err_read_en_mismatch1 <= '0'; end if; end process; -- Checked! --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -- Newly added checkers for FIFO with packet drop and fault classifier support -- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -- Checkers for fake credit generation logic in FIFO --------------------------------------------------------------------------------- process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '1' and read_en_out = '1' and fake_credit_counter_in /= fake_credit_counter + 1) then err_fake_credit_read_en_fake_credit_counter_in_increment <= '1'; else err_fake_credit_read_en_fake_credit_counter_in_increment <= '0'; end if; end process; -- Checked! process (fake_credit, read_en_out, fake_credit_counter, fake_credit_counter_in) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter > 0 and fake_credit_counter_in /= fake_credit_counter - 1 ) then err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement <= '0'; end if; end process; -- Checked! process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '0' and read_en_out = '1' and fake_credit_counter_in /= fake_credit_counter) then err_not_fake_credit_read_en_fake_credit_counter_in_not_change <= '1'; else err_not_fake_credit_read_en_fake_credit_counter_in_not_change <= '0'; end if; end process; -- Checked! process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '1' and read_en_out = '0' and fake_credit_counter_in /= fake_credit_counter) then err_fake_credit_not_read_en_fake_credit_counter_in_not_change <= '1'; else err_fake_credit_not_read_en_fake_credit_counter_in_not_change <= '0'; end if; end process; -- Checked! process (fake_credit, read_en_out, fake_credit_counter, fake_credit_counter_in) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter <= 0 and fake_credit_counter_in /= fake_credit_counter) then err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change <= '0'; end if; end process; -- Checked! (Behrad: Is it OK to see fake credit counter like this ?? Because being negative, can also be understood as positive, -- depending on how the data is evaluated (signed or unsigned), or may I am wrong.) process (fake_credit, read_en_out, credit_out) begin if ((fake_credit = '1' or read_en_out ='1') and credit_out = '0') then err_fake_credit_read_en_credit_out <= '1'; else err_fake_credit_read_en_credit_out <= '0'; end if; end process; -- Checked! (Behrad: Credit_out here in Checker is actually credit_in in FIFO. Well, FIFO generated credit_out. -- But here, credit_in would mean the registered value of credit_out I guess. ) process (fake_credit, read_en_out, fake_credit_counter, credit_out) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter > 0 and credit_out = '0') then err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out <= '0'; end if; end process; -- Checked! process (fake_credit, read_en_out, fake_credit_counter, credit_out) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter <= 0 and credit_out = '1') then err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Checkers related to the packet dropping FSM of FIFO -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Idle state -- fault_out = '0' -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- process (state_out, fault_out, valid_in, state_in) begin if (state_out = Idle and fault_out = '0' and valid_in = '1' and state_in /= Header_flit) then err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit <= '1'; else err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit <= '0'; end if; end process; -- Checked! process (state_out, fault_out, valid_in, state_in, state_out) begin if (state_out = Idle and fault_out = '0' and valid_in = '0' and state_in /= state_out) then err_state_out_Idle_not_fault_out_valid_in_state_in_not_change <= '1'; else err_state_out_Idle_not_fault_out_valid_in_state_in_not_change <= '0'; end if; end process; -- Checked! process (state_out, fault_out, fake_credit) begin if (state_out = Idle and fault_out = '0' and fake_credit = '1') then err_state_out_Idle_not_fault_out_not_fake_credit <= '1'; else err_state_out_Idle_not_fault_out_not_fake_credit <= '0'; end if; end process; -- Checked! process (state_out, fault_out, fault_info_in) begin if (state_out = Idle and fault_out = '0' and fault_info_in = '1') then err_state_out_Idle_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Idle_not_fault_out_not_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Idle and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal <= '1'; else err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal <= '0'; end if; end process; -- Checked! -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, fault_out, fake_credit) begin if (state_out = Idle and fault_out = '1' and fake_credit = '0') then err_state_out_Idle_fault_out_fake_credit <= '1'; else err_state_out_Idle_fault_out_fake_credit <= '0'; end if; end process; -- Checked! process (state_out, fault_out, state_in) begin if (state_out = Idle and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Idle_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Idle_fault_out_state_in_Packet_drop <= '0'; end if; end process; -- Checked! process (state_out, fault_out, fault_info_in) begin if (state_out = Idle and fault_out = '1' and fault_info_in = '0') then err_state_out_Idle_fault_out_fault_info_in <= '1'; else err_state_out_Idle_fault_out_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, fault_out, faulty_packet_in) begin if (state_out = Idle and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Idle_fault_out_faulty_packet_in <= '1'; else err_state_out_Idle_fault_out_faulty_packet_in <= '0'; end if; end process; -- Checked! process (state_out, write_fake_flit) begin if (state_out = Idle and write_fake_flit = '1') then err_state_out_Idle_not_write_fake_flit <= '1'; else err_state_out_Idle_not_write_fake_flit <= '0'; end if; end process; -- Checked! -- Other properties for Idle state -------------------------------------------------------------------------------------------------- -- health_info only gets updated when the FSM is in "Body" state (flit type is Body) process (state_out, health_info) begin if ( (state_out = Idle or state_out = Header_flit or state_out = Tail_flit or state_out = Packet_drop) and health_info = '1') then err_state_out_Idle_not_health_info <= '1'; else err_state_out_Idle_not_health_info <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Header_flit state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and flit_type = "010" and state_in /= Body_flit) then err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and state_in /= Tail_flit) then err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and write_fake_flit = '1') then err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and write_fake_flit = '0') then err_state_out_Header_flit_valid_in_fault_out_write_fake_flit <= '1'; else err_state_out_Header_flit_valid_in_fault_out_write_fake_flit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Header_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Header_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; -- Checked! -- valid_in = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, state_in, state_out) begin if (state_out = Header_flit and valid_in = '0' and state_in /= state_out) then err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; -- Checked! process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Header_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_info_in) begin if (state_out = Header_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Header_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Header_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, valid_in, write_fake_flit) begin if (state_out = Header_flit and valid_in = '0' and write_fake_flit = '1') then err_state_out_Header_flit_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Header_flit_not_valid_in_not_write_fake_flit <= '0'; end if; end process; -- Checked! process (state_out, fake_credit) begin if ( (state_out = Header_flit or state_out = Body_flit) and fake_credit /= '0') then err_state_out_Header_flit_or_Body_flit_not_fake_credit <= '1'; else err_state_out_Header_flit_or_Body_flit_not_fake_credit <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -- Body_flit state -------------------------------------------------------------------------------------------------- -- valid_in = '1' and fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in, state_out) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "010" and state_in /= state_out) then err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and state_in /= Tail_flit) then err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, flit_type, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and health_info = '0') then err_state_out_Body_flit_valid_in_not_fault_out_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_health_info <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, flit_type, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type /= "100" and health_info = '1') then err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -- valid_in = '1' and fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and health_info = '1') then err_state_out_Body_flit_valid_in_fault_out_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_fault_out_not_health_info <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -- valid_in = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, health_info) begin if (state_out = Body_flit and valid_in = '0' and health_info = '1') then err_state_out_Body_flit_valid_in_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_health_info <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -- valid_in = '1' and fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and write_fake_flit = '1') then err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -- valid_in = '1' and fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and write_fake_flit = '0') then err_state_out_Body_flit_valid_in_fault_out_write_fake_flit <= '1'; else err_state_out_Body_flit_valid_in_fault_out_write_fake_flit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, state_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Body_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Body_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -- valid_in = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, state_in) begin if (state_out = Body_flit and valid_in = '0' and state_in /= state_out) then err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; -- Checked! process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Body_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_info_in) begin if (state_out = Body_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Body_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Body_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, valid_in, write_fake_flit) begin if (state_out = Body_flit and valid_in = '0' and write_fake_flit = '1') then err_state_out_Body_flit_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Body_flit_not_valid_in_not_write_fake_flit <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -- Checked! process (state_out, fake_credit) begin if (state_out = Body_flit and fake_credit = '1') then err_state_out_Body_flit_not_fake_credit <= '1'; else err_state_out_Body_flit_not_fake_credit <= '0'; end if; end process; -- Checked! -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Tail_flit state -- valid_in = '1' and fault_out = '0' -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and flit_type = "001" and state_in /= Header_flit) then err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, fake_credit) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and fake_credit = '1') then err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in <= '0'; end if; end process; -- Checked! process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, fake_credit) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and fake_credit /= '1') then err_state_out_Tail_flit_valid_in_fault_out_fake_credit <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_fake_credit <= '0'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Tail_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, valid_in, state_in) begin if (state_out = Tail_flit and valid_in = '0' and state_in /= Idle) then err_state_out_Tail_flit_not_valid_in_state_in_Idle <= '1'; else err_state_out_Tail_flit_not_valid_in_state_in_Idle <= '0'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Tail_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change <= '1'; else err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_info_in) begin if (state_out = Tail_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Tail_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Tail_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fake_credit) begin if (state_out = Tail_flit and valid_in = '0' and fake_credit /= '0') then err_state_out_Tail_flit_not_valid_in_not_fake_credit <= '1'; else err_state_out_Tail_flit_not_valid_in_not_fake_credit <= '0'; end if; end process; process (state_out, write_fake_flit) begin if (state_out = Tail_flit and write_fake_flit = '1') then err_state_out_Tail_flit_not_write_fake_flit <= '1'; else err_state_out_Tail_flit_not_write_fake_flit <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Packet_drop state -- faulty_packet_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and fake_credit /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and faulty_packet_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and state_in /= Header_flit) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and write_fake_flit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '1' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and faulty_packet_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '1' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and state_in /= Idle) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and fake_credit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and ((flit_type /= "001" and flit_type /= "100") or fault_out = '1') and fake_credit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and ( valid_in = '0' or (flit_type /= "001" and flit_type /= "100") or fault_out = '1' ) and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and ((flit_type /= "001" and flit_type /= "100") or fault_out = '1') and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and write_fake_flit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and fake_credit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit <= '0'; end if; end process; -- faulty_packet_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, faulty_packet_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '0' and state_in /= state_out) then err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '0' and fake_credit = '1') then err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and (valid_in = '0' or flit_type /= "001" or fault_out = '1') and write_fake_flit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '0' and write_fake_flit = '1') then err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit <= '0'; end if; end process; process (fault_info, fault_info_out) begin if (fault_info /= fault_info_out) then err_fault_info_fault_info_out_equal <= '1'; else err_fault_info_fault_info_out_equal <= '0'; end if; end process; process (state_out, valid_in, state_in, state_out) begin if (state_out = Packet_drop and valid_in = '0' and state_in /= state_out) then err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal <= '1'; else err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in, state_out) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and flit_type /= "001" and state_in /= state_out) then err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal <= '0'; end if; end process; -- Added after change of design ! process (state_out, faulty_packet_out, valid_in, flit_type, fault_info_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_info_in /= '1') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fault_info_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and (valid_in = '0' or flit_type /= "001") and fault_info_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in <= '0'; end if; end process; end behavior;
gpl-3.0
5a5482dc2e2499b69ffae6cc34651fff
0.640974
2.814678
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/NI.vhd
3
22,746
--------------------------------------------------------------------- -- Copyright (C) 2016 Siavoosh Payandeh Azad -- -- Network interface: Its an interrupt based memory mapped I/O for sending and recieving packets. -- the data that is sent to NI should be of the following form: -- FIRST write: 4bit source(31-28), 4 bit destination(27-14), 8bit packet length(23-16) -- Body write: 28 bit data(27-0) -- Last write: 28 bit data(27-0) --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_misc.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; use IEEE.NUMERIC_STD.all; use ieee.std_logic_textio.all; use std.textio.all; use work.mlite_pack.all; use ieee.std_logic_misc.all; entity NI is generic(current_address : integer := 10; -- the current node's address SHMU_address : integer := 0; reserved_address : std_logic_vector(29 downto 0) := "000000000000000001111111111111"; flag_address : std_logic_vector(29 downto 0) := "000000000000000010000000000000"; -- reserved address for the memory mapped I/O counter_address : std_logic_vector(29 downto 0) := "000000000000000010000000000001"; reconfiguration_address : std_logic_vector(29 downto 0) := "000000000000000010000000000010"; -- reserved address for reconfiguration register self_diagnosis_address : std_logic_vector(29 downto 0) := "000000000000000010000000000011"); -- reserved address for self diagnosis register port(clk : in std_logic; reset : in std_logic; enable : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); -- Flags used by JNIFR and JNIFW instructions --NI_read_flag : out std_logic; -- One if the N2P fifo is empty. No read should be performed if one. --NI_write_flag : out std_logic; -- One if P2N fifo is full. no write should be performed if one. -- interrupt signal: generated evertime a packet is recieved! irq_out : out std_logic; -- signals for sending packets to network credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); -- data sent to the NoC -- signals for reciving packets from the network credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); -- data recieved form the NoC -- fault information signals from the router link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(7 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); -- if you are not going to update Cx you should write all ones! (it will be and will the current Cx bits) Reconfig_command : out std_logic ); end; --entity NI architecture logic of NI is -- all the following signals are for sending data from processor to NoC signal storage, storage_in : std_logic_vector(31 downto 0); signal valid_data_in, valid_data: std_logic; signal old_address: std_logic_vector(31 downto 2); signal P2N_FIFO_read_pointer, P2N_FIFO_read_pointer_in, P2N_FIFO_write_pointer, P2N_FIFO_write_pointer_in: std_logic_vector(3 downto 0); signal P2N_write_en: std_logic; signal P2N_FIFO_MEM_1, P2N_FIFO_MEM_1_in : std_logic_vector(31 downto 0); signal P2N_FIFO_MEM_2, P2N_FIFO_MEM_2_in : std_logic_vector(31 downto 0); signal P2N_FIFO_MEM_3, P2N_FIFO_MEM_3_in : std_logic_vector(31 downto 0); signal P2N_FIFO_MEM_4, P2N_FIFO_MEM_4_in : std_logic_vector(31 downto 0); signal P2N_full, P2N_empty: std_logic; signal credit_counter_in, credit_counter_out: std_logic_vector(1 downto 0); signal packet_counter_in, packet_counter_out: std_logic_vector(7 downto 0); signal packet_length_counter_in, packet_length_counter_out: std_logic_vector(11 downto 0); signal grant : std_logic; type STATE_TYPE IS (IDLE, HEADER_FLIT, BODY_FLIT, TAIL_FLIT, DIAGNOSIS_HEADER, DIAGNOSIS_BODY, DIAGNOSIS_TAIL); signal state, state_in : STATE_TYPE := IDLE; signal FIFO_Data_out : std_logic_vector(31 downto 0); signal flag_register, flag_register_in : std_logic_vector(31 downto 0); -- all the following signals are for sending the packets from NoC to processor signal N2P_FIFO_MEM_1, N2P_FIFO_MEM_1_in : std_logic_vector(31 downto 0); signal N2P_FIFO_MEM_2, N2P_FIFO_MEM_2_in : std_logic_vector(31 downto 0); signal N2P_FIFO_MEM_3, N2P_FIFO_MEM_3_in : std_logic_vector(31 downto 0); signal N2P_FIFO_MEM_4, N2P_FIFO_MEM_4_in : std_logic_vector(31 downto 0); signal N2P_Data_out, data_read_in : std_logic_vector(31 downto 0); signal N2P_FIFO_read_pointer, N2P_FIFO_read_pointer_in: std_logic_vector(3 downto 0); signal N2P_FIFO_write_pointer, N2P_FIFO_write_pointer_in: std_logic_vector(3 downto 0); signal N2P_full, N2P_empty: std_logic; signal N2P_read_en, N2P_read_en_in, N2P_write_en: std_logic; signal counter_register_in, counter_register : std_logic_vector(1 downto 0); signal fault_info, fault_info_in: std_logic_vector(12 downto 0); signal sent_info, fault_info_ready, fault_info_ready_in: std_logic; signal self_diagnosis_reg_out, self_diagnosis_reg_in: std_logic_vector(31 downto 0); signal self_diagnosis_flag, self_diagnosis_flag_in: std_logic; begin process(clk, enable, write_byte_enable) begin if reset = '1' then storage <= (others => '0'); valid_data <= '0'; P2N_FIFO_read_pointer <= "0001"; P2N_FIFO_write_pointer <= "0001"; P2N_FIFO_MEM_1 <= (others=>'0'); P2N_FIFO_MEM_2 <= (others=>'0'); P2N_FIFO_MEM_3 <= (others=>'0'); P2N_FIFO_MEM_4 <= (others=>'0'); credit_counter_out <= "11"; packet_length_counter_out <= "000000000000"; state <= IDLE; packet_counter_out <= "00000000"; ------------------------------------------------ N2P_FIFO_MEM_1 <= (others=>'0'); N2P_FIFO_MEM_2 <= (others=>'0'); N2P_FIFO_MEM_3 <= (others=>'0'); N2P_FIFO_MEM_4 <= (others=>'0'); N2P_FIFO_read_pointer <= "0001"; N2P_FIFO_write_pointer <= "0001"; credit_out <= '0'; counter_register <= (others => '0'); N2P_read_en <= '0'; flag_register <= (others =>'0'); old_address <= (others =>'0'); fault_info <= (others => '0'); fault_info_ready <= '0'; self_diagnosis_reg_out <= (others => '0'); self_diagnosis_flag <= '0'; elsif clk'event and clk = '1' then old_address <= address; P2N_FIFO_write_pointer <= P2N_FIFO_write_pointer_in; P2N_FIFO_read_pointer <= P2N_FIFO_read_pointer_in; credit_counter_out <= credit_counter_in; packet_length_counter_out <= packet_length_counter_in; valid_data <= valid_data_in; if P2N_write_en = '1' then --write into the memory P2N_FIFO_MEM_1 <= P2N_FIFO_MEM_1_in; P2N_FIFO_MEM_2 <= P2N_FIFO_MEM_2_in; P2N_FIFO_MEM_3 <= P2N_FIFO_MEM_3_in; P2N_FIFO_MEM_4 <= P2N_FIFO_MEM_4_in; end if; packet_counter_out <= packet_counter_in; if write_byte_enable /= "0000" then storage <= storage_in; end if; state <= state_in; ------------------------------------------------ if N2P_write_en = '1' then --write into the memory N2P_FIFO_MEM_1 <= N2P_FIFO_MEM_1_in; N2P_FIFO_MEM_2 <= N2P_FIFO_MEM_2_in; N2P_FIFO_MEM_3 <= N2P_FIFO_MEM_3_in; N2P_FIFO_MEM_4 <= N2P_FIFO_MEM_4_in; end if; counter_register <= counter_register_in; N2P_FIFO_write_pointer <= N2P_FIFO_write_pointer_in; N2P_FIFO_read_pointer <= N2P_FIFO_read_pointer_in; credit_out <= '0'; N2P_read_en <= N2P_read_en_in; if N2P_read_en = '1' then credit_out <= '1'; end if; flag_register <= flag_register_in; fault_info <= fault_info_in; fault_info_ready <= fault_info_ready_in; self_diagnosis_reg_out <= self_diagnosis_reg_in; self_diagnosis_flag <= self_diagnosis_flag_in; end if; end process; -- everything bellow this line is pure combinatorial! --------------------------------------------------------------------------------------- --below this is code for communication from PE 2 NoC process(enable, address, write_byte_enable) begin Reconfig_command <= '0'; Rxy_reconf_PE <= (others =>'0'); Cx_reconf_PE <= (others =>'0'); if address = reconfiguration_address and enable = '1' then if write_byte_enable /= "0000" then Rxy_reconf_PE <= data_write(7 downto 0); Cx_reconf_PE <= data_write(4 downto 8); Reconfig_command <= '1'; end if; end if; end process; process(write_byte_enable, enable, address, storage, data_write, valid_data, P2N_write_en) begin storage_in <= storage ; valid_data_in <= valid_data; if enable = '1' and address = reserved_address then if write_byte_enable /= "0000" then valid_data_in <= '1'; end if; if write_byte_enable(0) = '1' then storage_in(7 downto 0) <= data_write(7 downto 0); end if; if write_byte_enable(1) = '1' then storage_in(15 downto 8) <= data_write(15 downto 8); end if; if write_byte_enable(2) = '1' then storage_in(23 downto 16) <= data_write(23 downto 16); end if; if write_byte_enable(3) = '1' then storage_in(31 downto 24) <= data_write(31 downto 24); end if; end if; if P2N_write_en = '1' then valid_data_in <= '0'; end if; end process; process(storage, P2N_FIFO_write_pointer, P2N_FIFO_MEM_1, P2N_FIFO_MEM_2, P2N_FIFO_MEM_3, P2N_FIFO_MEM_4)begin case(P2N_FIFO_write_pointer) is when "0001" => P2N_FIFO_MEM_1_in <= storage; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; when "0010" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= storage; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; when "0100" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= storage; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; when "1000" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= storage; when others => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; end case ; end process; process(P2N_FIFO_read_pointer, P2N_FIFO_MEM_1, P2N_FIFO_MEM_2, P2N_FIFO_MEM_3, P2N_FIFO_MEM_4)begin case( P2N_FIFO_read_pointer ) is when "0001" => FIFO_Data_out <= P2N_FIFO_MEM_1; when "0010" => FIFO_Data_out <= P2N_FIFO_MEM_2; when "0100" => FIFO_Data_out <= P2N_FIFO_MEM_3; when "1000" => FIFO_Data_out <= P2N_FIFO_MEM_4; when others => FIFO_Data_out <= P2N_FIFO_MEM_1; end case ; end process; process(P2N_write_en, P2N_FIFO_write_pointer)begin if P2N_write_en = '1'then P2N_FIFO_write_pointer_in <= P2N_FIFO_write_pointer(2 downto 0) & P2N_FIFO_write_pointer(3); else P2N_FIFO_write_pointer_in <= P2N_FIFO_write_pointer; end if; end process; process(P2N_FIFO_read_pointer, grant)begin P2N_FIFO_read_pointer_in <= P2N_FIFO_read_pointer; if grant = '1' then P2N_FIFO_read_pointer_in <= P2N_FIFO_read_pointer(2 downto 0) & P2N_FIFO_read_pointer(3); end if; end process; process(P2N_full, valid_data) begin if valid_data = '1' and P2N_full ='0' then P2N_write_en <= '1'; else P2N_write_en <= '0'; end if; end process; process(P2N_FIFO_write_pointer, P2N_FIFO_read_pointer) begin P2N_empty <= '0'; P2N_full <= '0'; if P2N_FIFO_read_pointer = P2N_FIFO_write_pointer then P2N_empty <= '1'; end if; if P2N_FIFO_write_pointer = P2N_FIFO_read_pointer(0) & P2N_FIFO_read_pointer(3 downto 1) then P2N_full <= '1'; end if; end process; process (credit_in, credit_counter_out, grant)begin credit_counter_in <= credit_counter_out; if credit_in = '1' and grant = '1' then credit_counter_in <= credit_counter_out; elsif credit_in = '1' and credit_counter_out < 3 then credit_counter_in <= credit_counter_out + 1; elsif grant = '1' and credit_counter_out > 0 then credit_counter_in <= credit_counter_out - 1; end if; end process; -- flag setting and clearing for self diagnosis process(link_faults, turn_faults, self_diagnosis_flag, old_address)begin if (link_faults /= "00000" or turn_faults /= "00000000") and SHMU_address = current_address then self_diagnosis_flag_in <= '1'; elsif old_address = self_diagnosis_address then self_diagnosis_flag_in <= '0'; else self_diagnosis_flag_in <= self_diagnosis_flag; end if; end process; -- handling fault information! process(link_faults, turn_faults, sent_info, fault_info_ready, fault_info)begin self_diagnosis_reg_in <= self_diagnosis_reg_out; if (link_faults /= "00000" or turn_faults /= "00000000") and SHMU_address /= current_address then fault_info_in <= turn_faults & link_faults; fault_info_ready_in <= '1'; elsif (link_faults /= "00000" or turn_faults /= "00000000") and SHMU_address = current_address then self_diagnosis_reg_in <= "0000000000000000000" & turn_faults & link_faults; else fault_info_in <= fault_info; fault_info_ready_in <= fault_info_ready; end if; if sent_info = '1' then fault_info_ready_in <= '0'; end if; end process; process(P2N_empty, state, credit_counter_out, packet_length_counter_out, packet_counter_out, FIFO_Data_out, fault_info_ready) variable LINEVARIABLE : line; file VEC_FILE : text is out "sent.txt"; begin sent_info <= '0'; TX <= (others => '0'); grant<= '0'; packet_length_counter_in <= packet_length_counter_out; packet_counter_in <= packet_counter_out; case(state) is when IDLE => if fault_info_ready = '1' then state_in <= DIAGNOSIS_HEADER; elsif P2N_empty = '0' then state_in <= HEADER_FLIT; else state_in <= IDLE; end if; when HEADER_FLIT => if credit_counter_out /= "00" then grant <= '1'; TX <= "001" & "0000" & FIFO_Data_out(23 downto 16) & FIFO_Data_out(31 downto 28) & std_logic_vector(to_unsigned(current_address, 4)) & packet_counter_out & XOR_REDUCE("001" & "0000" & FIFO_Data_out(23 downto 16) & FIFO_Data_out(31 downto 28) & std_logic_vector(to_unsigned(current_address, 4)) & packet_counter_out); state_in <= BODY_FLIT; packet_length_counter_in <= ("0000" & FIFO_Data_out(23 downto 16))-1; else state_in <= HEADER_FLIT; end if; when BODY_FLIT => if credit_counter_out /= "00" and P2N_empty = '0'then grant <= '1'; TX <= "010" & FIFO_Data_out(27 downto 0) & XOR_REDUCE("010" & FIFO_Data_out(27 downto 0)); packet_length_counter_in <= packet_length_counter_out - "000000000001"; if packet_length_counter_out = "000000000010" then state_in <= TAIL_FLIT; else state_in <= BODY_FLIT; end if; else state_in <= BODY_FLIT; end if; when TAIL_FLIT => if credit_counter_out /= "00" and P2N_empty = '0' then grant <= '1'; TX <= "100" & FIFO_Data_out(27 downto 0) & XOR_REDUCE("100" & FIFO_Data_out(27 downto 0)); packet_counter_in <= packet_counter_out +1; state_in <= IDLE; else state_in <= TAIL_FLIT; end if; -- SHMU stuff ---------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------ when DIAGNOSIS_HEADER => if credit_counter_out /= "00" then grant <= '1'; TX <= "001" & "000000000011" & "0000" & std_logic_vector(to_unsigned(current_address, 4)) & packet_counter_out & XOR_REDUCE("001" & "000000000011" & "0000" & std_logic_vector(to_unsigned(current_address, 4)) & packet_counter_out); state_in <= DIAGNOSIS_BODY; else state_in <= DIAGNOSIS_HEADER; end if; when DIAGNOSIS_BODY => if credit_counter_out /= "00" then grant <= '1'; --FD (Fault Diagnosis) : 01000110 01000100 -- fault info is 13 bits TX <= "010" & "0100011001000100" & fault_info(11 downto 0) & XOR_REDUCE("010" & "0100011001000100" & fault_info(11 downto 0)); state_in <= DIAGNOSIS_TAIL; else state_in <= DIAGNOSIS_BODY; end if; when DIAGNOSIS_TAIL => if credit_counter_out /= "00" then grant <= '1'; TX <= "100" & fault_info(12) & "000000000000000000000000000" & XOR_REDUCE("100" & fault_info(12) & "000000000000000000000000000"); state_in <= IDLE; sent_info <= '1'; packet_counter_in <= packet_counter_out +1; else state_in <= DIAGNOSIS_TAIL; end if; when others => state_in <= IDLE; end case ; end procesS; valid_out <= grant; ---------------------------------------------------------------------------------------- --below this is code for communication from NoC 2 PE process(RX, N2P_FIFO_write_pointer, N2P_FIFO_MEM_1, N2P_FIFO_MEM_2, N2P_FIFO_MEM_3, N2P_FIFO_MEM_4)begin case( N2P_FIFO_write_pointer ) is when "0001" => N2P_FIFO_MEM_1_in <= RX; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; when "0010" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= RX; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; when "0100" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= RX; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; when "1000" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= RX; when others => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; end case ; end process; process(N2P_FIFO_read_pointer, N2P_FIFO_MEM_1, N2P_FIFO_MEM_2, N2P_FIFO_MEM_3, N2P_FIFO_MEM_4)begin case( N2P_FIFO_read_pointer ) is when "0001" => N2P_Data_out <= N2P_FIFO_MEM_1; when "0010" => N2P_Data_out <= N2P_FIFO_MEM_2; when "0100" => N2P_Data_out <= N2P_FIFO_MEM_3; when "1000" => N2P_Data_out <= N2P_FIFO_MEM_4; when others => N2P_Data_out <= N2P_FIFO_MEM_1; end case ; end process; process(address, write_byte_enable, N2P_empty)begin if address = reserved_address and write_byte_enable = "0000" and N2P_empty = '0' then N2P_read_en_in <= '1'; else N2P_read_en_in <= '0'; end if; end process; process(N2P_write_en, N2P_FIFO_write_pointer)begin if N2P_write_en = '1'then N2P_FIFO_write_pointer_in <= N2P_FIFO_write_pointer(2 downto 0)&N2P_FIFO_write_pointer(3); else N2P_FIFO_write_pointer_in <= N2P_FIFO_write_pointer; end if; end process; process(N2P_read_en, N2P_empty, N2P_FIFO_read_pointer)begin if (N2P_read_en = '1' and N2P_empty = '0') then N2P_FIFO_read_pointer_in <= N2P_FIFO_read_pointer(2 downto 0)&N2P_FIFO_read_pointer(3); else N2P_FIFO_read_pointer_in <= N2P_FIFO_read_pointer; end if; end process; process(N2P_full, valid_in) begin if (valid_in = '1' and N2P_full ='0') then N2P_write_en <= '1'; else N2P_write_en <= '0'; end if; end process; process(N2P_FIFO_write_pointer, N2P_FIFO_read_pointer) begin if N2P_FIFO_read_pointer = N2P_FIFO_write_pointer then N2P_empty <= '1'; else N2P_empty <= '0'; end if; if N2P_FIFO_write_pointer = N2P_FIFO_read_pointer(0)&N2P_FIFO_read_pointer(3 downto 1) then N2P_full <= '1'; else N2P_full <= '0'; end if; end process; process(N2P_read_en, N2P_Data_out, old_address, flag_register) begin if old_address = reserved_address and N2P_read_en = '1' then data_read <= N2P_Data_out; elsif old_address = flag_address then data_read <= flag_register; elsif old_address = counter_address then data_read <= "000000000000000000000000000000" & counter_register; elsif old_address = self_diagnosis_address then data_read <= self_diagnosis_reg_out; else data_read <= (others => 'U'); end if; end process; process(N2P_write_en, N2P_read_en, RX, N2P_Data_out)begin counter_register_in <= counter_register; if N2P_write_en = '1' and RX(31 downto 29) = "001" and N2P_read_en = '1' and N2P_Data_out(31 downto 29) = "100" then counter_register_in <= counter_register; elsif N2P_write_en = '1' and RX(31 downto 29) = "001" then counter_register_in <= counter_register +1; elsif N2P_read_en = '1' and N2P_Data_out(31 downto 29) = "100" then counter_register_in <= counter_register -1; end if; end process; flag_register_in <= N2P_empty & P2N_full & self_diagnosis_flag& "00000000000000000000000000000"; --NI_read_flag <= N2P_empty; --NI_write_flag <= P2N_full; irq_out <= '0'; end; --architecture logic
gpl-3.0
38c0e3845bebdba6cf221a5ed22ba6fd
0.580234
3.110777
false
false
false
false
SKravitsky/ECEC412
MUX4Way.vhd
1
580
library ieee; use ieee.std_logic_1164.all; entity MUX4Way is port( v, w, x, y: in std_logic_vector(31 downto 0); sel: in std_logic_vector(1 downto 0); z: out std_logic_vector(31 downto 0) ); end MUX4Way; architecture Structural of MUX4Way is begin process(v, w, x, y, sel) begin case sel is when "00" => z <= v; when "01" => z <= w; when "10" => z <= x; when "11" => z <= y; when others => z <= X"00000000"; end case; end process; end Structural;
apache-2.0
e04126f08cdf7ef78dde5e6730e587f9
0.505172
3.169399
false
false
false
false
SKravitsky/ECEC412
RegistersPipeline.vhd
1
1,846
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity RegistersPipeline is port( RR1, RR2, WR: in std_logic_vector(4 downto 0); WD: in std_logic_vector(31 downto 0); RegWrite: in std_logic; RD1, RD2: out std_logic_vector(31 downto 0) ); end RegistersPipeline; Architecture Structural of RegistersPipeline is type mem_array is array(0 to 31) of std_logic_vector(31 downto 0); signal reg_mem: mem_array := ( X"00000000", --0 $zero (constant value 0) X"00000000", -- $at (reserved for the assembler) X"00000000", -- $v0 (value for results and expression) X"00000000", -- $v1 X"00000000", -- $a0 (arguments) X"00000000", --5 $a1 X"00000000", -- $a2 X"00000000", -- $a3 X"00000000", -- $t0 (temporaries) X"00000004", -- $t1 X"00000004", --10 $t2 X"00000000", -- $t3 X"00000000", -- $t4 X"00000000", -- $t5 X"00000000", -- $t6 X"00000000", --15 $t7 X"00000000", -- $s0 (saved) X"00000000", -- $s1 X"00000000", -- $s2 X"00000000", -- $s3 X"0000000E", --20 $s4 X"00000005", -- $s5 X"00000008", -- $s6 X"00000003", -- $s7 X"00000000", -- $t8 (more temporaries) X"00000000", --25 $t9 X"00000000", -- $k0 (reserved for the operating system) X"00000000", -- $k1 X"00000000", -- $gp (global pointer) X"00000000", -- $sp (stack pointer) X"00000000", --30 $fp (frame pointer) X"00000000" -- $ra (return address) ); signal temp_data: std_logic_vector(31 downto 0) := X"00000000"; begin RD1 <= reg_mem(to_integer(unsigned(RR1))); RD2 <= reg_mem(to_integer(unsigned(RR2))); process(WD, WR, RegWrite) begin if RegWrite = '1' then reg_mem(to_integer(unsigned(WR))) <= WD; end if; end process; end Structural;
apache-2.0
b32618fbeb96004541783d227e09f2d0
0.582882
2.9536
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/With_checkers/allocator_with_checkers.vhd
6
128,714
--Copyright (C) 2016 Siavoosh Payandeh Azad Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity allocator is port ( reset: in std_logic; clk: in std_logic; -- flow control credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; req_N_N, req_N_E, req_N_W, req_N_S, req_N_L: in std_logic; req_E_N, req_E_E, req_E_W, req_E_S, req_E_L: in std_logic; req_W_N, req_W_E, req_W_W, req_W_S, req_W_L: in std_logic; req_S_N, req_S_E, req_S_W, req_S_S, req_S_L: in std_logic; req_L_N, req_L_E, req_L_W, req_L_S, req_L_L: in std_logic; empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! valid_N, valid_E, valid_W, valid_S, valid_L : out std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: out std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: out std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: out std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: out std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: out std_logic; -- Allocator logic checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match, -- Allocator credit counter logic checker outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_N_credit_counter_N_out_increment, err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change, err_grant_N_credit_counter_N_out_decrement, err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change, err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_E_credit_counter_E_out_increment, err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change, err_grant_E_credit_counter_E_out_decrement, err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change, err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_W_credit_counter_W_out_increment, err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change, err_grant_W_credit_counter_W_out_decrement, err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change, err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_S_credit_counter_S_out_increment, err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change, err_grant_S_credit_counter_S_out_decrement, err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change, err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal, err_credit_in_L_credit_counter_L_out_increment, err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change, err_grant_L_credit_counter_L_out_decrement, err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change, err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal, -- Arbiter_in checker outputs -- North Arbiter_in checker outputs N_err_Requests_state_in_state_not_equal, N_err_IDLE_Req_N, N_err_IDLE_grant_N, N_err_North_Req_N, N_err_North_grant_N, N_err_East_Req_E, N_err_East_grant_E, N_err_West_Req_W, N_err_West_grant_W, N_err_South_Req_S, N_err_South_grant_S, N_err_Local_Req_L, N_err_Local_grant_L, N_err_IDLE_Req_E, N_err_IDLE_grant_E, N_err_North_Req_E, N_err_North_grant_E, N_err_East_Req_W, N_err_East_grant_W, N_err_West_Req_S, N_err_West_grant_S, N_err_South_Req_L, N_err_South_grant_L, N_err_Local_Req_N, N_err_Local_grant_N, N_err_IDLE_Req_W, N_err_IDLE_grant_W, N_err_North_Req_W, N_err_North_grant_W, N_err_East_Req_S, N_err_East_grant_S, N_err_West_Req_L, N_err_West_grant_L, N_err_South_Req_N, N_err_South_grant_N, N_err_Local_Req_E, N_err_Local_grant_E, N_err_IDLE_Req_S, N_err_IDLE_grant_S, N_err_North_Req_S, N_err_North_grant_S, N_err_East_Req_L, N_err_East_grant_L, N_err_West_Req_N, N_err_West_grant_N, N_err_South_Req_E, N_err_South_grant_E, N_err_Local_Req_W, N_err_Local_grant_W, N_err_IDLE_Req_L, N_err_IDLE_grant_L, N_err_North_Req_L, N_err_North_grant_L, N_err_East_Req_N, N_err_East_grant_N, N_err_West_Req_E, N_err_West_grant_E, N_err_South_Req_W, N_err_South_grant_W, N_err_Local_Req_S, N_err_Local_grant_S, N_err_state_in_onehot, N_err_no_request_grants, N_err_request_no_grants, N_err_no_Req_N_grant_N, N_err_no_Req_E_grant_E, N_err_no_Req_W_grant_W, N_err_no_Req_S_grant_S, N_err_no_Req_L_grant_L, -- East Arbiter_in checker outputs E_err_Requests_state_in_state_not_equal, E_err_IDLE_Req_N, E_err_IDLE_grant_N, E_err_North_Req_N, E_err_North_grant_N, E_err_East_Req_E, E_err_East_grant_E, E_err_West_Req_W, E_err_West_grant_W, E_err_South_Req_S, E_err_South_grant_S, E_err_Local_Req_L, E_err_Local_grant_L, E_err_IDLE_Req_E, E_err_IDLE_grant_E, E_err_North_Req_E, E_err_North_grant_E, E_err_East_Req_W, E_err_East_grant_W, E_err_West_Req_S, E_err_West_grant_S, E_err_South_Req_L, E_err_South_grant_L, E_err_Local_Req_N, E_err_Local_grant_N, E_err_IDLE_Req_W, E_err_IDLE_grant_W, E_err_North_Req_W, E_err_North_grant_W, E_err_East_Req_S, E_err_East_grant_S, E_err_West_Req_L, E_err_West_grant_L, E_err_South_Req_N, E_err_South_grant_N, E_err_Local_Req_E, E_err_Local_grant_E, E_err_IDLE_Req_S, E_err_IDLE_grant_S, E_err_North_Req_S, E_err_North_grant_S, E_err_East_Req_L, E_err_East_grant_L, E_err_West_Req_N, E_err_West_grant_N, E_err_South_Req_E, E_err_South_grant_E, E_err_Local_Req_W, E_err_Local_grant_W, E_err_IDLE_Req_L, E_err_IDLE_grant_L, E_err_North_Req_L, E_err_North_grant_L, E_err_East_Req_N, E_err_East_grant_N, E_err_West_Req_E, E_err_West_grant_E, E_err_South_Req_W, E_err_South_grant_W, E_err_Local_Req_S, E_err_Local_grant_S, E_err_state_in_onehot, E_err_no_request_grants, E_err_request_no_grants, E_err_no_Req_N_grant_N, E_err_no_Req_E_grant_E, E_err_no_Req_W_grant_W, E_err_no_Req_S_grant_S, E_err_no_Req_L_grant_L, -- West Arbiter_in checker outputs W_err_Requests_state_in_state_not_equal, W_err_IDLE_Req_N, W_err_IDLE_grant_N, W_err_North_Req_N, W_err_North_grant_N, W_err_East_Req_E, W_err_East_grant_E, W_err_West_Req_W, W_err_West_grant_W, W_err_South_Req_S, W_err_South_grant_S, W_err_Local_Req_L, W_err_Local_grant_L, W_err_IDLE_Req_E, W_err_IDLE_grant_E, W_err_North_Req_E, W_err_North_grant_E, W_err_East_Req_W, W_err_East_grant_W, W_err_West_Req_S, W_err_West_grant_S, W_err_South_Req_L, W_err_South_grant_L, W_err_Local_Req_N, W_err_Local_grant_N, W_err_IDLE_Req_W, W_err_IDLE_grant_W, W_err_North_Req_W, W_err_North_grant_W, W_err_East_Req_S, W_err_East_grant_S, W_err_West_Req_L, W_err_West_grant_L, W_err_South_Req_N, W_err_South_grant_N, W_err_Local_Req_E, W_err_Local_grant_E, W_err_IDLE_Req_S, W_err_IDLE_grant_S, W_err_North_Req_S, W_err_North_grant_S, W_err_East_Req_L, W_err_East_grant_L, W_err_West_Req_N, W_err_West_grant_N, W_err_South_Req_E, W_err_South_grant_E, W_err_Local_Req_W, W_err_Local_grant_W, W_err_IDLE_Req_L, W_err_IDLE_grant_L, W_err_North_Req_L, W_err_North_grant_L, W_err_East_Req_N, W_err_East_grant_N, W_err_West_Req_E, W_err_West_grant_E, W_err_South_Req_W, W_err_South_grant_W, W_err_Local_Req_S, W_err_Local_grant_S, W_err_state_in_onehot, W_err_no_request_grants, W_err_request_no_grants, W_err_no_Req_N_grant_N, W_err_no_Req_E_grant_E, W_err_no_Req_W_grant_W, W_err_no_Req_S_grant_S, W_err_no_Req_L_grant_L, -- South Arbiter_in checker outputs S_err_Requests_state_in_state_not_equal, S_err_IDLE_Req_N, S_err_IDLE_grant_N, S_err_North_Req_N, S_err_North_grant_N, S_err_East_Req_E, S_err_East_grant_E, S_err_West_Req_W, S_err_West_grant_W, S_err_South_Req_S, S_err_South_grant_S, S_err_Local_Req_L, S_err_Local_grant_L, S_err_IDLE_Req_E, S_err_IDLE_grant_E, S_err_North_Req_E, S_err_North_grant_E, S_err_East_Req_W, S_err_East_grant_W, S_err_West_Req_S, S_err_West_grant_S, S_err_South_Req_L, S_err_South_grant_L, S_err_Local_Req_N, S_err_Local_grant_N, S_err_IDLE_Req_W, S_err_IDLE_grant_W, S_err_North_Req_W, S_err_North_grant_W, S_err_East_Req_S, S_err_East_grant_S, S_err_West_Req_L, S_err_West_grant_L, S_err_South_Req_N, S_err_South_grant_N, S_err_Local_Req_E, S_err_Local_grant_E, S_err_IDLE_Req_S, S_err_IDLE_grant_S, S_err_North_Req_S, S_err_North_grant_S, S_err_East_Req_L, S_err_East_grant_L, S_err_West_Req_N, S_err_West_grant_N, S_err_South_Req_E, S_err_South_grant_E, S_err_Local_Req_W, S_err_Local_grant_W, S_err_IDLE_Req_L, S_err_IDLE_grant_L, S_err_North_Req_L, S_err_North_grant_L, S_err_East_Req_N, S_err_East_grant_N, S_err_West_Req_E, S_err_West_grant_E, S_err_South_Req_W, S_err_South_grant_W, S_err_Local_Req_S, S_err_Local_grant_S, S_err_state_in_onehot, S_err_no_request_grants, S_err_request_no_grants, S_err_no_Req_N_grant_N, S_err_no_Req_E_grant_E, S_err_no_Req_W_grant_W, S_err_no_Req_S_grant_S, S_err_no_Req_L_grant_L, -- Local Arbiter_in checker outputs L_err_Requests_state_in_state_not_equal, L_err_IDLE_Req_N, L_err_IDLE_grant_N, L_err_North_Req_N, L_err_North_grant_N, L_err_East_Req_E, L_err_East_grant_E, L_err_West_Req_W, L_err_West_grant_W, L_err_South_Req_S, L_err_South_grant_S, L_err_Local_Req_L, L_err_Local_grant_L, L_err_IDLE_Req_E, L_err_IDLE_grant_E, L_err_North_Req_E, L_err_North_grant_E, L_err_East_Req_W, L_err_East_grant_W, L_err_West_Req_S, L_err_West_grant_S, L_err_South_Req_L, L_err_South_grant_L, L_err_Local_Req_N, L_err_Local_grant_N, L_err_IDLE_Req_W, L_err_IDLE_grant_W, L_err_North_Req_W, L_err_North_grant_W, L_err_East_Req_S, L_err_East_grant_S, L_err_West_Req_L, L_err_West_grant_L, L_err_South_Req_N, L_err_South_grant_N, L_err_Local_Req_E, L_err_Local_grant_E, L_err_IDLE_Req_S, L_err_IDLE_grant_S, L_err_North_Req_S, L_err_North_grant_S, L_err_East_Req_L, L_err_East_grant_L, L_err_West_Req_N, L_err_West_grant_N, L_err_South_Req_E, L_err_South_grant_E, L_err_Local_Req_W, L_err_Local_grant_W, L_err_IDLE_Req_L, L_err_IDLE_grant_L, L_err_North_Req_L, L_err_North_grant_L, L_err_East_Req_N, L_err_East_grant_N, L_err_West_Req_E, L_err_West_grant_E, L_err_South_Req_W, L_err_South_grant_W, L_err_Local_Req_S, L_err_Local_grant_S, L_err_state_in_onehot, L_err_no_request_grants, L_err_request_no_grants, L_err_no_Req_N_grant_N, L_err_no_Req_E_grant_E, L_err_no_Req_W_grant_W, L_err_no_Req_S_grant_S, L_err_no_Req_L_grant_L, -- Arbiter_out checker outputs -- North Arbiter_out checker outputs N_arbiter_out_err_Requests_state_in_state_not_equal, N_err_IDLE_req_X_N, N_err_North_req_X_N, N_err_North_credit_not_zero_req_X_N_grant_N, N_err_North_credit_zero_or_not_req_X_N_not_grant_N, N_err_East_req_X_E, N_err_East_credit_not_zero_req_X_E_grant_E, N_err_East_credit_zero_or_not_req_X_E_not_grant_E, N_err_West_req_X_W, N_err_West_credit_not_zero_req_X_W_grant_W, N_err_West_credit_zero_or_not_req_X_W_not_grant_W, N_err_South_req_X_S, N_err_South_credit_not_zero_req_X_S_grant_S, N_err_South_credit_zero_or_not_req_X_S_not_grant_S, N_err_Local_req_X_L, N_err_Local_credit_not_zero_req_X_L_grant_L, N_err_Local_credit_zero_or_not_req_X_L_not_grant_L, N_err_IDLE_req_X_E, N_err_North_req_X_E, N_err_East_req_X_W, N_err_West_req_X_S, N_err_South_req_X_L, N_err_Local_req_X_N, N_err_IDLE_req_X_W, N_err_North_req_X_W, N_err_East_req_X_S, N_err_West_req_X_L, N_err_South_req_X_N, N_err_Local_req_X_E, N_err_IDLE_req_X_S, N_err_North_req_X_S, N_err_East_req_X_L, N_err_West_req_X_N, N_err_South_req_X_E, N_err_Local_req_X_W, N_err_IDLE_req_X_L, N_err_North_req_X_L, N_err_East_req_X_N, N_err_West_req_X_E, N_err_South_req_X_W, N_err_Local_req_X_S, N_arbiter_out_err_state_in_onehot, N_arbiter_out_err_no_request_grants, N_err_request_IDLE_state, N_err_request_IDLE_not_Grants, N_err_state_North_Invalid_Grant, N_err_state_East_Invalid_Grant, N_err_state_West_Invalid_Grant, N_err_state_South_Invalid_Grant, N_err_state_Local_Invalid_Grant, N_err_Grants_onehot_or_all_zero, -- East Arbiter_out checker outputs E_arbiter_out_err_Requests_state_in_state_not_equal, E_err_IDLE_req_X_N, E_err_North_req_X_N, E_err_North_credit_not_zero_req_X_N_grant_N, E_err_North_credit_zero_or_not_req_X_N_not_grant_N, E_err_East_req_X_E, E_err_East_credit_not_zero_req_X_E_grant_E, E_err_East_credit_zero_or_not_req_X_E_not_grant_E, E_err_West_req_X_W, E_err_West_credit_not_zero_req_X_W_grant_W, E_err_West_credit_zero_or_not_req_X_W_not_grant_W, E_err_South_req_X_S, E_err_South_credit_not_zero_req_X_S_grant_S, E_err_South_credit_zero_or_not_req_X_S_not_grant_S, E_err_Local_req_X_L, E_err_Local_credit_not_zero_req_X_L_grant_L, E_err_Local_credit_zero_or_not_req_X_L_not_grant_L, E_err_IDLE_req_X_E, E_err_North_req_X_E, E_err_East_req_X_W, E_err_West_req_X_S, E_err_South_req_X_L, E_err_Local_req_X_N, E_err_IDLE_req_X_W, E_err_North_req_X_W, E_err_East_req_X_S, E_err_West_req_X_L, E_err_South_req_X_N, E_err_Local_req_X_E, E_err_IDLE_req_X_S, E_err_North_req_X_S, E_err_East_req_X_L, E_err_West_req_X_N, E_err_South_req_X_E, E_err_Local_req_X_W, E_err_IDLE_req_X_L, E_err_North_req_X_L, E_err_East_req_X_N, E_err_West_req_X_E, E_err_South_req_X_W, E_err_Local_req_X_S, E_arbiter_out_err_state_in_onehot, E_arbiter_out_err_no_request_grants, E_err_request_IDLE_state, E_err_request_IDLE_not_Grants, E_err_state_North_Invalid_Grant, E_err_state_East_Invalid_Grant, E_err_state_West_Invalid_Grant, E_err_state_South_Invalid_Grant, E_err_state_Local_Invalid_Grant, E_err_Grants_onehot_or_all_zero, -- West Arbiter_out checker outputs W_arbiter_out_err_Requests_state_in_state_not_equal, W_err_IDLE_req_X_N, W_err_North_req_X_N, W_err_North_credit_not_zero_req_X_N_grant_N, W_err_North_credit_zero_or_not_req_X_N_not_grant_N, W_err_East_req_X_E, W_err_East_credit_not_zero_req_X_E_grant_E, W_err_East_credit_zero_or_not_req_X_E_not_grant_E, W_err_West_req_X_W, W_err_West_credit_not_zero_req_X_W_grant_W, W_err_West_credit_zero_or_not_req_X_W_not_grant_W, W_err_South_req_X_S, W_err_South_credit_not_zero_req_X_S_grant_S, W_err_South_credit_zero_or_not_req_X_S_not_grant_S, W_err_Local_req_X_L, W_err_Local_credit_not_zero_req_X_L_grant_L, W_err_Local_credit_zero_or_not_req_X_L_not_grant_L, W_err_IDLE_req_X_E, W_err_North_req_X_E, W_err_East_req_X_W, W_err_West_req_X_S, W_err_South_req_X_L, W_err_Local_req_X_N, W_err_IDLE_req_X_W, W_err_North_req_X_W, W_err_East_req_X_S, W_err_West_req_X_L, W_err_South_req_X_N, W_err_Local_req_X_E, W_err_IDLE_req_X_S, W_err_North_req_X_S, W_err_East_req_X_L, W_err_West_req_X_N, W_err_South_req_X_E, W_err_Local_req_X_W, W_err_IDLE_req_X_L, W_err_North_req_X_L, W_err_East_req_X_N, W_err_West_req_X_E, W_err_South_req_X_W, W_err_Local_req_X_S, W_arbiter_out_err_state_in_onehot, W_arbiter_out_err_no_request_grants, W_err_request_IDLE_state, W_err_request_IDLE_not_Grants, W_err_state_North_Invalid_Grant, W_err_state_East_Invalid_Grant, W_err_state_West_Invalid_Grant, W_err_state_South_Invalid_Grant, W_err_state_Local_Invalid_Grant, W_err_Grants_onehot_or_all_zero, -- South Arbiter_out checker outputs S_arbiter_out_err_Requests_state_in_state_not_equal, S_err_IDLE_req_X_N, S_err_North_req_X_N, S_err_North_credit_not_zero_req_X_N_grant_N, S_err_North_credit_zero_or_not_req_X_N_not_grant_N, S_err_East_req_X_E, S_err_East_credit_not_zero_req_X_E_grant_E, S_err_East_credit_zero_or_not_req_X_E_not_grant_E, S_err_West_req_X_W, S_err_West_credit_not_zero_req_X_W_grant_W, S_err_West_credit_zero_or_not_req_X_W_not_grant_W, S_err_South_req_X_S, S_err_South_credit_not_zero_req_X_S_grant_S, S_err_South_credit_zero_or_not_req_X_S_not_grant_S, S_err_Local_req_X_L, S_err_Local_credit_not_zero_req_X_L_grant_L, S_err_Local_credit_zero_or_not_req_X_L_not_grant_L, S_err_IDLE_req_X_E, S_err_North_req_X_E, S_err_East_req_X_W, S_err_West_req_X_S, S_err_South_req_X_L, S_err_Local_req_X_N, S_err_IDLE_req_X_W, S_err_North_req_X_W, S_err_East_req_X_S, S_err_West_req_X_L, S_err_South_req_X_N, S_err_Local_req_X_E, S_err_IDLE_req_X_S, S_err_North_req_X_S, S_err_East_req_X_L, S_err_West_req_X_N, S_err_South_req_X_E, S_err_Local_req_X_W, S_err_IDLE_req_X_L, S_err_North_req_X_L, S_err_East_req_X_N, S_err_West_req_X_E, S_err_South_req_X_W, S_err_Local_req_X_S, S_arbiter_out_err_state_in_onehot, S_arbiter_out_err_no_request_grants, S_err_request_IDLE_state, S_err_request_IDLE_not_Grants, S_err_state_North_Invalid_Grant, S_err_state_East_Invalid_Grant, S_err_state_West_Invalid_Grant, S_err_state_South_Invalid_Grant, S_err_state_Local_Invalid_Grant, S_err_Grants_onehot_or_all_zero, -- Local Arbiter_out checker outputs L_arbiter_out_err_Requests_state_in_state_not_equal, L_err_IDLE_req_X_N, L_err_North_req_X_N, L_err_North_credit_not_zero_req_X_N_grant_N, L_err_North_credit_zero_or_not_req_X_N_not_grant_N, L_err_East_req_X_E, L_err_East_credit_not_zero_req_X_E_grant_E, L_err_East_credit_zero_or_not_req_X_E_not_grant_E, L_err_West_req_X_W, L_err_West_credit_not_zero_req_X_W_grant_W, L_err_West_credit_zero_or_not_req_X_W_not_grant_W, L_err_South_req_X_S, L_err_South_credit_not_zero_req_X_S_grant_S, L_err_South_credit_zero_or_not_req_X_S_not_grant_S, L_err_Local_req_X_L, L_err_Local_credit_not_zero_req_X_L_grant_L, L_err_Local_credit_zero_or_not_req_X_L_not_grant_L, L_err_IDLE_req_X_E, L_err_North_req_X_E, L_err_East_req_X_W, L_err_West_req_X_S, L_err_South_req_X_L, L_err_Local_req_X_N, L_err_IDLE_req_X_W, L_err_North_req_X_W, L_err_East_req_X_S, L_err_West_req_X_L, L_err_South_req_X_N, L_err_Local_req_X_E, L_err_IDLE_req_X_S, L_err_North_req_X_S, L_err_East_req_X_L, L_err_West_req_X_N, L_err_South_req_X_E, L_err_Local_req_X_W, L_err_IDLE_req_X_L, L_err_North_req_X_L, L_err_East_req_X_N, L_err_West_req_X_E, L_err_South_req_X_W, L_err_Local_req_X_S, L_arbiter_out_err_state_in_onehot, L_arbiter_out_err_no_request_grants, L_err_request_IDLE_state, L_err_request_IDLE_not_Grants, L_err_state_North_Invalid_Grant, L_err_state_East_Invalid_Grant, L_err_state_West_Invalid_Grant, L_err_state_South_Invalid_Grant, L_err_state_Local_Invalid_Grant, L_err_Grants_onehot_or_all_zero : out std_logic ); end allocator; architecture behavior of allocator is -- so the idea is that we should have counters that keep track of credit! signal credit_counter_N_in, credit_counter_N_out: std_logic_vector(1 downto 0); signal credit_counter_E_in, credit_counter_E_out: std_logic_vector(1 downto 0); signal credit_counter_W_in, credit_counter_W_out: std_logic_vector(1 downto 0); signal credit_counter_S_in, credit_counter_S_out: std_logic_vector(1 downto 0); signal credit_counter_L_in, credit_counter_L_out: std_logic_vector(1 downto 0); signal grant_N, grant_E, grant_W, grant_S, grant_L: std_logic; signal X_N_N, X_N_E, X_N_W, X_N_S, X_N_L: std_logic; signal X_E_N, X_E_E, X_E_W, X_E_S, X_E_L: std_logic; signal X_W_N, X_W_E, X_W_W, X_W_S, X_W_L: std_logic; signal X_S_N, X_S_E, X_S_W, X_S_S, X_S_L: std_logic; signal X_L_N, X_L_E, X_L_W, X_L_S, X_L_L: std_logic; signal grant_N_N_sig, grant_N_E_sig, grant_N_W_sig, grant_N_S_sig, grant_N_L_sig: std_logic; signal grant_E_N_sig, grant_E_E_sig, grant_E_W_sig, grant_E_S_sig, grant_E_L_sig: std_logic; signal grant_W_N_sig, grant_W_E_sig, grant_W_W_sig, grant_W_S_sig, grant_W_L_sig: std_logic; signal grant_S_N_sig, grant_S_E_sig, grant_S_W_sig, grant_S_S_sig, grant_S_L_sig: std_logic; signal grant_L_N_sig, grant_L_E_sig, grant_L_W_sig, grant_L_S_sig, grant_L_L_sig: std_logic; signal valid_N_sig, valid_E_sig, valid_W_sig, valid_S_sig, valid_L_sig : std_logic; signal grant_N_N_signal, grant_N_E_signal, grant_N_W_signal, grant_N_S_signal, grant_N_L_signal: std_logic; signal grant_E_N_signal, grant_E_E_signal, grant_E_W_signal, grant_E_S_signal, grant_E_L_signal: std_logic; signal grant_W_N_signal, grant_W_E_signal, grant_W_W_signal, grant_W_S_signal, grant_W_L_signal: std_logic; signal grant_S_N_signal, grant_S_E_signal, grant_S_W_signal, grant_S_S_signal, grant_S_L_signal: std_logic; signal grant_L_N_signal, grant_L_E_signal, grant_L_W_signal, grant_L_S_signal, grant_L_L_signal: std_logic; -- Allocator logic checker outputs and allocator credit counter logic checker outputs go directly to the output interface of Allocator component Arbiter_in is port ( reset: in std_logic; clk: in std_logic; Req_X_N, Req_X_E, Req_X_W, Req_X_S, Req_X_L: in std_logic; -- From LBDR modules X_N, X_E, X_W, X_S, X_L: out std_logic; -- Grants given to LBDR requests (encoded as one-hot) -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_Req_N, err_IDLE_grant_N, err_North_Req_N, err_North_grant_N, err_East_Req_E, err_East_grant_E, err_West_Req_W, err_West_grant_W, err_South_Req_S, err_South_grant_S, err_Local_Req_L, err_Local_grant_L, err_IDLE_Req_E, err_IDLE_grant_E, err_North_Req_E, err_North_grant_E, err_East_Req_W, err_East_grant_W, err_West_Req_S, err_West_grant_S, err_South_Req_L, err_South_grant_L, err_Local_Req_N, err_Local_grant_N, err_IDLE_Req_W, err_IDLE_grant_W, err_North_Req_W, err_North_grant_W, err_East_Req_S, err_East_grant_S, err_West_Req_L, err_West_grant_L, err_South_Req_N, err_South_grant_N, err_Local_Req_E, err_Local_grant_E, err_IDLE_Req_S, err_IDLE_grant_S, err_North_Req_S, err_North_grant_S, err_East_Req_L, err_East_grant_L, err_West_Req_N, err_West_grant_N, err_South_Req_E, err_South_grant_E, err_Local_Req_W, err_Local_grant_W, err_IDLE_Req_L, err_IDLE_grant_L, err_North_Req_L, err_North_grant_L, err_East_Req_N, err_East_grant_N, err_West_Req_E, err_West_grant_E, err_South_Req_W, err_South_grant_W, err_Local_Req_S, err_Local_grant_S, err_state_in_onehot, err_no_request_grants, err_request_no_grants, err_no_Req_N_grant_N, err_no_Req_E_grant_E, err_no_Req_W_grant_W, err_no_Req_S_grant_S, err_no_Req_L_grant_L : out std_logic ); end component; component arbiter_out is port ( reset: in std_logic; clk: in std_logic; X_N_Y, X_E_Y, X_W_Y, X_S_Y, X_L_Y:in std_logic; -- From LBDR modules credit: in std_logic_vector(1 downto 0); grant_Y_N, grant_Y_E, grant_Y_W, grant_Y_S, grant_Y_L :out std_logic; -- Grants given to LBDR requests (encoded as one-hot) -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_req_X_N, err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E, err_North_req_X_E, err_East_req_X_W, err_West_req_X_S, err_South_req_X_L, err_Local_req_X_N, err_IDLE_req_X_W, err_North_req_X_W, err_East_req_X_S, err_West_req_X_L, err_South_req_X_N, err_Local_req_X_E, err_IDLE_req_X_S, err_North_req_X_S, err_East_req_X_L, err_West_req_X_N, err_South_req_X_E, err_Local_req_X_W, err_IDLE_req_X_L, err_North_req_X_L, err_East_req_X_N, err_West_req_X_E, err_South_req_X_W, err_Local_req_X_S, err_state_in_onehot, err_no_request_grants, err_request_IDLE_state, err_request_IDLE_not_Grants, err_state_North_Invalid_Grant, err_state_East_Invalid_Grant, err_state_West_Invalid_Grant, err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero : out std_logic ); end component; -- Checker modules component allocator_logic_pseudo_checkers is port ( -- grant_X_Y means the grant for X output port towards Y input port -- this means for any X in [N, E, W, S, L] then set grant_X_Y is one hot! empty_N, empty_E, empty_W, empty_S, empty_L: in std_logic; grant_N_N_sig, grant_N_E_sig, grant_N_W_sig, grant_N_S_sig, grant_N_L_sig: in std_logic; grant_E_N_sig, grant_E_E_sig, grant_E_W_sig, grant_E_S_sig, grant_E_L_sig: in std_logic; grant_W_N_sig, grant_W_E_sig, grant_W_W_sig, grant_W_S_sig, grant_W_L_sig: in std_logic; grant_S_N_sig, grant_S_E_sig, grant_S_W_sig, grant_S_S_sig, grant_S_L_sig: in std_logic; grant_L_N_sig, grant_L_E_sig, grant_L_W_sig, grant_L_S_sig, grant_L_L_sig: in std_logic; valid_N, valid_E, valid_W, valid_S, valid_L : in std_logic; grant_N_N, grant_N_E, grant_N_W, grant_N_S, grant_N_L: in std_logic; grant_E_N, grant_E_E, grant_E_W, grant_E_S, grant_E_L: in std_logic; grant_W_N, grant_W_E, grant_W_W, grant_W_S, grant_W_L: in std_logic; grant_S_N, grant_S_E, grant_S_W, grant_S_S, grant_S_L: in std_logic; grant_L_N, grant_L_E, grant_L_W, grant_L_S, grant_L_L: in std_logic; grant_N, grant_E, grant_W, grant_S, grant_L : in std_logic; -- Checker outputs err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N, err_not_grant_signals_empty_not_grant_N, err_grant_signals_not_empty_grant_E, err_not_grant_signals_empty_not_grant_E, err_grant_signals_not_empty_grant_W, err_not_grant_signals_empty_not_grant_W, err_grant_signals_not_empty_grant_S, err_not_grant_signals_empty_not_grant_S, err_grant_signals_not_empty_grant_L, err_not_grant_signals_empty_not_grant_L, err_grants_valid_not_match : out std_logic ); end component; component allocator_credit_counter_logic_pseudo_checkers is port ( -- flow control credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L: in std_logic; credit_counter_N_out, credit_counter_E_out, credit_counter_W_out, credit_counter_S_out, credit_counter_L_out : in std_logic_vector(1 downto 0); valid_N, valid_E, valid_W, valid_S, valid_L: in std_logic; -- ?? Not sure yet ! grant or valid ! credit_counter_N_in, credit_counter_E_in, credit_counter_W_in, credit_counter_S_in, credit_counter_L_in : in std_logic_vector(1 downto 0); -- Checker outputs -- Not complete yet ! err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_N_credit_counter_N_out_increment, err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change, err_grant_N_credit_counter_N_out_decrement, err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change, err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_E_credit_counter_E_out_increment, err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change, err_grant_E_credit_counter_E_out_decrement, err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change, err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_W_credit_counter_W_out_increment, err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change, err_grant_W_credit_counter_W_out_decrement, err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change, err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_S_credit_counter_S_out_increment, err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change, err_grant_S_credit_counter_S_out_decrement, err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change, err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal, err_credit_in_L_credit_counter_L_out_increment, err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change, err_grant_L_credit_counter_L_out_decrement, err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change, err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal : out std_logic ); end component; begin -- sequential part process(clk, reset) begin if reset = '0' then -- we start with all full cradit credit_counter_N_out <= (others=>'1'); credit_counter_E_out <= (others=>'1'); credit_counter_W_out <= (others=>'1'); credit_counter_S_out <= (others=>'1'); credit_counter_L_out <= (others=>'1'); elsif clk'event and clk = '1' then credit_counter_N_out <= credit_counter_N_in; credit_counter_E_out <= credit_counter_E_in; credit_counter_W_out <= credit_counter_W_in; credit_counter_S_out <= credit_counter_S_in; credit_counter_L_out <= credit_counter_L_in; end if; end process; -- The combionational part -- We did this because of the checkers valid_N <= valid_N_sig; valid_E <= valid_E_sig; valid_W <= valid_W_sig; valid_S <= valid_S_sig; valid_L <= valid_L_sig; grant_N_N <= grant_N_N_signal; grant_E_N <= grant_E_N_signal; grant_W_N <= grant_W_N_signal; grant_S_N <= grant_S_N_signal; grant_L_N <= grant_L_N_signal; grant_N_E <= grant_N_E_signal; grant_E_E <= grant_E_E_signal; grant_W_E <= grant_W_E_signal; grant_S_E <= grant_S_E_signal; grant_L_E <= grant_L_E_signal; grant_N_W <= grant_N_W_signal; grant_E_W <= grant_E_W_signal; grant_W_W <= grant_W_W_signal; grant_S_W <= grant_S_W_signal; grant_L_W <= grant_L_W_signal; grant_N_S <= grant_N_S_signal; grant_E_S <= grant_E_S_signal; grant_W_S <= grant_W_S_signal; grant_S_S <= grant_S_S_signal; grant_L_S <= grant_L_S_signal; grant_N_L <= grant_N_L_signal; grant_E_L <= grant_E_L_signal; grant_W_L <= grant_W_L_signal; grant_S_L <= grant_S_L_signal; grant_L_L <= grant_L_L_signal; -- Taking Arbiter_in checker outputs to outputs of Allocator grant_N_N_signal <= grant_N_N_sig and not empty_N; grant_N_E_signal <= grant_N_E_sig and not empty_E; grant_N_W_signal <= grant_N_W_sig and not empty_W; grant_N_S_signal <= grant_N_S_sig and not empty_S; grant_N_L_signal <= grant_N_L_sig and not empty_L; grant_E_N_signal <= grant_E_N_sig and not empty_N; grant_E_E_signal <= grant_E_E_sig and not empty_E; grant_E_W_signal <= grant_E_W_sig and not empty_W; grant_E_S_signal <= grant_E_S_sig and not empty_S; grant_E_L_signal <= grant_E_L_sig and not empty_L; grant_W_N_signal <= grant_W_N_sig and not empty_N; grant_W_E_signal <= grant_W_E_sig and not empty_E; grant_W_W_signal <= grant_W_W_sig and not empty_W; grant_W_S_signal <= grant_W_S_sig and not empty_S; grant_W_L_signal <= grant_W_L_sig and not empty_L; grant_S_N_signal <= grant_S_N_sig and not empty_N; grant_S_E_signal <= grant_S_E_sig and not empty_E; grant_S_W_signal <= grant_S_W_sig and not empty_W; grant_S_S_signal <= grant_S_S_sig and not empty_S; grant_S_L_signal <= grant_S_L_sig and not empty_L; grant_L_N_signal <= grant_L_N_sig and not empty_N; grant_L_E_signal <= grant_L_E_sig and not empty_E; grant_L_W_signal <= grant_L_W_sig and not empty_W; grant_L_S_signal <= grant_L_S_sig and not empty_S; grant_L_L_signal <= grant_L_L_sig and not empty_L; grant_N <= (grant_N_N_sig and not empty_N )or (grant_N_E_sig and not empty_E) or (grant_N_W_sig and not empty_W) or (grant_N_S_sig and not empty_S) or (grant_N_L_sig and not empty_L); grant_E <= (grant_E_N_sig and not empty_N )or (grant_E_E_sig and not empty_E) or (grant_E_W_sig and not empty_W) or (grant_E_S_sig and not empty_S) or (grant_E_L_sig and not empty_L); grant_W <= (grant_W_N_sig and not empty_N )or (grant_W_E_sig and not empty_E) or (grant_W_W_sig and not empty_W) or (grant_W_S_sig and not empty_S) or (grant_W_L_sig and not empty_L); grant_S <= (grant_S_N_sig and not empty_N )or (grant_S_E_sig and not empty_E) or (grant_S_W_sig and not empty_W) or (grant_S_S_sig and not empty_S) or (grant_S_L_sig and not empty_L); grant_L <= (grant_L_N_sig and not empty_N )or (grant_L_E_sig and not empty_E) or (grant_L_W_sig and not empty_W) or (grant_L_S_sig and not empty_S) or (grant_L_L_sig and not empty_L); -- this process handles the credit counters! process(credit_in_N, credit_in_E, credit_in_W, credit_in_S, credit_in_L, grant_N, grant_E, grant_W, grant_S, grant_L, credit_counter_N_out, credit_counter_E_out, credit_counter_W_out, credit_counter_S_out, credit_counter_L_out ) begin credit_counter_N_in <= credit_counter_N_out; credit_counter_E_in <= credit_counter_E_out; credit_counter_W_in <= credit_counter_W_out; credit_counter_S_in <= credit_counter_S_out; credit_counter_L_in <= credit_counter_L_out; if credit_in_N = '1' and grant_N = '1' then credit_counter_N_in <= credit_counter_N_out; elsif credit_in_N = '1' and credit_counter_N_out < 3 then credit_counter_N_in <= credit_counter_N_out + 1; elsif grant_N = '1' and credit_counter_N_out > 0 then credit_counter_N_in <= credit_counter_N_out - 1; end if; if credit_in_E = '1' and grant_E = '1' then credit_counter_E_in <= credit_counter_E_out; elsif credit_in_E = '1' and credit_counter_E_out < 3 then credit_counter_E_in <= credit_counter_E_out + 1; elsif grant_E = '1' and credit_counter_E_out > 0 then credit_counter_E_in <= credit_counter_E_out - 1; end if; if credit_in_W = '1' and grant_W = '1' then credit_counter_W_in <= credit_counter_W_out; elsif credit_in_W = '1' and credit_counter_W_out < 3 then credit_counter_W_in <= credit_counter_W_out + 1; elsif grant_W = '1' and credit_counter_W_out > 0 then credit_counter_W_in <= credit_counter_W_out - 1; end if; if credit_in_S = '1' and grant_S = '1' then credit_counter_S_in <= credit_counter_S_out; elsif credit_in_S = '1' and credit_counter_S_out < 3 then credit_counter_S_in <= credit_counter_S_out + 1; elsif grant_S = '1' and credit_counter_S_out > 0 then credit_counter_S_in <= credit_counter_S_out - 1; end if; if credit_in_L = '1' and grant_L = '1' then credit_counter_L_in <= credit_counter_L_out; elsif credit_in_L = '1' and credit_counter_L_out < 3 then credit_counter_L_in <= credit_counter_L_out + 1; elsif grant_L = '1' and credit_counter_L_out > 0 then credit_counter_L_in <= credit_counter_L_out - 1; end if; end process; --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Allocator logic checkers module instantiation ALLOCATOR_LOGIC_CHECKERS: allocator_logic_pseudo_checkers PORT MAP ( empty_N => empty_N, empty_E => empty_E, empty_W => empty_W, empty_S => empty_S, empty_L => empty_L, grant_N_N_sig => grant_N_N_sig, grant_N_E_sig => grant_N_E_sig, grant_N_W_sig => grant_N_W_sig, grant_N_S_sig => grant_N_S_sig, grant_N_L_sig => grant_N_L_sig, grant_E_N_sig => grant_E_N_sig, grant_E_E_sig => grant_E_E_sig, grant_E_W_sig => grant_E_W_sig, grant_E_S_sig => grant_E_S_sig, grant_E_L_sig => grant_E_L_sig, grant_W_N_sig => grant_W_N_sig, grant_W_E_sig => grant_W_E_sig, grant_W_W_sig => grant_W_W_sig, grant_W_S_sig => grant_W_S_sig, grant_W_L_sig => grant_W_L_sig, grant_S_N_sig => grant_S_N_sig, grant_S_E_sig => grant_S_E_sig, grant_S_W_sig => grant_S_W_sig, grant_S_S_sig => grant_S_S_sig, grant_S_L_sig => grant_S_L_sig, grant_L_N_sig => grant_L_N_sig, grant_L_E_sig => grant_L_E_sig, grant_L_W_sig => grant_L_W_sig, grant_L_S_sig => grant_L_S_sig, grant_L_L_sig => grant_L_L_sig, valid_N => valid_N_sig, valid_E => valid_E_sig, valid_W => valid_W_sig, valid_S => valid_S_sig, valid_L => valid_L_sig, grant_N_N => grant_N_N_signal, grant_N_E => grant_N_E_signal, grant_N_W => grant_N_W_signal, grant_N_S => grant_N_S_signal, grant_N_L => grant_N_L_signal, grant_E_N => grant_E_N_signal, grant_E_E => grant_E_E_signal, grant_E_W => grant_E_W_signal, grant_E_S => grant_E_S_signal, grant_E_L => grant_E_L_signal, grant_W_N => grant_W_N_signal, grant_W_E => grant_W_E_signal, grant_W_W => grant_W_W_signal, grant_W_S => grant_W_S_signal, grant_W_L => grant_W_L_signal, grant_S_N => grant_S_N_signal, grant_S_E => grant_S_E_signal, grant_S_W => grant_S_W_signal, grant_S_S => grant_S_S_signal, grant_S_L => grant_S_L_signal, grant_L_N => grant_L_N_signal, grant_L_E => grant_L_E_signal, grant_L_W => grant_L_W_signal, grant_L_S => grant_L_S_signal, grant_L_L => grant_L_L_signal, grant_N => grant_N, grant_E => grant_E, grant_W => grant_W, grant_S => grant_S, grant_L => grant_L, -- Checker Outputs err_grant_N_N_sig_not_empty_N_grant_N_N => err_grant_N_N_sig_not_empty_N_grant_N_N, err_not_grant_N_N_sig_or_empty_N_not_grant_N_N => err_not_grant_N_N_sig_or_empty_N_not_grant_N_N, err_grant_N_E_sig_not_empty_E_grant_N_E => err_grant_N_E_sig_not_empty_E_grant_N_E, err_not_grant_N_E_sig_or_empty_E_not_grant_N_E => err_not_grant_N_E_sig_or_empty_E_not_grant_N_E, err_grant_N_W_sig_not_empty_W_grant_N_W => err_grant_N_W_sig_not_empty_W_grant_N_W, err_not_grant_N_W_sig_or_empty_W_not_grant_N_W => err_not_grant_N_W_sig_or_empty_W_not_grant_N_W, err_grant_N_S_sig_not_empty_S_grant_N_S => err_grant_N_S_sig_not_empty_S_grant_N_S, err_not_grant_N_S_sig_or_empty_S_not_grant_N_S => err_not_grant_N_S_sig_or_empty_S_not_grant_N_S, err_grant_N_L_sig_not_empty_L_grant_N_L => err_grant_N_L_sig_not_empty_L_grant_N_L, err_not_grant_N_L_sig_or_empty_L_not_grant_N_L => err_not_grant_N_L_sig_or_empty_L_not_grant_N_L, err_grant_E_N_sig_not_empty_N_grant_E_N => err_grant_E_N_sig_not_empty_N_grant_E_N, err_not_grant_E_N_sig_or_empty_N_not_grant_E_N => err_not_grant_E_N_sig_or_empty_N_not_grant_E_N, err_grant_E_E_sig_not_empty_E_grant_E_E => err_grant_E_E_sig_not_empty_E_grant_E_E, err_not_grant_E_E_sig_or_empty_E_not_grant_E_E => err_not_grant_E_E_sig_or_empty_E_not_grant_E_E, err_grant_E_W_sig_not_empty_W_grant_E_W => err_grant_E_W_sig_not_empty_W_grant_E_W, err_not_grant_E_W_sig_or_empty_W_not_grant_E_W => err_not_grant_E_W_sig_or_empty_W_not_grant_E_W, err_grant_E_S_sig_not_empty_S_grant_E_S => err_grant_E_S_sig_not_empty_S_grant_E_S, err_not_grant_E_S_sig_or_empty_S_not_grant_E_S => err_not_grant_E_S_sig_or_empty_S_not_grant_E_S, err_grant_E_L_sig_not_empty_L_grant_E_L => err_grant_E_L_sig_not_empty_L_grant_E_L, err_not_grant_E_L_sig_or_empty_L_not_grant_E_L => err_not_grant_E_L_sig_or_empty_L_not_grant_E_L, err_grant_W_N_sig_not_empty_N_grant_W_N => err_grant_W_N_sig_not_empty_N_grant_W_N, err_not_grant_W_N_sig_or_empty_N_not_grant_W_N => err_not_grant_W_N_sig_or_empty_N_not_grant_W_N, err_grant_W_E_sig_not_empty_E_grant_W_E => err_grant_W_E_sig_not_empty_E_grant_W_E, err_not_grant_W_E_sig_or_empty_E_not_grant_W_E => err_not_grant_W_E_sig_or_empty_E_not_grant_W_E, err_grant_W_W_sig_not_empty_W_grant_W_W => err_grant_W_W_sig_not_empty_W_grant_W_W, err_not_grant_W_W_sig_or_empty_W_not_grant_W_W => err_not_grant_W_W_sig_or_empty_W_not_grant_W_W, err_grant_W_S_sig_not_empty_S_grant_W_S => err_grant_W_S_sig_not_empty_S_grant_W_S, err_not_grant_W_S_sig_or_empty_S_not_grant_W_S => err_not_grant_W_S_sig_or_empty_S_not_grant_W_S, err_grant_W_L_sig_not_empty_L_grant_W_L => err_grant_W_L_sig_not_empty_L_grant_W_L, err_not_grant_W_L_sig_or_empty_L_not_grant_W_L => err_not_grant_W_L_sig_or_empty_L_not_grant_W_L, err_grant_S_N_sig_not_empty_N_grant_S_N => err_grant_S_N_sig_not_empty_N_grant_S_N, err_not_grant_S_N_sig_or_empty_N_not_grant_S_N => err_not_grant_S_N_sig_or_empty_N_not_grant_S_N, err_grant_S_E_sig_not_empty_E_grant_S_E => err_grant_S_E_sig_not_empty_E_grant_S_E, err_not_grant_S_E_sig_or_empty_E_not_grant_S_E => err_not_grant_S_E_sig_or_empty_E_not_grant_S_E, err_grant_S_W_sig_not_empty_W_grant_S_W => err_grant_S_W_sig_not_empty_W_grant_S_W, err_not_grant_S_W_sig_or_empty_W_not_grant_S_W => err_not_grant_S_W_sig_or_empty_W_not_grant_S_W, err_grant_S_S_sig_not_empty_S_grant_S_S => err_grant_S_S_sig_not_empty_S_grant_S_S, err_not_grant_S_S_sig_or_empty_S_not_grant_S_S => err_not_grant_S_S_sig_or_empty_S_not_grant_S_S, err_grant_S_L_sig_not_empty_L_grant_S_L => err_grant_S_L_sig_not_empty_L_grant_S_L, err_not_grant_S_L_sig_or_empty_L_not_grant_S_L => err_not_grant_S_L_sig_or_empty_L_not_grant_S_L, err_grant_L_N_sig_not_empty_N_grant_L_N => err_grant_L_N_sig_not_empty_N_grant_L_N, err_not_grant_L_N_sig_or_empty_N_not_grant_L_N => err_not_grant_L_N_sig_or_empty_N_not_grant_L_N, err_grant_L_E_sig_not_empty_E_grant_L_E => err_grant_L_E_sig_not_empty_E_grant_L_E, err_not_grant_L_E_sig_or_empty_E_not_grant_L_E => err_not_grant_L_E_sig_or_empty_E_not_grant_L_E, err_grant_L_W_sig_not_empty_W_grant_L_W => err_grant_L_W_sig_not_empty_W_grant_L_W, err_not_grant_L_W_sig_or_empty_W_not_grant_L_W => err_not_grant_L_W_sig_or_empty_W_not_grant_L_W, err_grant_L_S_sig_not_empty_S_grant_L_S => err_grant_L_S_sig_not_empty_S_grant_L_S, err_not_grant_L_S_sig_or_empty_S_not_grant_L_S => err_not_grant_L_S_sig_or_empty_S_not_grant_L_S, err_grant_L_L_sig_not_empty_L_grant_L_L => err_grant_L_L_sig_not_empty_L_grant_L_L, err_not_grant_L_L_sig_or_empty_L_not_grant_L_L => err_not_grant_L_L_sig_or_empty_L_not_grant_L_L, err_grant_signals_not_empty_grant_N => err_grant_signals_not_empty_grant_N , err_not_grant_signals_empty_not_grant_N => err_not_grant_signals_empty_not_grant_N , err_grant_signals_not_empty_grant_E => err_grant_signals_not_empty_grant_E , err_not_grant_signals_empty_not_grant_E => err_not_grant_signals_empty_not_grant_E , err_grant_signals_not_empty_grant_W => err_grant_signals_not_empty_grant_W , err_not_grant_signals_empty_not_grant_W => err_not_grant_signals_empty_not_grant_W , err_grant_signals_not_empty_grant_S => err_grant_signals_not_empty_grant_S , err_not_grant_signals_empty_not_grant_S => err_not_grant_signals_empty_not_grant_S , err_grant_signals_not_empty_grant_L => err_grant_signals_not_empty_grant_L , err_not_grant_signals_empty_not_grant_L => err_not_grant_signals_empty_not_grant_L , err_grants_valid_not_match => err_grants_valid_not_match ); -- Allocator credit counter logic checkers module instantiation ALLOCATOR_CREDIT_COUNTER_LOGIC_CHECKERS: allocator_credit_counter_logic_pseudo_checkers PORT MAP ( credit_in_N => credit_in_N, credit_in_E => credit_in_E, credit_in_W => credit_in_W, credit_in_S => credit_in_S, credit_in_L => credit_in_L, credit_counter_N_out => credit_counter_N_out, credit_counter_E_out => credit_counter_E_out, credit_counter_W_out => credit_counter_W_out, credit_counter_S_out => credit_counter_S_out, credit_counter_L_out => credit_counter_L_out, valid_N => grant_N, -- Must be connected to grant signals! valid_E => grant_E, -- Must be connected to grant signals! valid_W => grant_W, -- Must be connected to grant signals! valid_S => grant_S, -- Must be connected to grant signals! valid_L => grant_L, -- Must be connected to grant signals! credit_counter_N_in => credit_counter_N_in, credit_counter_E_in => credit_counter_E_in, credit_counter_W_in => credit_counter_W_in, credit_counter_S_in => credit_counter_S_in, credit_counter_L_in => credit_counter_L_in, -- Checker Outputs err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal => err_credit_in_N_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_N_credit_counter_N_out_increment => err_credit_in_N_credit_counter_N_out_increment, err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change => err_not_credit_in_N_credit_counter_N_out_max_credit_counter_N_in_not_change, err_grant_N_credit_counter_N_out_decrement => err_grant_N_credit_counter_N_out_decrement, err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change => err_not_grant_N_or_credit_counter_N_out_zero_credit_counter_N_in_not_change, err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal => err_not_credit_in_N_not_grant_N_credit_counter_N_in_credit_counter_N_out_equal, err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal => err_credit_in_E_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_E_credit_counter_E_out_increment => err_credit_in_E_credit_counter_E_out_increment, err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change => err_not_credit_in_E_credit_counter_E_out_max_credit_counter_E_in_not_change, err_grant_E_credit_counter_E_out_decrement => err_grant_E_credit_counter_E_out_decrement, err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change => err_not_grant_E_or_credit_counter_E_out_zero_credit_counter_E_in_not_change, err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal => err_not_credit_in_E_not_grant_E_credit_counter_E_in_credit_counter_E_out_equal, err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal => err_credit_in_W_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_W_credit_counter_W_out_increment => err_credit_in_W_credit_counter_W_out_increment, err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change => err_not_credit_in_W_credit_counter_W_out_max_credit_counter_W_in_not_change, err_grant_W_credit_counter_W_out_decrement => err_grant_W_credit_counter_W_out_decrement, err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change => err_not_grant_W_or_credit_counter_W_out_zero_credit_counter_W_in_not_change, err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal => err_not_credit_in_W_not_grant_W_credit_counter_W_in_credit_counter_W_out_equal, err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal => err_credit_in_S_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_S_credit_counter_S_out_increment => err_credit_in_S_credit_counter_S_out_increment, err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change => err_not_credit_in_S_credit_counter_S_out_max_credit_counter_S_in_not_change, err_grant_S_credit_counter_S_out_decrement => err_grant_S_credit_counter_S_out_decrement, err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change => err_not_grant_S_or_credit_counter_S_out_zero_credit_counter_S_in_not_change, err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal => err_not_credit_in_S_not_grant_S_credit_counter_S_in_credit_counter_S_out_equal, err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal => err_credit_in_L_grant_L_credit_counter_L_in_credit_counter_L_out_equal, err_credit_in_L_credit_counter_L_out_increment => err_credit_in_L_credit_counter_L_out_increment, err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change => err_not_credit_in_L_credit_counter_L_out_max_credit_counter_L_in_not_change, err_grant_L_credit_counter_L_out_decrement => err_grant_L_credit_counter_L_out_decrement, err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change => err_not_grant_L_or_credit_counter_L_out_zero_credit_counter_L_in_not_change, err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal => err_not_credit_in_L_not_grant_L_credit_counter_L_in_credit_counter_L_out_equal ); --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Arbiter In -- North Arbiter_in with checkers integrated (module instantiation) arb_N_X: Arbiter_in PORT MAP (reset => reset, clk => clk, Req_X_N=>req_N_N, Req_X_E=> req_N_E, Req_X_W=>req_N_W, Req_X_S=>req_N_S, Req_X_L=>req_N_L, X_N=>X_N_N, X_E=>X_N_E, X_W=>X_N_W, X_S=>X_N_S, X_L=>X_N_L, -- North Arbiter_in Checker outputs err_Requests_state_in_state_not_equal => N_err_Requests_state_in_state_not_equal, err_IDLE_Req_N => N_err_IDLE_Req_N, err_IDLE_grant_N => N_err_IDLE_grant_N, err_North_Req_N => N_err_North_Req_N, err_North_grant_N => N_err_North_grant_N, err_East_Req_E => N_err_East_Req_E, err_East_grant_E => N_err_East_grant_E, err_West_Req_W => N_err_West_Req_W, err_West_grant_W => N_err_West_grant_W, err_South_Req_S => N_err_South_Req_S, err_South_grant_S => N_err_South_grant_S, err_Local_Req_L => N_err_Local_Req_L, err_Local_grant_L => N_err_Local_grant_L, err_IDLE_Req_E => N_err_IDLE_Req_E, err_IDLE_grant_E => N_err_IDLE_grant_E, err_North_Req_E => N_err_North_Req_E, err_North_grant_E => N_err_North_grant_E, err_East_Req_W => N_err_East_Req_W, err_East_grant_W => N_err_East_grant_W, err_West_Req_S => N_err_West_Req_S, err_West_grant_S => N_err_West_grant_S, err_South_Req_L => N_err_South_Req_L, err_South_grant_L => N_err_South_grant_L, err_Local_Req_N => N_err_Local_Req_N, err_Local_grant_N => N_err_Local_grant_N, err_IDLE_Req_W => N_err_IDLE_Req_W, err_IDLE_grant_W => N_err_IDLE_grant_W, err_North_Req_W => N_err_North_Req_W, err_North_grant_W => N_err_North_grant_W, err_East_Req_S => N_err_East_Req_S, err_East_grant_S => N_err_East_grant_S, err_West_Req_L => N_err_West_Req_L, err_West_grant_L => N_err_West_grant_L, err_South_Req_N => N_err_South_Req_N, err_South_grant_N => N_err_South_grant_N, err_Local_Req_E => N_err_Local_Req_E, err_Local_grant_E => N_err_Local_grant_E, err_IDLE_Req_S => N_err_IDLE_Req_S, err_IDLE_grant_S => N_err_IDLE_grant_S, err_North_Req_S => N_err_North_Req_S, err_North_grant_S => N_err_North_grant_S, err_East_Req_L => N_err_East_Req_L, err_East_grant_L => N_err_East_grant_L, err_West_Req_N => N_err_West_Req_N, err_West_grant_N => N_err_West_grant_N, err_South_Req_E => N_err_South_Req_E, err_South_grant_E => N_err_South_grant_E, err_Local_Req_W => N_err_Local_Req_W, err_Local_grant_W => N_err_Local_grant_W, err_IDLE_Req_L => N_err_IDLE_Req_L, err_IDLE_grant_L => N_err_IDLE_grant_L, err_North_Req_L => N_err_North_Req_L, err_North_grant_L => N_err_North_grant_L, err_East_Req_N => N_err_East_Req_N, err_East_grant_N => N_err_East_grant_N, err_West_Req_E => N_err_West_Req_E, err_West_grant_E => N_err_West_grant_E, err_South_Req_W => N_err_South_Req_W, err_South_grant_W => N_err_South_grant_W, err_Local_Req_S => N_err_Local_Req_S, err_Local_grant_S => N_err_Local_grant_S, err_state_in_onehot => N_err_state_in_onehot, err_no_request_grants => N_err_no_request_grants, err_request_no_grants => N_err_request_no_grants, err_no_Req_N_grant_N => N_err_no_Req_N_grant_N, err_no_Req_E_grant_E => N_err_no_Req_E_grant_E, err_no_Req_W_grant_W => N_err_no_Req_W_grant_W, err_no_Req_S_grant_S => N_err_no_Req_S_grant_S, err_no_Req_L_grant_L => N_err_no_Req_L_grant_L ); arb_E_X: Arbiter_in PORT MAP (reset => reset, clk => clk, Req_X_N=>req_E_N, Req_X_E=> req_E_E, Req_X_W=>req_E_W, Req_X_S=>req_E_S, Req_X_L=>req_E_L, X_N=>X_E_N, X_E=>X_E_E, X_W=>X_E_W, X_S=>X_E_S, X_L=>X_E_L, -- East Arbiter_in Checker outputs err_Requests_state_in_state_not_equal => E_err_Requests_state_in_state_not_equal, err_IDLE_Req_N => E_err_IDLE_Req_N, err_IDLE_grant_N => E_err_IDLE_grant_N, err_North_Req_N => E_err_North_Req_N, err_North_grant_N => E_err_North_grant_N, err_East_Req_E => E_err_East_Req_E, err_East_grant_E => E_err_East_grant_E, err_West_Req_W => E_err_West_Req_W, err_West_grant_W => E_err_West_grant_W, err_South_Req_S => E_err_South_Req_S, err_South_grant_S => E_err_South_grant_S, err_Local_Req_L => E_err_Local_Req_L, err_Local_grant_L => E_err_Local_grant_L, err_IDLE_Req_E => E_err_IDLE_Req_E, err_IDLE_grant_E => E_err_IDLE_grant_E, err_North_Req_E => E_err_North_Req_E, err_North_grant_E => E_err_North_grant_E, err_East_Req_W => E_err_East_Req_W, err_East_grant_W => E_err_East_grant_W, err_West_Req_S => E_err_West_Req_S, err_West_grant_S => E_err_West_grant_S, err_South_Req_L => E_err_South_Req_L, err_South_grant_L => E_err_South_grant_L, err_Local_Req_N => E_err_Local_Req_N, err_Local_grant_N => E_err_Local_grant_N, err_IDLE_Req_W => E_err_IDLE_Req_W, err_IDLE_grant_W => E_err_IDLE_grant_W, err_North_Req_W => E_err_North_Req_W, err_North_grant_W => E_err_North_grant_W, err_East_Req_S => E_err_East_Req_S, err_East_grant_S => E_err_East_grant_S, err_West_Req_L => E_err_West_Req_L, err_West_grant_L => E_err_West_grant_L, err_South_Req_N => E_err_South_Req_N, err_South_grant_N => E_err_South_grant_N, err_Local_Req_E => E_err_Local_Req_E, err_Local_grant_E => E_err_Local_grant_E, err_IDLE_Req_S => E_err_IDLE_Req_S, err_IDLE_grant_S => E_err_IDLE_grant_S, err_North_Req_S => E_err_North_Req_S, err_North_grant_S => E_err_North_grant_S, err_East_Req_L => E_err_East_Req_L, err_East_grant_L => E_err_East_grant_L, err_West_Req_N => E_err_West_Req_N, err_West_grant_N => E_err_West_grant_N, err_South_Req_E => E_err_South_Req_E, err_South_grant_E => E_err_South_grant_E, err_Local_Req_W => E_err_Local_Req_W, err_Local_grant_W => E_err_Local_grant_W, err_IDLE_Req_L => E_err_IDLE_Req_L, err_IDLE_grant_L => E_err_IDLE_grant_L, err_North_Req_L => E_err_North_Req_L, err_North_grant_L => E_err_North_grant_L, err_East_Req_N => E_err_East_Req_N, err_East_grant_N => E_err_East_grant_N, err_West_Req_E => E_err_West_Req_E, err_West_grant_E => E_err_West_grant_E, err_South_Req_W => E_err_South_Req_W, err_South_grant_W => E_err_South_grant_W, err_Local_Req_S => E_err_Local_Req_S, err_Local_grant_S => E_err_Local_grant_S, err_state_in_onehot => E_err_state_in_onehot, err_no_request_grants => E_err_no_request_grants, err_request_no_grants => E_err_request_no_grants, err_no_Req_N_grant_N => E_err_no_Req_N_grant_N, err_no_Req_E_grant_E => E_err_no_Req_E_grant_E, err_no_Req_W_grant_W => E_err_no_Req_W_grant_W, err_no_Req_S_grant_S => E_err_no_Req_S_grant_S, err_no_Req_L_grant_L => E_err_no_Req_L_grant_L ); arb_W_X: Arbiter_in PORT MAP (reset => reset, clk => clk, Req_X_N=>req_W_N, Req_X_E=> req_W_E, Req_X_W=>req_W_W, Req_X_S=>req_W_S, Req_X_L=>req_W_L, X_N=>X_W_N, X_E=>X_W_E, X_W=>X_W_W, X_S=>X_W_S, X_L=>X_W_L, -- West Arbiter_in Checker outputs err_Requests_state_in_state_not_equal => W_err_Requests_state_in_state_not_equal, err_IDLE_Req_N => W_err_IDLE_Req_N, err_IDLE_grant_N => W_err_IDLE_grant_N, err_North_Req_N => W_err_North_Req_N, err_North_grant_N => W_err_North_grant_N, err_East_Req_E => W_err_East_Req_E, err_East_grant_E => W_err_East_grant_E, err_West_Req_W => W_err_West_Req_W, err_West_grant_W => W_err_West_grant_W, err_South_Req_S => W_err_South_Req_S, err_South_grant_S => W_err_South_grant_S, err_Local_Req_L => W_err_Local_Req_L, err_Local_grant_L => W_err_Local_grant_L, err_IDLE_Req_E => W_err_IDLE_Req_E, err_IDLE_grant_E => W_err_IDLE_grant_E, err_North_Req_E => W_err_North_Req_E, err_North_grant_E => W_err_North_grant_E, err_East_Req_W => W_err_East_Req_W, err_East_grant_W => W_err_East_grant_W, err_West_Req_S => W_err_West_Req_S, err_West_grant_S => W_err_West_grant_S, err_South_Req_L => W_err_South_Req_L, err_South_grant_L => W_err_South_grant_L, err_Local_Req_N => W_err_Local_Req_N, err_Local_grant_N => W_err_Local_grant_N, err_IDLE_Req_W => W_err_IDLE_Req_W, err_IDLE_grant_W => W_err_IDLE_grant_W, err_North_Req_W => W_err_North_Req_W, err_North_grant_W => W_err_North_grant_W, err_East_Req_S => W_err_East_Req_S, err_East_grant_S => W_err_East_grant_S, err_West_Req_L => W_err_West_Req_L, err_West_grant_L => W_err_West_grant_L, err_South_Req_N => W_err_South_Req_N, err_South_grant_N => W_err_South_grant_N, err_Local_Req_E => W_err_Local_Req_E, err_Local_grant_E => W_err_Local_grant_E, err_IDLE_Req_S => W_err_IDLE_Req_S, err_IDLE_grant_S => W_err_IDLE_grant_S, err_North_Req_S => W_err_North_Req_S, err_North_grant_S => W_err_North_grant_S, err_East_Req_L => W_err_East_Req_L, err_East_grant_L => W_err_East_grant_L, err_West_Req_N => W_err_West_Req_N, err_West_grant_N => W_err_West_grant_N, err_South_Req_E => W_err_South_Req_E, err_South_grant_E => W_err_South_grant_E, err_Local_Req_W => W_err_Local_Req_W, err_Local_grant_W => W_err_Local_grant_W, err_IDLE_Req_L => W_err_IDLE_Req_L, err_IDLE_grant_L => W_err_IDLE_grant_L, err_North_Req_L => W_err_North_Req_L, err_North_grant_L => W_err_North_grant_L, err_East_Req_N => W_err_East_Req_N, err_East_grant_N => W_err_East_grant_N, err_West_Req_E => W_err_West_Req_E, err_West_grant_E => W_err_West_grant_E, err_South_Req_W => W_err_South_Req_W, err_South_grant_W => W_err_South_grant_W, err_Local_Req_S => W_err_Local_Req_S, err_Local_grant_S => W_err_Local_grant_S, err_state_in_onehot => W_err_state_in_onehot, err_no_request_grants => W_err_no_request_grants, err_request_no_grants => W_err_request_no_grants, err_no_Req_N_grant_N => W_err_no_Req_N_grant_N, err_no_Req_E_grant_E => W_err_no_Req_E_grant_E, err_no_Req_W_grant_W => W_err_no_Req_W_grant_W, err_no_Req_S_grant_S => W_err_no_Req_S_grant_S, err_no_Req_L_grant_L => W_err_no_Req_L_grant_L ); arb_S_X: Arbiter_in PORT MAP (reset => reset, clk => clk, Req_X_N=>req_S_N, Req_X_E=> req_S_E, Req_X_W=>req_S_W, Req_X_S=>req_S_S, Req_X_L=>req_S_L, X_N=>X_S_N, X_E=>X_S_E, X_W=>X_S_W, X_S=>X_S_S, X_L=>X_S_L, -- South Arbiter_in Checker outputs err_Requests_state_in_state_not_equal => S_err_Requests_state_in_state_not_equal, err_IDLE_Req_N => S_err_IDLE_Req_N, err_IDLE_grant_N => S_err_IDLE_grant_N, err_North_Req_N => S_err_North_Req_N, err_North_grant_N => S_err_North_grant_N, err_East_Req_E => S_err_East_Req_E, err_East_grant_E => S_err_East_grant_E, err_West_Req_W => S_err_West_Req_W, err_West_grant_W => S_err_West_grant_W, err_South_Req_S => S_err_South_Req_S, err_South_grant_S => S_err_South_grant_S, err_Local_Req_L => S_err_Local_Req_L, err_Local_grant_L => S_err_Local_grant_L, err_IDLE_Req_E => S_err_IDLE_Req_E, err_IDLE_grant_E => S_err_IDLE_grant_E, err_North_Req_E => S_err_North_Req_E, err_North_grant_E => S_err_North_grant_E, err_East_Req_W => S_err_East_Req_W, err_East_grant_W => S_err_East_grant_W, err_West_Req_S => S_err_West_Req_S, err_West_grant_S => S_err_West_grant_S, err_South_Req_L => S_err_South_Req_L, err_South_grant_L => S_err_South_grant_L, err_Local_Req_N => S_err_Local_Req_N, err_Local_grant_N => S_err_Local_grant_N, err_IDLE_Req_W => S_err_IDLE_Req_W, err_IDLE_grant_W => S_err_IDLE_grant_W, err_North_Req_W => S_err_North_Req_W, err_North_grant_W => S_err_North_grant_W, err_East_Req_S => S_err_East_Req_S, err_East_grant_S => S_err_East_grant_S, err_West_Req_L => S_err_West_Req_L, err_West_grant_L => S_err_West_grant_L, err_South_Req_N => S_err_South_Req_N, err_South_grant_N => S_err_South_grant_N, err_Local_Req_E => S_err_Local_Req_E, err_Local_grant_E => S_err_Local_grant_E, err_IDLE_Req_S => S_err_IDLE_Req_S, err_IDLE_grant_S => S_err_IDLE_grant_S, err_North_Req_S => S_err_North_Req_S, err_North_grant_S => S_err_North_grant_S, err_East_Req_L => S_err_East_Req_L, err_East_grant_L => S_err_East_grant_L, err_West_Req_N => S_err_West_Req_N, err_West_grant_N => S_err_West_grant_N, err_South_Req_E => S_err_South_Req_E, err_South_grant_E => S_err_South_grant_E, err_Local_Req_W => S_err_Local_Req_W, err_Local_grant_W => S_err_Local_grant_W, err_IDLE_Req_L => S_err_IDLE_Req_L, err_IDLE_grant_L => S_err_IDLE_grant_L, err_North_Req_L => S_err_North_Req_L, err_North_grant_L => S_err_North_grant_L, err_East_Req_N => S_err_East_Req_N, err_East_grant_N => S_err_East_grant_N, err_West_Req_E => S_err_West_Req_E, err_West_grant_E => S_err_West_grant_E, err_South_Req_W => S_err_South_Req_W, err_South_grant_W => S_err_South_grant_W, err_Local_Req_S => S_err_Local_Req_S, err_Local_grant_S => S_err_Local_grant_S, err_state_in_onehot => S_err_state_in_onehot, err_no_request_grants => S_err_no_request_grants, err_request_no_grants => S_err_request_no_grants, err_no_Req_N_grant_N => S_err_no_Req_N_grant_N, err_no_Req_E_grant_E => S_err_no_Req_E_grant_E, err_no_Req_W_grant_W => S_err_no_Req_W_grant_W, err_no_Req_S_grant_S => S_err_no_Req_S_grant_S, err_no_Req_L_grant_L => S_err_no_Req_L_grant_L ); arb_L_X: Arbiter_in PORT MAP (reset => reset, clk => clk, Req_X_N=>req_L_N, Req_X_E=> req_L_E, Req_X_W=>req_L_W, Req_X_S=>req_L_S, Req_X_L=>req_L_L, X_N=>X_L_N, X_E=>X_L_E, X_W=>X_L_W, X_S=>X_L_S, X_L=>X_L_L, -- Local Arbiter_in Checker outputs err_Requests_state_in_state_not_equal => L_err_Requests_state_in_state_not_equal, err_IDLE_Req_N => L_err_IDLE_Req_N, err_IDLE_grant_N => L_err_IDLE_grant_N, err_North_Req_N => L_err_North_Req_N, err_North_grant_N => L_err_North_grant_N, err_East_Req_E => L_err_East_Req_E, err_East_grant_E => L_err_East_grant_E, err_West_Req_W => L_err_West_Req_W, err_West_grant_W => L_err_West_grant_W, err_South_Req_S => L_err_South_Req_S, err_South_grant_S => L_err_South_grant_S, err_Local_Req_L => L_err_Local_Req_L, err_Local_grant_L => L_err_Local_grant_L, err_IDLE_Req_E => L_err_IDLE_Req_E, err_IDLE_grant_E => L_err_IDLE_grant_E, err_North_Req_E => L_err_North_Req_E, err_North_grant_E => L_err_North_grant_E, err_East_Req_W => L_err_East_Req_W, err_East_grant_W => L_err_East_grant_W, err_West_Req_S => L_err_West_Req_S, err_West_grant_S => L_err_West_grant_S, err_South_Req_L => L_err_South_Req_L, err_South_grant_L => L_err_South_grant_L, err_Local_Req_N => L_err_Local_Req_N, err_Local_grant_N => L_err_Local_grant_N, err_IDLE_Req_W => L_err_IDLE_Req_W, err_IDLE_grant_W => L_err_IDLE_grant_W, err_North_Req_W => L_err_North_Req_W, err_North_grant_W => L_err_North_grant_W, err_East_Req_S => L_err_East_Req_S, err_East_grant_S => L_err_East_grant_S, err_West_Req_L => L_err_West_Req_L, err_West_grant_L => L_err_West_grant_L, err_South_Req_N => L_err_South_Req_N, err_South_grant_N => L_err_South_grant_N, err_Local_Req_E => L_err_Local_Req_E, err_Local_grant_E => L_err_Local_grant_E, err_IDLE_Req_S => L_err_IDLE_Req_S, err_IDLE_grant_S => L_err_IDLE_grant_S, err_North_Req_S => L_err_North_Req_S, err_North_grant_S => L_err_North_grant_S, err_East_Req_L => L_err_East_Req_L, err_East_grant_L => L_err_East_grant_L, err_West_Req_N => L_err_West_Req_N, err_West_grant_N => L_err_West_grant_N, err_South_Req_E => L_err_South_Req_E, err_South_grant_E => L_err_South_grant_E, err_Local_Req_W => L_err_Local_Req_W, err_Local_grant_W => L_err_Local_grant_W, err_IDLE_Req_L => L_err_IDLE_Req_L, err_IDLE_grant_L => L_err_IDLE_grant_L, err_North_Req_L => L_err_North_Req_L, err_North_grant_L => L_err_North_grant_L, err_East_Req_N => L_err_East_Req_N, err_East_grant_N => L_err_East_grant_N, err_West_Req_E => L_err_West_Req_E, err_West_grant_E => L_err_West_grant_E, err_South_Req_W => L_err_South_Req_W, err_South_grant_W => L_err_South_grant_W, err_Local_Req_S => L_err_Local_Req_S, err_Local_grant_S => L_err_Local_grant_S, err_state_in_onehot => L_err_state_in_onehot, err_no_request_grants => L_err_no_request_grants, err_request_no_grants => L_err_request_no_grants, err_no_Req_N_grant_N => L_err_no_Req_N_grant_N, err_no_Req_E_grant_E => L_err_no_Req_E_grant_E, err_no_Req_W_grant_W => L_err_no_Req_W_grant_W, err_no_Req_S_grant_S => L_err_no_Req_S_grant_S, err_no_Req_L_grant_L => L_err_no_Req_L_grant_L ); --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- -- Arbiter Out mobuldes instantiation(s) -- Y is N now -- North Arbiter_out with checkers integrated arb_X_N: arbiter_out port map (reset => reset, clk => clk, X_N_Y => X_N_N, X_E_Y => X_E_N, X_W_Y => X_W_N, X_S_Y => X_S_N, X_L_Y => X_L_N, credit => credit_counter_N_out, grant_Y_N => grant_N_N_sig, grant_Y_E => grant_N_E_sig, grant_Y_W => grant_N_W_sig, grant_Y_S => grant_N_S_sig, grant_Y_L => grant_N_L_sig, -- Checker outputs err_Requests_state_in_state_not_equal => N_arbiter_out_err_Requests_state_in_state_not_equal, err_IDLE_req_X_N => N_err_IDLE_req_X_N, err_North_req_X_N => N_err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N => N_err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N => N_err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E => N_err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E => N_err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E => N_err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W => N_err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W => N_err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W => N_err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S => N_err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S => N_err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S => N_err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L => N_err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L => N_err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L => N_err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E => N_err_IDLE_req_X_E, err_North_req_X_E => N_err_North_req_X_E, err_East_req_X_W => N_err_East_req_X_W, err_West_req_X_S => N_err_West_req_X_S, err_South_req_X_L => N_err_South_req_X_L, err_Local_req_X_N => N_err_Local_req_X_N, err_IDLE_req_X_W => N_err_IDLE_req_X_W, err_North_req_X_W => N_err_North_req_X_W, err_East_req_X_S => N_err_East_req_X_S, err_West_req_X_L => N_err_West_req_X_L, err_South_req_X_N => N_err_South_req_X_N, err_Local_req_X_E => N_err_Local_req_X_E, err_IDLE_req_X_S => N_err_IDLE_req_X_S, err_North_req_X_S => N_err_North_req_X_S, err_East_req_X_L => N_err_East_req_X_L, err_West_req_X_N => N_err_West_req_X_N, err_South_req_X_E => N_err_South_req_X_E, err_Local_req_X_W => N_err_Local_req_X_W, err_IDLE_req_X_L => N_err_IDLE_req_X_L, err_North_req_X_L => N_err_North_req_X_L, err_East_req_X_N => N_err_East_req_X_N, err_West_req_X_E => N_err_West_req_X_E, err_South_req_X_W => N_err_South_req_X_W, err_Local_req_X_S => N_err_Local_req_X_S, err_state_in_onehot => N_arbiter_out_err_state_in_onehot, err_no_request_grants => N_arbiter_out_err_no_request_grants, err_request_IDLE_state => N_err_request_IDLE_state, err_request_IDLE_not_Grants => N_err_request_IDLE_not_Grants, err_state_North_Invalid_Grant => N_err_state_North_Invalid_Grant, err_state_East_Invalid_Grant => N_err_state_East_Invalid_Grant, err_state_West_Invalid_Grant => N_err_state_West_Invalid_Grant, err_state_South_Invalid_Grant => N_err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant => N_err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero => N_err_Grants_onehot_or_all_zero ); -- Y is E now -- East Arbiter_out with checkers integrated arb_X_E: arbiter_out port map (reset => reset, clk => clk, X_N_Y => X_N_E, X_E_Y => X_E_E, X_W_Y => X_W_E, X_S_Y => X_S_E, X_L_Y => X_L_E, credit => credit_counter_E_out, grant_Y_N => grant_E_N_sig, grant_Y_E => grant_E_E_sig, grant_Y_W => grant_E_W_sig, grant_Y_S => grant_E_S_sig, grant_Y_L => grant_E_L_sig, -- Checker outputs err_Requests_state_in_state_not_equal => E_arbiter_out_err_Requests_state_in_state_not_equal, err_IDLE_req_X_N => E_err_IDLE_req_X_N, err_North_req_X_N => E_err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N => E_err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N => E_err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E => E_err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E => E_err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E => E_err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W => E_err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W => E_err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W => E_err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S => E_err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S => E_err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S => E_err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L => E_err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L => E_err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L => E_err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E => E_err_IDLE_req_X_E, err_North_req_X_E => E_err_North_req_X_E, err_East_req_X_W => E_err_East_req_X_W, err_West_req_X_S => E_err_West_req_X_S, err_South_req_X_L => E_err_South_req_X_L, err_Local_req_X_N => E_err_Local_req_X_N, err_IDLE_req_X_W => E_err_IDLE_req_X_W, err_North_req_X_W => E_err_North_req_X_W, err_East_req_X_S => E_err_East_req_X_S, err_West_req_X_L => E_err_West_req_X_L, err_South_req_X_N => E_err_South_req_X_N, err_Local_req_X_E => E_err_Local_req_X_E, err_IDLE_req_X_S => E_err_IDLE_req_X_S, err_North_req_X_S => E_err_North_req_X_S, err_East_req_X_L => E_err_East_req_X_L, err_West_req_X_N => E_err_West_req_X_N, err_South_req_X_E => E_err_South_req_X_E, err_Local_req_X_W => E_err_Local_req_X_W, err_IDLE_req_X_L => E_err_IDLE_req_X_L, err_North_req_X_L => E_err_North_req_X_L, err_East_req_X_N => E_err_East_req_X_N, err_West_req_X_E => E_err_West_req_X_E, err_South_req_X_W => E_err_South_req_X_W, err_Local_req_X_S => E_err_Local_req_X_S, err_state_in_onehot => E_arbiter_out_err_state_in_onehot, err_no_request_grants => E_arbiter_out_err_no_request_grants, err_request_IDLE_state => E_err_request_IDLE_state, err_request_IDLE_not_Grants => E_err_request_IDLE_not_Grants, err_state_North_Invalid_Grant => E_err_state_North_Invalid_Grant, err_state_East_Invalid_Grant => E_err_state_East_Invalid_Grant, err_state_West_Invalid_Grant => E_err_state_West_Invalid_Grant, err_state_South_Invalid_Grant => E_err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant => E_err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero => E_err_Grants_onehot_or_all_zero ); -- Y is W now -- West Arbiter_out with checkers integrated arb_X_W: arbiter_out port map (reset => reset, clk => clk, X_N_Y => X_N_W, X_E_Y => X_E_W, X_W_Y => X_W_W, X_S_Y => X_S_W, X_L_Y => X_L_W, credit => credit_counter_W_out, grant_Y_N => grant_W_N_sig, grant_Y_E => grant_W_E_sig, grant_Y_W => grant_W_W_sig, grant_Y_S => grant_W_S_sig, grant_Y_L => grant_W_L_sig, -- Checker outputs err_Requests_state_in_state_not_equal => W_arbiter_out_err_Requests_state_in_state_not_equal, err_IDLE_req_X_N => W_err_IDLE_req_X_N, err_North_req_X_N => W_err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N => W_err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N => W_err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E => W_err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E => W_err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E => W_err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W => W_err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W => W_err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W => W_err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S => W_err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S => W_err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S => W_err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L => W_err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L => W_err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L => W_err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E => W_err_IDLE_req_X_E, err_North_req_X_E => W_err_North_req_X_E, err_East_req_X_W => W_err_East_req_X_W, err_West_req_X_S => W_err_West_req_X_S, err_South_req_X_L => W_err_South_req_X_L, err_Local_req_X_N => W_err_Local_req_X_N, err_IDLE_req_X_W => W_err_IDLE_req_X_W, err_North_req_X_W => W_err_North_req_X_W, err_East_req_X_S => W_err_East_req_X_S, err_West_req_X_L => W_err_West_req_X_L, err_South_req_X_N => W_err_South_req_X_N, err_Local_req_X_E => W_err_Local_req_X_E, err_IDLE_req_X_S => W_err_IDLE_req_X_S, err_North_req_X_S => W_err_North_req_X_S, err_East_req_X_L => W_err_East_req_X_L, err_West_req_X_N => W_err_West_req_X_N, err_South_req_X_E => W_err_South_req_X_E, err_Local_req_X_W => W_err_Local_req_X_W, err_IDLE_req_X_L => W_err_IDLE_req_X_L, err_North_req_X_L => W_err_North_req_X_L, err_East_req_X_N => W_err_East_req_X_N, err_West_req_X_E => W_err_West_req_X_E, err_South_req_X_W => W_err_South_req_X_W, err_Local_req_X_S => W_err_Local_req_X_S, err_state_in_onehot => W_arbiter_out_err_state_in_onehot, err_no_request_grants => W_arbiter_out_err_no_request_grants, err_request_IDLE_state => W_err_request_IDLE_state, err_request_IDLE_not_Grants => W_err_request_IDLE_not_Grants, err_state_North_Invalid_Grant => W_err_state_North_Invalid_Grant, err_state_East_Invalid_Grant => W_err_state_East_Invalid_Grant, err_state_West_Invalid_Grant => W_err_state_West_Invalid_Grant, err_state_South_Invalid_Grant => W_err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant => W_err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero => W_err_Grants_onehot_or_all_zero ); -- Y is S now -- South Arbiter_out with checkers integrated arb_X_S: arbiter_out port map (reset => reset, clk => clk, X_N_Y => X_N_S, X_E_Y => X_E_S, X_W_Y => X_W_S, X_S_Y => X_S_S, X_L_Y => X_L_S, credit => credit_counter_S_out, grant_Y_N => grant_S_N_sig, grant_Y_E => grant_S_E_sig, grant_Y_W => grant_S_W_sig, grant_Y_S => grant_S_S_sig, grant_Y_L => grant_S_L_sig, -- Checker outputs err_Requests_state_in_state_not_equal => S_arbiter_out_err_Requests_state_in_state_not_equal, err_IDLE_req_X_N => S_err_IDLE_req_X_N, err_North_req_X_N => S_err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N => S_err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N => S_err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E => S_err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E => S_err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E => S_err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W => S_err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W => S_err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W => S_err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S => S_err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S => S_err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S => S_err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L => S_err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L => S_err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L => S_err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E => S_err_IDLE_req_X_E, err_North_req_X_E => S_err_North_req_X_E, err_East_req_X_W => S_err_East_req_X_W, err_West_req_X_S => S_err_West_req_X_S, err_South_req_X_L => S_err_South_req_X_L, err_Local_req_X_N => S_err_Local_req_X_N, err_IDLE_req_X_W => S_err_IDLE_req_X_W, err_North_req_X_W => S_err_North_req_X_W, err_East_req_X_S => S_err_East_req_X_S, err_West_req_X_L => S_err_West_req_X_L, err_South_req_X_N => S_err_South_req_X_N, err_Local_req_X_E => S_err_Local_req_X_E, err_IDLE_req_X_S => S_err_IDLE_req_X_S, err_North_req_X_S => S_err_North_req_X_S, err_East_req_X_L => S_err_East_req_X_L, err_West_req_X_N => S_err_West_req_X_N, err_South_req_X_E => S_err_South_req_X_E, err_Local_req_X_W => S_err_Local_req_X_W, err_IDLE_req_X_L => S_err_IDLE_req_X_L, err_North_req_X_L => S_err_North_req_X_L, err_East_req_X_N => S_err_East_req_X_N, err_West_req_X_E => S_err_West_req_X_E, err_South_req_X_W => S_err_South_req_X_W, err_Local_req_X_S => S_err_Local_req_X_S, err_state_in_onehot => S_arbiter_out_err_state_in_onehot, err_no_request_grants => S_arbiter_out_err_no_request_grants, err_request_IDLE_state => S_err_request_IDLE_state, err_request_IDLE_not_Grants => S_err_request_IDLE_not_Grants, err_state_North_Invalid_Grant => S_err_state_North_Invalid_Grant, err_state_East_Invalid_Grant => S_err_state_East_Invalid_Grant, err_state_West_Invalid_Grant => S_err_state_West_Invalid_Grant, err_state_South_Invalid_Grant => S_err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant => S_err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero => S_err_Grants_onehot_or_all_zero ); -- Y is L now -- Local Arbiter_out with checkers integrated arb_X_L: arbiter_out port map (reset => reset, clk => clk, X_N_Y => X_N_L, X_E_Y => X_E_L, X_W_Y => X_W_L, X_S_Y => X_S_L, X_L_Y => X_L_L, credit => credit_counter_L_out, grant_Y_N => grant_L_N_sig, grant_Y_E => grant_L_E_sig, grant_Y_W => grant_L_W_sig, grant_Y_S => grant_L_S_sig, grant_Y_L => grant_L_L_sig, err_Requests_state_in_state_not_equal => L_arbiter_out_err_Requests_state_in_state_not_equal, err_IDLE_req_X_N => L_err_IDLE_req_X_N, err_North_req_X_N => L_err_North_req_X_N, err_North_credit_not_zero_req_X_N_grant_N => L_err_North_credit_not_zero_req_X_N_grant_N, err_North_credit_zero_or_not_req_X_N_not_grant_N => L_err_North_credit_zero_or_not_req_X_N_not_grant_N, err_East_req_X_E => L_err_East_req_X_E, err_East_credit_not_zero_req_X_E_grant_E => L_err_East_credit_not_zero_req_X_E_grant_E, err_East_credit_zero_or_not_req_X_E_not_grant_E => L_err_East_credit_zero_or_not_req_X_E_not_grant_E, err_West_req_X_W => L_err_West_req_X_W, err_West_credit_not_zero_req_X_W_grant_W => L_err_West_credit_not_zero_req_X_W_grant_W, err_West_credit_zero_or_not_req_X_W_not_grant_W => L_err_West_credit_zero_or_not_req_X_W_not_grant_W, err_South_req_X_S => L_err_South_req_X_S, err_South_credit_not_zero_req_X_S_grant_S => L_err_South_credit_not_zero_req_X_S_grant_S, err_South_credit_zero_or_not_req_X_S_not_grant_S => L_err_South_credit_zero_or_not_req_X_S_not_grant_S, err_Local_req_X_L => L_err_Local_req_X_L, err_Local_credit_not_zero_req_X_L_grant_L => L_err_Local_credit_not_zero_req_X_L_grant_L, err_Local_credit_zero_or_not_req_X_L_not_grant_L => L_err_Local_credit_zero_or_not_req_X_L_not_grant_L, err_IDLE_req_X_E => L_err_IDLE_req_X_E, err_North_req_X_E => L_err_North_req_X_E, err_East_req_X_W => L_err_East_req_X_W, err_West_req_X_S => L_err_West_req_X_S, err_South_req_X_L => L_err_South_req_X_L, err_Local_req_X_N => L_err_Local_req_X_N, err_IDLE_req_X_W => L_err_IDLE_req_X_W, err_North_req_X_W => L_err_North_req_X_W, err_East_req_X_S => L_err_East_req_X_S, err_West_req_X_L => L_err_West_req_X_L, err_South_req_X_N => L_err_South_req_X_N, err_Local_req_X_E => L_err_Local_req_X_E, err_IDLE_req_X_S => L_err_IDLE_req_X_S, err_North_req_X_S => L_err_North_req_X_S, err_East_req_X_L => L_err_East_req_X_L, err_West_req_X_N => L_err_West_req_X_N, err_South_req_X_E => L_err_South_req_X_E, err_Local_req_X_W => L_err_Local_req_X_W, err_IDLE_req_X_L => L_err_IDLE_req_X_L, err_North_req_X_L => L_err_North_req_X_L, err_East_req_X_N => L_err_East_req_X_N, err_West_req_X_E => L_err_West_req_X_E, err_South_req_X_W => L_err_South_req_X_W, err_Local_req_X_S => L_err_Local_req_X_S, err_state_in_onehot => L_arbiter_out_err_state_in_onehot, err_no_request_grants => L_arbiter_out_err_no_request_grants, err_request_IDLE_state => L_err_request_IDLE_state, err_request_IDLE_not_Grants => L_err_request_IDLE_not_Grants, err_state_North_Invalid_Grant => L_err_state_North_Invalid_Grant, err_state_East_Invalid_Grant => L_err_state_East_Invalid_Grant, err_state_West_Invalid_Grant => L_err_state_West_Invalid_Grant, err_state_South_Invalid_Grant => L_err_state_South_Invalid_Grant, err_state_Local_Invalid_Grant => L_err_state_Local_Invalid_Grant, err_Grants_onehot_or_all_zero => L_err_Grants_onehot_or_all_zero ); --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- valid_N_sig <= grant_N; valid_E_sig <= grant_E; valid_W_sig <= grant_W; valid_S_sig <= grant_S; valid_L_sig <= grant_L; END;
gpl-3.0
8b340b456a443128f06eb8bc91c2694a
0.450037
3.184571
false
false
false
false
AndyMcC0/UVVM_All
bitvis_vip_i2c/src/vvc_methods_pkg.vhd
1
27,805
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_vvc_framework_support_pkg.all; use work.i2c_bfm_pkg.all; use work.vvc_cmd_pkg.all; use work.td_vvc_framework_common_methods_pkg.all; use work.td_target_support_pkg.all; --================================================================================================= --================================================================================================= --================================================================================================= package vvc_methods_pkg is --=============================================================================================== -- Types and constants for the I2C VVC --=============================================================================================== constant C_VVC_NAME : string := "I2C_VVC"; signal I2C_VVCT : t_vvc_target_record := set_vvc_target_defaults(C_VVC_NAME); alias THIS_VVCT : t_vvc_target_record is I2C_VVCT; alias t_bfm_config is t_i2c_bfm_config; constant C_I2C_INTER_BFM_DELAY_DEFAULT : t_inter_bfm_delay := ( delay_type => NO_DELAY, delay_in_time => 0 ns, inter_bfm_delay_violation_severity => warning ); type t_vvc_config is record inter_bfm_delay : t_inter_bfm_delay; -- Minimum delay between BFM accesses from the VVC. If parameter delay_type is set to NO_DELAY, BFM accesses will be back to back, i.e. no delay. cmd_queue_count_max : natural; -- Maximum pending number in command queue before queue is full. Adding additional commands will result in an ERROR. cmd_queue_count_threshold : natural; -- An alert with severity 'cmd_queue_count_threshold_severity' will be issued if command queue exceeds this count. Used for early warning if command queue is almost full. Will be ignored if set to 0. cmd_queue_count_threshold_severity : t_alert_level; -- Severity of alert to be initiated if exceeding cmd_queue_count_threshold result_queue_count_max : natural; -- Maximum number of unfetched results before result_queue is full. result_queue_count_threshold_severity : t_alert_level; -- An alert with severity 'result_queue_count_threshold_severity' will be issued if command queue exceeds this count. Used for early warning if result queue is almost full. Will be ignored if set to 0. result_queue_count_threshold : natural; -- Severity of alert to be initiated if exceeding result_queue_count_threshold bfm_config : t_i2c_bfm_config; -- Configuration for the BFM. See BFM quick reference msg_id_panel : t_msg_id_panel; -- VVC dedicated message ID panel end record; type t_vvc_config_array is array (natural range <>) of t_vvc_config; constant C_I2C_VVC_CONFIG_DEFAULT : t_vvc_config := ( inter_bfm_delay => C_I2C_INTER_BFM_DELAY_DEFAULT, cmd_queue_count_max => C_CMD_QUEUE_COUNT_MAX, cmd_queue_count_threshold => C_CMD_QUEUE_COUNT_THRESHOLD, cmd_queue_count_threshold_severity => C_CMD_QUEUE_COUNT_THRESHOLD_SEVERITY, result_queue_count_max => C_RESULT_QUEUE_COUNT_MAX, result_queue_count_threshold_severity => C_RESULT_QUEUE_COUNT_THRESHOLD_SEVERITY, result_queue_count_threshold => C_RESULT_QUEUE_COUNT_THRESHOLD, bfm_config => C_I2C_BFM_CONFIG_DEFAULT, msg_id_panel => C_VVC_MSG_ID_PANEL_DEFAULT ); type t_vvc_status is record current_cmd_idx : natural; previous_cmd_idx : natural; pending_cmd_cnt : natural; end record; type t_vvc_status_array is array (natural range <>) of t_vvc_status; constant C_VVC_STATUS_DEFAULT : t_vvc_status := ( current_cmd_idx => 0, previous_cmd_idx => 0, pending_cmd_cnt => 0 ); -- Transaction information for the wave view during simulation type t_transaction_info is record operation : t_operation; msg : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); addr : unsigned(C_VVC_CMD_ADDR_MAX_LENGTH - 1 downto 0); data : t_byte_array(0 to C_VVC_CMD_DATA_MAX_LENGTH-1); num_bytes : natural; continue : t_action_when_transfer_is_done; exp_ack : boolean; end record; type t_transaction_info_array is array (natural range <>) of t_transaction_info; constant C_TRANSACTION_INFO_DEFAULT : t_transaction_info := ( addr => (others => '0'), data => (others => (others => '0')), num_bytes => 0, operation => NO_OPERATION, msg => (others => ' '), continue => RELEASE_LINE_AFTER_TRANSFER, exp_ack => true ); shared variable shared_i2c_vvc_config : t_vvc_config_array(0 to C_MAX_VVC_INSTANCE_NUM) := (others => C_I2C_VVC_CONFIG_DEFAULT); shared variable shared_i2c_vvc_status : t_vvc_status_array(0 to C_MAX_VVC_INSTANCE_NUM) := (others => C_VVC_STATUS_DEFAULT); shared variable shared_i2c_transaction_info : t_transaction_info_array(0 to C_MAX_VVC_INSTANCE_NUM) := (others => C_TRANSACTION_INFO_DEFAULT); --============================================================================== -- Methods dedicated to this VVC -- - These procedures are called from the testbench in order to queue BFM calls -- in the VVC command queue. The VVC will store and forward these calls to the -- I2C BFM when the command is at the from of the VVC command queue. -- - For details on how the BFM procedures work, see i2c_bfm_pkg.vhd or the -- quickref. --============================================================================== -- ***************************************************************************** -- -- master transmit -- -- ***************************************************************************** -- multi-byte procedure i2c_master_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant data : in t_byte_array; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER ); -- single byte procedure i2c_master_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant data : in std_logic_vector; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER ); -- ***************************************************************************** -- -- slave transmit -- -- ***************************************************************************** -- multi-byte procedure i2c_slave_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in t_byte_array; constant msg : in string ); -- single byte procedure i2c_slave_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ); -- ***************************************************************************** -- -- master receive -- -- ***************************************************************************** procedure i2c_master_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant num_bytes : in natural; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER ); -- ***************************************************************************** -- -- master check -- -- ***************************************************************************** -- multi-byte procedure i2c_master_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant data : in t_byte_array; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER; constant alert_level : in t_alert_level := error ); -- single byte procedure i2c_master_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant data : in std_logic_vector; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER; constant alert_level : in t_alert_level := error ); procedure i2c_master_quick_command( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant msg : in string; constant rw_bit : in std_logic := C_WRITE_BIT; constant exp_ack : in boolean := true; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER; constant alert_level : in t_alert_level := error ); -- ***************************************************************************** -- -- slave receive -- -- ***************************************************************************** procedure i2c_slave_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant num_bytes : in natural; constant msg : in string ); -- ***************************************************************************** -- -- slave check -- -- ***************************************************************************** -- multi-byte procedure i2c_slave_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in t_byte_array; constant msg : in string; constant alert_level : in t_alert_level := error; constant rw_bit : in std_logic := '0' -- Default write bit ); -- single byte procedure i2c_slave_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := error; constant rw_bit : in std_logic := '0' -- Default write bit ); procedure i2c_slave_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant rw_bit : in std_logic; constant msg : in string; constant alert_level : in t_alert_level := error ); end package vvc_methods_pkg; package body vvc_methods_pkg is --============================================================================== -- Methods dedicated to this VVC -- Notes: -- - shared_vvc_cmd is initialised to C_VVC_CMD_DEFAULT, and also reset to this after every command --============================================================================== -- master transmit procedure i2c_master_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant data : in t_byte_array; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; -- Normalize to the 10 bit addr width variable v_normalized_addr : unsigned(C_VVC_CMD_ADDR_MAX_LENGTH - 1 downto 0) := normalize_and_check(addr, shared_vvc_cmd.addr, ALLOW_WIDER_NARROWER, "addr", "shared_vvc_cmd.addr", proc_call & " called with to wide address. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_TRANSMIT); shared_vvc_cmd.addr := v_normalized_addr; shared_vvc_cmd.data(0 to data'length - 1) := data; shared_vvc_cmd.num_bytes := data'length; shared_vvc_cmd.continue := continue; send_command_to_vvc(VVCT); end procedure; procedure i2c_master_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant data : in std_logic_vector; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_byte : std_logic_vector(7 downto 0) := (others => '0'); -- Normalize to the 8 bit data width variable v_normalized_data : std_logic_vector(7 downto 0) := normalize_and_check(data, v_byte, ALLOW_NARROWER, "data", "v_byte", msg); variable v_byte_array : t_byte_array(0 to 0) := (0 => v_normalized_data); begin i2c_master_transmit(VVCT, vvc_instance_idx, addr, v_byte_array, msg, continue); end procedure; -- slave transmit procedure i2c_slave_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in t_byte_array; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, SLAVE_TRANSMIT); shared_vvc_cmd.data(0 to data'length - 1) := data; shared_vvc_cmd.num_bytes := data'length; send_command_to_vvc(VVCT); end procedure; procedure i2c_slave_transmit( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string ) is variable v_byte : std_logic_vector(7 downto 0) := (others => '0'); -- Normalize to the 8 bit data width variable v_normalized_data : std_logic_vector(7 downto 0) := normalize_and_check(data, v_byte, ALLOW_NARROWER, "data", "v_byte", msg); variable v_byte_array : t_byte_array(0 to 0) := (0 => v_normalized_data); begin i2c_slave_transmit(VVCT, vvc_instance_idx, v_byte_array, msg); end procedure; -- master receive procedure i2c_master_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant num_bytes : in natural; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; -- Normalize to the 10 bit addr width variable v_normalized_addr : unsigned(C_VVC_CMD_ADDR_MAX_LENGTH - 1 downto 0) := normalize_and_check(addr, shared_vvc_cmd.addr, ALLOW_NARROWER, "addr", "shared_vvc_cmd.addr", msg); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_RECEIVE); shared_vvc_cmd.addr := v_normalized_addr; shared_vvc_cmd.num_bytes := num_bytes; shared_vvc_cmd.continue := continue; send_command_to_vvc(VVCT); end procedure; procedure i2c_slave_receive( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant num_bytes : in natural; constant msg : in string ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, SLAVE_RECEIVE); shared_vvc_cmd.num_bytes := num_bytes; send_command_to_vvc(VVCT); end procedure; -- master check procedure i2c_master_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant data : in t_byte_array; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER; constant alert_level : in t_alert_level := error ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; -- Normalize to the 10 bit addr width variable v_normalized_addr : unsigned(C_VVC_CMD_ADDR_MAX_LENGTH - 1 downto 0) := normalize_and_check(addr, shared_vvc_cmd.addr, ALLOW_WIDER_NARROWER, "addr", "shared_vvc_cmd.addr", proc_call & " called with to wide address. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_CHECK); shared_vvc_cmd.addr := v_normalized_addr; shared_vvc_cmd.data(0 to data'length - 1) := data; shared_vvc_cmd.num_bytes := data'length; shared_vvc_cmd.alert_level := alert_level; shared_vvc_cmd.continue := continue; send_command_to_vvc(VVCT); end procedure; procedure i2c_master_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant data : in std_logic_vector; constant msg : in string; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER; constant alert_level : in t_alert_level := error ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_byte : std_logic_vector(7 downto 0) := (others => '0'); -- Normalize to the 8 bit data width variable v_normalized_data : std_logic_vector(7 downto 0) := normalize_and_check(data, v_byte, ALLOW_NARROWER, "data", "v_byte", msg); variable v_byte_array : t_byte_array(0 to 0) := (0 => v_normalized_data); begin i2c_master_check(VVCT, vvc_instance_idx, addr, v_byte_array, msg, continue, alert_level); end procedure; procedure i2c_master_quick_command( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant addr : in unsigned; constant msg : in string; constant rw_bit : in std_logic := C_WRITE_BIT; constant exp_ack : in boolean := true; constant continue : in t_action_when_transfer_is_done := RELEASE_LINE_AFTER_TRANSFER; constant alert_level : in t_alert_level := error ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; -- Normalize to the 10 bit addr width variable v_normalized_addr : unsigned(C_VVC_CMD_ADDR_MAX_LENGTH - 1 downto 0) := normalize_and_check(addr, shared_vvc_cmd.addr, ALLOW_WIDER_NARROWER, "addr", "shared_vvc_cmd.addr", proc_call & " called with to wide address. " & add_msg_delimiter(msg)); begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, MASTER_QUICK_CMD); shared_vvc_cmd.addr := v_normalized_addr; shared_vvc_cmd.exp_ack := exp_ack; shared_vvc_cmd.alert_level := alert_level; shared_vvc_cmd.rw_bit := rw_bit; shared_vvc_cmd.continue := continue; send_command_to_vvc(VVCT); end procedure; -- slave check procedure i2c_slave_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in t_byte_array; constant msg : in string; constant alert_level : in t_alert_level := error; constant rw_bit : in std_logic := '0' -- Default write bit ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; begin -- Create command by setting common global 'VVCT' signal record and dedicated VVC 'shared_vvc_cmd' record -- locking semaphore in set_general_target_and_command_fields to gain exclusive right to VVCT and shared_vvc_cmd -- semaphore gets unlocked in await_cmd_from_sequencer of the targeted VVC set_general_target_and_command_fields(VVCT, vvc_instance_idx, proc_call, msg, QUEUED, SLAVE_CHECK); shared_vvc_cmd.data(0 to data'length - 1) := data; shared_vvc_cmd.num_bytes := data'length; shared_vvc_cmd.alert_level := alert_level; shared_vvc_cmd.rw_bit := rw_bit; send_command_to_vvc(VVCT); end procedure; procedure i2c_slave_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant data : in std_logic_vector; constant msg : in string; constant alert_level : in t_alert_level := error; constant rw_bit : in std_logic := '0' -- Default write bit ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_byte : std_logic_vector(7 downto 0) := (others => '0'); -- Normalize to the 8 bit data width variable v_normalized_data : std_logic_vector(7 downto 0) := normalize_and_check(data, v_byte, ALLOW_NARROWER, "data", "v_byte", msg); variable v_byte_array : t_byte_array(0 to 0) := (0 => v_normalized_data); begin i2c_slave_check(VVCT, vvc_instance_idx, v_byte_array, msg, alert_level, rw_bit); end procedure; -- slave check procedure i2c_slave_check( signal VVCT : inout t_vvc_target_record; constant vvc_instance_idx : in integer; constant rw_bit : in std_logic; constant msg : in string; constant alert_level : in t_alert_level := error ) is constant proc_name : string := get_procedure_name_from_instance_name(vvc_instance_idx'instance_name); constant proc_call : string := proc_name & "(" & to_string(VVCT, vvc_instance_idx) & ")"; variable v_dummy_byte_array : t_byte_array(0 to -1); -- Empty byte array to indicate that data is not checked begin i2c_slave_check(VVCT, vvc_instance_idx, v_dummy_byte_array, msg, alert_level, rw_bit); end procedure; end package body vvc_methods_pkg;
mit
4fe0ac6e83b5d9a3884b0304b6543c32
0.577162
4.009951
false
false
false
false
elainemielas/CVUT_BI-PNO
cvika/scit4/scit4.vhd
1
745
library IEEE; use IEEE.std_logic_1164.all; entity SCIT4 is port ( A, B : in std_logic_vector ( 3 downto 0 ); Cin : in std_logic; S : out std_logic_vector ( 4 downto 0 ) ); end entity SCIT4; architecture SCIT4_BODY of SCIT4 is signal C : std_logic_vector ( 4 downto 0 ); begin -- VSTUP : process (Cin) -- begin -- C(0) <= Cin; -- end process VSTUP; SCITANI : process ( C, A, B, Cin ) begin C(0) <= Cin; for I in 0 to 3 loop S(I) <= A(I) xor B(I) xor C(I) after 2 ns; C(I+1) <= ( A(I) and B(I) ) or ( A(I) and C(I) ) or ( B(I) and C(I) ) after 2 ns; end loop; S(4) <= C(4); end process SCITANI; -- VYSTUP : process (C(4)) -- begin -- S(4) <= C(4); -- end process VYSTUP; end architecture SCIT4_BODY;
mit
042cb807fab2862957e83bcd24d9032c
0.573154
2.335423
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/IJTAG_files/RAM_access_instrument.vhd
3
10,062
--Copyright (C) 2017 Konstantin Shibin library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity RAMAccessInstrument is Generic ( DataSize : positive := 8; AddressSize : positive := 8); Port ( -- Scan Interface scan_client ---------- SI : in STD_LOGIC; -- ScanInPort SO : out STD_LOGIC; -- ScanOutPort SEL : in STD_LOGIC; -- SelectPort ---------------------------------------- SE : in STD_LOGIC; -- ShiftEnPort CE : in STD_LOGIC; -- CaptureEnPort UE : in STD_LOGIC; -- UpdateEnPort RST : in STD_LOGIC; -- ResetPort TCK : in STD_LOGIC; -- TCKPort MEM_SIB_SEL : out STD_LOGIC; -- RAM interface RAM_data_read : in STD_LOGIC_VECTOR (DataSize-1 downto 0); RAM_data_write : out STD_LOGIC_VECTOR (DataSize-1 downto 0); RAM_address_out : out STD_LOGIC_VECTOR (AddressSize-1 downto 0); RAM_write_enable : out STD_LOGIC ); end RAMAccessInstrument; architecture RAMAccessInstrument_arch of RAMAccessInstrument is signal RAM_address, RAM_address_update: STD_LOGIC_VECTOR (AddressSize-1 downto 0); signal RAM_addr_inc_reg: STD_LOGIC; signal RAM_write_enable_internal : STD_LOGIC; signal RAM_write_enable_strobe : STD_LOGIC; signal RAM_data_write_internal: STD_LOGIC_VECTOR (DataSize-1 downto 0); signal sib_addr_update_strobe, sib_data_update_strobe: STD_LOGIC; signal sib_addr_toUE_prev, sib_data_toUE_prev: STD_LOGIC; signal Addr_service_bits, Addr_service_bits_update: STD_LOGIC_VECTOR (1 downto 0); signal sib_mem_so, sib_data_so, sib_addr_so, addr_sreg_so, service_sreg_so: STD_LOGIC; signal data_sreg_so: STD_LOGIC; signal sib_mem_toCE, sib_data_toCE, sib_addr_toCE: STD_LOGIC; signal sib_mem_toSE, sib_data_toSE, sib_addr_toSE: STD_LOGIC; signal sib_mem_toUE, sib_data_toUE, sib_addr_toUE: STD_LOGIC; signal sib_mem_toSEL, sib_data_toSEL, sib_addr_toSEL: STD_LOGIC; signal sib_mem_toRST, sib_data_toRST, sib_addr_toRST: STD_LOGIC; signal sib_mem_toTCK, sib_data_toTCK, sib_addr_toTCK: STD_LOGIC; signal sib_mem_toSI, sib_data_toSI, sib_addr_toSI: STD_LOGIC; component SReg is Generic ( Size : positive := 33); Port ( -- Scan Interface scan_client ---------- SI : in STD_LOGIC; -- ScanInPort SO : out STD_LOGIC; -- ScanOutPort SEL : in STD_LOGIC; -- SelectPort ---------------------------------------- SE : in STD_LOGIC; -- ShiftEnPort CE : in STD_LOGIC; -- CaptureEnPort UE : in STD_LOGIC; -- UpdateEnPort RST : in STD_LOGIC; -- ResetPort TCK : in STD_LOGIC; -- TCKPort DI : in STD_LOGIC_VECTOR (Size-1 downto 0); --DataInPort DO : out STD_LOGIC_VECTOR (Size-1 downto 0)); --DataOutPort end component; component SIB_mux_pre is Port ( -- Scan Interface client -------------- SI : in STD_LOGIC; -- ScanInPort CE : in STD_LOGIC; -- CaptureEnPort SE : in STD_LOGIC; -- ShiftEnPort UE : in STD_LOGIC; -- UpdateEnPort SEL : in STD_LOGIC; -- SelectPort RST : in STD_LOGIC; -- ResetPort TCK : in STD_LOGIC; -- TCKPort SO : out STD_LOGIC; -- ScanOutPort -- Scan Interface host ---------------- fromSO : in STD_LOGIC; -- ScanInPort toCE : out STD_LOGIC; -- ToCaptureEnPort toSE : out STD_LOGIC; -- ToShiftEnPort toUE : out STD_LOGIC; -- ToUpdateEnPort toSEL : out STD_LOGIC; -- ToSelectPort toRST : out STD_LOGIC; -- ToResetPort toTCK : out STD_LOGIC; -- ToTCKPort toSI : out STD_LOGIC); -- ScanOutPort end component; begin RAM_address_out <= RAM_address; RAM_data_write <= RAM_data_write_internal; RAM_write_enable <= RAM_write_enable_strobe and RAM_write_enable_internal; -- .-------. -- SI -----|sib_mem|-- SO -- '-------' -- | |_________________________________________________. -- | | -- | .----------. .------------. | -- '--| sib_data |--------------------->| sib_addr |----' -- '----------' '------------' -- | |_____________ | |______________ -- | _____________ | | ______ _______ | -- '--->| data |-' '->|we,inc|-|address|-' -- '-------------' '------' '-------' -- Auto increment bit is MSb in Address shift register SO <= sib_mem_so; MEM_SIB_SEL <= sib_mem_toSEL; -- Top-level SIB for integration into system's IJTAG network sib_mem : SIB_mux_pre port map ( SI => SI, SE => SE, UE => UE, CE => CE, SEL => SEL, RST => RST, TCK => TCK, SO => sib_mem_so, fromSO => sib_addr_so, toCE => sib_mem_toCE, toSE => sib_mem_toSE, toUE => sib_mem_toUE, toSEL => sib_mem_toSEL, toRST => sib_mem_toRST, toTCK => sib_mem_toTCK, toSI => sib_mem_toSI); -- Underlying SIB for efficient access to RAM data sib_data : SIB_mux_pre port map ( SI => sib_mem_toSI, SE => sib_mem_toSE, UE => sib_mem_toUE, CE => sib_mem_toCE, SEL => sib_mem_toSEL, RST => sib_mem_toRST, TCK => sib_mem_toTCK, SO => sib_data_so, fromSO => data_sreg_so, toCE => sib_data_toCE, toSE => sib_data_toSE, toUE => sib_data_toUE, toSEL => sib_data_toSEL, toRST => sib_data_toRST, toTCK => sib_data_toTCK, toSI => sib_data_toSI); -- Shift register for RAM data data_shiftreg : SReg Generic map ( Size => DataSize) Port map ( -- Scan Interface scan_client ---------- SI => sib_data_toSI, -- Input Port SI = SI SO => data_sreg_so, SEL => sib_data_toSEL, SE => sib_data_toSE, UE => sib_data_toUE, CE => sib_data_toCE, RST => sib_data_toRST, TCK => sib_data_toTCK, DI => RAM_data_read, DO => RAM_data_write_internal); -- Underlying SIB for setting access address sib_addr : SIB_mux_pre port map ( SI => sib_data_so, SE => sib_mem_toSE, UE => sib_mem_toUE, CE => sib_mem_toCE, SEL => sib_mem_toSEL, RST => sib_mem_toRST, TCK => sib_mem_toTCK, SO => sib_addr_so, fromSO => addr_sreg_so, toCE => sib_addr_toCE, toSE => sib_addr_toSE, toUE => sib_addr_toUE, toSEL => sib_addr_toSEL, toRST => sib_addr_toRST, toTCK => sib_addr_toTCK, toSI => sib_addr_toSI); -- Shift register for Address increment bit and write enable bit service_bits_shiftreg : SReg Generic map ( Size => 2) Port map ( -- Scan Interface scan_client ---------- SI => sib_addr_toSI, SO => service_sreg_so, SEL => sib_addr_toSEL, SE => sib_addr_toSE, CE => sib_addr_toCE, UE => sib_addr_toUE, RST => sib_addr_toRST, TCK => sib_addr_toTCK, DI => Addr_service_bits, DO => Addr_service_bits_update); Addr_service_bits <= RAM_write_enable_internal & RAM_addr_inc_reg; -- Shift register for RAM address addr_shiftreg : SReg Generic map ( Size => AddressSize) Port map ( -- Scan Interface scan_client ---------- SI => service_sreg_so, SO => addr_sreg_so, SEL => sib_addr_toSEL, SE => sib_addr_toSE, CE => sib_addr_toCE, UE => sib_addr_toUE, RST => sib_addr_toRST, TCK => sib_addr_toTCK, DI => RAM_address, DO => RAM_address_update); update_strobes: process(TCK) begin if TCK'event and TCK = '0' then sib_addr_toUE_prev <= sib_addr_toUE; sib_data_toUE_prev <= sib_data_toUE; sib_addr_update_strobe <= not sib_addr_toUE_prev and sib_addr_toUE and sib_addr_toSEL; sib_data_update_strobe <= not sib_data_toUE_prev and sib_data_toUE and sib_data_toSEL; end if; end process; service_bits: process(TCK, RST) begin if RST = '1' then RAM_addr_inc_reg <= '0'; RAM_write_enable_internal <= '0'; elsif TCK'event and TCK = '0' then RAM_addr_inc_reg <= Addr_service_bits_update(0); -- Auto increment bit RAM_write_enable_internal <= Addr_service_bits_update(1); -- Write enable bit end if; end process; data_write_strobe_delay: process(TCK, RST) begin if RST = '1' then RAM_write_enable_strobe <= '0'; elsif TCK'event and TCK = '0' then RAM_write_enable_strobe <= sib_data_update_strobe; end if; end process; address_set: process(TCK, RST) begin if RST = '1' then RAM_address <= (others => '0'); elsif TCK'event and TCK = '0' then if sib_addr_update_strobe = '1' then RAM_address <= RAM_address_update; elsif RAM_write_enable_strobe = '1' and RAM_addr_inc_reg = '1' then RAM_address <= std_logic_vector(unsigned(RAM_address) + 1); end if; end if; end process; end RAMAccessInstrument_arch;
gpl-3.0
ce89fa5a8efb0d1418fdc22f7a8a84ad
0.495329
3.893963
false
false
false
false
AndyMcC0/UVVM_All
bitvis_vip_axilite/src/vvc_cmd_pkg.vhd
3
7,153
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_vvc_framework_support_pkg.all; use work.axilite_bfm_pkg.all; --================================================================================================= --================================================================================================= --================================================================================================= package vvc_cmd_pkg is --=============================================================================================== -- t_operation -- - Bitvis defined BFM operations --=============================================================================================== type t_operation is ( -- UVVM common NO_OPERATION, AWAIT_COMPLETION, AWAIT_ANY_COMPLETION, ENABLE_LOG_MSG, DISABLE_LOG_MSG, FLUSH_COMMAND_QUEUE, FETCH_RESULT, INSERT_DELAY, TERMINATE_CURRENT_COMMAND, -- VVC local WRITE, READ, CHECK); constant C_VVC_CMD_DATA_MAX_LENGTH : natural := 256; constant C_VVC_CMD_BYTE_ENABLE_MAX_LENGTH : natural := C_VVC_CMD_DATA_MAX_LENGTH/8; constant C_VVC_CMD_ADDR_MAX_LENGTH : natural := 32; constant C_VVC_CMD_STRING_MAX_LENGTH : natural := 300; --=============================================================================================== -- t_vvc_cmd_record -- - Record type used for communication with the VVC --=============================================================================================== type t_vvc_cmd_record is record -- Common UVVM fields (Used by td_vvc_framework_common_methods_pkg procedures, and thus mandatory) operation : t_operation; proc_call : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); msg : string(1 to C_VVC_CMD_STRING_MAX_LENGTH); cmd_idx : natural; command_type : t_immediate_or_queued; -- QUEUED/IMMEDIATE msg_id : t_msg_id; gen_integer_array : t_integer_array(0 to 1); -- Increase array length if needed gen_boolean : boolean; -- Generic boolean timeout : time; alert_level : t_alert_level; delay : time; quietness : t_quietness; -- VVC dedicated fields addr : unsigned(C_VVC_CMD_ADDR_MAX_LENGTH-1 downto 0); -- Max width may be increased if required data : std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0); byte_enable : std_logic_vector(C_VVC_CMD_BYTE_ENABLE_MAX_LENGTH-1 downto 0); end record; constant C_VVC_CMD_DEFAULT : t_vvc_cmd_record := ( operation => NO_OPERATION, -- Default unless overwritten by a common operation addr => (others => '0'), data => (others => '0'), byte_enable => (others => '1'), alert_level => failure, proc_call => (others => NUL), msg => (others => NUL), cmd_idx => 0, command_type => NO_command_type, msg_id => NO_ID, gen_integer_array => (others => -1), gen_boolean => false, timeout => 0 ns, delay => 0 ns, quietness => NON_QUIET ); --=============================================================================================== -- shared_vvc_cmd -- - Shared variable used for transmitting VVC commands --=============================================================================================== shared variable shared_vvc_cmd : t_vvc_cmd_record := C_VVC_CMD_DEFAULT; --=============================================================================================== -- t_vvc_result, t_vvc_result_queue_element, t_vvc_response and shared_vvc_response : -- -- - Used for storing the result of a BFM procedure called by the VVC, -- so that the result can be transported from the VVC to for example a sequencer via -- fetch_result() as described in VVC_Framework_common_methods_QuickRef -- -- - t_vvc_result includes the return value of the procedure in the BFM. -- It can also be defined as a record if multiple values shall be transported from the BFM --=============================================================================================== subtype t_vvc_result is std_logic_vector(C_VVC_CMD_DATA_MAX_LENGTH-1 downto 0); type t_vvc_result_queue_element is record cmd_idx : natural; -- from UVVM handshake mechanism result : t_vvc_result; end record; type t_vvc_response is record fetch_is_accepted : boolean; transaction_result : t_transaction_result; result : t_vvc_result; end record; shared variable shared_vvc_response : t_vvc_response; --=============================================================================================== -- t_last_received_cmd_idx : -- - Used to store the last queued cmd in vvc interpreter. --=============================================================================================== type t_last_received_cmd_idx is array (t_channel range <>,natural range <>) of integer; --=============================================================================================== -- shared_vvc_last_received_cmd_idx -- - Shared variable used to get last queued index from vvc to sequencer --=============================================================================================== shared variable shared_vvc_last_received_cmd_idx : t_last_received_cmd_idx(t_channel'left to t_channel'right, 0 to C_MAX_VVC_INSTANCE_NUM) := (others => (others => -1)); end package vvc_cmd_pkg; package body vvc_cmd_pkg is end package body vvc_cmd_pkg;
mit
f984c67f9c13662e13ba5e90267f6e73
0.463861
4.963914
false
false
false
false
elainemielas/CVUT_BI-PNO
project1/automat.vhd
1
1,143
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity AUTOMAT is port( CLK, BTN0, BTN1, ZERO : in std_logic; POSUN, SCIT : out std_logic ); end AUTOMAT; architecture AUTOMAT_BODY of AUTOMAT is type TYP_STAV is (START, POS, CEKANI, SUM, SHOW); signal STAV, DALSI_STAV : TYP_STAV; begin PRECHODY : process (BTN1, STAV, ZERO) begin DALSI_STAV <= STAV; case STAV is when START => if BTN1 = '1' then DALSI_STAV <= POS; end if; when POS => DALSI_STAV <= CEKANI; when CEKANI => if BTN1 = '0' then DALSI_STAV <= SUM; end if; when SUM => if ZERO = '1' then DALSI_STAV <= SHOW; end if; when SHOW => if BTN1 = '1' then DALSI_STAV <= POS; end if; when others => NULL; end case; end process; VYSTUP : process (STAV) begin POSUN <= '0'; SCIT <= '0'; case STAV is when POS => POSUN <= '1'; when SUM => SCIT <= '1'; when others => NULL; end case; end process; REG : process (CLK) begin if CLK'event and CLK = '1' then if BTN0 = '1' then STAV <= START; else STAV <= DALSI_STAV; end if; end if; end process; end architecture;
mit
431261af7c55991b5dad5e0f89e70d22
0.587052
2.893671
false
false
false
false
AndyMcC0/UVVM_All
uvvm_util/src/types_pkg.vhd
1
6,000
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; library ieee; use ieee.std_logic_1164.all; use std.textio.all; package types_pkg is file ALERT_FILE : text; file LOG_FILE : text; constant C_LOG_HDR_FOR_WAVEVIEW_WIDTH : natural := 100; -- For string in waveview indicating last log header constant C_NUM_SYNC_FLAGS : positive := 10; constant C_FLAG_NAME_LENGTH : positive := 20; type t_void is (VOID); type t_natural_array is array (natural range <>) of natural; type t_integer_array is array (natural range <>) of integer; type t_byte_array is array (natural range <>) of std_logic_vector(7 downto 0); -- Note: Most types below have a matching to_string() in 'string_methods_pkg.vhd' type t_info_target is (LOG_INFO, ALERT_INFO, USER_INFO); type t_alert_level is (NO_ALERT, NOTE, TB_NOTE, WARNING, TB_WARNING, MANUAL_CHECK, ERROR, TB_ERROR, FAILURE, TB_FAILURE); type t_enabled is (ENABLED, DISABLED); type t_attention is (REGARD, EXPECT, IGNORE); type t_radix is (BIN, HEX, DEC, HEX_BIN_IF_INVALID); type t_radix_prefix is (EXCL_RADIX, INCL_RADIX); type t_order is (INTERMEDIATE, FINAL); type t_ascii_allow is (ALLOW_ALL, ALLOW_PRINTABLE_ONLY); type t_blocking_mode is (BLOCKING, NON_BLOCKING); type t_from_point_in_time is (FROM_NOW, FROM_LAST_EVENT); type t_format_zeros is (AS_IS, KEEP_LEADING_0, SKIP_LEADING_0); -- AS_IS is deprecated and will be removed. Use KEEP_LEADING_0. type t_format_string is (AS_IS, TRUNCATE, SKIP_LEADING_SPACE); -- Deprecated, will be removed. type t_format_spaces is (KEEP_LEADING_SPACE, SKIP_LEADING_SPACE); type t_truncate_string is (ALLOW_TRUNCATE, DISALLOW_TRUNCATE); type t_log_format is (FORMATTED, UNFORMATTED); type t_log_if_block_empty is (WRITE_HDR_IF_BLOCK_EMPTY, SKIP_LOG_IF_BLOCK_EMPTY, NOTIFY_IF_BLOCK_EMPTY); type t_log_destination is (CONSOLE_AND_LOG, CONSOLE_ONLY, LOG_ONLY); type t_match_strictness is (MATCH_STD, MATCH_EXACT); type t_alert_counters is array (NOTE to t_alert_level'right) of natural; type t_alert_attention is array (NOTE to t_alert_level'right) of t_attention; type t_attention_counters is array (t_attention'left to t_attention'right) of natural; -- Only used to build below type type t_alert_attention_counters is array (NOTE to t_alert_level'right) of t_attention_counters; type t_quietness is (NON_QUIET, QUIET); type t_deprecate_setting is (NO_DEPRECATE, DEPRECATE_ONCE, ALWAYS_DEPRECATE); type t_deprecate_list is array(0 to 9) of string(1 to 100); type t_action_when_transfer_is_done is (RELEASE_LINE_AFTER_TRANSFER, HOLD_LINE_AFTER_TRANSFER); type t_active_level is (ACTIVE_HIGH, ACTIVE_LOW); type t_global_ctrl is record attention : t_alert_attention; stop_limit : t_alert_counters; end record; type t_current_log_hdr is record normal : string(1 to C_LOG_HDR_FOR_WAVEVIEW_WIDTH); large : string(1 to C_LOG_HDR_FOR_WAVEVIEW_WIDTH); xl : string(1 to C_LOG_HDR_FOR_WAVEVIEW_WIDTH); end record; -- type for await_unblock_flag whether the method should set the flag back to blocked or not type t_flag_returning is (KEEP_UNBLOCKED, RETURN_TO_BLOCK); -- value after unblock type t_sync_flag_record is record flag_name : string(1 to C_FLAG_NAME_LENGTH); is_active : boolean; end record; constant C_SYNC_FLAG_DEFAULT : t_sync_flag_record := ( flag_name => (others => ' '), is_active => true ); type t_sync_flag_record_array is array (1 to C_NUM_SYNC_FLAGS) of t_sync_flag_record; type t_uvvm_status is record no_unexpected_simulation_warnings_or_worse : natural range 0 to 1; no_unexpected_simulation_errors_or_worse : natural range 0 to 1; end record t_uvvm_status; ------------------------------------- -- BFMs and above ------------------------------------- type t_transaction_result is (ACK, NAK, ERROR); -- add more when needed type t_hierarchy_alert_level_print is array (NOTE to t_alert_level'right) of boolean; constant C_HIERARCHY_NODE_NAME_LENGTH : natural := 20; type t_hierarchy_node is record name : string(1 to C_HIERARCHY_NODE_NAME_LENGTH); alert_attention_counters : t_alert_attention_counters; alert_stop_limit : t_alert_counters; alert_level_print : t_hierarchy_alert_level_print; end record; type t_bfm_delay_type is (NO_DELAY, TIME_FINISH2START, TIME_START2START); type t_inter_bfm_delay is record delay_type : t_bfm_delay_type; delay_in_time : time; inter_bfm_delay_violation_severity : t_alert_level; end record; end package types_pkg; package body types_pkg is end package body types_pkg;
mit
ed3996a2e5310bb35a750ad4350fe4c0
0.6375
3.731343
false
false
false
false
Wynjones1/gbvhdl
testing/alu_tb.vhd
1
3,176
library IEEE; use IEEE.numeric_std.all; use IEEE.std_logic_1164.all; use IEEE.std_logic_misc.all; use IEEE.std_logic_textio.all; use std.textio.all; use work.types.all; use work.interfaces.all; entity alu_tb is end; architecture rtl of alu_tb is component alu is port(input : in alu_in_if; output : out alu_out_if); end component; procedure output_data(name : string; i0 : std_logic_vector(7 downto 0); i1 : std_logic_vector(7 downto 0); q : std_logic_vector(7 downto 0); flags_in : std_logic_vector(7 downto 0); flags_out : std_logic_vector(7 downto 0); file output_file : text) is variable tmp : line; begin write(tmp, name); write(tmp, string'(" ")); write(tmp, i0); write(tmp, string'(" ")); write(tmp, i1); write(tmp, string'(" ")); write(tmp, flags_in); write(tmp, string'(" ")); write(tmp, q); write(tmp, string'(" ")); write(tmp, flags_out); writeline(output_file, tmp); end procedure; signal clk : std_logic; signal input : alu_in_if; signal output : alu_out_if; begin alu0: alu port map (input, output); clkgen: process begin clk <= '0'; wait for 10 ns; clk <= '1'; wait for 10 ns; end process; -- gen_data: -- process -- type state_t is (state_read_op, state_load_input, state_read_output); -- variable state : state_t := state_read_op; -- file log : text open read_mode is "/home/stuart/VHDL/gbvhdl/testing/input.txt"; -- file outfile : text; -- variable tmp_line : line; -- begin -- case state is -- when state_read_op => -- if endfile(log) then -- report "End of simulation." severity failure; -- end if; -- readline(log, tmp_line); -- file_open(outfile, "/home/stuart/VHDL/gbvhdl/testing/output/" & tmp_line.all & ".txt", WRITE_MODE); -- op <= string_to_alu_op(tmp_line.all); -- state := state_load_input; -- wait for 10 ns; -- when state_load_input => -- state := state_read_output; -- wait for 10 ns; -- when state_read_output => -- state := state_load_input; -- output_data(tmp_line.all, i0, i1, q, flags_in, flags_out, outfile); -- input <= std_logic_vector( unsigned(input) + 1); -- if and_reduce(input) = '1' then -- state := state_read_op; -- file_close(outfile); -- end if; -- wait for 10 ns; -- end case; -- end process; -- -- i0 <= input( 7 downto 0); -- i1 <= input(15 downto 8); -- flags_in <= input(19 downto 16) & "0000"; end rtl;
mit
1f4472a3f12e61ca866f65508c169a08
0.473866
3.701632
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/plasma_RTL/ram_xilinx_3.vhd
3
181,455
--------------------------------------------------------------------- -- TITLE: Random Access Memory for Xilinx -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 11/06/05 -- FILENAME: ram_xilinx.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Implements Plasma internal RAM as RAMB for Spartan 3x -- -- Compile the MIPS C and assembly code into "test.axf". -- Run convert.exe to change "test.axf" to "code.txt" which -- will contain the hex values of the opcodes. -- Next run "ram_image ram_xilinx.vhd code.txt ram_image.vhd", -- to create the "ram_image.vhd" file that will have the opcodes -- correctly placed inside the INIT_00 => strings. -- Then include ram_image.vhd in the simulation/synthesis. -- -- Warning: Addresses 0x1000 - 0x1FFF are reserved for the cache -- if the DDR cache is enabled. --------------------------------------------------------------------- -- UPDATED: 09/07/10 Olivier Rinaudo ([email protected]) -- new behaviour: 8KB expandable to 64KB of internal RAM -- -- MEMORY MAP -- 0000..1FFF : 8KB 8KB block0 (upper 4KB used as DDR cache) -- 2000..3FFF : 8KB 16KB block1 -- 4000..5FFF : 8KB 24KB block2 -- 6000..7FFF : 8KB 32KB block3 -- 8000..9FFF : 8KB 40KB block4 -- A000..BFFF : 8KB 48KB block5 -- C000..DFFF : 8KB 56KB block6 -- E000..FFFF : 8KB 64KB block7 --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use work.mlite_pack.all; library UNISIM; use UNISIM.vcomponents.all; entity ram_3 is generic(memory_type : string := "DEFAULT"; --Number of 8KB blocks of internal RAM, up to 64KB (1 to 8) block_count : integer := 8); port(clk : in std_logic; enable : in std_logic; reset : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0)); end; --entity ram architecture logic of ram_3 is --type type mem32_vector IS ARRAY (NATURAL RANGE<>) OF std_logic_vector(31 downto 0); --Which 8KB block alias block_sel: std_logic_vector(2 downto 0) is address(15 downto 13); --Address within a 8KB block (without lower two bits) alias block_addr : std_logic_vector(10 downto 0) is address(12 downto 2); --Block enable with 1 bit per memory block signal block_enable: std_logic_vector(7 downto 0); --Block Data Out signal block_do: mem32_vector(7 downto 0); --Remember which block was selected signal block_sel_buf: std_logic_vector(2 downto 0); begin block_enable<= "00000001" when (enable='1') and (block_sel="000") else "00000010" when (enable='1') and (block_sel="001") else "00000100" when (enable='1') and (block_sel="010") else "00001000" when (enable='1') and (block_sel="011") else "00010000" when (enable='1') and (block_sel="100") else "00100000" when (enable='1') and (block_sel="101") else "01000000" when (enable='1') and (block_sel="110") else "10000000" when (enable='1') and (block_sel="111") else "00000000"; proc_blocksel: process (clk, block_sel) is begin if rising_edge(clk) then block_sel_buf <= block_sel; end if; end process; proc_do: process (block_do, block_sel_buf) is begin data_read <= block_do(conv_integer(block_sel_buf)); end process; -- BLOCKS generation block0: if (block_count > 0) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"afafafafafafafafafafafafafafafaf2308000c241400ac273c243c243c273c", INIT_01 => X"8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f230c008c8c3caf00af00af2340afaf", INIT_02 => X"acacacac0003373cac038cac8cac8cac8c243c40034040033423038f038f8f8f", INIT_03 => X"000300ac0300000034038c8c8c8c8c8c8c8c8c8c8c8c3403acacacacacacacac", INIT_04 => X"8c343c00af03af270003278f0300ac008f34af0000000014008f8fafaf03af27", INIT_05 => X"008f000c2400142480008f0010af03afaf270003278f0300ac008f3c00103000", INIT_06 => X"008f8f0010af24af03afaf270003278f8f030000140080008f000c000080af24", INIT_07 => X"03000004008faf24008f000c0024008f0010000c0024008f00102c008faf3000", INIT_08 => X"0c000080af24008f0010af27000c8f008f002727afafaf03afaf270003278f8f", INIT_09 => X"3c03af270003278f8f030000140080008fa0248faf24008f0014248024008f00", INIT_0A => X"0000000003278f8f030000008c3c0010000c0003afaf270003278f0330008c34", INIT_0B => X"243c000c343c243c24000c343c243c24000c243c000c243c000c243c03afaf27", INIT_0C => X"24243c243c243caf243caf24000c24243c243c243caf243caf24000c243c000c", INIT_0D => X"000c343c243c243c243caf243caf24000c343c243c243c243caf243caf24000c", INIT_0E => X"243c000c000c243c000c243c000c000c243c000c243c000c000c243c000c243c", INIT_0F => X"3c000c243c0010000c243c0014008c3c000c243c000c243c000c000c243c000c", INIT_10 => X"af240010af24afaf03afaf270003278f8f0300000c24000c0024008c3c000c24", INIT_11 => X"0c8f24000010008f001400008f8faf24008f0010af001400000014008f8f0010", INIT_12 => X"24008faf240010008f8c002400008f3c000c0024008c002400008f3c000c2400", INIT_13 => X"0c243c0010ac3c24008c3c000c243c0014248f001428008faf24008f000c24af", INIT_14 => X"0087000c24000c8faf00008f870010a7afafafaf03afaf270003278f8f030000", INIT_15 => X"0087a730240097af240010008f8c00008f000087000c24000c00008c00008f00", INIT_16 => X"000c243c0010ac3c24008c3c000c243c0014248f000c8f2400000c243c001428", INIT_17 => X"87000c24000c8faf0000008f870010a7afafafafaf03afaf270003278f8f0300", INIT_18 => X"87a730240097af240010008f8c00008f000087000c24000c00008c00008f0000", INIT_19 => X"008c00008f000087000c24000c8faf0000008f2400870010a7000c2400142800", INIT_1A => X"000c240014280087a730240097af240010008f8c00008f000087000c24000c00", INIT_1B => X"000c00008c00008f0000343c87000c24000c8faf0000000014008f870010a724", INIT_1C => X"24000c240014280087a730240097af240010008f8c00008f0000343c87000c24", INIT_1D => X"0c24000c00008c00008f0000343c87000c24000c8faf00000014008f870010a7", INIT_1E => X"2400000c243c0014280087a730240097af240010008f8c00008f0000343c8700", INIT_1F => X"af270003278f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c8f", INIT_20 => X"0c24000c00008c002400008f3c000c24000c8faf00008f8f0010afafaf2403af", INIT_21 => X"008f8f0010af000c24001428008faf24008faf240010008f8c002400008f3c00", INIT_22 => X"10008f8c002400008f3c000c24000c00008c002400008f3c000c24000c8faf00", INIT_23 => X"0010ac3c24008c3c000c243c0014248f000c243c001428008faf24008faf2400", INIT_24 => X"8f0000008fa000278f0000008f0010afaf03afaf270003278f8f0300000c243c", INIT_25 => X"00af008000278f0010af001428008faf24008fac008f002700008fa400270000", INIT_26 => X"10008f8c002400008f3c000c24000c0024008c002400008f3c000c24000c8f24", INIT_27 => X"24000c0024008c002400008f3c000c24000c8f2400af0084002700008faf2400", INIT_28 => X"3c000c24000c8f2400af008c002700008faf240010008f8c002400008f3c000c", INIT_29 => X"8faf24008faf240010008f8c002400008f3c000c24000c0024008c002400008f", INIT_2A => X"8f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c243c00142800", INIT_2B => X"000c24000c00008c3c000c24000c8faf00008f8fafaf24af2403afaf27000327", INIT_2C => X"8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f8c3c", INIT_2D => X"008f8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f", INIT_2E => X"240010008f8c243c000c24000c00008c243c000c24000c8faf00008faf240010", INIT_2F => X"008faf240010008f8c243c000c24000c00008c243c000c24000c8faf24008faf", INIT_30 => X"0014248f000c243caf240010008f8c243c000c00008c243c000c24000c8faf24", INIT_31 => X"28008c3caf03af27000003278f8f0300000c243c0010ac3c24008c3c000c243c", INIT_32 => X"a324af03af270003278f0324001000ac3c24008c3cac008f0024003c8c3c0010", INIT_33 => X"14003c8c340010240010248c3c00100083a4248fa3001000102400100094008f", INIT_34 => X"af270003278f0324a4008fa30010ac3cac243cac3cac008c3c240018008c3c00", INIT_35 => X"0010240010248c3c00100083a4248fa3001000102400100094008fa324afaf03", INIT_36 => X"3cac0024003c8c248c3c001028008c3c0004008f0010008faf008c34af008c34", INIT_37 => X"af008fafaf03af270003278f0324a4008fa30010ac243cac3cac3cac3c24008c", INIT_38 => X"10afafafafaf03afaf270003278f038f00140080a00080af24008faf24008f00", INIT_39 => X"8f8faf240010af240010248f0004008fa3001428008faf24008fa02400278f00", INIT_3A => X"008f001028008faf0000000014008f8faf00000014008f8f0010af24af000000", INIT_3B => X"1000008c008f00008f240014008fa000278f0000302430008f00100000302430", INIT_3C => X"8f0010008c008fa02400278faf24008f0014248f0000100004008faf24008f00", INIT_3D => X"2700248c008f0010ac008f00008f24000c8f0000008f2700100000008f248c00", INIT_3E => X"af03af270003278f0300ac343c343cafaf03af270003278f8f0300000c8f0000", INIT_3F => X"008fafaf03af270003278f038f0014008faf00008f24008faf302c008f0010af" ) port map ( DO => block_do(0)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"b8afaeadacabaaa9a8a7a6a5a4a3a2a1bd000000a560a4a0bd1d8404a5059c1c", INIT_01 => X"b9b8afaeadacabaaa9a8a7a6a5a4a3a2a1a50086c6c406bb00bb00ba5a1abfb9", INIT_02 => X"9392919000405a1a06e0a606a606a606a6a50584e0029b401bbd60bb60bbbabf", INIT_03 => X"00e000c4e0000085a2e09f9d9c9e979695949392919002e09f9d9c9e97969594", INIT_04 => X"42420200c4a0bebd00e0bdbec0004300c302c2000007624000c2c3c5c4a0bebd", INIT_05 => X"00c20000040062024300c20000c4a0bebfbd00e0bdbec0004300c30200404200", INIT_06 => X"00c2c30000c202c4a0bebfbd00e0bdbebfc0000040004200c20000400042c343", INIT_07 => X"c000004100c2c24200c20000404200c200000000404200c200404200c2c24243", INIT_08 => X"00400042c34300c20000c2c20000c440c660c2c3c6c5c4a0bebfbd00e0bdbebf", INIT_09 => X"02a0bebd00e0bdbebfc0000040004200c24303c2c24200c2006202434200c200", INIT_0A => X"00000000e0bdbebfc002020042020040000000a0bebfbd00e0bdbec042004242", INIT_0B => X"44020000440245020600004402450206000044020000440200004402a0bebfbd", INIT_0C => X"04450246024702a24202a202000004450246024702a24202a202000044020000", INIT_0D => X"00004402450246024702a24202a20200004402450246024702a24202a2020000", INIT_0E => X"4402000000004402000044020000000044020000440200000000440200004402", INIT_0F => X"0200004402000000004402004000420200004402000044020000000044020000", INIT_10 => X"c2020000c202c0c0a0bebfbd00e0bdbebfc00000000400004005004202000044", INIT_11 => X"00c40500004000c200406200c2c3c24200c20000c000400007624000c2c30000", INIT_12 => X"4200c2c202006200c24362420300c30200004005004262420300c30200000400", INIT_13 => X"004402000043024300420200004402006202c300404200c2c24200c2000004c2", INIT_14 => X"00c20000040000c4c24300c3c20000c0c0c6c5c4a0bebfbd00e0bdbebfc00000", INIT_15 => X"00c2c2424200c2c202006200c2436200c30200c200000400004000426200c302", INIT_16 => X"00004402000043024300420200004402006202c30000c4050000004402004042", INIT_17 => X"c20000040000c4c2006200c2c30000c0c0c7c6c5c4a0bebfbd00e0bdbebfc000", INIT_18 => X"c2c2424200c2c202006200c2436200c30200c200000400004000426200c30200", INIT_19 => X"00426200c30200c20000040000c4c2006200c24300c20000c000000400404200", INIT_1A => X"00000400404200c2c2424200c2c202006200c2436200c30200c2000004000040", INIT_1B => X"00004000426200c302624202c30000040000c4c2000007624000c3c20000c202", INIT_1C => X"0200000400404200c2c2424200c2c202006200c2436200c302624202c3000004", INIT_1D => X"000400004000426200c302624202c30000040000c4c20007624000c3c20000c2", INIT_1E => X"05000000440200404200c2c2424200c2c202006200c2436200c302624202c300", INIT_1F => X"bfbd00e0bdbebfc00000004402000043024300420200004402006202c30000c4", INIT_20 => X"0004000040004262420300c3020000040000c4c26200c2c30000c0c0c202a0be", INIT_21 => X"00c2c30000c000000400404200c2c24200c2c202006200c24362420300c30200", INIT_22 => X"6200c24362420300c302000004000040004262420300c3020000040000c4c262", INIT_23 => X"000043024300420200004402006202c30000440200404200c2c24200c2c20200", INIT_24 => X"c2030200c24382c4c2030200c20000c0c0a0bebfbd00e0bdbebfc00000004402", INIT_25 => X"00c2004262c3c20000c000404200c2c24200c24300c362c30200c24382c40200", INIT_26 => X"6200c24362420300c30200000400004005004262420300c3020000040000c405", INIT_27 => X"0400004005004262420300c3020000040000c40500c2004262c30200c2c20200", INIT_28 => X"020000040000c40500c2004262c30200c2c202006200c24362420300c3020000", INIT_29 => X"c2c24200c2c202006200c24362420300c30200000400004005004262420300c3", INIT_2A => X"bebfc00000004402000043024300420200004402006202c30000440200404200", INIT_2B => X"0000040000400042020000040000c4c26200c2c3c0c202c202a0bebfbd00e0bd", INIT_2C => X"434202000004000040004242020000040000c4c26200c2c3c202006200c24302", INIT_2D => X"00c2434202000004000040004242020000040000c4c26200c2c3c202006200c2", INIT_2E => X"02006200c2434202000004000040004242020000040000c4c20200c2c2020062", INIT_2F => X"00c2c202006200c2434202000004000040004242020000040000c4c24200c2c2", INIT_30 => X"006202c300004402c202006200c2434202000040004242020000040000c4c242", INIT_31 => X"42004202c4a0bebd0000e0bdbebfc00000004402000043024300420200004402", INIT_32 => X"c202c4a0bebd00e0bdbec0020000004302430042024300c36242030243020040", INIT_33 => X"40620243020000020062024302004000c24303c2c000000043030040004200c2", INIT_34 => X"bebd00e0bdbec0024000c2c00000400243030240024300630302004000420200", INIT_35 => X"0000020062024302004000c24303c2c000000043030040004200c2c202c0c4a0", INIT_36 => X"02438242040243024402004042004202004000c2004000c2c2004202c2004202", INIT_37 => X"c200c2c5c4a0bebd00e0bdbec0024000c2c00000430302400240024302430042", INIT_38 => X"00c0c7c6c5c4a0bebfbd00e0bdbec0c200400042430063c46400c3c34300c200", INIT_39 => X"c2c3c2020000c202006202c3004100c2c000404200c2c24200c2430362c3c200", INIT_3A => X"00c200404200c2c2000007624000c3c2c20007624000c3c20000c202c2006200", INIT_3B => X"4062004200c26200c203004000c26283c4c3020242424200c200000202424242", INIT_3C => X"c20040004200c2430362c3c2c24200c2006202c3000000004100c2c24200c200", INIT_3D => X"c362034200c200004300c26200c2030000c4406200c2c30040628200c2044300", INIT_3E => X"c4a0bebd00e0bdbec0004363034202c5c4a0bebd00e0bdbebfc0000000c44062", INIT_3F => X"00c2c5c4a0bebd00e0bdbec0c2004000c2c26200c34200c2c2424200c20000c0" ) port map ( DO => block_do(0)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"00000000000000000000000000000000ff00000800ff1800350035003300b200", INIT_01 => X"000000000000000000000000000000000000072000002000d800d800ff700000", INIT_02 => X"0000000000000010000000000000000000010060006060000000000000000000", INIT_03 => X"0000000000201000000000000000000000000000000000000000000000000000", INIT_04 => X"0000200000f000ff00000000e800000000800010100000000000000000f000ff", INIT_05 => X"0000000000000000000000000000f00000ff00000000e8000000002000ff0000", INIT_06 => X"0000000000000000f00000ff0000000000e80000ff0000000000002000000000", INIT_07 => X"e80000ff000000ff000000002000000000000000200000000000000000000010", INIT_08 => X"0020000000000000000000000007002800380000000000f00000ff0000000000", INIT_09 => X"20f000ff0000000000e80000ff0000000000000000ff000000000000ff000000", INIT_0A => X"0000000000000000e8161600002000ff000100f00000ff00000000e800000000", INIT_0B => X"2a00000256922700000002561227000000002a0000002a0000002a00f00000ff", INIT_0C => X"032800280028000028000000000200280028002800002800000000002a000000", INIT_0D => X"0002230029002900290000290000000002430028002900290000290000000002", INIT_0E => X"2a00000400002a0000002a00000500002a0000002a00000300002a0000002a00", INIT_0F => X"0000002b00000000002b00000000330000002b0000002b00000200002a000000", INIT_10 => X"0000000000000000f00000ff0000000000e8000000000001200030330000002b", INIT_11 => X"010000300000000000ff10000000000000000000000000100000000000000000", INIT_12 => X"0000000000000000000010241800000000012000300010241800000000000000", INIT_13 => X"002b00000033000000330000002b000000000000ff0300000000000000000000", INIT_14 => X"0000000000000000001000000000000000000000f00000ff0000000000e80000", INIT_15 => X"000000ff00000000000000000000100000100000000000000020000010000010", INIT_16 => X"00002b00000033000000330000002b0000000000000100003000002b0000ff00", INIT_17 => X"000000000000000010000000000000000000000000f00000ff0000000000e800", INIT_18 => X"0000ff0000000000000000000010000010000000000000002000001000001000", INIT_19 => X"0000100000100000000000000000001000000001000000000000000000ff0000", INIT_1A => X"00000000ff00000000ff00000000000000000000100000100000000000000020", INIT_1B => X"00002000001000001010ff3f0000000000000000101000000000000000000000", INIT_1C => X"0000000000ff00000000ff000000000000000000001000001010ff3f00000000", INIT_1D => X"000000002000001000001010ff3f000000000000000010000000000000000000", INIT_1E => X"003000002b0000ff00000000ff000000000000000000001000001010ff3f0000", INIT_1F => X"00ff0000000000e80000002b00000033000000330000002b0000000000000100", INIT_20 => X"000000002000001029180000000000000000000010000000000000000012f000", INIT_21 => X"00000000000000000000ff000000000000000000000000000010291800000000", INIT_22 => X"00000000102a180000000000000000200000102a180000000000000000000010", INIT_23 => X"000033000000330000002b000000000000002c0000ff00000000000000000000", INIT_24 => X"001c1c0000001000001e1e000000000000f00000ff0000000000e80000002b00", INIT_25 => X"3000000010000000000000ff0000000000000000000010001000000010001000", INIT_26 => X"00000000102c18000000000000000120003000102c1800000000000000010000", INIT_27 => X"00000120003000102c1800000000000000010000300000001000100000000000", INIT_28 => X"000000000001000030000000100010000000000000000000102c180000000000", INIT_29 => X"000000000000000000000000102c18000000000000000120003000102c180000", INIT_2A => X"0000e80000002b00000033000000330000002b000000000000002c0000ff0000", INIT_2B => X"000000000020002c0000000000000000100000000000430012f00000ff000000", INIT_2C => X"002c0000000000002000002c0000000000000000100000000000000000002c00", INIT_2D => X"0000002c0000000000002000002c000000000000000010000000000000000000", INIT_2E => X"0000000000002c0000000000002000002c000000000000000010000000000000", INIT_2F => X"0000000000000000002c0000000000002000002c000000000000000000000000", INIT_30 => X"0000000000002c00000000000000002c0000002000002c0000000000000000ff", INIT_31 => X"0000330000f000ff000000000000e80000002b00000033000000330000002b00", INIT_32 => X"000000f000ff00000000e8ff0000103300000033000000001035180033000000", INIT_33 => X"0010400080000000000000320000000000000000000000000000000000000000", INIT_34 => X"00ff00000000e8000000000000ff33003300003200000035007f000000330000", INIT_35 => X"00000000000033000000000000000000000000000000000000000000000000f0", INIT_36 => X"000010352000007f330000000000330000000000000000000000008000000080", INIT_37 => X"0000000000f000ff00000000e8000000000000ff330000330032003300000033", INIT_38 => X"000000000000f00000ff00000000e80000ff0000000000000000000000000000", INIT_39 => X"000000ff0000000000000000000000000000ff00000000000000000010000000", INIT_3A => X"0000000000000000101000000000000000100000000000000000000000100000", INIT_3B => X"0010000000001800000000000000001800001616000000000000001616000000", INIT_3C => X"00000000000000000010000000ff00000000ff0000000000ff000000ff000000", INIT_3D => X"0010000000000000000000180000000006002810000000000010100000000000", INIT_3E => X"00f000ff00000000e80000fc0000200000f000ff0000000000e8000006002810", INIT_3F => X"00000000f000ff00000000e80000ff000000100000ff00000000000000000000" ) port map ( DO => block_do(0)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"4c4844403c3834302c2824201c181410980e00ac04fd2a001800b0000000f001", INIT_01 => X"504c4844403c3834302c2824201c18141000cc2410200060125c1058fc005450", INIT_02 => X"0c08040000083c0048080c440840043c006000000800000801681360115c5854", INIT_03 => X"00080c000810121900082c2824201c1814100c08040000082c2824201c181410", INIT_04 => X"00200000082504f80008100c2500000000100012100d1b020014101410250cf0", INIT_05 => X"001800980d00040a000018001318251014e80008080425000000080000fa0200", INIT_06 => X"001020001e101c2025181ce00008181014250000e90000001800982500001801", INIT_07 => X"250000e0001010fc0010009825570014000700982530001400090a0014140f06", INIT_08 => X"9825000010010010001810140016a025a42514a8a8a4a025989c60000820181c", INIT_09 => X"002504f80008a0989c250000e400000010000d1010ff001000080a00ff001000", INIT_0A => X"000000000818101425030000000000fd003c00251014e8000808042501000020", INIT_0B => X"8000008878348c0002008878340c000100ae680000ae540000ae3c0025181ce0", INIT_0C => X"2184009c00b40010d800140200e7070c0024003c00106000140100ae680000ae", INIT_0D => X"00e7450174008c00a40010c800140400e72105fc0014002c00105000140300e7", INIT_0E => X"f800008b00ae680000aee000006300ae680000aec80000fe00ae680000aea800", INIT_0F => X"0000ae5000001300ae4800000700100000ae380000ae2800001400ae680000ae", INIT_10 => X"1403004b10031c18252024d8000820181c250000980a0005250a25100000ae5c", INIT_11 => X"05100a250026001400eb2a00101414020014000b140004100d1a020014100011", INIT_12 => X"0100181c0100030010002170800018000005250a250021708000180000983a00", INIT_13 => X"ae9c00000510000100100000ae7400000d011c00b2e800101002001000982018", INIT_14 => X"001000983a00d4181807002810002c1014302c28252024d80008282024250000", INIT_15 => X"001010ff0100101401000300180021002c80001000982000d425000021002c80", INIT_16 => X"00aee400000510000100100000aed800000d01140005300a2500aec40000d120", INIT_17 => X"1000983a00d418181218002810002d101434302c28252024d800082820242500", INIT_18 => X"1010ff0100101401000300180021002c80001000982000d425000021002c8000", INIT_19 => X"000021003080001000983a00d4181812180028230010002f1000980a00d00600", INIT_1A => X"00980a00ce06001010ff0100101401000300180021003080001000982000d425", INIT_1B => X"00d42500002100348021ffff1000983a00d4181812100d1a0200281000341001", INIT_1C => X"0100980a00c90a001010ff010010140100030018002100348021ffff10009820", INIT_1D => X"982000d42500002100388021ffff1000983a00d41818100d1a02002810003310", INIT_1E => X"0a2500aef00000ca0a001010ff010010140100030018002100388021ffff1000", INIT_1F => X"24d80008282024250000aee400000510000100100000aed800000d011400053c", INIT_20 => X"982000d425000021ec8000100000983a00d41c1c21001018002b101418342520", INIT_21 => X"001018002b1000980a00d20a00101001001014010003001c0021ec8000100000", INIT_22 => X"03001c0021148000100000982000d425000021148000100000983a00d41c1c23", INIT_23 => X"000510000100100000aed800000d011400ae140000d20a001010010010140100", INIT_24 => X"10030000100c21101003000010001f1014259094680008282024250000aee400", INIT_25 => X"2518000c21101000871000de0a0010100100103c001021108000101c21104000", INIT_26 => X"030018002158800010000098200005250a250021588000100000983a0005180a", INIT_27 => X"200005250a250021588000100000983a0005180a2518001c2110400010140100", INIT_28 => X"0000983a0005180a2518003c2110800010140100030018002158800010000098", INIT_29 => X"10100100101401000300180021588000100000980a0005250a25002158800010", INIT_2A => X"9094250000aee400000510000100100000aed800000d011400ae300000760a00", INIT_2B => X"00982000d42500800000983a00d41c1c240018141018211434252024d8000898", INIT_2C => X"04800000982000d4250004800000983a00d41c1c2500181410010003001c8000", INIT_2D => X"001c08800000982000d4250008800000983a00d41c1c2600181410010003001c", INIT_2E => X"010003001c0c800000982000d425000c800000983a00d41c1c27001410010003", INIT_2F => X"001410010003001c10800000982000d4250010800000983a00d41c1c12001410", INIT_30 => X"000d011000ae400010010003001c14800000d4250014800000983a00d41c1cee", INIT_31 => X"0f002400082504f8000008282024250000aee400000510000100100000aed800", INIT_32 => X"000110250cf00008080425ff0002252400010024000000082130800024000013", INIT_33 => X"0b24000000001f01000401f0000006000000321000002a000732000600000010", INIT_34 => X"14e80008100c25030000100000d82c00280100f00000003000fc000600240000", INIT_35 => X"003401000401280000060000005d1800003f00075d0006000000180001041825", INIT_36 => X"00002170800000fc200000100f00200000160008001a00040800000004000004", INIT_37 => X"0000101410250cf00008181425030000180000c32c01002800f0002000010020", INIT_38 => X"0a104c48444025383cc00008100c250000f20000000000140100141001001000", INIT_39 => X"184018ff0003180100050a48000500402f00f30f001010010010102021101000", INIT_3A => X"0010000a0a00101c12100d1b02001c4810100d1b02001c48003e140e1c121800", INIT_3B => X"0b2a0000004c2300140f000c001c102110140300ff57ff001000080300ff30ff", INIT_3C => X"4c000b0000004c102d21101414ff0014000aff1800000200c0001414ff001400", INIT_3D => X"20230f00004c000c00004c2300140f00f844252100142000122a2300140f0000", INIT_3E => X"10250cf000080804250000180360000c082504f8000840383c250000f8442521", INIT_3F => X"00080c082504f80008100c250000f1001010240010ff001000ff010000000d00" ) port map ( DO => block_do(0)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block0 block1: if (block_count > 1) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"00008f8faf000c8faf0000008f00008fafaf03afaf270003278f030000008f00", INIT_01 => X"8f0000003c8fac008fac008fac008f30008fafafafafaf03af270003278f8f03", INIT_02 => X"0010248f001428008faf24008faf00008f0030003000008f8c008f0010afac00", INIT_03 => X"10240014008f8f001024001000008f8c008f001024001000008f8c008f001024", INIT_04 => X"03af270003278f0300008faf03af270003278f0300001024001028008c008f00", INIT_05 => X"343c000c243c000c343c34af24afaf03afafaf27000003278f030000343c8faf", INIT_06 => X"240004008c340010ac24ac343c24ae000c002424000c243cac008f343caf008c", INIT_07 => X"008fae000c002424000c24000c0024008f000c243c0014248faf000c8faf008c", INIT_08 => X"00000000000003278f8f8f0300000c00142c008fac008f24af000c8f0010af24", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000102040912000000", INIT_0F => X"fffffffffffffffffffffffffffffffffffffffffffffefcf9f2e4c992000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000606060606050000000000", INIT_13 => X"0000000000000000000000000000000000000000000000010101010101000000", INIT_14 => X"3d3d3d3d3d3d676620740a0a747320650a000000000000000000000000000000", INIT_15 => X"694c7363726d69546e616f6269546f6175206467730a00696920746c6c67730a", INIT_16 => X"4e490a007420696c54004546455000454d500a6469540030617261736d657061", INIT_17 => X"544c4c0a0a53200a4c2000454e490a0044414f4c41454e490a0044414f4c4145", INIT_18 => X"0000000000000000000054204945540a54204d0a542043422f440a2054494920", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000102040912000000000000000000000000000000", INIT_1F => X"fffffffffffffffffffffefcf9f2e4c992000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000606060606050000000000000000000000000000000000", INIT_23 => X"0000000000000000000000010101010101000000000000000000000000000000", INIT_24 => X"7566542055000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000072756570695300736e61756369670a0a727475526e2068616e", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"6200c2c3c20000c4c2430300c30200c2c5c4a0bebfbd00e0bdbec0620200c202", INIT_01 => X"c240026202c34000c24000c24300c24300c2c0c7c6c5c4a0bebd00e0bdbebfc0", INIT_02 => X"006202c300404200c2c24200c2c24300c2404202424300c24300c20000c04300", INIT_03 => X"0002006200c2c300000200404300c24300c200000200404300c24300c2000002", INIT_04 => X"a0bebd00e0bdbec00200c2c4a0bebd00e0bdbec000000002004042004200c200", INIT_05 => X"4202000044020000440205c202c5c4a0b0bebfbd0000e0bdbec002624202c3c4", INIT_06 => X"0200400042020000400243630302020000000510000044024300c34202c20042", INIT_07 => X"00c20200000005100000040000400500c200004402006202c3c20000c4c20042", INIT_08 => X"000000000000e0bdb0bebfc000000000404200c24300c302c20000c40000c242", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"00000000000000000000000000000000010204091224489123468d1a34000000", INIT_0F => X"fffffffffffffffffffffffffffffefcf9f2e4c99224489123468d1a34000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000003030303030300000000000000", INIT_12 => X"02010000000000000000000000000000010101020515100b0500fb1a150f0a05", INIT_13 => X"0000000000000000000000000000000000000000000001504f4e4d4c4b050403", INIT_14 => X"0a3d3d3d3d3d0a747369540a656d707247000000000000000000000000000000", INIT_15 => X"6e69736379656e65737470696e656e63622f6920740a006f762f69697420740a", INIT_16 => X"554d0a0073746c206f00444144410053414c0a6f6e6500306e206c206220726c", INIT_17 => X"4949540a0a45500a4546005347460a0021534e414c52554d0a0021494e414c52", INIT_18 => X"0000000000000000000020544f52200a20544f0a2054545420450a00454f562f", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"00000000010204091224489123468d1a34000000000000000000000000000000", INIT_1F => X"fffffefcf9f2e4c99224489123468d1a34000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000003030303030300000000000000000000000000000000000000", INIT_22 => X"00000000010101020515100b0500fb1a150f0a05000000000000000000000000", INIT_23 => X"0000000000000000000001504f4e4d4c4b050403020100000000000000000000", INIT_24 => X"20203a5441000000000000000000000000000000000000000000000000000000", INIT_25 => X"00000000000000206d74616e65007420746e6f6e690a006b2074542074696420", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"100000000000070000101f00001000000000f00000ff00000000e8101400001f", INIT_01 => X"001814100f000000000000000000000000000000000000f000ff0000000000e8", INIT_02 => X"0000000000ff0000000000000000100000180010001000000000000000000000", INIT_03 => X"0000000000000000000000001000000000000000000000100000000000000000", INIT_04 => X"f000ff00000000e817000000f000ff00000000e8100000000000000000000000", INIT_05 => X"00200000320000007801e100000000f0000000ff0000000000e81010ff1f0000", INIT_06 => X"7f00000000800000007f00ff0f7f00000720007f000032000000000020000000", INIT_07 => X"000000000720007f000000000120003000000032000000000000000800000000", INIT_08 => X"0000000000000000000000e810000100ff0000000000007f0000080000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0101010101010101010101010101010000000000000000000000000000000000", INIT_0B => X"0202020201010101010101010101010101010101010101010101010101010101", INIT_0C => X"0202020202020202020202020202020202020202020202020202020202020202", INIT_0D => X"0303030303030303030303030303030303030303030303030303030303030202", INIT_0E => X"0000000000000000010204091224489123468d1a3468d1a2458a152b56030303", INIT_0F => X"fffffffffffffefcf9f2e4c99224489123468d1a3468d1a2458a152b56000000", INIT_10 => X"0000000000000000000000000000000000080808080707000000000000ffffff", INIT_11 => X"000000000000000000000000000000000101039e9b9794918e0f0c0906030000", INIT_12 => X"46230000000000000000000095a8c0e00d50c1a1439e5b17d4914e4f0cc98643", INIT_13 => X"1212121212000000000000000000202429303a48619123c7a4815d3a17b08d69", INIT_14 => X"003d3d3d3d3d0069686e650073616c6165121212121212121212121212121212", INIT_15 => X"67730a65206d67730a69657467730a7474206e616954006e69206f63696d6954", INIT_16 => X"4d4550003a65656674002149215300542041006e6773003020746c73656e696c", INIT_17 => X"4f43494d0044410044410054205453000a53205443204d4550000a4c20544320", INIT_18 => X"0000000000000000000000454e414f420045524d00454f5253524100534e4920", INIT_19 => X"00000000000000000000000000000000000000000000000000001212ed515302", INIT_1A => X"0101010000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0101010101010101010101010101010101010101010101010101010101010101", INIT_1C => X"0202020202020202020202020202020202020202020202020101010101010101", INIT_1D => X"0303030303030303030303030303030303030202020202020202020202020202", INIT_1E => X"1224489123468d1a3468d1a2458a152b56030303030303030303030303030303", INIT_1F => X"9224489123468d1a3468d1a2458a152b56000000000000000000000001020409", INIT_20 => X"0000000000080808080707000000000000fffffffffffffffffffefcf9f2e4c9", INIT_21 => X"000000000101039e9b9794918e0f0c0906030000000000000000000000000000", INIT_22 => X"95a8c0e00d50c1a1439e5b17d4914e4f0cc98643000000000000000000000000", INIT_23 => X"0000202429303a48619123c7a4815d3a17b08d69462300000000000000000000", INIT_24 => X"6379204552121212121212121212121212121212121212121200000000000000", INIT_25 => X"0000000000000000622063676e000a7469696d676e4200737770205568732072", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"250014101400dc101025400020400024242025181ce000080804252500000c00", INIT_01 => X"20250224ff1000001c000018000014ff0010041c181410250cf0000820181c25", INIT_02 => X"0004010400ea080000000100000421000425ff2b010700000000140013000000", INIT_03 => X"0c04000400181c00140300042a002400001c001f0200042a0024000018002a01", INIT_04 => X"2504f80008080425420008082504f80008100c25250002050004020000002000", INIT_05 => X"500000ae6c000080407d0010013c38252c3034c80000080804254224feff0808", INIT_06 => X"fc002e000000003300fc00fffffc0000f92503fc00aea8000000143000140000", INIT_07 => X"00100000f92503fc00980a0005250a251000aecc00001a011c1c009118180000", INIT_08 => X"0b070503000008382c30342525006000ca650010000020fc20009d1800091001", INIT_09 => X"9d97958b89837f716d6b67656159534f4947433d3b352f2b29251f1d1713110d", INIT_0A => X"5b514b3d393733251b19150f0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a3", INIT_0B => X"231d0b09fdf7f3ebe7dfd3cfcdc9c1bbb7b1afa5a399918d857f7b756f67615d", INIT_0C => X"efe7e3ddd7cfc5bdb3aba5a195938d878381776b69655f5957514b413b39332d", INIT_0D => X"d1cbc7b9b3ada9a1978f8b7773716d5f5b5955473d3b37352b291d130501f9f5", INIT_0E => X"010204091224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78e5dfd7", INIT_0F => X"f9f2e4c99224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78000000", INIT_10 => X"070001020301010000000101010102030718110a03fcf5231c150e0700fffefc", INIT_11 => X"0000010303010100010059647285a0c80b90212807e6c5a483a5846342210007", INIT_12 => X"8a4500030103030001000100ae6472856dc80b90212807e6c5a483a584634221", INIT_13 => X"38373635340005010300010001005d689c8b41d117a245c8833ef9b46f5914cf", INIT_14 => X"003d3d3d3d3d006e696773007420616c6e2b2c2d2e2f30313233343d3c3b3a39", INIT_15 => X"20740073616f2074006f722020740069727367646e65000a73646e6170756e65", INIT_16 => X"422052002073646161000a4c00530020545300652074000a3168656d72756d20", INIT_17 => X"4e4150550021530021490020544948000a4550495543422052000a4546495543", INIT_18 => X"0908070605040302010000535354504900535945005352415520440054205344", INIT_19 => X"6159534f4947433d3b352f2b29251f1d1713110d0b07050300002246cb153520", INIT_1A => X"0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a39d97958b89837f716d6b6765", INIT_1B => X"cdc9c1bbb7b1afa5a399918d857f7b756f67615d5b514b3d393733251b19150f", INIT_1C => X"95938d878381776b69655f5957514b413b39332d231d0b09fdf7f3ebe7dfd3cf", INIT_1D => X"73716d5f5b5955473d3b37352b291d130501f9f5efe7e3ddd7cfc5bdb3aba5a1", INIT_1E => X"3468d1a2458a152b56ac59b367cf9e3c78e5dfd7d1cbc7b9b3ada9a1978f8b77", INIT_1F => X"3468d1a2458a152b56ac59b367cf9e3c78000000010204091224489123468d1a", INIT_20 => X"010102030718110a03fcf5231c150e0700fffefcf9f2e4c99224489123468d1a", INIT_21 => X"7285a0c80b90212807e6c5a483a5846342210007070001020301010000000101", INIT_22 => X"ae6472856dc80b90212807e6c5a483a584634221000001030301010001005964", INIT_23 => X"01005d689c8b41d117a245c8833ef9b46f5914cf8a4500030103030001000100", INIT_24 => X"616f4953542b2c2d2e2f30313233343d3c3b3a39383736353400050103000100", INIT_25 => X"0000000100000000656e6b2064000a656f636d206e6500216f756f41652c7465", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block1 block2: if (block_count > 2) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block2 block3: if (block_count > 3) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block3 block4: if (block_count > 4) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block4 block5: if (block_count > 5) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block5 block6: if (block_count > 6) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block6 block7: if (block_count > 7) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block7 end; --architecture logic
gpl-3.0
7cc07d42e207ecd9a0ea067a0c9e2a50
0.843311
5.636999
false
false
false
false
SKravitsky/ECEC412
DataMemoryPipeline.vhd
1
954
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity DataMemoryPipeline is port( WriteData: in std_logic_vector(31 downto 0); Address: in std_logic_vector(31 downto 0); MemRead, MemWrite: in std_logic; ReadData: out std_logic_vector(31 downto 0) ); end DataMemoryPipeline; Architecture Structural of DataMemoryPipeline is type mem_array is array(0 to 55) of std_logic_vector(31 downto 0); signal data_mem: mem_array := ( -- Data Memory 0 => X"00000004", 1 => X"00000004", others => x"00000000" ); signal temp_data: std_logic_vector(31 downto 0) := X"00000000"; begin ReadData <= temp_data; process(WriteData, Address, MemRead, MemWrite) begin if MemWrite = '1' then data_mem(to_integer(unsigned(Address)) / 4) <= WriteData; end if; if MemRead = '1' then temp_data <= data_mem(to_integer(unsigned(Address)) / 4); end if; end process; end Structural;
apache-2.0
17a1eef7ed8f248e2ffd8370fb5606e0
0.671908
3.444043
false
false
false
false
SKravitsky/ECEC412
Control.vhd
1
1,748
library ieee; use ieee.std_logic_1164.all; entity Control is port( Opcode: in std_logic_vector(5 downto 0); RegDst, Branch, MemRead, MemtoReg, MemWrite, ALUSrc, RegWrite, Jump: out std_logic; ALUOp: out std_logic_vector(1 downto 0) ); end Control; architecture Structural of Control is begin process(Opcode) begin case Opcode is when "000000" => --add/sub RegDst <= '1'; Branch <= '0'; MemRead <= '0'; MemtoReg <= '0'; MemWrite <= '0'; ALUSrc <= '0'; RegWrite <= '1'; Jump <= '0'; ALUOp <= "10"; when "100011" => --lw RegDst <= '0'; Branch <= '0'; MemRead <= '1'; MemtoReg <= '1'; MemWrite <= '0'; ALUSrc <= '1'; RegWrite <= '1'; Jump <= '0'; ALUOp <= "00"; when "000100" => --beq RegDst <= '0'; Branch <= '1'; MemRead <= '0'; MemtoReg <= '0'; MemWrite <= '0'; ALUSrc <= '0'; RegWrite <= '0'; Jump <= '0'; ALUOp <= "01"; when "000010" => --j RegDst <= '0'; Branch <= '0'; MemRead <= '0'; MemtoReg <= '0'; MemWrite <= '0'; ALUSrc <= '0'; RegWrite <= '0'; Jump <= '1'; ALUOp <= "00"; when "101011" => --sw RegDst <= '0'; Branch <= '0'; MemRead <= '0'; MemtoReg <= '0'; MemWrite <= '1'; ALUSrc <= '1'; RegWrite <= '0'; Jump <= '0'; ALUOp <= "00"; when others => null; end case; end process; end Structural;
apache-2.0
b3ecdc93a9d088f315e00aff30b8be21
0.401602
4.055684
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/plasma_RTL/plasma.vhd
3
19,270
--------------------------------------------------------------------- -- TITLE: Plasma (CPU core with memory) -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 6/4/02 -- FILENAME: plasma.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- This entity combines the CPU core with memory and a UART. -- -- Memory Map: -- 0x00000000 - 0x0000ffff Internal RAM (8KB) -- 0x10000000 - 0x100fffff External RAM (1MB) -- Access all Misc registers with 32-bit accesses -- 0x20000000 Uart Write (will pause CPU if busy) -- 0x20000000 Uart Read -- 0x20000010 IRQ Mask -- 0x20000020 IRQ Status -- 0x20000030 GPIO0 Out Set bits -- 0x20000040 GPIO0 Out Clear bits -- 0x20000050 GPIOA In -- 0x20000060 Counter -- 0x20000070 Ethernet transmit count -- IRQ bits: -- 7 GPIO31 -- 6 ^GPIO31 -- 5 EthernetSendDone -- 4 EthernetReceive -- 3 Counter(18) -- 2 ^Counter(18) -- 1 ^UartWriteBusy -- 0 UartDataAvailable -- modified by: Siavoosh Payandeh Azad -- Change logs: -- * An NI has been instantiated! -- * some changes has been applied to the ports of the CPU to facilitate the new NI! --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use work.mlite_pack.all; entity plasma is generic(memory_type : string := "TRI_PORT_X"; --"DUAL_PORT_" "ALTERA_LPM"; log_file : string := "UNUSED"; ethernet : std_logic := '0'; use_cache : std_logic := '0'; current_address : integer := 0; stim_file: string :="code.txt"); port(clk : in std_logic; reset : in std_logic; uart_write : out std_logic; uart_read : in std_logic; address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_write : out std_logic_vector(31 downto 0); data_read : in std_logic_vector(31 downto 0); mem_pause_in : in std_logic; no_ddr_start : out std_logic; no_ddr_stop : out std_logic; gpio0_out : out std_logic_vector(31 downto 0); gpioA_in : in std_logic_vector(31 downto 0); credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(19 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); -- if you are not going to update Cx you should write all ones! (it will be and will the current Cx bits) Reconfig_command : out std_logic; --remove this part if you are using behavioral ram IJTAG_select : in std_logic; IJTAG_clk : in std_logic; IJTAG_reset : in std_logic; IJTAG_enable : in std_logic; IJTAG_write_byte_enable : in std_logic_vector(3 downto 0); IJTAG_address : in std_logic_vector(31 downto 2); IJTAG_data_write : in std_logic_vector(31 downto 0); IJTAG_data_read : out std_logic_vector(31 downto 0) ); end; --entity plasma architecture logic of plasma is signal address_next : std_logic_vector(31 downto 2); signal byte_we_next : std_logic_vector(3 downto 0); signal cpu_address : std_logic_vector(31 downto 0); signal cpu_byte_we : std_logic_vector(3 downto 0); signal cpu_data_w : std_logic_vector(31 downto 0); signal cpu_data_r : std_logic_vector(31 downto 0); signal cpu_pause : std_logic; signal data_read_uart : std_logic_vector(7 downto 0); signal write_enable : std_logic; signal eth_pause_in : std_logic; signal eth_pause : std_logic; signal mem_busy : std_logic; signal enable_misc : std_logic; signal enable_uart : std_logic; signal enable_uart_read : std_logic; signal enable_uart_write : std_logic; signal enable_eth : std_logic; signal gpio0_reg : std_logic_vector(31 downto 0); signal uart_write_busy : std_logic; signal uart_data_avail : std_logic; signal irq_mask_reg : std_logic_vector(7 downto 0); signal irq_status : std_logic_vector(7 downto 0); signal irq : std_logic; signal irq_eth_rec : std_logic; signal irq_eth_send : std_logic; signal counter_reg : std_logic_vector(31 downto 0); signal ram_enable : std_logic; signal ram_byte_we : std_logic_vector(3 downto 0); signal ram_address, ram_address_late : std_logic_vector(31 downto 2); signal ram_data_w : std_logic_vector(31 downto 0); signal ram_data_r, ram_data_r_ni, ram_data_r_uart : std_logic_vector(31 downto 0); signal NI_irq_out : std_logic; --signal NI_read_flag : std_logic; --signal NI_write_flag : std_logic; signal cache_access : std_logic; signal cache_checking : std_logic; signal cache_miss : std_logic; signal cache_hit : std_logic; begin --architecture write_enable <= '1' when cpu_byte_we /= "0000" else '0'; mem_busy <= eth_pause or mem_pause_in; cache_hit <= cache_checking and not cache_miss; cpu_pause <= (uart_write_busy and enable_uart and write_enable) or --UART busy cache_miss or --Cache wait (cpu_address(28) and not cache_hit and mem_busy); --DDR or flash irq_status <= gpioA_in(31) & not gpioA_in(31) & irq_eth_send & irq_eth_rec & counter_reg(18) & not counter_reg(18) & not uart_write_busy & uart_data_avail; irq <= '1' when ((irq_status and irq_mask_reg) /= ZERO(7 downto 0) or (NI_irq_out = '1')) else '0'; -- modified by Behrad gpio0_out(31 downto 29) <= gpio0_reg(31 downto 29); gpio0_out(23 downto 0) <= gpio0_reg(23 downto 0); enable_misc <= '1' when cpu_address(30 downto 28) = "010" else '0'; enable_uart <= '1' when enable_misc = '1' and cpu_address(7 downto 4) = "0000" else '0'; enable_uart_read <= enable_uart and not write_enable; enable_uart_write <= enable_uart and write_enable; enable_eth <= '1' when enable_misc = '1' and cpu_address(7 downto 4) = "0111" else '0'; cpu_address(1 downto 0) <= "00"; u1_cpu: mlite_cpu generic map (memory_type => memory_type) PORT MAP ( clk => clk, reset_in => reset, intr_in => irq, --NI_read_flag => NI_read_flag, --NI_write_flag => NI_write_flag, address_next => address_next, --before rising_edge(clk) byte_we_next => byte_we_next, address => cpu_address(31 downto 2), --after rising_edge(clk) byte_we => cpu_byte_we, data_w => cpu_data_w, data_r => cpu_data_r, mem_pause => cpu_pause); opt_cache: if use_cache = '0' generate cache_access <= '0'; cache_checking <= '0'; cache_miss <= '0'; end generate; opt_cache2: if use_cache = '1' generate --Control 4KB unified cache that uses the upper 4KB of the 8KB --internal RAM. Only lowest 2MB of DDR is cached. u_cache: cache generic map (memory_type => memory_type) PORT MAP ( clk => clk, reset => reset, address_next => address_next, byte_we_next => byte_we_next, cpu_address => cpu_address(31 downto 2), mem_busy => mem_busy, cache_access => cache_access, --access 4KB cache cache_checking => cache_checking, --checking if cache hit cache_miss => cache_miss); --cache miss end generate; --opt_cache2 no_ddr_start <= not eth_pause and cache_checking; no_ddr_stop <= not eth_pause and cache_miss; eth_pause_in <= mem_pause_in or (not eth_pause and cache_miss and not cache_checking); misc_proc: process(clk, reset, cpu_address, enable_misc, ram_data_r, ram_address_late, ram_data_r_ni, ram_data_r_uart, data_read, data_read_uart, cpu_pause, irq_mask_reg, irq_status, gpio0_reg, write_enable, cache_checking, gpioA_in, counter_reg, cpu_data_w) begin case cpu_address(30 downto 28) is when "000" => --internal RAM if ((ram_address_late = NI_reserved_data_address) or (ram_address_late = NI_flag_address) or (ram_address_late = NI_counter_address) or (ram_address_late = NI_reconfiguration_address) or (ram_address_late = NI_self_diagnosis_address)) then cpu_data_r <= ram_data_r_ni; elsif ram_address_late = uart_count_value_address then cpu_data_r <= ram_data_r_uart; else cpu_data_r <= ram_data_r; end if; when "001" => --external RAM if cache_checking = '1' then --cpu_data_r <= ram_data_r; --cache if ((ram_address_late = NI_reserved_data_address) or (ram_address_late = NI_flag_address) or (ram_address_late = NI_counter_address) or (ram_address_late = NI_reconfiguration_address) or (ram_address_late = NI_self_diagnosis_address)) then cpu_data_r <= ram_data_r_ni; elsif ram_address_late = uart_count_value_address then cpu_data_r <= ram_data_r_uart; else cpu_data_r <= ram_data_r; --cache end if; else cpu_data_r <= data_read; --DDR end if; when "010" => --misc case cpu_address(6 downto 4) is when "000" => --uart cpu_data_r <= ZERO(31 downto 8) & data_read_uart; when "001" => --irq_mask cpu_data_r <= ZERO(31 downto 8) & irq_mask_reg; when "010" => --irq_status cpu_data_r <= ZERO(31 downto 8) & irq_status; when "011" => --gpio0 cpu_data_r <= gpio0_reg; when "101" => --gpioA cpu_data_r <= gpioA_in; when "110" => --counter cpu_data_r <= counter_reg; when others => cpu_data_r <= gpioA_in; end case; when "011" => --flash cpu_data_r <= data_read; when others => cpu_data_r <= ZERO; end case; if reset = '1' then irq_mask_reg <= ZERO(7 downto 0); gpio0_reg <= ZERO; counter_reg <= ZERO; elsif rising_edge(clk) then counter_reg <= bv_inc(counter_reg); if cpu_pause = '0' then if enable_misc = '1' and write_enable = '1' then if cpu_address(6 downto 4) = "001" then irq_mask_reg <= cpu_data_w(7 downto 0); elsif cpu_address(6 downto 4) = "011" then gpio0_reg <= gpio0_reg or cpu_data_w; elsif cpu_address(6 downto 4) = "100" then gpio0_reg <= gpio0_reg and not cpu_data_w; elsif cpu_address(6 downto 4) = "110" then counter_reg <= cpu_data_w; end if; end if; end if; end if; end process; process(ram_address, reset, clk)begin if reset = '1' then ram_address_late <= (others => '0'); elsif clk'event and clk = '1' then ram_address_late <= ram_address; end if; end process; ram_proc: process(cache_access, cache_miss, address_next, cpu_address, byte_we_next, cpu_data_w, data_read) begin if cache_access = '1' then --Check if cache hit or write through ram_enable <= '1'; ram_byte_we <= byte_we_next; ram_address(31 downto 2) <= ZERO(31 downto 16) & "0001" & address_next(11 downto 2); ram_data_w <= cpu_data_w; elsif cache_miss = '1' then --Update cache after cache miss ram_enable <= '1'; ram_byte_we <= "1111"; ram_address(31 downto 2) <= ZERO(31 downto 16) & "0001" & cpu_address(11 downto 2); ram_data_w <= data_read; else --Normal non-cache access if address_next(30 downto 28) = "000" then ram_enable <= '1'; else ram_enable <= '0'; end if; ram_byte_we <= byte_we_next; ram_address(31 downto 2) <= address_next(31 downto 2); ram_data_w <= cpu_data_w; end if; end process; --ramgen_tri: if memory_type = "TRI_PORT_X" generate -- u2_ramgen: ram -- generic map (memory_type => memory_type, stim_file => stim_file) -- port map ( -- clk => clk, -- reset => reset, -- enable => ram_enable, -- write_byte_enable => ram_byte_we, -- address => ram_address, -- data_write => ram_data_w, -- data_read => ram_data_r); -- end generate; ramgen_tri: if memory_type = "TRI_PORT_X" generate u2_ramgen: ram generic map (memory_type => memory_type, stim_file => stim_file) port map ( clk => clk, reset => reset, enable => ram_enable, write_byte_enable => ram_byte_we, address => ram_address, data_write => ram_data_w, data_read => ram_data_r, IJTAG_select => IJTAG_select, IJTAG_clk => IJTAG_clk, IJTAG_reset => IJTAG_reset, IJTAG_enable => IJTAG_enable, IJTAG_write_byte_enable => IJTAG_write_byte_enable, IJTAG_address => IJTAG_address, IJTAG_data_write => IJTAG_data_write, IJTAG_data_read => IJTAG_data_read ); end generate; -- ramgen_xil: if memory_type = "XILINX_16X" generate -- node_0: -- node_0: -- if current_address = 0 generate -- u2_ram: entity work.ram_0 generic map (memory_type => memory_type) -- port map ( -- clk => clk, -- reset => reset, -- enable => ram_enable, -- write_byte_enable => ram_byte_we, -- address => ram_address, -- data_write => ram_data_w, -- data_read => ram_data_r); -- end generate; -- -- node_1: -- node_1: -- if current_address = 1 generate -- u2_ram: entity work.ram_1 generic map (memory_type => memory_type) -- port map ( -- clk => clk, -- reset => reset, -- enable => ram_enable, -- write_byte_enable => ram_byte_we, -- address => ram_address, -- data_write => ram_data_w, -- data_read => ram_data_r); -- end generate; -- -- -- node_2: -- node_2: -- if current_address = 2 generate -- u2_ram: entity work.ram_2 generic map (memory_type => memory_type) -- port map ( -- clk => clk, -- reset => reset, -- enable => ram_enable, -- write_byte_enable => ram_byte_we, -- address => ram_address, -- data_write => ram_data_w, -- data_read => ram_data_r); -- end generate; -- -- -- node_3: -- node_3: -- if current_address = 3 generate -- u2_ram: entity work.ram_3 generic map (memory_type => memory_type) -- port map ( -- clk => clk, -- reset => reset, -- enable => ram_enable, -- write_byte_enable => ram_byte_we, -- address => ram_address, -- data_write => ram_data_w, -- data_read => ram_data_r); -- end generate; -- end generate; u3_uart: uart generic map (log_file => log_file) port map( clk => clk, reset => reset, enable_read => enable_uart_read, enable_write => enable_uart_write, data_in => cpu_data_w(7 downto 0), data_out => data_read_uart, uart_read => uart_read, uart_write => uart_write, busy_write => uart_write_busy, data_avail => uart_data_avail, reg_enable =>ram_enable, reg_write_byte_enable =>ram_byte_we, reg_address =>ram_address, reg_data_write =>ram_data_w, reg_data_read =>ram_data_r_uart); dma_gen: if ethernet = '0' generate address <= cpu_address(31 downto 2); byte_we <= cpu_byte_we; data_write <= cpu_data_w; eth_pause <= '0'; gpio0_out(28 downto 24) <= ZERO(28 downto 24); irq_eth_rec <= '0'; irq_eth_send <= '0'; end generate; dma_gen2: if ethernet = '1' generate u4_eth: eth_dma port map( clk => clk, reset => reset, enable_eth => gpio0_reg(24), select_eth => enable_eth, rec_isr => irq_eth_rec, send_isr => irq_eth_send, address => address, --to DDR byte_we => byte_we, data_write => data_write, data_read => data_read, pause_in => eth_pause_in, mem_address => cpu_address(31 downto 2), --from CPU mem_byte_we => cpu_byte_we, data_w => cpu_data_w, pause_out => eth_pause, E_RX_CLK => gpioA_in(20), E_RX_DV => gpioA_in(19), E_RXD => gpioA_in(18 downto 15), E_TX_CLK => gpioA_in(14), E_TX_EN => gpio0_out(28), E_TXD => gpio0_out(27 downto 24)); end generate; u4_ni: NI generic map(current_address => current_address) port map (clk => clk, reset => reset, enable => ram_enable, write_byte_enable => ram_byte_we, address => ram_address, data_write => ram_data_w, data_read => ram_data_r_ni, irq_out => NI_irq_out, credit_in => credit_in, valid_out => valid_out, TX => TX, credit_out => credit_out, valid_in => valid_in, RX => RX, -- fault information signals from the router link_faults => link_faults, turn_faults => turn_faults, Rxy_reconf_PE => Rxy_reconf_PE, Cx_reconf_PE => Cx_reconf_PE, Reconfig_command => Reconfig_command ); end; --architecture logic
gpl-3.0
8cf868b9180520f1a72f8100141196fc
0.5178
3.542931
false
false
false
false
simoesusp/Processador-ICMC
Processor_FPGA/Processor_Template_VHDL_DE70/lpm_dff1.vhd
3
3,702
-- megafunction wizard: %LPM_FF% -- GENERATION: STANDARD -- VERSION: WM1.0 -- MODULE: lpm_ff -- ============================================================ -- File Name: lpm_dff1.vhd -- Megafunction Name(s): -- lpm_ff -- -- Simulation Library Files(s): -- lpm -- ============================================================ -- ************************************************************ -- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE! -- -- 9.1 Build 222 10/21/2009 SJ Web Edition -- ************************************************************ --Copyright (C) 1991-2009 Altera Corporation --Your use of Altera Corporation's design tools, logic functions --and other software and tools, and its AMPP partner logic --functions, and any output files from any of the foregoing --(including device programming or simulation files), and any --associated documentation or information are expressly subject --to the terms and conditions of the Altera Program License --Subscription Agreement, Altera MegaCore Function License --Agreement, or other applicable license agreement, including, --without limitation, that your use is for the sole purpose of --programming logic devices manufactured by Altera and sold by --Altera or its authorized distributors. Please refer to the --applicable agreement for further details. LIBRARY ieee; USE ieee.std_logic_1164.all; LIBRARY lpm; USE lpm.all; ENTITY lpm_dff1 IS PORT ( clock : IN STD_LOGIC ; q : OUT STD_LOGIC ); END lpm_dff1; ARCHITECTURE SYN OF lpm_dff1 IS SIGNAL sub_wire0 : STD_LOGIC_VECTOR (0 DOWNTO 0); SIGNAL sub_wire1 : STD_LOGIC ; COMPONENT lpm_ff GENERIC ( lpm_fftype : STRING; lpm_type : STRING; lpm_width : NATURAL ); PORT ( clock : IN STD_LOGIC ; q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0) ); END COMPONENT; BEGIN sub_wire1 <= sub_wire0(0); q <= sub_wire1; lpm_ff_component : lpm_ff GENERIC MAP ( lpm_fftype => "TFF", lpm_type => "LPM_FF", lpm_width => 1 ) PORT MAP ( clock => clock, q => sub_wire0 ); END SYN; -- ============================================================ -- CNX file retrieval info -- ============================================================ -- Retrieval info: PRIVATE: ACLR NUMERIC "0" -- Retrieval info: PRIVATE: ALOAD NUMERIC "0" -- Retrieval info: PRIVATE: ASET NUMERIC "0" -- Retrieval info: PRIVATE: ASET_ALL1 NUMERIC "1" -- Retrieval info: PRIVATE: CLK_EN NUMERIC "0" -- Retrieval info: PRIVATE: DFF NUMERIC "0" -- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone II" -- Retrieval info: PRIVATE: SCLR NUMERIC "0" -- Retrieval info: PRIVATE: SLOAD NUMERIC "0" -- Retrieval info: PRIVATE: SSET NUMERIC "0" -- Retrieval info: PRIVATE: SSET_ALL1 NUMERIC "1" -- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0" -- Retrieval info: PRIVATE: UseTFFdataPort NUMERIC "0" -- Retrieval info: PRIVATE: nBit NUMERIC "1" -- Retrieval info: CONSTANT: LPM_FFTYPE STRING "TFF" -- Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_FF" -- Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "1" -- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL clock -- Retrieval info: USED_PORT: q 0 0 0 0 OUTPUT NODEFVAL q -- Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0 -- Retrieval info: CONNECT: q 0 0 0 0 @q 0 0 1 0 -- Retrieval info: LIBRARY: lpm lpm.lpm_components.all -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff1.vhd TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff1.inc FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff1.cmp TRUE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff1.bsf TRUE FALSE -- Retrieval info: GEN_FILE: TYPE_NORMAL lpm_dff1_inst.vhd FALSE -- Retrieval info: LIB_FILE: lpm
gpl-3.0
53605f5611ebfa4906304bc3d431891d
0.636143
3.665347
false
false
false
false
Wynjones1/gbvhdl
testing/sdcard_tb.vhd
1
2,109
library IEEE; use IEEE.numeric_std.all; use IEEE.std_logic_1164.all; use IEEE.std_logic_misc.all; use IEEE.std_logic_textio.all; use std.textio.all; use work.types.all; entity sdcard_tb is end; architecture rtl of sdcard_tb is component top is port( clk : in std_logic; reset : in std_logic; an : out std_logic_vector(3 downto 0); disp : out std_logic_vector(6 downto 0); dp : out std_logic; ss : out std_logic; sck : out std_logic; mosi : out std_logic; miso : in std_logic; sddat : out std_logic_vector(1 downto 0); wp : in std_logic; cd : in std_logic; led : out std_logic_vector(7 downto 0); HS : out std_logic; VS : out std_logic; colour : out std_logic_vector(7 downto 0)); end component; signal clk : std_logic := '0'; signal reset : std_logic := '1'; signal an : std_logic_vector(3 downto 0) := (others => '0'); signal disp : std_logic_vector(6 downto 0) := (others => '0'); signal dp : std_logic := '0'; signal ss : std_logic := '0'; signal sck : std_logic := '0'; signal mosi : std_logic := '0'; signal miso : std_logic := '0'; signal sddat : std_logic_vector(1 downto 0) := (others => '0'); signal wp : std_logic := '0'; signal cd : std_logic := '0'; signal led : std_logic_vector(7 downto 0) := (others => '0'); signal HS : std_logic; signal VS : std_logic; signal colour : std_logic_vector(7 downto 0); begin top0 : top port map (clk, reset, an, disp, dp, ss, sck, mosi, miso, sddat, wp, cd, led, HS, VS, colour); clkgen: process begin clk <= '0'; wait for 10 ns; clk <= '1'; wait for 10 ns; end process; rstgen: process begin reset <= '1'; wait for 10 ns; reset <= '0'; wait; end process; end rtl;
mit
746d4e6bec57f04f0deb28e3f1d9fb4e
0.506401
3.418152
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/Checkers/Modules_with_checkers_integrated/All_checkers/New_SHMU_on_Node/FIFO_one_hot_credit_based_packet_drop_classifier_support_checkers/FIFO_one_hot_credit_based_packet_drop_classifier_support_checkers.vhd
3
50,196
--Copyright (C) 2016 Siavoosh Payandeh Azad and Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity FIFO_credit_based_control_part_checkers is port ( valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; read_pointer: in std_logic_vector(3 downto 0); read_pointer_in: in std_logic_vector(3 downto 0); write_pointer: in std_logic_vector(3 downto 0); write_pointer_in: in std_logic_vector(3 downto 0); credit_out: in std_logic; empty_out: in std_logic; full_out: in std_logic; read_en_out: in std_logic; write_en_out: in std_logic; fake_credit: in std_logic; fake_credit_counter: in std_logic_vector(1 downto 0); fake_credit_counter_in: in std_logic_vector(1 downto 0); state_out: in std_logic_vector(4 downto 0); state_in: in std_logic_vector(4 downto 0); fault_info: in std_logic; fault_info_out: in std_logic; fault_info_in: in std_logic; health_info: in std_logic; faulty_packet_out: in std_logic; faulty_packet_in: in std_logic; flit_type: in std_logic_vector(2 downto 0); fault_out: in std_logic; write_fake_flit: in std_logic; -- Functional checkers err_empty_full, err_empty_read_en, err_full_write_en, err_state_in_onehot, err_read_pointer_in_onehot, err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer, err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full, err_read_pointer_increment, err_read_pointer_not_increment, err_write_en, err_not_write_en, err_not_write_en1, err_not_write_en2, err_read_en_mismatch, err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_fault_info_in, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal : out std_logic ); end FIFO_credit_based_control_part_checkers; architecture behavior of FIFO_credit_based_control_part_checkers is CONSTANT Idle: std_logic_vector (4 downto 0) := "00001"; CONSTANT Header_flit: std_logic_vector (4 downto 0) := "00010"; CONSTANT Body_flit: std_logic_vector (4 downto 0) := "00100"; CONSTANT Tail_flit: std_logic_vector (4 downto 0) := "01000"; CONSTANT Packet_drop: std_logic_vector (4 downto 0) := "10000"; begin -- Functional Checkers (Might cover or be covered by some of the structural checkers) -- Empty and full cannot be high at the same time! process (empty_out, full_out) begin if (empty_out = '1' and full_out = '1') then err_empty_full <= '1'; else err_empty_full <= '0'; end if; end process; -- Reading from an empty FIFO is not possible! process (empty_out, read_en_out) begin if (empty_out = '1' and read_en_out = '1') then err_empty_read_en <= '1'; else err_empty_read_en <= '0'; end if; end process; -- Writing to a full FIFO is not possible! process (full_out, write_en_out) begin if (full_out = '1' and write_en_out = '1') then err_full_write_en <= '1'; else err_full_write_en <= '0'; end if; end process; -- The states of the packet dropping FSM of FIFO must always be one-hot (state_in)! process (state_in) begin if (state_in /= Idle and state_in /= Header_flit and state_in /= Body_flit and state_in /= Tail_flit and state_in /= Packet_drop) then err_state_in_onehot <= '1'; else err_state_in_onehot <= '0'; end if; end process; -- Read pointer must always be one-hot! process (read_pointer_in) begin if (read_pointer_in /= "0001" and read_pointer_in /= "0010" and read_pointer_in /= "0100" and read_pointer_in /= "1000") then err_read_pointer_in_onehot <= '1'; else err_read_pointer_in_onehot <= '0'; end if; end process; -- Write pointer must always be one-hot! process (write_pointer_in) begin if (write_pointer_in /= "0001" and write_pointer_in /= "0010" and write_pointer_in /= "0100" and write_pointer_in /= "1000") then err_write_pointer_in_onehot <= '1'; else err_write_pointer_in_onehot <= '0'; end if; end process; --------------------------------------------------------------------------------------------------------- -- Structural Checkers -- Write pointer and Read pointer checkers process (write_en_out, write_pointer_in, write_pointer) begin if (write_en_out = '1' and write_pointer_in /= (write_pointer(2 downto 0) & write_pointer(3)) ) then err_write_en_write_pointer <= '1'; else err_write_en_write_pointer <= '0'; end if; end process; -- Checked ! process (write_en_out, write_pointer_in, write_pointer) begin if (write_en_out = '0' and write_pointer_in /= write_pointer ) then err_not_write_en_write_pointer <= '1'; else err_not_write_en_write_pointer <= '0'; end if; end process; -- Checked ! process (read_pointer, write_pointer, empty_out) begin if (read_pointer = write_pointer and empty_out = '0' ) then err_read_pointer_write_pointer_not_empty <= '1'; else err_read_pointer_write_pointer_not_empty <= '0'; end if; end process; -- Checked ! process (read_pointer, write_pointer, empty_out) begin if (read_pointer /= write_pointer and empty_out = '1' ) then err_read_pointer_write_pointer_empty <= '1'; else err_read_pointer_write_pointer_empty <= '0'; end if; end process; -- Checked ! process (write_pointer, read_pointer, full_out) begin if (write_pointer = (read_pointer(0)&read_pointer(3 downto 1)) and full_out = '0' ) then err_read_pointer_write_pointer_not_full <= '1'; else err_read_pointer_write_pointer_not_full <= '0'; end if; end process; -- Checked ! process (write_pointer, read_pointer, full_out) begin if (write_pointer /= (read_pointer(0)&read_pointer(3 downto 1)) and full_out = '1' ) then err_read_pointer_write_pointer_full <= '1'; else err_read_pointer_write_pointer_full <= '0'; end if; end process; -- Checked ! process (read_en_out, empty_out, read_pointer_in, read_pointer) begin if (read_en_out = '1' and empty_out = '0' and read_pointer_in /= (read_pointer(2 downto 0)&read_pointer(3)) ) then err_read_pointer_increment <= '1'; else err_read_pointer_increment <= '0'; end if; end process; -- Checked ! process (read_en_out, empty_out, read_pointer_in, read_pointer) begin if ( (read_en_out = '0' or empty_out = '1') and read_pointer_in /= read_pointer ) then err_read_pointer_not_increment <= '1'; else err_read_pointer_not_increment <= '0'; end if; end process; -- Checked ! process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if (valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full_out ='0' and write_en_out = '0') then err_write_en <= '1'; else err_write_en <= '0'; end if; end process; -- Updated ! process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( (valid_in = '0' or (((faulty_packet_out = '1' or fault_out = '1') and write_fake_flit = '0')) or full_out = '1') and write_en_out = '1') then err_not_write_en <= '1'; else err_not_write_en <= '0'; end if; end process; process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( valid_in = '1' and ((faulty_packet_out = '1' or fault_out = '1') and write_fake_flit = '0') and write_en_out = '1') then err_not_write_en1 <= '1'; else err_not_write_en1 <= '0'; end if; end process; process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin if ( valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full_out = '1' and write_en_out = '1') then err_not_write_en2 <= '1'; else err_not_write_en2 <= '0'; end if; end process; -- Updated ! process (read_en_N, read_en_E, read_en_W, read_en_S, read_en_L, empty_out, read_en_out) begin if ( (read_en_N = '1' or read_en_E = '1' or read_en_W = '1' or read_en_S = '1' or read_en_L = '1') and empty_out = '0' and read_en_out = '0' ) then err_read_en_mismatch <= '1'; else err_read_en_mismatch <= '0'; end if; end process; process (read_en_N, read_en_E, read_en_W, read_en_S, read_en_L, empty_out, read_en_out) begin if ( ((read_en_N = '0' and read_en_E = '0' and read_en_W = '0' and read_en_S = '0' and read_en_L = '0') or empty_out = '1') and read_en_out = '1' ) then err_read_en_mismatch1 <= '1'; else err_read_en_mismatch1 <= '0'; end if; end process; -- Newly added checkers for FIFO with packet drop and fault classifier support! process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '1' and read_en_out = '1' and fake_credit_counter_in /= fake_credit_counter + 1) then err_fake_credit_read_en_fake_credit_counter_in_increment <= '1'; else err_fake_credit_read_en_fake_credit_counter_in_increment <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, fake_credit_counter_in) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter > 0 and fake_credit_counter_in /= fake_credit_counter - 1 ) then err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '0' and read_en_out = '1' and fake_credit_counter_in /= fake_credit_counter) then err_not_fake_credit_read_en_fake_credit_counter_in_not_change <= '1'; else err_not_fake_credit_read_en_fake_credit_counter_in_not_change <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin if (fake_credit = '1' and read_en_out = '0' and fake_credit_counter_in /= fake_credit_counter) then err_fake_credit_not_read_en_fake_credit_counter_in_not_change <= '1'; else err_fake_credit_not_read_en_fake_credit_counter_in_not_change <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, fake_credit_counter_in) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter <= 0 and fake_credit_counter_in /= fake_credit_counter) then err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change <= '0'; end if; end process; process (fake_credit, read_en_out, credit_out) begin if ((fake_credit = '1' or read_en_out ='1') and credit_out = '0') then err_fake_credit_read_en_credit_out <= '1'; else err_fake_credit_read_en_credit_out <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, credit_out) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter > 0 and credit_out = '0') then err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out <= '0'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, credit_out) begin if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter <= 0 and credit_out = '1') then err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out <= '1'; else err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -- Idle state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, fault_out, valid_in, state_in) begin if (state_out = Idle and fault_out = '0' and valid_in = '1' and state_in /= Header_flit) then err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit <= '1'; else err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit <= '0'; end if; end process; process (state_out, fault_out, valid_in, state_in, state_out) begin if (state_out = Idle and fault_out = '0' and valid_in = '0' and state_in /= state_out) then err_state_out_Idle_not_fault_out_valid_in_state_in_not_change <= '1'; else err_state_out_Idle_not_fault_out_valid_in_state_in_not_change <= '0'; end if; end process; process (state_out, fault_out, fake_credit) begin if (state_out = Idle and fault_out = '0' and fake_credit = '1') then err_state_out_Idle_not_fault_out_not_fake_credit <= '1'; else err_state_out_Idle_not_fault_out_not_fake_credit <= '0'; end if; end process; process (state_out, fault_out, fault_info_in) begin if (state_out = Idle and fault_out = '0' and fault_info_in = '1') then err_state_out_Idle_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Idle_not_fault_out_not_fault_info_in <= '0'; end if; end process; process (state_out, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Idle and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal <= '1'; else err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, fault_out, fake_credit) begin if (state_out = Idle and fault_out = '1' and fake_credit = '0') then err_state_out_Idle_fault_out_fake_credit <= '1'; else err_state_out_Idle_fault_out_fake_credit <= '0'; end if; end process; process (state_out, fault_out, state_in) begin if (state_out = Idle and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Idle_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Idle_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, fault_out, fault_info_in) begin if (state_out = Idle and fault_out = '1' and fault_info_in = '0') then err_state_out_Idle_fault_out_fault_info_in <= '1'; else err_state_out_Idle_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, fault_out, faulty_packet_in) begin if (state_out = Idle and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Idle_fault_out_faulty_packet_in <= '1'; else err_state_out_Idle_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, write_fake_flit) begin if (state_out = Idle and write_fake_flit = '1') then err_state_out_Idle_not_write_fake_flit <= '1'; else err_state_out_Idle_not_write_fake_flit <= '0'; end if; end process; -- Other properties for Idle state -------------------------------------------------------------------------------------------------- process (state_out, health_info) begin if ( (state_out = Idle or state_out = Header_flit or state_out = Tail_flit or state_out = Packet_drop) and health_info = '1') then err_state_out_Idle_not_health_info <= '1'; else err_state_out_Idle_not_health_info <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Header_flit state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and flit_type = "010" and state_in /= Body_flit) then err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and state_in /= Tail_flit) then err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and write_fake_flit = '1') then err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and write_fake_flit = '0') then err_state_out_Header_flit_valid_in_fault_out_write_fake_flit <= '1'; else err_state_out_Header_flit_valid_in_fault_out_write_fake_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Header_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Header_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, valid_in, state_in, state_out) begin if (state_out = Header_flit and valid_in = '0' and state_in /= state_out) then err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Header_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_info_in) begin if (state_out = Header_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Header_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Header_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, write_fake_flit) begin if (state_out = Header_flit and valid_in = '0' and write_fake_flit = '1') then err_state_out_Header_flit_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Header_flit_not_valid_in_not_write_fake_flit <= '0'; end if; end process; process (state_out, fake_credit) begin if ( (state_out = Header_flit or state_out = Body_flit) and fake_credit /= '0') then err_state_out_Header_flit_or_Body_flit_not_fake_credit <= '1'; else err_state_out_Header_flit_or_Body_flit_not_fake_credit <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Body_flit state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in, state_out) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "010" and state_in /= state_out) then err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and state_in /= Tail_flit) then err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and health_info = '0') then err_state_out_Body_flit_valid_in_not_fault_out_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_health_info <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type /= "100" and health_info = '1') then err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info <= '0'; end if; end process; process (state_out, valid_in, fault_out, health_info) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and health_info = '1') then err_state_out_Body_flit_valid_in_fault_out_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_fault_out_not_health_info <= '0'; end if; end process; process (state_out, valid_in, health_info) begin if (state_out = Body_flit and valid_in = '0' and health_info = '1') then err_state_out_Body_flit_valid_in_not_health_info <= '1'; else err_state_out_Body_flit_valid_in_not_health_info <= '0'; end if; end process; process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and write_fake_flit = '1') then err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and write_fake_flit = '0') then err_state_out_Body_flit_valid_in_fault_out_write_fake_flit <= '1'; else err_state_out_Body_flit_valid_in_fault_out_write_fake_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Body_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Body_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, valid_in, state_in) begin if (state_out = Body_flit and valid_in = '0' and state_in /= state_out) then err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Body_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_info_in) begin if (state_out = Body_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Body_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Body_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; process (state_out, fake_credit) begin if (state_out = Body_flit and fake_credit = '1') then err_state_out_Body_flit_not_fake_credit <= '1'; else err_state_out_Body_flit_not_fake_credit <= '0'; end if; end process; process (state_out, valid_in, write_fake_flit) begin if (state_out = Body_flit and valid_in = '0' and write_fake_flit = '1') then err_state_out_Body_flit_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Body_flit_not_valid_in_not_write_fake_flit <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Tail_flit state -- fault_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and flit_type = "001" and state_in /= Header_flit) then err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit <= '0'; end if; end process; process (state_out, valid_in, fault_out, fake_credit) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and fake_credit = '1') then err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, fake_credit) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and fake_credit /= '1') then err_state_out_Tail_flit_valid_in_fault_out_fake_credit <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_fake_credit <= '0'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Tail_flit_valid_in_fault_out_fault_info_in <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in <= '1'; else err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in <= '0'; end if; end process; process (state_out, valid_in, state_in) begin if (state_out = Tail_flit and valid_in = '0' and state_in /= Idle) then err_state_out_Tail_flit_not_valid_in_state_in_Idle <= '1'; else err_state_out_Tail_flit_not_valid_in_state_in_Idle <= '0'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Tail_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change <= '1'; else err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change <= '0'; end if; end process; process (state_out, valid_in, fault_info_in) begin if (state_out = Tail_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Tail_flit_not_valid_in_not_fault_info_in <= '1'; else err_state_out_Tail_flit_not_valid_in_not_fault_info_in <= '0'; end if; end process; process (state_out, valid_in, fake_credit) begin if (state_out = Tail_flit and valid_in = '0' and fake_credit /= '0') then err_state_out_Tail_flit_not_valid_in_not_fake_credit <= '1'; else err_state_out_Tail_flit_not_valid_in_not_fake_credit <= '0'; end if; end process; process (state_out, write_fake_flit) begin if (state_out = Tail_flit and write_fake_flit = '1') then err_state_out_Tail_flit_not_write_fake_flit <= '1'; else err_state_out_Tail_flit_not_write_fake_flit <= '0'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Packet_drop state -- faulty_packet_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and fake_credit /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and faulty_packet_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and state_in /= Header_flit) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and write_fake_flit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '1' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and faulty_packet_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '1' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and state_in /= Idle) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and fake_credit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and ((flit_type /= "001" and flit_type /= "100") or fault_out = '1') and fake_credit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and ( valid_in = '0' or (flit_type /= "001" and flit_type /= "100") or fault_out = '1' ) and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and ((flit_type /= "001" and flit_type /= "100") or fault_out = '1') and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and write_fake_flit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and fake_credit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit <= '0'; end if; end process; -- faulty_packet_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, faulty_packet_out, state_in, state_out) begin if (state_out = Packet_drop and faulty_packet_out = '0' and state_in /= state_out) then err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change <= '0'; end if; end process; process (state_out, faulty_packet_out, faulty_packet_in, faulty_packet_out) begin if (state_out = Packet_drop and faulty_packet_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; end if; end process; process (state_out, fault_info_in) begin if (state_out = Packet_drop and fault_info_in = '1') then err_state_out_Packet_drop_not_fault_info_in <= '1'; else err_state_out_Packet_drop_not_fault_info_in <= '0'; end if; end process; process (state_out, faulty_packet_out, fake_credit) begin if (state_out = Packet_drop and faulty_packet_out = '0' and fake_credit = '1') then err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit <= '0'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '1' and (valid_in = '0' or flit_type /= "001" or fault_out = '1') and write_fake_flit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit <= '0'; end if; end process; process (state_out, faulty_packet_out, write_fake_flit) begin if (state_out = Packet_drop and faulty_packet_out = '0' and write_fake_flit = '1') then err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit <= '1'; else err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit <= '0'; end if; end process; process (fault_info, fault_info_out) begin if (fault_info /= fault_info_out) then err_fault_info_fault_info_out_equal <= '1'; else err_fault_info_fault_info_out_equal <= '0'; end if; end process; process (state_out, valid_in, state_in, state_out) begin if (state_out = Packet_drop and valid_in = '0' and state_in /= state_out) then err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal <= '1'; else err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal <= '0'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in, state_out) begin if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and flit_type /= "001" and state_in /= state_out) then err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal <= '1'; else err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal <= '0'; end if; end process; end behavior;
gpl-3.0
38d25592d0907fb45b0348b268ba3dc4
0.666746
2.703943
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/With_checkers/mlite_pack.vhd
3
26,281
--------------------------------------------------------------------- -- TITLE: Plasma Misc. Package -- Main AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 2/15/01 -- FILENAME: mlite_pack.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Data types, constants, and add functions needed for the Plasma CPU. -- modified by: Siavoosh Payandeh Azad -- Change logs: -- * An NI has been added to the file as a new module -- * some changes has been applied to the ports of the older modules -- to facilitate the new module! --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; package mlite_pack is constant ZERO : std_logic_vector(31 downto 0) := "00000000000000000000000000000000"; constant ONES : std_logic_vector(31 downto 0) := "11111111111111111111111111111111"; --make HIGH_Z equal to ZERO if compiler complains constant HIGH_Z : std_logic_vector(31 downto 0) := "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; subtype alu_function_type is std_logic_vector(3 downto 0); constant ALU_NOTHING : alu_function_type := "0000"; constant ALU_ADD : alu_function_type := "0001"; constant ALU_SUBTRACT : alu_function_type := "0010"; constant ALU_LESS_THAN : alu_function_type := "0011"; constant ALU_LESS_THAN_SIGNED : alu_function_type := "0100"; constant ALU_OR : alu_function_type := "0101"; constant ALU_AND : alu_function_type := "0110"; constant ALU_XOR : alu_function_type := "0111"; constant ALU_NOR : alu_function_type := "1000"; subtype shift_function_type is std_logic_vector(1 downto 0); constant SHIFT_NOTHING : shift_function_type := "00"; constant SHIFT_LEFT_UNSIGNED : shift_function_type := "01"; constant SHIFT_RIGHT_SIGNED : shift_function_type := "11"; constant SHIFT_RIGHT_UNSIGNED : shift_function_type := "10"; subtype mult_function_type is std_logic_vector(3 downto 0); constant MULT_NOTHING : mult_function_type := "0000"; constant MULT_READ_LO : mult_function_type := "0001"; constant MULT_READ_HI : mult_function_type := "0010"; constant MULT_WRITE_LO : mult_function_type := "0011"; constant MULT_WRITE_HI : mult_function_type := "0100"; constant MULT_MULT : mult_function_type := "0101"; constant MULT_SIGNED_MULT : mult_function_type := "0110"; constant MULT_DIVIDE : mult_function_type := "0111"; constant MULT_SIGNED_DIVIDE : mult_function_type := "1000"; subtype a_source_type is std_logic_vector(1 downto 0); constant A_FROM_REG_SOURCE : a_source_type := "00"; constant A_FROM_IMM10_6 : a_source_type := "01"; constant A_FROM_PC : a_source_type := "10"; subtype b_source_type is std_logic_vector(1 downto 0); constant B_FROM_REG_TARGET : b_source_type := "00"; constant B_FROM_IMM : b_source_type := "01"; constant B_FROM_SIGNED_IMM : b_source_type := "10"; constant B_FROM_IMMX4 : b_source_type := "11"; subtype c_source_type is std_logic_vector(2 downto 0); constant C_FROM_NULL : c_source_type := "000"; constant C_FROM_ALU : c_source_type := "001"; constant C_FROM_SHIFT : c_source_type := "001"; --same as alu constant C_FROM_MULT : c_source_type := "001"; --same as alu constant C_FROM_MEMORY : c_source_type := "010"; constant C_FROM_PC : c_source_type := "011"; constant C_FROM_PC_PLUS4 : c_source_type := "100"; constant C_FROM_IMM_SHIFT16: c_source_type := "101"; constant C_FROM_REG_SOURCEN: c_source_type := "110"; subtype pc_source_type is std_logic_vector(1 downto 0); constant FROM_INC4 : pc_source_type := "00"; constant FROM_OPCODE25_0 : pc_source_type := "01"; constant FROM_BRANCH : pc_source_type := "10"; constant FROM_LBRANCH : pc_source_type := "11"; subtype branch_function_type is std_logic_vector(2 downto 0); constant BRANCH_LTZ : branch_function_type := "000"; constant BRANCH_LEZ : branch_function_type := "001"; constant BRANCH_EQ : branch_function_type := "010"; constant BRANCH_NE : branch_function_type := "011"; constant BRANCH_GEZ : branch_function_type := "100"; constant BRANCH_GTZ : branch_function_type := "101"; constant BRANCH_YES : branch_function_type := "110"; constant BRANCH_NO : branch_function_type := "111"; -- mode(32=1,16=2,8=3), signed, write subtype mem_source_type is std_logic_vector(3 downto 0); constant MEM_FETCH : mem_source_type := "0000"; constant MEM_READ32 : mem_source_type := "0100"; constant MEM_WRITE32 : mem_source_type := "0101"; constant MEM_READ16 : mem_source_type := "1000"; constant MEM_READ16S : mem_source_type := "1010"; constant MEM_WRITE16 : mem_source_type := "1001"; constant MEM_READ8 : mem_source_type := "1100"; constant MEM_READ8S : mem_source_type := "1110"; constant MEM_WRITE8 : mem_source_type := "1101"; function bv_adder(a : in std_logic_vector; b : in std_logic_vector; do_add: in std_logic) return std_logic_vector; function bv_negate(a : in std_logic_vector) return std_logic_vector; function bv_increment(a : in std_logic_vector(31 downto 2) ) return std_logic_vector; function bv_inc(a : in std_logic_vector ) return std_logic_vector; -- For Altera COMPONENT lpm_ram_dp generic ( LPM_WIDTH : natural; -- MUST be greater than 0 LPM_WIDTHAD : natural; -- MUST be greater than 0 LPM_NUMWORDS : natural := 0; LPM_INDATA : string := "REGISTERED"; LPM_OUTDATA : string := "REGISTERED"; LPM_RDADDRESS_CONTROL : string := "REGISTERED"; LPM_WRADDRESS_CONTROL : string := "REGISTERED"; LPM_FILE : string := "UNUSED"; LPM_TYPE : string := "LPM_RAM_DP"; USE_EAB : string := "OFF"; INTENDED_DEVICE_FAMILY : string := "UNUSED"; RDEN_USED : string := "TRUE"; LPM_HINT : string := "UNUSED"); port ( RDCLOCK : in std_logic := '0'; RDCLKEN : in std_logic := '1'; RDADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); RDEN : in std_logic := '1'; DATA : in std_logic_vector(LPM_WIDTH-1 downto 0); WRADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); WREN : in std_logic; WRCLOCK : in std_logic := '0'; WRCLKEN : in std_logic := '1'; Q : out std_logic_vector(LPM_WIDTH-1 downto 0)); END COMPONENT; -- For Altera component LPM_RAM_DQ generic ( LPM_WIDTH : natural; -- MUST be greater than 0 LPM_WIDTHAD : natural; -- MUST be greater than 0 LPM_NUMWORDS : natural := 0; LPM_INDATA : string := "REGISTERED"; LPM_ADDRESS_CONTROL: string := "REGISTERED"; LPM_OUTDATA : string := "REGISTERED"; LPM_FILE : string := "UNUSED"; LPM_TYPE : string := "LPM_RAM_DQ"; USE_EAB : string := "OFF"; INTENDED_DEVICE_FAMILY : string := "UNUSED"; LPM_HINT : string := "UNUSED"); port ( DATA : in std_logic_vector(LPM_WIDTH-1 downto 0); ADDRESS : in std_logic_vector(LPM_WIDTHAD-1 downto 0); INCLOCK : in std_logic := '0'; OUTCLOCK : in std_logic := '0'; WE : in std_logic; Q : out std_logic_vector(LPM_WIDTH-1 downto 0)); end component; -- For Xilinx component RAM16X1D -- synthesis translate_off generic (INIT : bit_vector := X"0000"); -- synthesis translate_on port (DPO : out STD_ULOGIC; SPO : out STD_ULOGIC; A0 : in STD_ULOGIC; A1 : in STD_ULOGIC; A2 : in STD_ULOGIC; A3 : in STD_ULOGIC; D : in STD_ULOGIC; DPRA0 : in STD_ULOGIC; DPRA1 : in STD_ULOGIC; DPRA2 : in STD_ULOGIC; DPRA3 : in STD_ULOGIC; WCLK : in STD_ULOGIC; WE : in STD_ULOGIC); end component; -- For Xilinx Virtex-5 component RAM32X1D -- synthesis translate_off generic (INIT : bit_vector := X"00000000"); -- synthesis translate_on port (DPO : out STD_ULOGIC; SPO : out STD_ULOGIC; A0 : in STD_ULOGIC; A1 : in STD_ULOGIC; A2 : in STD_ULOGIC; A3 : in STD_ULOGIC; A4 : in STD_ULOGIC; D : in STD_ULOGIC; DPRA0 : in STD_ULOGIC; DPRA1 : in STD_ULOGIC; DPRA2 : in STD_ULOGIC; DPRA3 : in STD_ULOGIC; DPRA4 : in STD_ULOGIC; WCLK : in STD_ULOGIC; WE : in STD_ULOGIC); end component; component pc_next port(clk : in std_logic; reset_in : in std_logic; pc_new : in std_logic_vector(31 downto 2); take_branch : in std_logic; pause_in : in std_logic; opcode25_0 : in std_logic_vector(25 downto 0); pc_source : in pc_source_type; pc_future : out std_logic_vector(31 downto 2); pc_current : out std_logic_vector(31 downto 2); pc_plus4 : out std_logic_vector(31 downto 2)); end component; component mem_ctrl port(clk : in std_logic; reset_in : in std_logic; pause_in : in std_logic; nullify_op : in std_logic; address_pc : in std_logic_vector(31 downto 2); opcode_out : out std_logic_vector(31 downto 0); address_in : in std_logic_vector(31 downto 0); mem_source : in mem_source_type; data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); pause_out : out std_logic; address_next : out std_logic_vector(31 downto 2); byte_we_next : out std_logic_vector(3 downto 0); address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_w : out std_logic_vector(31 downto 0); data_r : in std_logic_vector(31 downto 0)); end component; component control port(opcode : in std_logic_vector(31 downto 0); intr_signal : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; rs_index : out std_logic_vector(5 downto 0); rt_index : out std_logic_vector(5 downto 0); rd_index : out std_logic_vector(5 downto 0); imm_out : out std_logic_vector(15 downto 0); alu_func : out alu_function_type; shift_func : out shift_function_type; mult_func : out mult_function_type; branch_func : out branch_function_type; a_source_out : out a_source_type; b_source_out : out b_source_type; c_source_out : out c_source_type; pc_source_out: out pc_source_type; mem_source_out:out mem_source_type; exception_out: out std_logic); end component; component reg_bank generic(memory_type : string := "XILINX_16X"); port(clk : in std_logic; reset_in : in std_logic; pause : in std_logic; interrupt_in : in std_logic; -- modified rs_index : in std_logic_vector(5 downto 0); rt_index : in std_logic_vector(5 downto 0); rd_index : in std_logic_vector(5 downto 0); reg_source_out : out std_logic_vector(31 downto 0); reg_target_out : out std_logic_vector(31 downto 0); reg_dest_new : in std_logic_vector(31 downto 0); intr_enable : out std_logic); end component; component bus_mux port(imm_in : in std_logic_vector(15 downto 0); reg_source : in std_logic_vector(31 downto 0); a_mux : in a_source_type; a_out : out std_logic_vector(31 downto 0); reg_target : in std_logic_vector(31 downto 0); b_mux : in b_source_type; b_out : out std_logic_vector(31 downto 0); c_bus : in std_logic_vector(31 downto 0); c_memory : in std_logic_vector(31 downto 0); c_pc : in std_logic_vector(31 downto 2); c_pc_plus4 : in std_logic_vector(31 downto 2); c_mux : in c_source_type; reg_dest_out : out std_logic_vector(31 downto 0); branch_func : in branch_function_type; take_branch : out std_logic); end component; component alu generic(alu_type : string := "DEFAULT"); port(a_in : in std_logic_vector(31 downto 0); b_in : in std_logic_vector(31 downto 0); alu_function : in alu_function_type; c_alu : out std_logic_vector(31 downto 0)); end component; component shifter generic(shifter_type : string := "DEFAULT" ); port(value : in std_logic_vector(31 downto 0); shift_amount : in std_logic_vector(4 downto 0); shift_func : in shift_function_type; c_shift : out std_logic_vector(31 downto 0)); end component; component mult generic(mult_type : string := "DEFAULT"); port(clk : in std_logic; reset_in : in std_logic; a, b : in std_logic_vector(31 downto 0); mult_func : in mult_function_type; c_mult : out std_logic_vector(31 downto 0); pause_out : out std_logic); end component; component pipeline port(clk : in std_logic; reset : in std_logic; a_bus : in std_logic_vector(31 downto 0); a_busD : out std_logic_vector(31 downto 0); b_bus : in std_logic_vector(31 downto 0); b_busD : out std_logic_vector(31 downto 0); alu_func : in alu_function_type; alu_funcD : out alu_function_type; shift_func : in shift_function_type; shift_funcD : out shift_function_type; mult_func : in mult_function_type; mult_funcD : out mult_function_type; reg_dest : in std_logic_vector(31 downto 0); reg_destD : out std_logic_vector(31 downto 0); rd_index : in std_logic_vector(5 downto 0); rd_indexD : out std_logic_vector(5 downto 0); rs_index : in std_logic_vector(5 downto 0); rt_index : in std_logic_vector(5 downto 0); pc_source : in pc_source_type; mem_source : in mem_source_type; a_source : in a_source_type; b_source : in b_source_type; c_source : in c_source_type; c_bus : in std_logic_vector(31 downto 0); pause_any : in std_logic; pause_pipeline : out std_logic); end component; component mlite_cpu generic(memory_type : string := "XILINX_16X"; --ALTERA_LPM, or DUAL_PORT_ mult_type : string := "DEFAULT"; shifter_type : string := "DEFAULT"; alu_type : string := "DEFAULT"; pipeline_stages : natural := 2); --2 or 3 port(clk : in std_logic; reset_in : in std_logic; intr_in : in std_logic; --NI_read_flag : in std_logic; --NI_write_flag : in std_logic; address_next : out std_logic_vector(31 downto 2); --for synch ram byte_we_next : out std_logic_vector(3 downto 0); address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_w : out std_logic_vector(31 downto 0); data_r : in std_logic_vector(31 downto 0); mem_pause : in std_logic); end component; component cache generic(memory_type : string := "DEFAULT"); port(clk : in std_logic; reset : in std_logic; address_next : in std_logic_vector(31 downto 2); byte_we_next : in std_logic_vector(3 downto 0); cpu_address : in std_logic_vector(31 downto 2); mem_busy : in std_logic; cache_access : out std_logic; --access 4KB cache cache_checking : out std_logic; --checking if cache hit cache_miss : out std_logic); --cache miss end component; --cache component ram generic(memory_type : string := "DEFAULT"; stim_file: string :="code.txt"); port(clk : in std_logic; enable : in std_logic; reset : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0)); end component; --ram component NI generic(current_address : integer := 10; -- the current node's address SHMU_address : integer := 0; reserved_address : std_logic_vector(29 downto 0) := "000000000000000001111111111111"; flag_address : std_logic_vector(29 downto 0) := "000000000000000010000000000000"; -- reserved address for the memory mapped I/O counter_address : std_logic_vector(29 downto 0) := "000000000000000010000000000001"); -- reserved address for the counter port(clk : in std_logic; reset : in std_logic; enable : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); --NI_read_flag : out std_logic; --NI_write_flag : out std_logic; irq_out : out std_logic; credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(19 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); Reconfig_command : out std_logic ); end component; --network interface component uart generic(log_file : string := "UNUSED"); port(clk : in std_logic; reset : in std_logic; enable_read : in std_logic; enable_write : in std_logic; data_in : in std_logic_vector(7 downto 0); data_out : out std_logic_vector(7 downto 0); uart_read : in std_logic; uart_write : out std_logic; busy_write : out std_logic; data_avail : out std_logic); end component; --uart component eth_dma port(clk : in std_logic; --25 MHz reset : in std_logic; enable_eth : in std_logic; select_eth : in std_logic; rec_isr : out std_logic; send_isr : out std_logic; address : out std_logic_vector(31 downto 2); --to DDR byte_we : out std_logic_vector(3 downto 0); data_write : out std_logic_vector(31 downto 0); data_read : in std_logic_vector(31 downto 0); pause_in : in std_logic; mem_address : in std_logic_vector(31 downto 2); --from CPU mem_byte_we : in std_logic_vector(3 downto 0); data_w : in std_logic_vector(31 downto 0); pause_out : out std_logic; E_RX_CLK : in std_logic; --2.5 MHz receive E_RX_DV : in std_logic; --data valid E_RXD : in std_logic_vector(3 downto 0); --receive nibble E_TX_CLK : in std_logic; --2.5 MHz transmit E_TX_EN : out std_logic; --transmit enable E_TXD : out std_logic_vector(3 downto 0)); --transmit nibble end component; --eth_dma component plasma generic(memory_type : string := "XILINX_X16"; --"DUAL_PORT_" "ALTERA_LPM"; log_file : string := "UNUSED"; ethernet : std_logic := '0'; use_cache : std_logic := '0'; current_address : integer := 10; stim_file: string :="code.txt"); port(clk : in std_logic; reset : in std_logic; uart_write : out std_logic; uart_read : in std_logic; address : out std_logic_vector(31 downto 2); byte_we : out std_logic_vector(3 downto 0); data_write : out std_logic_vector(31 downto 0); data_read : in std_logic_vector(31 downto 0); mem_pause_in : in std_logic; no_ddr_start : out std_logic; no_ddr_stop : out std_logic; gpio0_out : out std_logic_vector(31 downto 0); gpioA_in : in std_logic_vector(31 downto 0); credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(19 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); Reconfig_command : out std_logic ); end component; --plasma component ddr_ctrl port(clk : in std_logic; clk_2x : in std_logic; reset_in : in std_logic; address : in std_logic_vector(25 downto 2); byte_we : in std_logic_vector(3 downto 0); data_w : in std_logic_vector(31 downto 0); data_r : out std_logic_vector(31 downto 0); active : in std_logic; no_start : in std_logic; no_stop : in std_logic; pause : out std_logic; SD_CK_P : out std_logic; --clock_positive SD_CK_N : out std_logic; --clock_negative SD_CKE : out std_logic; --clock_enable SD_BA : out std_logic_vector(1 downto 0); --bank_address SD_A : out std_logic_vector(12 downto 0); --address(row or col) SD_CS : out std_logic; --chip_select SD_RAS : out std_logic; --row_address_strobe SD_CAS : out std_logic; --column_address_strobe SD_WE : out std_logic; --write_enable SD_DQ : inout std_logic_vector(15 downto 0); --data SD_UDM : out std_logic; --upper_byte_enable SD_UDQS : inout std_logic; --upper_data_strobe SD_LDM : out std_logic; --low_byte_enable SD_LDQS : inout std_logic); --low_data_strobe end component; --ddr end; --package mlite_pack package body mlite_pack is function bv_adder(a : in std_logic_vector; b : in std_logic_vector; do_add: in std_logic) return std_logic_vector is variable carry_in : std_logic; variable bb : std_logic_vector(a'length-1 downto 0); variable result : std_logic_vector(a'length downto 0); begin if do_add = '1' then bb := b; carry_in := '0'; else bb := not b; carry_in := '1'; end if; for index in 0 to a'length-1 loop result(index) := a(index) xor bb(index) xor carry_in; carry_in := (carry_in and (a(index) or bb(index))) or (a(index) and bb(index)); end loop; result(a'length) := carry_in xnor do_add; return result; end; --function function bv_negate(a : in std_logic_vector) return std_logic_vector is variable carry_in : std_logic; variable not_a : std_logic_vector(a'length-1 downto 0); variable result : std_logic_vector(a'length-1 downto 0); begin not_a := not a; carry_in := '1'; for index in a'reverse_range loop result(index) := not_a(index) xor carry_in; carry_in := carry_in and not_a(index); end loop; return result; end; --function function bv_increment(a : in std_logic_vector(31 downto 2) ) return std_logic_vector is variable carry_in : std_logic; variable result : std_logic_vector(31 downto 2); begin carry_in := '1'; for index in 2 to 31 loop result(index) := a(index) xor carry_in; carry_in := a(index) and carry_in; end loop; return result; end; --function function bv_inc(a : in std_logic_vector ) return std_logic_vector is variable carry_in : std_logic; variable result : std_logic_vector(a'length-1 downto 0); begin carry_in := '1'; for index in 0 to a'length-1 loop result(index) := a(index) xor carry_in; carry_in := a(index) and carry_in; end loop; return result; end; --function end; --package body
gpl-3.0
34fc29266701c5c657632000b9742f94
0.543587
3.666434
false
false
false
false
AndyMcC0/UVVM_All
bitvis_uart/tb/uart_vvc_tb.vhd
1
15,292
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- Description : See library quick reference (under 'doc') and README-file(s) ------------------------------------------------------------------------------------------ library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; library uvvm_util; context uvvm_util.uvvm_util_context; library uvvm_vvc_framework; use uvvm_vvc_framework.ti_vvc_framework_support_pkg.all; library bitvis_vip_sbi; use bitvis_vip_sbi.vvc_methods_pkg.all; use bitvis_vip_sbi.td_vvc_framework_common_methods_pkg.all; library bitvis_vip_uart; use bitvis_vip_uart.vvc_methods_pkg.all; use bitvis_vip_uart.td_vvc_framework_common_methods_pkg.all; -- Test bench entity entity uart_vvc_tb is end entity; -- Test bench architecture architecture func of uart_vvc_tb is constant C_SCOPE : string := C_TB_SCOPE_DEFAULT; -- Clock and bit period settings constant C_CLK_PERIOD : time := 10 ns; constant C_BIT_PERIOD : time := 16 * C_CLK_PERIOD; -- Time for one UART transmission to complete constant C_TIME_OF_ONE_UART_TX : time := 11*C_BIT_PERIOD; -- =1760 ns; -- Predefined SBI addresses constant C_ADDR_RX_DATA : unsigned(2 downto 0) := "000"; constant C_ADDR_RX_DATA_VALID : unsigned(2 downto 0) := "001"; constant C_ADDR_TX_DATA : unsigned(2 downto 0) := "010"; constant C_ADDR_TX_READY : unsigned(2 downto 0) := "011"; -- Log overload procedure for simplification procedure log( msg : string) is begin log(ID_SEQUENCER, msg, C_SCOPE); end; begin ----------------------------------------------------------------------------- -- Instantiate test harness, containing DUT and Executors ----------------------------------------------------------------------------- i_test_harness : entity work.uart_vvc_th; ------------------------------------------------ -- PROCESS: p_main ------------------------------------------------ p_main: process begin -- Wait for UVVM to finish initialization await_uvvm_initialization(VOID); -- Print the configuration to the log report_global_ctrl(VOID); report_msg_id_panel(VOID); --enable_log_msg(ALL_MESSAGES); disable_log_msg(ALL_MESSAGES); enable_log_msg(ID_LOG_HDR); enable_log_msg(ID_SEQUENCER); enable_log_msg(ID_UVVM_SEND_CMD); disable_log_msg(SBI_VVCT, 1, ALL_MESSAGES); enable_log_msg(SBI_VVCT, 1, ID_BFM); enable_log_msg(SBI_VVCT, 1, ID_FINISH_OR_STOP); disable_log_msg(UART_VVCT, 1, RX, ALL_MESSAGES); enable_log_msg(UART_VVCT, 1, RX, ID_BFM); disable_log_msg(UART_VVCT, 1, TX, ALL_MESSAGES); enable_log_msg(UART_VVCT, 1, TX, ID_BFM); log(ID_LOG_HDR, "Starting simulation of TB for UART using VVCs", C_SCOPE); ------------------------------------------------------------ log("Wait 10 clock period for reset to be turned off"); wait for (10 * C_CLK_PERIOD); -- for reset to be turned off log(ID_LOG_HDR, "Configure UART VVC 1", C_SCOPE); ------------------------------------------------------------ shared_uart_vvc_config(RX,1).bfm_config.bit_time := C_BIT_PERIOD; shared_uart_vvc_config(TX,1).bfm_config.bit_time := C_BIT_PERIOD; log(ID_LOG_HDR, "Check register defaults ", C_SCOPE); ------------------------------------------------------------ -- This test will send three sbi_check commands to the SBI VVC, and then -- wait for them all to complete before continuing the test sequence. sbi_check(SBI_VVCT, 1, C_ADDR_RX_DATA, x"00", "RX_DATA default"); sbi_check(SBI_VVCT, 1, C_ADDR_TX_READY, x"01", "TX_READY default"); sbi_check(SBI_VVCT, 1, C_ADDR_RX_DATA_VALID, x"00", "RX_DATA_VALID default"); await_completion(SBI_VVCT,1, 10 * C_CLK_PERIOD); log(ID_LOG_HDR, "Check simple transmit", C_SCOPE); ------------------------------------------------------------ -- This test case will instruct the SBI VVC to send the data x"55" to the DUT C_ADDR_TX_DATA address. -- This will cause the DUT to transmit x"55" on the UART line. In order to receive the data, the -- UART VVC is instructed to expect the data x"55" on the RX port. The test sequence will not continue -- until the UART VVC has received the data from the DUT, indicated by the await_completion method. sbi_write(SBI_VVCT,1, C_ADDR_TX_DATA, x"55", "TX_DATA"); uart_expect(UART_VVCT,1,RX, x"55", "Expecting data on UART RX"); await_completion(UART_VVCT,1,RX, 13 * C_BIT_PERIOD); wait for 200 ns; -- margin log(ID_LOG_HDR, "Check simple receive", C_SCOPE); ------------------------------------------------------------ -- In this test case the UART VVC (TX channel) is instructed to send the data x"AA" to the DUT. -- This data should be received and stored to a RX buffer by the DUT. After the UART VVC has completed -- the transmission, the SBI VVC is instructed to check read and check (sbi_check) the C_ADDR_RX_DATA -- register, and verify that it is in fact x"AA" that the DUT received. The test sequencer will continue -- when the SBI VVC is done checking the C_ADDR_RX_DATA register. uart_transmit(UART_VVCT,1,TX, x"AA", "UART TX"); await_completion(UART_VVCT,1,TX, 13 * C_BIT_PERIOD); wait for 200 ns; -- margin sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, x"AA", "RX_DATA"); await_completion(SBI_VVCT,1, 13 * C_BIT_PERIOD); log(ID_LOG_HDR, "Check single simultaneous transmit and receive", C_SCOPE); ------------------------------------------------------------ -- Since the UART consists of two individual VVCs (TX and RX), it is capable of full duplex operation. -- This test case will instruct the SBI VVC to write x"B4" to the C_ADDR_TX_DATA register of the DUT, -- which will cause the DUT to send x"B4" on its UART TX line. Simultaneously, the UART VVC is instructed -- to both transmit x"87" to the DUT, and expect x"B4" from the DUT. When the UART VVC is done transmitting -- to the DUT, the SBI VVC will be instructed to read and check the DUT C_ADDR_RX_DATA register and verify -- that the DUT received the correct data from the UART VVC. After this check is completed, the test sequencer -- can continue to the next test case. sbi_write(SBI_VVCT,1, C_ADDR_TX_DATA, x"B4", "TX_DATA"); uart_transmit(UART_VVCT,1,TX, x"87", "UART TX"); uart_expect(UART_VVCT,1,RX, x"B4", "Expecting data on UART RX"); await_completion(UART_VVCT,1,TX, 13 * C_BIT_PERIOD); wait for 200 ns; -- margin sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, x"87", "RX_DATA"); await_completion(SBI_VVCT,1, 13 * C_BIT_PERIOD); log(ID_LOG_HDR, "Check multiple simultaneous receive and read", C_SCOPE); ------------------------------------------------------------ -- This test case will instruct the UART VVC to transmit three messages to the DUT. These UART VVC (TX channel) -- will add the three "uart_transmit" commands to the command queue, and execute them sequentially when -- await_completion is called. After the UART VVC is done transmitting, the SBI VVC is instructed to read and -- verify that the three consecutive bytes from the C_ADDR_RX_DATA register of the DUT are equal to the data -- transmitted from the UART VVC. When the SBI VVC is done with these checks, the testbench sequencer can continue -- to the next test case. uart_transmit(UART_VVCT,1,TX, x"A1", "UART TX"); uart_transmit(UART_VVCT,1,TX, x"A2", "UART TX"); uart_transmit(UART_VVCT,1,TX, x"A3", "UART TX"); await_completion(UART_VVCT,1,TX, 3 * 13 * C_BIT_PERIOD); wait for 200 ns; -- margin sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, x"A1", "RX_DATA"); sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, x"A2", "RX_DATA"); sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, x"A3", "RX_DATA"); await_completion(SBI_VVCT,1, 10 * C_CLK_PERIOD); log(ID_LOG_HDR, "Skew SBI read over UART receive ", C_SCOPE); ------------------------------------------------------------ -- This test case will show how using VVCs in UVVM can be used for simultaneous UART and SBI operation, -- which enables testing of corner cases. In the UART DUT one of these corner cases often occurs when the UART DUT -- must handle UART RX data and SBI reads simultaneously. To test if this is handled properly in the DUT, -- this test case will transmit data from the UART VVC, and check the data received in the C_ADDR_RX_DATA register. -- The DUT RX buffer will always contain at least one received byte, and the SBI VVC will check the oldest entry in -- the RX buffer. The UART VVC will be set up to transmit bytes to the DUT continuously. When the SBI_VVC checks the -- DUT RX buffer, relative to the UART TX operation, will vary on each iteration. -- First, the UART VVC will transmit a complete frame to the DUT. Then, when the UART VVC is 50 clock periods from -- completing the transmission of the second byte, the SBI VVC checks the DUT RX buffer for the first received byte. -- When the UART VVC is 49 clock periods from transmitting the third byte, the SBI VVC will check the DUT RX buffer -- for the second byte received. This process repeats until the SBI VVC is checking the DUT RX register 50 clock periods -- after the UART VVC has completed its transmission. At this point there will be two complete bytes in the DUT RX buffer -- when the SBI VVC reads from it. After the test is completed the two final bytes in the RX buffer are checked. When this -- is done, the test case is complete. log("Setting up the UART VVC to transmit 102 samples to the DUT"); for i in 1 to 102 loop uart_transmit(UART_VVCT,1,TX, std_logic_vector(to_unsigned(16#80# + i, 8)), string'("Set up new data. Now byte # " & to_string(i))); end loop; log("Setting up the SBI VVC to read and check the DUT RX register after each completed UART TX operation"); -- 1760 ns is measured time from start of UART receive to received data is available in the DUT C_ADDR_RX_DATA register -- The SBI VVC will wait until the UART VVC is 50 clock periods away from successfully transmitting the first byte. insert_delay(SBI_VVCT,1, C_TIME_OF_ONE_UART_TX - 50 * C_CLK_PERIOD, "Inserting delay in SBI VVC to wait for first byte to complete"); for i in 1 to 100 loop -- Wait for the time of one complete UART transmission + one clock cycle (for skew). -- Every read will now be 1T later relative to a new byte being valid internally insert_delay(SBI_VVCT,1, C_TIME_OF_ONE_UART_TX, "Delaying for the time of one uart transmission"); insert_delay(SBI_VVCT,1, C_CLK_PERIOD, "Skewing the SBI read one clock cycle"); sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, std_logic_vector(to_unsigned(16#80# + i, 8)), "Reading data number " & to_string(i)); end loop; await_completion(UART_VVCT,1,TX, 103 * C_TIME_OF_ONE_UART_TX); wait for 50 ns; -- to assure UART RX complete internally -- Check the last two bytes in the DUT RX buffer. sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, std_logic_vector(to_unsigned(16#80# + 101, 8)), "Reading data number " & to_string(101)); sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, std_logic_vector(to_unsigned(16#80# + 102, 8)), "Reading data number " & to_string(102)); await_completion(SBI_VVCT,1, 10 * C_CLK_PERIOD); log(ID_LOG_HDR, "Skew SBI read over UART receive with inter-BFM delay functionality", C_SCOPE); ------------------------------------------------------------ -- This test case will test the same as the test case above, but using the built in delay functionality in the SBI VVC log("Setting up the UART VVC to transmit 102 samples to the DUT"); for i in 1 to 102 loop uart_transmit(UART_VVCT,1,TX, std_logic_vector(to_unsigned(16#80# + i, 8)), string'("Set up new data. Now byte # " & to_string(i))); end loop; log("Setting up the SBI VVC to read and check the DUT RX register after each completed UART TX operation"); -- The SBI VVC will wait until the UART VVC is 50 clock periods away from successfully transmitting the second byte. insert_delay(SBI_VVCT,1, C_TIME_OF_ONE_UART_TX, "Insert delay in SBI VVC until the first UART transmission has completed"); insert_delay(SBI_VVCT,1, C_TIME_OF_ONE_UART_TX - 50 * C_CLK_PERIOD, "Inserting delay in SBI VVC until second UART transmission has almost completed"); log("Setting the SBI VVC to separate each BFM access with 1760 ns"); shared_sbi_vvc_config(1).inter_bfm_delay.delay_type := TIME_START2START; shared_sbi_vvc_config(1).inter_bfm_delay.delay_in_time := C_TIME_OF_ONE_UART_TX+C_CLK_PERIOD; for i in 1 to 100 loop sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, std_logic_vector(to_unsigned(16#80# + i, 8)), "Reading data number " & to_string(i)); end loop; await_completion(UART_VVCT,1,TX, 103 * C_TIME_OF_ONE_UART_TX); await_completion(SBI_VVCT,1, 2 * C_TIME_OF_ONE_UART_TX); wait for 50 ns; -- to assure UART RX complete internally -- Check the last two bytes in the DUT RX buffer. log("Setting the SBI VVC back to no delay between BFM accesses"); shared_sbi_vvc_config(1).inter_bfm_delay.delay_type := NO_DELAY; shared_sbi_vvc_config(1).inter_bfm_delay.delay_in_time := 0 ns; sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, std_logic_vector(to_unsigned(16#80# + 101, 8)), "Reading data number " & to_string(101)); sbi_check(SBI_VVCT,1, C_ADDR_RX_DATA, std_logic_vector(to_unsigned(16#80# + 102, 8)), "Reading data number " & to_string(102)); await_completion(SBI_VVCT,1, 2*C_TIME_OF_ONE_UART_TX); ----------------------------------------------------------------------------- -- Ending the simulation ----------------------------------------------------------------------------- wait for 1000 ns; -- to allow some time for completion report_alert_counters(FINAL); -- Report final counters and print conclusion for simulation (Success/Fail) log(ID_LOG_HDR, "SIMULATION COMPLETED", C_SCOPE); -- Finish the simulation std.env.stop; wait; -- to stop completely end process p_main; end func;
mit
0c6e8065c978e839483ac723a2cd9999
0.621371
3.787023
false
true
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/New_SHMU_on_Node/With_checkers/LBDR_packet_drop_routing_part_pseudo_checkers.vhd
12
13,914
library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity LBDR_packet_drop_routing_part_pseudo_checkers is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; dst_addr: in std_logic_vector(NoC_size-1 downto 0); Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; N1_out, E1_out, W1_out, S1_out: in std_logic; Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: in std_logic; grants: in std_logic; packet_drop_order: in std_logic; packet_drop_in: in std_logic; -- Checker outputs --err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order : out std_logic ); end LBDR_packet_drop_routing_part_pseudo_checkers; architecture behavior of LBDR_packet_drop_routing_part_pseudo_checkers is signal cur_addr: std_logic_vector(NoC_size-1 downto 0); signal Requests_FF: std_logic_vector(4 downto 0); signal Requests_in: std_logic_vector(4 downto 0); signal grant_signals: std_logic_vector(4 downto 0); begin cur_addr <= std_logic_vector(to_unsigned(cur_addr_rst, cur_addr'length)); Requests_FF <= Req_N_FF & Req_E_FF & Req_W_FF & Req_S_FF & Req_L_FF; Requests_in <= Req_N_in & Req_E_in & Req_W_in & Req_S_in & Req_L_in; grant_signals <= grant_N & grant_E & grant_W & grant_S & grant_L; -- Implementing checkers in form of concurrent assignments (combinational assertions) --process (flit_type, empty, Requests_in) --begin -- if (flit_type = "001" and empty = '0' and Requests_in /= "00001" and Requests_in /= "00010" and -- Requests_in /= "00100" and Requests_in /= "01000" and Requests_in /= "10000") then -- err_header_not_empty_Requests_in_onehot <= '1'; -- else -- err_header_not_empty_Requests_in_onehot <= '0'; -- end if; --end process; -- Checked ! process (flit_type, empty, Requests_FF, Requests_in) begin if (flit_type = "001" and empty = '1' and Requests_FF /= Requests_in) then err_header_empty_Requests_FF_Requests_in <= '1'; else err_header_empty_Requests_FF_Requests_in <= '0'; end if; end process; -- Checked ! process (flit_type, empty, grants, Requests_in) begin if (flit_type = "100" and empty = '0' and grants = '1' and Requests_in /= "00000") then err_tail_Requests_in_all_zero <= '1'; else err_tail_Requests_in_all_zero <= '0'; end if; end process; -- Checked ! process (flit_type, empty, Requests_FF, Requests_in) begin if (flit_type = "100" and empty = '1' and Requests_FF /= Requests_in) then err_tail_empty_Requests_FF_Requests_in <= '1'; else err_tail_empty_Requests_FF_Requests_in <= '0'; end if; end process; -- Checked ! process (flit_type, empty, grants, Requests_FF, Requests_in) begin if (flit_type = "100" and empty = '0' and grants = '0' and Requests_FF /= Requests_in) then err_tail_not_empty_not_grants_Requests_FF_Requests_in <= '1'; else err_tail_not_empty_not_grants_Requests_FF_Requests_in <= '0'; end if; end process; -- Checked ! process (grant_signals, grants) begin if ( (grant_signals = "00001" or grant_signals = "00010" or grant_signals = "00100" or grant_signals = "01000" or grant_signals = "10000") and grants = '0') then err_grants_onehot <= '1'; else err_grants_onehot <= '0'; end if; end process; -- Checked ! process (grant_signals, grants) begin if ( grant_signals = "00000" and grants = '1') then err_grants_mismatch <= '1'; else err_grants_mismatch <= '0'; end if; end process; -- Checked ! process (flit_type, Requests_FF, Requests_FF, Requests_in) begin if (flit_type /= "001" and flit_type /= "100" and Requests_FF /= Requests_in) then err_header_tail_Requests_FF_Requests_in <= '1'; else err_header_tail_Requests_FF_Requests_in <= '0'; end if; end process; -- Checked ! process (cur_addr, dst_addr, N1_out) begin if ( dst_addr(NoC_size-1 downto NoC_size/2) < cur_addr(NoC_size-1 downto NoC_size/2) and N1_out = '0') then err_dst_addr_cur_addr_N1 <= '1'; else err_dst_addr_cur_addr_N1 <= '0'; end if; end process; -- Checked ! process (cur_addr, dst_addr, N1_out) begin if ( dst_addr(NoC_size-1 downto NoC_size/2) >= cur_addr(NoC_size-1 downto NoC_size/2) and N1_out = '1') then err_dst_addr_cur_addr_not_N1 <= '1'; else err_dst_addr_cur_addr_not_N1 <= '0'; end if; end process; -- Checked ! process (cur_addr, dst_addr, E1_out) begin if ( cur_addr((NoC_size/2)-1 downto 0) < dst_addr((NoC_size/2)-1 downto 0) and E1_out = '0') then err_dst_addr_cur_addr_E1 <= '1'; else err_dst_addr_cur_addr_E1 <= '0'; end if; end process; -- Checked ! process (cur_addr, dst_addr, E1_out) begin if ( cur_addr((NoC_size/2)-1 downto 0) >= dst_addr((NoC_size/2)-1 downto 0) and E1_out = '1') then err_dst_addr_cur_addr_not_E1 <= '1'; else err_dst_addr_cur_addr_not_E1 <= '0'; end if; end process; -- Checked ! process (cur_addr, dst_addr, W1_out) begin if ( dst_addr((NoC_size/2)-1 downto 0) < cur_addr((NoC_size/2)-1 downto 0) and W1_out = '0') then err_dst_addr_cur_addr_W1 <= '1'; else err_dst_addr_cur_addr_W1 <= '0'; end if; end process; -- Checked ! process (cur_addr, dst_addr, W1_out) begin if ( dst_addr((NoC_size/2)-1 downto 0) >= cur_addr((NoC_size/2)-1 downto 0) and W1_out = '1') then err_dst_addr_cur_addr_not_W1 <= '1'; else err_dst_addr_cur_addr_not_W1 <= '0'; end if; end process; -- Checked ! process (cur_addr, dst_addr, S1_out) begin if ( cur_addr(NoC_size-1 downto NoC_size/2) < dst_addr(NoC_size-1 downto NoC_size/2) and S1_out = '0') then err_dst_addr_cur_addr_S1 <= '1'; else err_dst_addr_cur_addr_S1 <= '0'; end if; end process; -- Checked ! process (cur_addr, dst_addr, S1_out) begin if ( cur_addr(NoC_size-1 downto NoC_size/2) >= dst_addr(NoC_size-1 downto NoC_size/2) and S1_out = '1') then err_dst_addr_cur_addr_not_S1 <= '1'; else err_dst_addr_cur_addr_not_S1 <= '0'; end if; end process; -- Checked ! process (flit_type, empty, dst_addr, cur_addr, Req_L_in) begin if ( flit_type = "001" and empty = '0' and dst_addr = cur_addr and Req_L_in = '0') then err_dst_addr_cur_addr_not_Req_L_in <= '1'; else err_dst_addr_cur_addr_not_Req_L_in <= '0'; end if; end process; -- Updated ! process (flit_type, empty, cur_addr, dst_addr, Req_L_in, Req_L_FF) begin if ( flit_type = "001" and empty = '0' and cur_addr /= dst_addr and Req_L_in /= Req_L_FF) then err_dst_addr_cur_addr_Req_L_in <= '1'; else err_dst_addr_cur_addr_Req_L_in <= '0'; end if; end process; -- Updated ! process (flit_type, empty, Req_N_in, N1_out, E1_out, W1_out, Rxy, Cx) begin if ( flit_type = "001" and empty = '0' and Req_N_in /= ( ((N1_out and not E1_out and not W1_out) or (N1_out and E1_out and Rxy(0)) or (N1_out and W1_out and Rxy(1))) and Cx(0) ) ) then err_header_not_empty_Req_N_in <= '1'; else err_header_not_empty_Req_N_in <= '0'; end if; end process; -- Updated ! process (flit_type, empty, Req_E_in, N1_out, E1_out, S1_out, Rxy, Cx) begin if ( flit_type = "001" and empty = '0' and Req_E_in /= ( ((E1_out and not N1_out and not S1_out) or (E1_out and N1_out and Rxy(2)) or (E1_out and S1_out and Rxy(3))) and Cx(1) ) ) then err_header_not_empty_Req_E_in <= '1'; else err_header_not_empty_Req_E_in <= '0'; end if; end process; -- Updated ! process (flit_type, empty, Req_W_in, N1_out, W1_out, S1_out, Rxy, Cx) begin if ( flit_type = "001" and empty = '0' and Req_W_in /= ( ((W1_out and not N1_out and not S1_out) or (W1_out and N1_out and Rxy(4)) or (W1_out and S1_out and Rxy(5))) and Cx(2) ) ) then err_header_not_empty_Req_W_in <= '1'; else err_header_not_empty_Req_W_in <= '0'; end if; end process; -- Updated ! process (flit_type, empty, Req_S_in, E1_out, W1_out, S1_out, Rxy, Cx) begin if ( flit_type = "001" and empty = '0' and Req_S_in /= (((S1_out and not E1_out and not W1_out) or (S1_out and E1_out and Rxy(6)) or (S1_out and W1_out and Rxy(7))) and Cx(3)) ) then err_header_not_empty_Req_S_in <= '1'; else err_header_not_empty_Req_S_in <= '0'; end if; end process; -- Updated ! process (flit_type, empty, N1_out, E1_out, W1_out, S1_out, Rxy, Cx, dst_addr, cur_addr, packet_drop_in) begin if (flit_type = "001" and empty = '0' and ( ((((N1_out and not E1_out and not W1_out) or (N1_out and E1_out and Rxy(0)) or (N1_out and W1_out and Rxy(1))) and Cx(0)) or (((E1_out and not N1_out and not S1_out) or (E1_out and N1_out and Rxy(2)) or (E1_out and S1_out and Rxy(3))) and Cx(1)) or (((W1_out and not N1_out and not S1_out) or (W1_out and N1_out and Rxy(4)) or (W1_out and S1_out and Rxy(5))) and Cx(2)) or (((S1_out and not E1_out and not W1_out) or (S1_out and E1_out and Rxy(6)) or (S1_out and W1_out and Rxy(7))) and Cx(3))) ='0' ) and dst_addr /= cur_addr and packet_drop_in <= '0' ) then err_header_not_empty_packet_drop_in <= '1'; else err_header_not_empty_packet_drop_in <= '0'; end if; end process; -- Added ! process (flit_type, empty, N1_out, E1_out, W1_out, S1_out, Rxy, Cx, dst_addr, cur_addr, packet_drop_in, packet_drop) begin if (flit_type = "001" and empty = '0' and ( ( ((((N1_out and not E1_out and not W1_out) or (N1_out and E1_out and Rxy(0)) or (N1_out and W1_out and Rxy(1))) and Cx(0)) or (((E1_out and not N1_out and not S1_out) or (E1_out and N1_out and Rxy(2)) or (E1_out and S1_out and Rxy(3))) and Cx(1)) or (((W1_out and not N1_out and not S1_out) or (W1_out and N1_out and Rxy(4)) or (W1_out and S1_out and Rxy(5))) and Cx(2)) or (((S1_out and not E1_out and not W1_out) or (S1_out and E1_out and Rxy(6)) or (S1_out and W1_out and Rxy(7))) and Cx(3))) ='1' ) or (dst_addr = cur_addr) ) and packet_drop_in /= packet_drop ) then err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal <= '1'; else err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal <= '0'; end if; end process; -- Added ! process (flit_type, empty, packet_drop_in, packet_drop) begin if (flit_type = "001" and empty = '1' and packet_drop_in /= packet_drop ) then err_header_empty_packet_drop_in_packet_drop_equal <= '1'; else err_header_empty_packet_drop_in_packet_drop_equal <= '0'; end if; end process; -- Added ! process (flit_type, empty, packet_drop, packet_drop_in) begin if (flit_type = "100" and empty = '0' and packet_drop = '1' and packet_drop_in /= '0' ) then err_tail_not_empty_packet_drop_not_packet_drop_in <= '1'; else err_tail_not_empty_packet_drop_not_packet_drop_in <= '0'; end if; end process; -- Added ! process (flit_type, empty, packet_drop, packet_drop_in) begin if (flit_type = "100" and empty = '0' and packet_drop = '0' and packet_drop_in /= packet_drop ) then err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal <= '1'; else err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal <= '0'; end if; end process; -- Added ! process (flit_type, empty, packet_drop_in, packet_drop) begin if ( ((flit_type /= "001" and flit_type /= "100") or empty = '1') and packet_drop_in /= packet_drop ) then err_invalid_or_body_flit_packet_drop_in_packet_drop_equal <= '1'; else err_invalid_or_body_flit_packet_drop_in_packet_drop_equal <= '0'; end if; end process; -- Added ! process (packet_drop_order, packet_drop) begin if (packet_drop_order /= packet_drop) then err_packet_drop_order <= '1'; else err_packet_drop_order <= '0'; end if; end process; -- Added ! end behavior;
gpl-3.0
de12130815de1188df4912dcf0eae545
0.598749
2.748173
false
false
false
false
alyoshin/geda-gaf
gnetlist/tests/7447.vhdl
8
9,069
-- Structural VHDL generated by gnetlist -- Context clause library IEEE; use IEEE.Std_Logic_1164.all; -- Entity declaration ENTITY not found IS PORT ( P7 : in Std_Logic; P6 : in Std_Logic; P5 : in Std_Logic; P4 : in Std_Logic; P2 : in Std_Logic; P1 : in Std_Logic; P9 : out Std_Logic; P8 : out Std_Logic; P3 : out Std_Logic; P14 : out Std_Logic; P13 : out Std_Logic; P12 : out Std_Logic; P11 : out Std_Logic; P10 : out Std_Logic); END not found; -- Secondary unit ARCHITECTURE netlist OF not found IS COMPONENT neg PORT ( IN0 : in Std_Logic; OUT0 : out Std_Logic); END COMPONENT ; COMPONENT and2 PORT ( IN1 : in Std_Logic; IN0 : in Std_Logic; OUT0 : out Std_Logic); END COMPONENT ; COMPONENT nand6 PORT ( IN5 : in Std_Logic; IN4 : in Std_Logic; IN3 : in Std_Logic; IN2 : in Std_Logic; IN1 : in Std_Logic; IN0 : in Std_Logic; OUT0 : out Std_Logic); END COMPONENT ; COMPONENT and4 PORT ( IN3 : in Std_Logic; IN2 : in Std_Logic; IN1 : in Std_Logic; IN0 : in Std_Logic; OUT0 : out Std_Logic); END COMPONENT ; COMPONENT and3 PORT ( IN2 : in Std_Logic; IN1 : in Std_Logic; IN0 : in Std_Logic; OUT0 : out Std_Logic); END COMPONENT ; COMPONENT nor3 PORT ( IN2 : in Std_Logic; IN1 : in Std_Logic; IN0 : in Std_Logic; OUT0 : out Std_Logic); END COMPONENT ; COMPONENT nor2 PORT ( IN1 : in Std_Logic; IN0 : in Std_Logic; OUT0 : out Std_Logic); END COMPONENT ; COMPONENT nand2 PORT ( IN1 : in Std_Logic; IN0 : in Std_Logic; OUT0 : out Std_Logic); END COMPONENT ; SIGNAL unnamed_net32 : Std_Logic; SIGNAL unnamed_net31 : Std_Logic; SIGNAL RIPPLE_BLANK_INn : Std_Logic; SIGNAL INPUTD : Std_Logic; SIGNAL OUTPUTGn : Std_Logic; SIGNAL OUTPUTFn : Std_Logic; SIGNAL OUTPUTEn : Std_Logic; SIGNAL OUTPUTDn : Std_Logic; SIGNAL OUTPUTCn : Std_Logic; SIGNAL unnamed_net30 : Std_Logic; SIGNAL OUTPUTBn : Std_Logic; SIGNAL OUTPUTAn : Std_Logic; SIGNAL unnamed_net29 : Std_Logic; SIGNAL unnamed_net28 : Std_Logic; SIGNAL unnamed_net27 : Std_Logic; SIGNAL unnamed_net26 : Std_Logic; SIGNAL unnamed_net25 : Std_Logic; SIGNAL unnamed_net24 : Std_Logic; SIGNAL unnamed_net23 : Std_Logic; SIGNAL unnamed_net22 : Std_Logic; SIGNAL unnamed_net21 : Std_Logic; SIGNAL unnamed_net20 : Std_Logic; SIGNAL unnamed_net19 : Std_Logic; SIGNAL unnamed_net18 : Std_Logic; SIGNAL unnamed_net17 : Std_Logic; SIGNAL unnamed_net16 : Std_Logic; SIGNAL unnamed_net15 : Std_Logic; SIGNAL unnamed_net14 : Std_Logic; SIGNAL unnamed_net13 : Std_Logic; SIGNAL unnamed_net12 : Std_Logic; SIGNAL unnamed_net11 : Std_Logic; SIGNAL unnamed_net10 : Std_Logic; SIGNAL unnamed_net9 : Std_Logic; SIGNAL unnamed_net8 : Std_Logic; SIGNAL unnamed_net7 : Std_Logic; SIGNAL unnamed_net6 : Std_Logic; SIGNAL unnamed_net5 : Std_Logic; SIGNAL RIPPLE_BLANK_OUTn : Std_Logic; SIGNAL unnamed_net4 : Std_Logic; SIGNAL INPUTC : Std_Logic; SIGNAL unnamed_net3 : Std_Logic; SIGNAL INPUTB : Std_Logic; SIGNAL unnamed_net2 : Std_Logic; SIGNAL INPUTA : Std_Logic; SIGNAL LAMP_TESTn : Std_Logic; SIGNAL unnamed_net1 : Std_Logic; BEGIN -- Architecture statement part U23 : neg PORT MAP ( OUT0 => OUTPUTCn, IN0 => unnamed_net18); U39 : neg PORT MAP ( OUT0 => OUTPUTFn, IN0 => unnamed_net25); U38 : nor3 PORT MAP ( OUT0 => unnamed_net30, IN0 => unnamed_net32, IN1 => unnamed_net31, IN2 => unnamed_net11); U22 : neg PORT MAP ( OUT0 => OUTPUTBn, IN0 => unnamed_net30); U37 : and4 PORT MAP ( OUT0 => unnamed_net28, IN0 => LAMP_TESTn, IN1 => unnamed_net8, IN2 => unnamed_net3, IN3 => unnamed_net2); U21 : neg PORT MAP ( OUT0 => OUTPUTAn, IN0 => unnamed_net16); U36 : and3 PORT MAP ( OUT0 => unnamed_net29, IN0 => unnamed_net6, IN1 => unnamed_net5, IN2 => unnamed_net4); U20 : nor2 PORT MAP ( OUT0 => unnamed_net27, IN0 => unnamed_net28, IN1 => unnamed_net29); U35 : and3 PORT MAP ( OUT0 => unnamed_net26, IN0 => unnamed_net8, IN1 => unnamed_net3, IN2 => unnamed_net4); U34 : and3 PORT MAP ( OUT0 => unnamed_net21, IN0 => unnamed_net6, IN1 => unnamed_net5, IN2 => unnamed_net4); U33 : and3 PORT MAP ( OUT0 => unnamed_net22, IN0 => unnamed_net6, IN1 => unnamed_net2, IN2 => unnamed_net1); U32 : and3 PORT MAP ( OUT0 => unnamed_net23, IN0 => unnamed_net3, IN1 => unnamed_net2, IN2 => unnamed_net4); U31 : and3 PORT MAP ( OUT0 => unnamed_net19, IN0 => unnamed_net3, IN1 => unnamed_net5, IN2 => unnamed_net1); U9 : and2 PORT MAP ( OUT0 => unnamed_net10, IN0 => unnamed_net6, IN1 => unnamed_net1); U30 : and3 PORT MAP ( OUT0 => unnamed_net32, IN0 => unnamed_net6, IN1 => unnamed_net5, IN2 => unnamed_net1); U8 : and2 PORT MAP ( OUT0 => unnamed_net9, IN0 => unnamed_net7, IN1 => unnamed_net5); U7 : nand2 PORT MAP ( OUT0 => unnamed_net7, IN0 => RIPPLE_BLANK_OUTn, IN1 => unnamed_net8); U6 : nand2 PORT MAP ( OUT0 => unnamed_net6, IN0 => RIPPLE_BLANK_OUTn, IN1 => unnamed_net3); U5 : nand2 PORT MAP ( OUT0 => unnamed_net5, IN0 => RIPPLE_BLANK_OUTn, IN1 => unnamed_net2); U4 : nand2 PORT MAP ( OUT0 => unnamed_net4, IN0 => RIPPLE_BLANK_OUTn, IN1 => unnamed_net1); U3 : nand2 PORT MAP ( OUT0 => unnamed_net3, IN0 => LAMP_TESTn, IN1 => INPUTC); U2 : nand2 PORT MAP ( OUT0 => unnamed_net2, IN0 => LAMP_TESTn, IN1 => INPUTB); U40 : neg PORT MAP ( OUT0 => OUTPUTGn, IN0 => unnamed_net27); U1 : nand2 PORT MAP ( OUT0 => unnamed_net1, IN0 => LAMP_TESTn, IN1 => INPUTA); U19 : nor3 PORT MAP ( OUT0 => unnamed_net25, IN0 => unnamed_net26, IN1 => unnamed_net15, IN2 => unnamed_net14); U18 : nor2 PORT MAP ( OUT0 => unnamed_net24, IN0 => unnamed_net13, IN1 => unnamed_net4); U17 : nor3 PORT MAP ( OUT0 => unnamed_net20, IN0 => unnamed_net21, IN1 => unnamed_net22, IN2 => unnamed_net23); U16 : nor2 PORT MAP ( OUT0 => unnamed_net18, IN0 => unnamed_net19, IN1 => unnamed_net12); U15 : nor3 PORT MAP ( OUT0 => unnamed_net16, IN0 => unnamed_net17, IN1 => unnamed_net10, IN2 => unnamed_net9); U14 : and2 PORT MAP ( OUT0 => unnamed_net15, IN0 => unnamed_net3, IN1 => unnamed_net5); U29 : and3 PORT MAP ( OUT0 => unnamed_net31, IN0 => unnamed_net6, IN1 => unnamed_net2, IN2 => unnamed_net4); U13 : and2 PORT MAP ( OUT0 => unnamed_net14, IN0 => unnamed_net5, IN1 => unnamed_net4); U12 : and2 PORT MAP ( OUT0 => unnamed_net13, IN0 => unnamed_net6, IN1 => unnamed_net2); U28 : and4 PORT MAP ( OUT0 => unnamed_net17, IN0 => unnamed_net8, IN1 => unnamed_net3, IN2 => unnamed_net2, IN3 => unnamed_net4); U11 : and2 PORT MAP ( OUT0 => unnamed_net12, IN0 => unnamed_net7, IN1 => unnamed_net6); U27 : nand6 PORT MAP ( OUT0 => RIPPLE_BLANK_OUTn, IN0 => LAMP_TESTn, IN1 => RIPPLE_BLANK_INn, IN2 => unnamed_net8, IN3 => unnamed_net3, IN4 => unnamed_net2, IN5 => unnamed_net1); U10 : and2 PORT MAP ( OUT0 => unnamed_net11, IN0 => unnamed_net7, IN1 => unnamed_net5); U26 : neg PORT MAP ( OUT0 => unnamed_net8, IN0 => INPUTD); U25 : neg PORT MAP ( OUT0 => OUTPUTEn, IN0 => unnamed_net24); U24 : neg PORT MAP ( OUT0 => OUTPUTDn, IN0 => unnamed_net20); -- Signal assignment part INPUTA <= P7; INPUTB <= P6; INPUTC <= P5; INPUTD <= P4; RIPPLE_BLANK_INn <= P2; LAMP_TESTn <= P1; P9 <= OUTPUTFn; P8 <= OUTPUTGn; P3 <= RIPPLE_BLANK_OUTn; P14 <= OUTPUTAn; P13 <= OUTPUTBn; P12 <= OUTPUTCn; P11 <= OUTPUTDn; P10 <= OUTPUTEn; END netlist;
gpl-2.0
cfc9144c7140da276e3b5fcede4d360f
0.530268
3.323195
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/IMMORTAL_Chip_2017/network_files/FIFO_one_hot_credit_based_packet_drop_classifier_support_with_checkers_with_FI/FIFO_one_hot_credit_based_packet_drop_classifier_support_checkers.vhd
3
51,741
--Copyright (C) 2016 Siavoosh Payandeh Azad and Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity FIFO_credit_based_control_part_checkers is port ( valid_in: in std_logic; read_en_N : in std_logic; read_en_E : in std_logic; read_en_W : in std_logic; read_en_S : in std_logic; read_en_L : in std_logic; read_pointer: in std_logic_vector(3 downto 0); read_pointer_in: in std_logic_vector(3 downto 0); write_pointer: in std_logic_vector(3 downto 0); write_pointer_in: in std_logic_vector(3 downto 0); credit_out: in std_logic; -- Behrad: In FIFO, this is actually an internal signal "named as credit_in", which I guess should keep the previous value of credit_out. empty_out: in std_logic; full_out: in std_logic; read_en_out: in std_logic; write_en_out: in std_logic; fake_credit: in std_logic; fake_credit_counter: in std_logic_vector(1 downto 0); fake_credit_counter_in: in std_logic_vector(1 downto 0); state_out: in std_logic_vector(4 downto 0); state_in: in std_logic_vector(4 downto 0); fault_info: in std_logic; fault_info_out: in std_logic; fault_info_in: in std_logic; health_info: in std_logic; faulty_packet_out: in std_logic; faulty_packet_in: in std_logic; flit_type: in std_logic_vector(2 downto 0); fault_out: in std_logic; write_fake_flit: in std_logic; -- Functional checkers err_empty_full, err_empty_read_en, err_full_write_en, err_state_in_onehot, err_read_pointer_in_onehot, err_write_pointer_in_onehot, -- Structural checkers err_write_en_write_pointer, err_not_write_en_write_pointer, err_read_pointer_write_pointer_not_empty, err_read_pointer_write_pointer_empty, err_read_pointer_write_pointer_not_full, err_read_pointer_write_pointer_full, err_read_pointer_increment, err_read_pointer_not_increment, err_write_en, err_not_write_en, err_not_write_en1, err_not_write_en2, err_read_en_mismatch, err_read_en_mismatch1, -- Newly added checkers for FIFO with packet drop and fault classifier support! err_fake_credit_read_en_fake_credit_counter_in_increment, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement, err_not_fake_credit_read_en_fake_credit_counter_in_not_change, err_fake_credit_not_read_en_fake_credit_counter_in_not_change, err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change, err_fake_credit_read_en_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out, err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out, -- Checkers for Packet Dropping FSM of FIFO err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit, err_state_out_Idle_not_fault_out_valid_in_state_in_not_change, err_state_out_Idle_not_fault_out_not_fake_credit, err_state_out_Idle_not_fault_out_not_fault_info_in, err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal, err_state_out_Idle_fault_out_fake_credit, err_state_out_Idle_fault_out_state_in_Packet_drop, err_state_out_Idle_fault_out_fault_info_in, err_state_out_Idle_fault_out_faulty_packet_in, err_state_out_Idle_not_health_info, err_state_out_Idle_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit, err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_valid_in_fault_out_write_fake_flit, err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Header_flit_valid_in_fault_out_fault_info_in, err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Header_flit_not_valid_in_not_fault_info_in, err_state_out_Header_flit_not_valid_in_not_write_fake_flit, err_state_out_Header_flit_or_Body_flit_not_fake_credit, err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change, err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit, err_state_out_Body_flit_valid_in_not_fault_out_health_info, err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit, err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_valid_in_fault_out_write_fake_flit, err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Body_flit_valid_in_fault_out_fault_info_in, err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change, err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Body_flit_not_valid_in_not_fault_info_in, err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info, err_state_out_Body_flit_valid_in_fault_out_not_health_info, err_state_out_Body_flit_valid_in_not_health_info, err_state_out_Body_flit_not_fake_credit, err_state_out_Body_flit_not_valid_in_not_write_fake_flit, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit, err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in, err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Tail_flit_valid_in_fault_out_fake_credit, err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop, err_state_out_Tail_flit_valid_in_fault_out_fault_info_in, err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in, err_state_out_Tail_flit_not_valid_in_state_in_Idle, err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change, err_state_out_Tail_flit_not_valid_in_not_fault_info_in, err_state_out_Tail_flit_not_valid_in_not_fake_credit, err_state_out_Tail_flit_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit, err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change, err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit, err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change, err_fault_info_fault_info_out_equal, err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal, err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal, err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in, err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in : out std_logic ); end FIFO_credit_based_control_part_checkers; architecture behavior of FIFO_credit_based_control_part_checkers is CONSTANT Idle: std_logic_vector (4 downto 0) := "00001"; CONSTANT Header_flit: std_logic_vector (4 downto 0) := "00010"; CONSTANT Body_flit: std_logic_vector (4 downto 0) := "00100"; CONSTANT Tail_flit: std_logic_vector (4 downto 0) := "01000"; CONSTANT Packet_drop: std_logic_vector (4 downto 0) := "10000"; begin -- Functional Checkers (Might cover or be covered by some of the structural checkers) -- Empty and full cannot be high at the same time! process (empty_out, full_out) begin err_empty_full <= '0'; if (empty_out = '1' and full_out = '1') then err_empty_full <= '1'; end if; end process; -- Checked! -- Reading from an empty FIFO is not possible! process (empty_out, read_en_out) begin err_empty_read_en <= '0'; if (empty_out = '1' and read_en_out = '1') then err_empty_read_en <= '1'; end if; end process; -- Writing to a full FIFO is not possible! process (full_out, write_en_out) begin err_full_write_en <= '0'; if (full_out = '1' and write_en_out = '1') then err_full_write_en <= '1'; end if; end process; -- The states of the packet dropping FSM of FIFO must always be one-hot (state_in)! process (state_in) begin err_state_in_onehot <= '0'; if (state_in /= Idle and state_in /= Header_flit and state_in /= Body_flit and state_in /= Tail_flit and state_in /= Packet_drop) then err_state_in_onehot <= '1'; end if; end process; -- Read pointer must always be one-hot! process (read_pointer_in) begin err_read_pointer_in_onehot <= '0'; if (read_pointer_in /= "0001" and read_pointer_in /= "0010" and read_pointer_in /= "0100" and read_pointer_in /= "1000") then err_read_pointer_in_onehot <= '1'; end if; end process; -- Write pointer must always be one-hot! process (write_pointer_in) begin err_write_pointer_in_onehot <= '0'; if (write_pointer_in /= "0001" and write_pointer_in /= "0010" and write_pointer_in /= "0100" and write_pointer_in /= "1000") then err_write_pointer_in_onehot <= '1'; end if; end process; --------------------------------------------------------------------------------------------------------- -- Structural Checkers -- Write pointer and Read pointer checkers process (write_en_out, write_pointer_in, write_pointer) begin err_write_en_write_pointer <= '0'; if (write_en_out = '1' and write_pointer_in /= (write_pointer(2 downto 0) & write_pointer(3)) ) then err_write_en_write_pointer <= '1'; end if; end process; process (write_en_out, write_pointer_in, write_pointer) begin err_not_write_en_write_pointer <= '0'; if (write_en_out = '0' and write_pointer_in /= write_pointer ) then err_not_write_en_write_pointer <= '1'; end if; end process; process (read_pointer, write_pointer, empty_out) begin err_read_pointer_write_pointer_not_empty <= '0'; if (read_pointer = write_pointer and empty_out = '0' ) then err_read_pointer_write_pointer_not_empty <= '1'; end if; end process; process (read_pointer, write_pointer, empty_out) begin err_read_pointer_write_pointer_empty <= '0'; if (read_pointer /= write_pointer and empty_out = '1' ) then err_read_pointer_write_pointer_empty <= '1'; end if; end process; process (write_pointer, read_pointer, full_out) begin err_read_pointer_write_pointer_not_full <= '0'; if (write_pointer = (read_pointer(0)&read_pointer(3 downto 1)) and full_out = '0' ) then err_read_pointer_write_pointer_not_full <= '1'; end if; end process; process (write_pointer, read_pointer, full_out) begin err_read_pointer_write_pointer_full <= '0'; if (write_pointer /= (read_pointer(0)&read_pointer(3 downto 1)) and full_out = '1' ) then err_read_pointer_write_pointer_full <= '1'; end if; end process; process (read_en_out, empty_out, read_pointer_in, read_pointer) begin err_read_pointer_increment <= '0'; if (read_en_out = '1' and empty_out = '0' and read_pointer_in /= (read_pointer(2 downto 0)&read_pointer(3)) ) then err_read_pointer_increment <= '1'; end if; end process; process (read_en_out, empty_out, read_pointer_in, read_pointer) begin err_read_pointer_not_increment <= '0'; if ( (read_en_out = '0' or empty_out = '1') and read_pointer_in /= read_pointer ) then err_read_pointer_not_increment <= '1'; end if; end process; process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin err_write_en <= '0'; if (valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full_out ='0' and write_en_out = '0') then err_write_en <= '1'; end if; end process; process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin err_not_write_en <= '0'; if ( (valid_in = '0' or (((faulty_packet_out = '1' or fault_out = '1') and write_fake_flit = '0')) or full_out = '1') and write_en_out = '1') then err_not_write_en <= '1'; end if; end process; process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin err_not_write_en1 <= '0'; if ( valid_in = '1' and ((faulty_packet_out = '1' or fault_out = '1') and write_fake_flit = '0') and write_en_out = '1') then err_not_write_en1 <= '1'; end if; end process; process (valid_in, faulty_packet_out, fault_out, write_fake_flit, full_out, write_en_out) begin err_not_write_en2 <= '0'; if ( valid_in = '1' and ((faulty_packet_out = '0' and fault_out = '0') or write_fake_flit = '1') and full_out = '1' and write_en_out = '1') then err_not_write_en2 <= '1'; end if; end process; -- Checked! (Not sure yet if actually needed!) process (read_en_N, read_en_E, read_en_W, read_en_S, read_en_L, empty_out, read_en_out) begin err_read_en_mismatch <= '0'; if ( (read_en_N = '1' or read_en_E = '1' or read_en_W = '1' or read_en_S = '1' or read_en_L = '1') and empty_out = '0' and read_en_out = '0' ) then err_read_en_mismatch <= '1'; end if; end process; process (read_en_N, read_en_E, read_en_W, read_en_S, read_en_L, empty_out, read_en_out) begin err_read_en_mismatch1 <= '0'; if ( ((read_en_N = '0' and read_en_E = '0' and read_en_W = '0' and read_en_S = '0' and read_en_L = '0') or empty_out = '1') and read_en_out = '1' ) then err_read_en_mismatch1 <= '1'; end if; end process; --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -- Newly added checkers for FIFO with packet drop and fault classifier support -- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -- Checkers for fake credit generation logic in FIFO --------------------------------------------------------------------------------- process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin err_fake_credit_read_en_fake_credit_counter_in_increment <= '0'; if (fake_credit = '1' and read_en_out = '1' and fake_credit_counter_in /= fake_credit_counter + 1) then err_fake_credit_read_en_fake_credit_counter_in_increment <= '1'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, fake_credit_counter_in) begin err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement <= '0'; if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter > 0 and fake_credit_counter_in /= fake_credit_counter - 1 ) then err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_fake_credit_counter_in_decrement <= '1'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin err_not_fake_credit_read_en_fake_credit_counter_in_not_change <= '0'; if (fake_credit = '0' and read_en_out = '1' and fake_credit_counter_in /= fake_credit_counter) then err_not_fake_credit_read_en_fake_credit_counter_in_not_change <= '1'; end if; end process; -- Checked! process (fake_credit, read_en_out, fake_credit_counter_in, fake_credit_counter) begin err_fake_credit_not_read_en_fake_credit_counter_in_not_change <= '0'; if (fake_credit = '1' and read_en_out = '0' and fake_credit_counter_in /= fake_credit_counter) then err_fake_credit_not_read_en_fake_credit_counter_in_not_change <= '1'; end if; end process; -- Checked! process (fake_credit, read_en_out, fake_credit_counter, fake_credit_counter_in) begin err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change <= '0'; if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter <= 0 and fake_credit_counter_in /= fake_credit_counter) then err_not_fake_credit_not_read_en_fake_credit_counter_zero_fake_credit_counter_in_not_change <= '1'; end if; end process; -- Checked! (Behrad: Is it OK to see fake credit counter like this ?? Because being negative, can also be understood as positive, -- depending on how the data is evaluated (signed or unsigned), or may I am wrong.) process (fake_credit, read_en_out, credit_out) begin err_fake_credit_read_en_credit_out <= '0'; if ((fake_credit = '1' or read_en_out ='1') and credit_out = '0') then err_fake_credit_read_en_credit_out <= '1'; end if; end process; -- Checked! (Behrad: Credit_out here in Checker is actually credit_in in FIFO. Well, FIFO generated credit_out. -- But here, credit_in would mean the registered value of credit_out I guess. ) process (fake_credit, read_en_out, fake_credit_counter, credit_out) begin err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out <= '0'; if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter > 0 and credit_out = '0') then err_not_fake_credit_not_read_en_fake_credit_counter_not_zero_credit_out <= '1'; end if; end process; process (fake_credit, read_en_out, fake_credit_counter, credit_out) begin err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out <= '0'; if (fake_credit = '0' and read_en_out = '0' and fake_credit_counter <= 0 and credit_out = '1') then err_not_fake_credit_not_read_en_fake_credit_counter_zero_not_credit_out <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Checkers related to the packet dropping FSM of FIFO -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Idle state -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- process (state_out, fault_out, valid_in, state_in) begin err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit <= '0'; if (state_out = Idle and fault_out = '0' and valid_in = '1' and state_in /= Header_flit) then err_state_out_Idle_not_fault_out_valid_in_state_in_Header_flit <= '1'; end if; end process; process (state_out, fault_out, valid_in, state_in) begin err_state_out_Idle_not_fault_out_valid_in_state_in_not_change <= '0'; if (state_out = Idle and fault_out = '0' and valid_in = '0' and state_in /= state_out) then err_state_out_Idle_not_fault_out_valid_in_state_in_not_change <= '1'; end if; end process; process (state_out, fault_out, fake_credit) begin err_state_out_Idle_not_fault_out_not_fake_credit <= '0'; if (state_out = Idle and fault_out = '0' and fake_credit = '1') then err_state_out_Idle_not_fault_out_not_fake_credit <= '1'; end if; end process; process (state_out, fault_out, fault_info_in) begin err_state_out_Idle_not_fault_out_not_fault_info_in <= '0'; if (state_out = Idle and fault_out = '0' and fault_info_in = '1') then err_state_out_Idle_not_fault_out_not_fault_info_in <= '1'; end if; end process; process (state_out, fault_out, faulty_packet_in, faulty_packet_out) begin err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal <= '0'; if (state_out = Idle and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Idle_not_fault_out_faulty_packet_in_faulty_packet_out_equal <= '1'; end if; end process; -- fault_out = '1' -------------------------------------------------------------------------------------------------- process (state_out, fault_out, fake_credit) begin err_state_out_Idle_fault_out_fake_credit <= '0'; if (state_out = Idle and fault_out = '1' and fake_credit = '0') then err_state_out_Idle_fault_out_fake_credit <= '1'; end if; end process; process (state_out, fault_out, state_in) begin err_state_out_Idle_fault_out_state_in_Packet_drop <= '0'; if (state_out = Idle and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Idle_fault_out_state_in_Packet_drop <= '1'; end if; end process; process (state_out, fault_out, fault_info_in) begin err_state_out_Idle_fault_out_fault_info_in <= '0'; if (state_out = Idle and fault_out = '1' and fault_info_in = '0') then err_state_out_Idle_fault_out_fault_info_in <= '1'; end if; end process; process (state_out, fault_out, faulty_packet_in) begin err_state_out_Idle_fault_out_faulty_packet_in <= '0'; if (state_out = Idle and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Idle_fault_out_faulty_packet_in <= '1'; end if; end process; process (state_out, write_fake_flit) begin err_state_out_Idle_not_write_fake_flit <= '0'; if (state_out = Idle and write_fake_flit = '1') then err_state_out_Idle_not_write_fake_flit <= '1'; end if; end process; -- Other properties for Idle state -------------------------------------------------------------------------------------------------- -- health_info only gets updated when the FSM is in "Body" state (flit type is Body) process (state_out, health_info) begin err_state_out_Idle_not_health_info <= '0'; if ( (state_out = Idle or state_out = Header_flit or state_out = Tail_flit or state_out = Packet_drop) and health_info = '1') then err_state_out_Idle_not_health_info <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and flit_type = "010" and state_in /= Body_flit) then err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Body_state_in_Body_flit <= '1'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in) begin err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and state_in /= Tail_flit) then err_state_out_Header_flit_valid_in_not_fault_out_flit_type_Tail_state_in_Tail_flit <= '1'; end if; end process; process (state_out, valid_in, fault_out, write_fake_flit) begin err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and write_fake_flit = '1') then err_state_out_Header_flit_valid_in_not_fault_out_not_write_fake_flit <= '1'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Header_flit_valid_in_not_fault_out_not_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Header_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin err_state_out_Header_flit_valid_in_fault_out_write_fake_flit <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and write_fake_flit = '0') then err_state_out_Header_flit_valid_in_fault_out_write_fake_flit <= '1'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Header_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin err_state_out_Header_flit_valid_in_fault_out_fault_info_in <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Header_flit_valid_in_fault_out_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in <= '0'; if (state_out = Header_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Header_flit_valid_in_fault_out_faulty_packet_in <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, state_in) begin err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change <= '0'; if (state_out = Header_flit and valid_in = '0' and state_in /= state_out) then err_state_out_Header_flit_not_valid_in_state_in_state_out_not_change <= '1'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '0'; if (state_out = Header_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Header_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '1'; end if; end process; process (state_out, valid_in, fault_info_in) begin err_state_out_Header_flit_not_valid_in_not_fault_info_in <= '0'; if (state_out = Header_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Header_flit_not_valid_in_not_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, write_fake_flit) begin err_state_out_Header_flit_not_valid_in_not_write_fake_flit <= '0'; if (state_out = Header_flit and valid_in = '0' and write_fake_flit = '1') then err_state_out_Header_flit_not_valid_in_not_write_fake_flit <= '1'; end if; end process; process (state_out, fake_credit) begin err_state_out_Header_flit_or_Body_flit_not_fake_credit <= '0'; if ( (state_out = Header_flit or state_out = Body_flit) and fake_credit /= '0') then err_state_out_Header_flit_or_Body_flit_not_fake_credit <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- -- Body_flit state -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "010" and state_in /= state_out) then err_state_out_Body_flit_valid_in_not_fault_out_state_in_state_out_not_change <= '1'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in) begin err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and state_in /= Tail_flit) then err_state_out_Body_flit_valid_in_not_fault_out_state_in_Tail_flit <= '1'; end if; end process; process (state_out, valid_in, fault_out, flit_type, health_info) begin err_state_out_Body_flit_valid_in_not_fault_out_health_info <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type = "100" and health_info = '0') then err_state_out_Body_flit_valid_in_not_fault_out_health_info <= '1'; end if; end process; process (state_out, valid_in, fault_out, flit_type, health_info) begin err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and flit_type /= "100" and health_info = '1') then err_state_out_Body_flit_valid_in_not_fault_out_flit_type_not_tail_not_health_info <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, health_info) begin err_state_out_Body_flit_valid_in_fault_out_not_health_info <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and health_info = '1') then err_state_out_Body_flit_valid_in_fault_out_not_health_info <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, health_info) begin err_state_out_Body_flit_valid_in_not_health_info <= '0'; if (state_out = Body_flit and valid_in = '0' and health_info = '1') then err_state_out_Body_flit_valid_in_not_health_info <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and write_fake_flit = '1') then err_state_out_Body_flit_valid_in_not_fault_out_not_write_fake_flit <= '1'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Body_flit_valid_in_not_fault_out_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Body_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, write_fake_flit) begin err_state_out_Body_flit_valid_in_fault_out_write_fake_flit <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and write_fake_flit = '0') then err_state_out_Body_flit_valid_in_fault_out_write_fake_flit <= '1'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Body_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin err_state_out_Body_flit_valid_in_fault_out_fault_info_in <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Body_flit_valid_in_fault_out_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in <= '0'; if (state_out = Body_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Body_flit_valid_in_fault_out_faulty_packet_in <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, state_in) begin err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change <= '0'; if (state_out = Body_flit and valid_in = '0' and state_in /= state_out) then err_state_out_Body_flit_not_valid_in_state_in_state_out_not_change <= '1'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '0'; if (state_out = Body_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Body_flit_not_valid_in_faulty_packet_in_faulty_packet_out_not_change <= '1'; end if; end process; process (state_out, valid_in, fault_info_in) begin err_state_out_Body_flit_not_valid_in_not_fault_info_in <= '0'; if (state_out = Body_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Body_flit_not_valid_in_not_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, write_fake_flit) begin err_state_out_Body_flit_not_valid_in_not_write_fake_flit <= '0'; if (state_out = Body_flit and valid_in = '0' and write_fake_flit = '1') then err_state_out_Body_flit_not_valid_in_not_write_fake_flit <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, fake_credit) begin err_state_out_Body_flit_not_fake_credit <= '0'; if (state_out = Body_flit and fake_credit = '1') then err_state_out_Body_flit_not_fake_credit <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -- Tail_flit state -- valid_in = '1' and fault_out = '0' -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, flit_type, state_in) begin err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and flit_type = "001" and state_in /= Header_flit) then err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_Header_state_in_Header_flit <= '1'; end if; end process; process (state_out, valid_in, fault_out, fake_credit) begin err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and fake_credit = '1') then err_state_out_Tail_flit_valid_in_not_fault_out_not_fake_credit <= '1'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and fault_info_in = '1') then err_state_out_Tail_flit_valid_in_not_fault_out_not_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in, faulty_packet_out) begin err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Tail_flit_valid_in_not_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, valid_in, fault_out, fake_credit) begin err_state_out_Tail_flit_valid_in_fault_out_fake_credit <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and fake_credit /= '1') then err_state_out_Tail_flit_valid_in_fault_out_fake_credit <= '1'; end if; end process; process (state_out, valid_in, fault_out, state_in) begin err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and state_in /= Packet_drop) then err_state_out_Tail_flit_valid_in_fault_out_state_in_Packet_drop <= '1'; end if; end process; process (state_out, valid_in, fault_out, fault_info_in) begin err_state_out_Tail_flit_valid_in_fault_out_fault_info_in <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and fault_info_in = '0') then err_state_out_Tail_flit_valid_in_fault_out_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, fault_out, faulty_packet_in) begin err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '1' and faulty_packet_in /= '1') then err_state_out_Tail_flit_valid_in_fault_out_faulty_packet_in <= '1'; end if; end process; process (state_out, valid_in, state_in) begin err_state_out_Tail_flit_not_valid_in_state_in_Idle <= '0'; if (state_out = Tail_flit and valid_in = '0' and state_in /= Idle) then err_state_out_Tail_flit_not_valid_in_state_in_Idle <= '1'; end if; end process; process (state_out, valid_in, faulty_packet_in, faulty_packet_out) begin err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change <= '0'; if (state_out = Tail_flit and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Tail_flit_not_valid_in_faulty_packet_in_faulty_packet_in_not_change <= '1'; end if; end process; process (state_out, valid_in, fault_info_in) begin err_state_out_Tail_flit_not_valid_in_not_fault_info_in <= '0'; if (state_out = Tail_flit and valid_in = '0' and fault_info_in = '1') then err_state_out_Tail_flit_not_valid_in_not_fault_info_in <= '1'; end if; end process; process (state_out, valid_in, fake_credit) begin err_state_out_Tail_flit_not_valid_in_not_fake_credit <= '0'; if (state_out = Tail_flit and valid_in = '0' and fake_credit /= '0') then err_state_out_Tail_flit_not_valid_in_not_fake_credit <= '1'; end if; end process; process (state_out, write_fake_flit) begin err_state_out_Tail_flit_not_write_fake_flit <= '0'; if (state_out = Tail_flit and write_fake_flit = '1') then err_state_out_Tail_flit_not_write_fake_flit <= '1'; end if; end process; -------------------------------------------------------------------------------------------------- process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and fake_credit /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_fake_credit <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and faulty_packet_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_not_faulty_packet_in <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and state_in /= Header_flit) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_state_in_Header_flit <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, write_fake_flit) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '0' and write_fake_flit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_out_write_fake_flit <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_out = '1' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_fault_out_state_in_state_out_not_change <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and faulty_packet_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_faulty_packet_in <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '1' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_fault_out_state_in_state_out_not_change <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and state_in /= Idle) then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_not_state_in_Idle <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "100" and fault_out = '0' and fake_credit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Tail_not_fault_out_fake_credit <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fake_credit) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and ((flit_type /= "001" and flit_type /= "100") or fault_out = '1') and fake_credit = '0') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_invalid_fault_out_fake_credit <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, faulty_packet_in) begin err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and ( valid_in = '0' or (flit_type /= "001" and flit_type /= "100") or fault_out = '1' ) and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_flit_type_body_or_invalid_fault_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, state_in) begin err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and ((flit_type /= "001" and flit_type /= "100") or fault_out = '1') and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_flit_type_invalid_fault_out_state_in_state_out_not_change <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, faulty_packet_in) begin err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_faulty_packet_in_faulty_packet_out_equal <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, state_in) begin err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and state_in /= state_out) then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_state_in_state_out_not_change <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, write_fake_flit) begin err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and write_fake_flit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_write_fake_flit <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, fake_credit) begin err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '0' and fake_credit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_not_fake_credit <= '1'; end if; end process; -- faulty_packet_out = '0' -------------------------------------------------------------------------------------------------- process (state_out, faulty_packet_out, state_in) begin err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change <= '0'; if (state_out = Packet_drop and faulty_packet_out = '0' and state_in /= state_out) then err_state_out_Packet_drop_not_faulty_packet_out_state_in_state_out_not_change <= '1'; end if; end process; process (state_out, faulty_packet_out, faulty_packet_in) begin err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change <= '0'; if (state_out = Packet_drop and faulty_packet_out = '0' and faulty_packet_in /= faulty_packet_out) then err_state_out_Packet_drop_not_faulty_packet_out_faulty_packet_in_faulty_packet_out_not_change <= '1'; end if; end process; process (state_out, faulty_packet_out, fake_credit) begin err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '0' and fake_credit = '1') then err_state_out_Packet_drop_not_faulty_packet_out_not_fake_credit <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, write_fake_flit) begin err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and (valid_in = '0' or flit_type /= "001" or fault_out = '1') and write_fake_flit = '1') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_header_or_fault_out_not_write_fake_flit <= '1'; end if; end process; process (state_out, faulty_packet_out, write_fake_flit) begin err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit <= '0'; if (state_out = Packet_drop and faulty_packet_out = '0' and write_fake_flit = '1') then err_state_out_Packet_drop_not_faulty_packet_out_not_write_fake_flit <= '1'; end if; end process; process (fault_info, fault_info_out) begin err_fault_info_fault_info_out_equal <= '0'; if (fault_info /= fault_info_out) then err_fault_info_fault_info_out_equal <= '1'; end if; end process; process (state_out, valid_in, state_in) begin err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal <= '0'; if (state_out = Packet_drop and valid_in = '0' and state_in /= state_out) then err_state_out_Packet_drop_not_valid_in_state_in_state_out_equal <= '1'; end if; end process; process (state_out, valid_in, fault_out, flit_type, state_in) begin err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal <= '0'; if (state_out = Tail_flit and valid_in = '1' and fault_out = '0' and flit_type /= "001" and state_in /= state_out) then err_state_out_Tail_flit_valid_in_not_fault_out_flit_type_not_Header_state_in_state_out_equal <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_info_in) begin err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and valid_in = '1' and flit_type = "001" and fault_info_in /= '1') then err_state_out_Packet_drop_faulty_packet_out_valid_in_flit_type_Header_not_fault_info_in <= '1'; end if; end process; process (state_out, faulty_packet_out, valid_in, flit_type, fault_out, fault_info_in) begin err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in <= '0'; if (state_out = Packet_drop and faulty_packet_out = '1' and (valid_in = '0' or flit_type /= "001") and fault_info_in /= '0') then err_state_out_Packet_drop_faulty_packet_out_not_valid_in_or_flit_type_not_Header_not_not_fault_info_in <= '1'; end if; end process; end behavior;
gpl-3.0
1ac7ce3188773006ce4a6ff1467f39d4
0.656211
2.772532
false
false
false
false
simoesusp/Processador-ICMC
Processor_FPGA/Processor_Template_VHDL_DE70/POS_CONV.vhd
3
697
LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.all; USE IEEE.STD_LOGIC_ARITH.all; USE IEEE.STD_LOGIC_UNSIGNED.all; ENTITY POS_CONV IS PORT( LPOS : IN STD_LOGIC_VECTOR(15 DOWNTO 0); SIZE : IN STD_LOGIC; XPOS : OUT STD_LOGIC_VECTOR(5 DOWNTO 0); YPOS : OUT STD_LOGIC_VECTOR(4 DOWNTO 0) ); END POS_CONV; ARCHITECTURE main OF POS_CONV IS BEGIN PROCESS(LPOS, SIZE) VARIABLE LP : STD_LOGIC_VECTOR(10 DOWNTO 0); VARIABLE SZ : INTEGER RANGE 0 TO 40; BEGIN IF(SIZE = '0') THEN SZ := 40; ELSE SZ := 20; END IF; LP := LPOS(10 DOWNTO 0); XPOS <= conv_std_logic_vector(conv_integer(LP) MOD SZ, 6); YPOS <= conv_std_logic_vector(conv_integer(LP) / SZ, 5); END PROCESS; END main;
gpl-3.0
26a49f5b5933b96cd02fdb8a1cba9da9
0.664275
2.680769
false
false
false
false
kiwih/subleq-vhdl
defs.vhd
1
317
library ieee; use ieee.std_logic_1164.all; package defs is constant ADDR_BUS_SIZE : integer := 8; constant INSTRUCTION_BUS_SIZE : integer := 24; constant DATA_BUS_SIZE : integer := 16; constant INSTRUCTION_MEMORY_LENGTH : integer := 128; constant DATA_MEMORY_LENGTH : integer := 128; end defs;
mit
e1c87907ac205d55f82282aae69988ca
0.687697
3.17
false
false
false
false
AndyMcC0/UVVM_All
bitvis_irqc/tb/irqc_tb.vhd
1
20,216
--======================================================================================================================== -- Copyright (c) 2017 by Bitvis AS. All rights reserved. -- You should have received a copy of the license file containing the MIT License (see LICENSE.TXT), if not, -- contact Bitvis AS <[email protected]>. -- -- UVVM AND ANY PART THEREOF ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH UVVM OR THE USE OR OTHER DEALINGS IN UVVM. --======================================================================================================================== ------------------------------------------------------------------------------------------ -- VHDL unit : Bitvis IRQC Library : irqc_tb -- -- Description : See dedicated powerpoint presentation and README-file(s) ------------------------------------------------------------------------------------------ library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; library STD; use std.env.all; library uvvm_util; context uvvm_util.uvvm_util_context; library bitvis_vip_sbi; use bitvis_vip_sbi.sbi_bfm_pkg.all; use work.irqc_pif_pkg.all; -- Test case entity entity irqc_tb is end entity; -- Test case architecture architecture func of irqc_tb is -- DSP interface and general control signals signal clk : std_logic := '0'; signal arst : std_logic := '0'; -- CPU interface signal sbi_if : t_sbi_if(addr(2 downto 0), wdata(7 downto 0), rdata(7 downto 0)) := init_sbi_if_signals(3, 8); -- Interrupt related signals signal irq_source : std_logic_vector(C_NUM_SOURCES-1 downto 0) := (others => '0'); signal irq2cpu : std_logic := '0'; signal irq2cpu_ack : std_logic := '0'; signal clock_ena : boolean := false; constant C_CLK_PERIOD : time := 10 ns; procedure clock_gen( signal clock_signal : inout std_logic; signal clock_ena : in boolean; constant clock_period : in time ) is variable v_first_half_clk_period : time := C_CLK_PERIOD / 2; begin loop if not clock_ena then wait until clock_ena; end if; wait for v_first_half_clk_period; clock_signal <= not clock_signal; wait for (clock_period - v_first_half_clk_period); clock_signal <= not clock_signal; end loop; end; subtype t_irq_source is std_logic_vector(C_NUM_SOURCES-1 downto 0); -- Trim (cut) a given vector to fit the number of irq sources (i.e. pot. reduce width) function trim( constant source : std_logic_vector; constant num_bits : positive := C_NUM_SOURCES) return t_irq_source is variable v_result : std_logic_vector(source'length-1 downto 0) := source; begin return v_result(num_bits-1 downto 0); end; -- Fit a given vector to the number of irq sources by masking with zeros above irq width function fit( constant source : std_logic_vector; constant num_bits : positive := C_NUM_SOURCES) return std_logic_vector is variable v_result : std_logic_vector(source'length-1 downto 0) := (others => '0'); variable v_source : std_logic_vector(source'length-1 downto 0) := source; begin v_result(num_bits-1 downto 0) := v_source(num_bits-1 downto 0); return v_result; end; begin ----------------------------------------------------------------------------- -- Instantiate DUT ----------------------------------------------------------------------------- i_irqc: entity work.irqc port map ( -- DSP interface and general control signals clk => clk, arst => arst, -- CPU interface cs => sbi_if.cs, addr => sbi_if.addr, wr => sbi_if.wena, rd => sbi_if.rena, din => sbi_if.wdata, dout => sbi_if.rdata, -- Interrupt related signals irq_source => irq_source, irq2cpu => irq2cpu, irq2cpu_ack => irq2cpu_ack ); sbi_if.ready <= '1'; -- always ready in the same clock cycle. -- Set upt clock generator clock_gen(clk, clock_ena, 10 ns); ------------------------------------------------ -- PROCESS: p_main ------------------------------------------------ p_main: process constant C_SCOPE : string := C_TB_SCOPE_DEFAULT; procedure pulse( signal target : inout std_logic; signal clock_signal : in std_logic; constant num_periods : in natural; constant msg : in string ) is begin if num_periods > 0 then wait until falling_edge(clock_signal); target <= '1'; for i in 1 to num_periods loop wait until falling_edge(clock_signal); end loop; else target <= '1'; wait for 0 ns; -- Delta cycle only end if; target <= '0'; log(ID_SEQUENCER_SUB, msg, C_SCOPE); end; procedure pulse( signal target : inout std_logic_vector; constant pulse_value : in std_logic_vector; signal clock_signal : in std_logic; constant num_periods : in natural; constant msg : in string) is begin if num_periods > 0 then wait until falling_edge(clock_signal); target <= pulse_value; for i in 1 to num_periods loop wait until falling_edge(clock_signal); end loop; else target <= pulse_value; wait for 0 ns; -- Delta cycle only end if; target(target'range) <= (others => '0'); log(ID_SEQUENCER_SUB, "Pulsed to " & to_string(pulse_value, HEX, AS_IS, INCL_RADIX) & ". " & add_msg_delimiter(msg), C_SCOPE); end; -- Log overloads for simplification procedure log( msg : string) is begin log(ID_SEQUENCER, msg, C_SCOPE); end; -- Overloads for PIF BFMs for SBI (Simple Bus Interface) procedure write( constant addr_value : in natural; constant data_value : in std_logic_vector; constant msg : in string) is begin sbi_write(to_unsigned(addr_value, sbi_if.addr'length), data_value, msg, clk, sbi_if, C_SCOPE); end; procedure check( constant addr_value : in natural; constant data_exp : in std_logic_vector; constant alert_level : in t_alert_level; constant msg : in string) is begin sbi_check(to_unsigned(addr_value, sbi_if.addr'length), data_exp, msg, clk, sbi_if, alert_level, C_SCOPE); end; procedure set_inputs_passive( dummy : t_void) is begin sbi_if.cs <= '0'; sbi_if.addr <= (others => '0'); sbi_if.wena <= '0'; sbi_if.rena <= '0'; sbi_if.wdata <= (others => '0'); irq_source <= (others => '0'); irq2cpu_ack <= '0'; log(ID_SEQUENCER_SUB, "All inputs set passive", C_SCOPE); end; variable v_time_stamp : time := 0 ns; variable v_irq_mask : std_logic_vector(7 downto 0); variable v_irq_mask_inv : std_logic_vector(7 downto 0); begin -- Print the configuration to the log report_global_ctrl(VOID); report_msg_id_panel(VOID); enable_log_msg(ALL_MESSAGES); --disable_log_msg(ALL_MESSAGES); --enable_log_msg(ID_LOG_HDR); log(ID_LOG_HDR, "Start Simulation of TB for IRQC", C_SCOPE); ------------------------------------------------------------ set_inputs_passive(VOID); clock_ena <= true; -- to start clock generator pulse(arst, clk, 10, "Pulsed reset-signal - active for 10T"); v_time_stamp := now; -- time from which irq2cpu should be stable off until triggered check_value(C_NUM_SOURCES > 0, FAILURE, "Must be at least 1 interrupt source", C_SCOPE); check_value(C_NUM_SOURCES <= 8, TB_WARNING, "This TB is only checking IRQC with up to 8 interrupt sources", C_SCOPE); log(ID_LOG_HDR, "Check defaults on output ports", C_SCOPE); ------------------------------------------------------------ check_value(irq2cpu, '0', ERROR, "Interrupt to CPU must be default inactive", C_SCOPE); check_value(sbi_if.rdata, x"00", ERROR, "Register data bus output must be default passive"); log(ID_LOG_HDR, "Check register defaults and access (write + read)", C_SCOPE); ------------------------------------------------------------ log("\nChecking Register defaults"); check(C_ADDR_IRR, x"00", ERROR, "IRR default"); check(C_ADDR_IER, x"00", ERROR, "IER default"); check(C_ADDR_IPR, x"00", ERROR, "IPR default"); check(C_ADDR_IRQ2CPU_ALLOWED, x"00", ERROR, "IRQ2CPU_ALLOWED default"); log("\nChecking Register Write/Read"); write(C_ADDR_IER, fit(x"55"), "IER"); check(C_ADDR_IER, fit(x"55"), ERROR, "IER pure readback"); write(C_ADDR_IER, fit(x"AA"), "IER"); check(C_ADDR_IER, fit(x"AA"), ERROR, "IER pure readback"); write(C_ADDR_IER, fit(x"00"), "IER"); check(C_ADDR_IER, fit(x"00"), ERROR, "IER pure readback"); log(ID_LOG_HDR, "Check register trigger/clear mechanism", C_SCOPE); ------------------------------------------------------------ write(C_ADDR_ITR, fit(x"AA"), "ITR : Set interrupts"); check(C_ADDR_IRR, fit(x"AA"), ERROR, "IRR"); write(C_ADDR_ITR, fit(x"55"), "ITR : Set more interrupts"); check(C_ADDR_IRR, fit(x"FF"), ERROR, "IRR"); write(C_ADDR_ICR, fit(x"71"), "ICR : Clear interrupts"); check(C_ADDR_IRR, fit(x"8E"), ERROR, "IRR"); write(C_ADDR_ICR, fit(x"85"), "ICR : Clear interrupts"); check(C_ADDR_IRR, fit(x"0A"), ERROR, "IRR"); write(C_ADDR_ITR, fit(x"55"), "ITR : Set more interrupts"); check(C_ADDR_IRR, fit(x"5F"), ERROR, "IRR"); write(C_ADDR_ICR, fit(x"5F"), "ICR : Clear interrupts"); check(C_ADDR_IRR, fit(x"00"), ERROR, "IRR"); log(ID_LOG_HDR, "Check interrupt sources, IER, IPR and irq2cpu", C_SCOPE); ------------------------------------------------------------ log("\nChecking interrupts and IRR"); write(C_ADDR_ICR, fit(x"FF"), "ICR : Clear all interrupts"); pulse(irq_source, trim(x"AA"), clk, 1, "Pulse irq_source 1T"); check(C_ADDR_IRR, fit(x"AA"), ERROR, "IRR after irq pulses"); pulse(irq_source, trim(x"01"), clk, 1, "Add more interrupts"); check(C_ADDR_IRR, fit(x"AB"), ERROR, "IRR after irq pulses"); pulse(irq_source, trim(x"A1"), clk, 1, "Repeat same interrupts"); check(C_ADDR_IRR, fit(x"AB"), ERROR, "IRR after irq pulses"); pulse(irq_source, trim(x"54"), clk, 1, "Add remaining interrupts"); check(C_ADDR_IRR, fit(x"FF"), ERROR, "IRR after irq pulses"); write(C_ADDR_ICR, fit(x"AA"), "ICR : Clear half the interrupts"); pulse(irq_source, trim(x"A0"), clk, 1, "Add more interrupts"); check(C_ADDR_IRR, fit(x"F5"), ERROR, "IRR after irq pulses"); write(C_ADDR_ICR, fit(x"FF"), "ICR : Clear all interrupts"); check(C_ADDR_IRR, fit(x"00"), ERROR, "IRR after clearing all"); log("\nChecking IER, IPR and irq2cpu"); write(C_ADDR_ICR, fit(x"FF"), "ICR : Clear all interrupts"); write(C_ADDR_IER, fit(x"55"), "IER : Enable some interrupts"); write(C_ADDR_ITR, fit(x"AA"), "ITR : Trigger non-enable interrupts"); check(C_ADDR_IPR, fit(x"00"), ERROR, "IPR should not be active"); check(C_ADDR_IRQ2CPU_ALLOWED, x"00", ERROR, "IRQ2CPU_ALLOWED should not be active"); write(C_ADDR_IRQ2CPU_ENA, x"01", "IRQ2CPU_ENA : Enable main interrupt to CPU"); check(C_ADDR_IRQ2CPU_ALLOWED, x"01", ERROR, "IRQ2CPU_ALLOWED should now be active"); check_value(irq2cpu, '0', ERROR, "Interrupt to CPU must still be inactive", C_SCOPE); check_stable(irq2cpu, (now - v_time_stamp), ERROR, "No spikes allowed on irq2cpu", C_SCOPE); pulse(irq_source, trim(x"01"), clk, 1, "Add a single enabled interrupt"); await_value(irq2cpu, '1', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt expected immediately", C_SCOPE); v_time_stamp := now; -- from time of stable active irq2cpu check(C_ADDR_IRR, fit(x"AB"), ERROR, "IRR should now be active"); check(C_ADDR_IPR, fit(x"01"), ERROR, "IPR should now be active"); log("\nMore details checked in the autonomy section below"); check_value(irq2cpu, '1', ERROR, "Interrupt to CPU must still be active", C_SCOPE); check_stable(irq2cpu, (now - v_time_stamp), ERROR, "No spikes allowed on irq2cpu", C_SCOPE); log(ID_LOG_HDR, "Check autonomy for all interrupts", C_SCOPE); ------------------------------------------------------------ write(C_ADDR_ICR, fit(x"FF"), "ICR : Clear all interrupts"); write(C_ADDR_IER, fit(x"FF"), "IER : Disable all interrupts"); write(C_ADDR_IRQ2CPU_ENA, x"01", "IRQ2CPU_ENA : Allow interrupt to CPU"); for i in 0 to C_NUM_SOURCES-1 loop log(" "); log("- Checking irq_source(" & to_string(i) & ") and all corresponding functionality"); log("- - Check interrupt activation not affected by non related interrupts or registers"); v_time_stamp := now; -- from time of stable inactive irq2cpu v_irq_mask := (others => '0'); v_irq_mask(i) := '1'; v_irq_mask_inv := (others => '1'); v_irq_mask_inv(i) := '0'; write(C_ADDR_IER, v_irq_mask, "IER : Enable selected interrupt"); pulse(irq_source, trim(v_irq_mask_inv), clk, 1, "Pulse all non-enabled interrupts"); write(C_ADDR_ITR, v_irq_mask_inv, "ITR : Trigger all non-enabled interrupts"); check(C_ADDR_IRR, fit(v_irq_mask_inv), ERROR, "IRR not yet triggered"); check(C_ADDR_IPR, x"00", ERROR, "IPR not yet triggered"); check_value(irq2cpu, '0', ERROR, "Interrupt to CPU must still be inactive", C_SCOPE); check_stable(irq2cpu, (now - v_time_stamp), ERROR, "No spikes allowed on irq2cpu", C_SCOPE); pulse(irq_source, trim(v_irq_mask), clk, 1, "Pulse the enabled interrupt"); await_value(irq2cpu, '1', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt expected immediately", C_SCOPE); check(C_ADDR_IRR, fit(x"FF"), ERROR, "All IRR triggered"); check(C_ADDR_IPR, v_irq_mask, ERROR, "IPR triggered for selected"); log("\n- - Check interrupt deactivation not affected by non related interrupts or registers"); v_time_stamp := now; -- from time of stable active irq2cpu write(C_ADDR_ICR, v_irq_mask_inv, "ICR : Clear all non-enabled interrupts"); write(C_ADDR_IER, fit(x"FF"), "IER : Enable all interrupts"); write(C_ADDR_IER, v_irq_mask, "IER : Disable non-selected interrupts"); pulse(irq_source, trim(x"FF"), clk, 1, "Pulse all interrupts"); write(C_ADDR_ITR, x"FF", "ITR : Trigger all interrupts"); check_stable(irq2cpu, (now - v_time_stamp), ERROR, "No spikes allowed on irq2cpu (='1')", C_SCOPE); write(C_ADDR_IER, v_irq_mask_inv, "IER : Enable all interrupts but disable selected"); check_value(irq2cpu, '1', ERROR, "Interrupt to CPU still active", C_SCOPE); check(C_ADDR_IRR, fit(x"FF"), ERROR, "IRR still active for all"); write(C_ADDR_ICR, v_irq_mask_inv, "ICR : Clear all non-enabled interrupts"); await_value(irq2cpu, '0', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt deactivation expected immediately", C_SCOPE); write(C_ADDR_IER, v_irq_mask, "IER : Re-enable selected interrupt"); await_value(irq2cpu, '1', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt reactivation expected immediately", C_SCOPE); check(C_ADDR_IPR, v_irq_mask, ERROR, "IPR still active for selected"); write(C_ADDR_ICR, v_irq_mask, "ICR : Clear selected interrupt"); check_value(irq2cpu, '0', ERROR, "Interrupt to CPU must go inactive", C_SCOPE); check(C_ADDR_IRR, x"00", ERROR, "IRR all inactive"); check(C_ADDR_IPR, x"00", ERROR, "IPR all inactive"); write(C_ADDR_IER, x"00", "IER : Disable all interrupts"); end loop; report_alert_counters(INTERMEDIATE); -- Report intermediate counters log(ID_LOG_HDR, "Check irq acknowledge and re-enable", C_SCOPE); ------------------------------------------------------------ log("- Activate interrupt"); write(C_ADDR_ITR, v_irq_mask, "ICR : Set single upper interrupt"); write(C_ADDR_IER, v_irq_mask, "IER : Enable single upper interrupts"); write(C_ADDR_IRQ2CPU_ENA, x"01", "IRQ2CPU_ENA : Allow interrupt to CPU"); await_value(irq2cpu, '1', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt activation expected", C_SCOPE); v_time_stamp := now; -- from time of stable active irq2cpu log("\n- Try potential malfunction"); write(C_ADDR_IRQ2CPU_ENA, x"01", "IRQ2CPU_ENA : Allow interrupt to CPU again - should not affect anything"); write(C_ADDR_IRQ2CPU_ENA, x"00", "IRQ2CPU_ENA : Set to 0 - should not affect anything"); write(C_ADDR_IRQ2CPU_DISABLE, x"00", "IRQ2CPU_DISABLE : Set to 0 - should not affect anything"); check_stable(irq2cpu, (now - v_time_stamp), ERROR, "No spikes allowed on irq2cpu (='1')", C_SCOPE); log("\n- Acknowledge and deactivate interrupt"); pulse(irq2cpu_ack, clk, 1, "Pulse irq2cpu_ack"); await_value(irq2cpu, '0', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt deactivation expected", C_SCOPE); v_time_stamp := now; -- from time of stable inactive irq2cpu log("\n- Test for potential malfunction"); write(C_ADDR_IRQ2CPU_DISABLE, x"01", "IRQ2CPU_DISABLE : Disable interrupt to CPU again - should not affect anything"); write(C_ADDR_IRQ2CPU_DISABLE, x"00", "IRQ2CPU_DISABLE : Set to 0 - should not affect anything"); write(C_ADDR_IRQ2CPU_ENA, x"00", "IRQ2CPU_ENA : Set to 0 - should not affect anything"); write(C_ADDR_ITR, x"FF", "ICR : Trigger all interrupts"); write(C_ADDR_IER, x"FF", "IER : Enable all interrupts"); pulse(irq_source, trim(x"FF"), clk, 1, "Pulse all interrupts"); pulse(irq2cpu_ack, clk, 1, "Pulse irq2cpu_ack"); check_stable(irq2cpu, (now - v_time_stamp), ERROR, "No spikes allowed on irq2cpu (='0')", C_SCOPE); log("\n- Re-/de-activation"); write(C_ADDR_IRQ2CPU_ENA, x"01", "IRQ2CPU_ENA : Reactivate interrupt to CPU"); await_value(irq2cpu, '1', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt reactivation expected", C_SCOPE); write(C_ADDR_IRQ2CPU_DISABLE, x"01", "IRQ2CPU_DISABLE : Deactivate interrupt to CPU"); await_value(irq2cpu, '0', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt deactivation expected", C_SCOPE); write(C_ADDR_IRQ2CPU_ENA, x"01", "IRQ2CPU_ENA : Reactivate interrupt to CPU"); await_value(irq2cpu, '1', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt reactivation expected", C_SCOPE); log(ID_LOG_HDR, "Check Reset", C_SCOPE); ------------------------------------------------------------ log("- Activate all interrupts"); write(C_ADDR_ITR, x"FF", "ICR : Set all interrupts"); write(C_ADDR_IER, x"FF", "IER : Enable all interrupts"); write(C_ADDR_IRQ2CPU_ENA, x"01", "IRQ2CPU_ENA : Allow interrupt to CPU"); await_value(irq2cpu, '1', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt activation expected", C_SCOPE); pulse(arst, clk, 1, "Pulse reset"); await_value(irq2cpu, '0', 0 ns, C_CLK_PERIOD, ERROR, "Interrupt deactivation", C_SCOPE); check(C_ADDR_IER, x"00", ERROR, "IER all inactive"); check(C_ADDR_IRR, x"00", ERROR, "IRR all inactive"); check(C_ADDR_IPR, x"00", ERROR, "IPR all inactive"); --================================================================================================== -- Ending the simulation -------------------------------------------------------------------------------------- wait for 1000 ns; -- to allow some time for completion report_alert_counters(FINAL); -- Report final counters and print conclusion for simulation (Success/Fail) log(ID_LOG_HDR, "SIMULATION COMPLETED", C_SCOPE); -- Finish the simulation std.env.stop; wait; -- to stop completely end process p_main; end func;
mit
535c9bc728510a1766a1dd4049344a75
0.58607
3.534266
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/Checkers/Modules_with_checkers_integrated/All_checkers/Arbiter_in_one_hot_with_checkers/Arbiter_in_one_hot_checkers.vhd
3
23,706
library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity Arbiter_in_one_hot_checkers is port ( req_X_N, req_X_E, req_X_W, req_X_S, req_X_L :in std_logic; state: in std_logic_vector (5 downto 0); state_in: in std_logic_vector (5 downto 0); X_N, X_E, X_W, X_S, X_L :in std_logic; -- Checker outputs err_Requests_state_in_state_not_equal, err_IDLE_Req_N, err_IDLE_grant_N, err_North_Req_N, err_North_grant_N, err_East_Req_E, err_East_grant_E, err_West_Req_W, err_West_grant_W, err_South_Req_S, err_South_grant_S, err_Local_Req_L, err_Local_grant_L, err_IDLE_Req_E, err_IDLE_grant_E, err_North_Req_E, err_North_grant_E, err_East_Req_W, err_East_grant_W, err_West_Req_S, err_West_grant_S, err_South_Req_L, err_South_grant_L, err_Local_Req_N, err_Local_grant_N, err_IDLE_Req_W, err_IDLE_grant_W, err_North_Req_W, err_North_grant_W, err_East_Req_S, err_East_grant_S, err_West_Req_L, err_West_grant_L, err_South_Req_N, err_South_grant_N, err_Local_Req_E, err_Local_grant_E, err_IDLE_Req_S, err_IDLE_grant_S, err_North_Req_S, err_North_grant_S, err_East_Req_L, err_East_grant_L, err_West_Req_N, err_West_grant_N, err_South_Req_E, err_South_grant_E, err_Local_Req_W, err_Local_grant_W, err_IDLE_Req_L, err_IDLE_grant_L, err_North_Req_L, err_North_grant_L, err_East_Req_N, err_East_grant_N, err_West_Req_E, err_West_grant_E, err_South_Req_W, err_South_grant_W, err_Local_Req_S, err_Local_grant_S, err_state_in_onehot, err_no_request_grants, err_request_no_grants, err_no_Req_N_grant_N, err_no_Req_E_grant_E, err_no_Req_W_grant_W, err_no_Req_S_grant_S, err_no_Req_L_grant_L : out std_logic ); end Arbiter_in_one_hot_checkers; architecture behavior of Arbiter_in_one_hot_checkers is CONSTANT IDLE: std_logic_vector (5 downto 0) := "000001"; CONSTANT Local: std_logic_vector (5 downto 0) := "000010"; CONSTANT North: std_logic_vector (5 downto 0) := "000100"; CONSTANT East: std_logic_vector (5 downto 0) := "001000"; CONSTANT West: std_logic_vector (5 downto 0) := "010000"; CONSTANT South: std_logic_vector (5 downto 0) := "100000"; SIGNAL Requests: std_logic_vector (4 downto 0); SIGNAL Grants: std_logic_vector (4 downto 0); begin Requests <= req_X_N & req_X_E & req_X_W & req_X_S & req_X_L; Grants <= X_N & X_E & X_W & X_S & X_L; -- Checkers --checked process (state, Requests, state_in) begin if (Requests = "00000" and state_in /= state ) then err_Requests_state_in_state_not_equal <= '1'; else err_Requests_state_in_state_not_equal <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 1 --checked -- N has highest priority, then E, W, S and L (and then again N). process (state, req_X_N, state_in) begin if ( state = IDLE and req_X_N = '1' and state_in /= North ) then err_IDLE_Req_N <= '1'; else err_IDLE_Req_N <= '0'; end if; end process; process (state, req_X_N, X_N) begin if ( state = IDLE and req_X_N = '1' and X_N = '0' ) then err_IDLE_grant_N <= '1'; else err_IDLE_grant_N <= '0'; end if; end process; process (state, req_X_N, state_in) begin if (state = North and req_X_N = '1' and state_in /= North) then err_North_Req_N <= '1'; else err_North_Req_N <= '0'; end if; end process; process (state, req_X_N, X_N) begin if ( state = North and req_X_N = '1' and X_N = '0' ) then err_North_grant_N <= '1'; else err_North_grant_N <= '0'; end if; end process; process (state, req_X_E, state_in) begin if (state = East and req_X_E = '1' and state_in /= East) then err_East_Req_E <= '1'; else err_East_Req_E <= '0'; end if; end process; process (state, req_X_E, X_E) begin if ( state = East and req_X_E = '1' and X_E = '0' ) then err_East_grant_E <= '1'; else err_East_grant_E <= '0'; end if; end process; process (state, req_X_W, state_in) begin if (state = West and req_X_W = '1' and state_in /= West) then err_West_Req_W <= '1'; else err_West_Req_W <= '0'; end if; end process; process (state, req_X_W, X_W) begin if ( state = West and req_X_W = '1' and X_W = '0' ) then err_West_grant_W <= '1'; else err_West_grant_W <= '0'; end if; end process; process (state, req_X_S, state_in) begin if (state = South and req_X_S = '1' and state_in /= South) then err_South_Req_S <= '1'; else err_South_Req_S <= '0'; end if; end process; process (state, req_X_S, X_S) begin if ( state = South and req_X_S = '1' and X_S = '0' ) then err_South_grant_S <= '1'; else err_South_grant_S <= '0'; end if; end process; -- Local is a bit different (including others case) process (state, req_X_L, state_in) begin if ( state /= IDLE and state /= North and state /=East and state /= West and state /= South and req_X_L = '1' and state_in /= Local) then err_Local_Req_L <= '1'; else err_Local_Req_L <= '0'; end if; end process; process (state, req_X_L, X_L) begin if ( state /= IDLE and state /= North and state /=East and state /= West and state /= South and req_X_L = '1' and X_L = '0' ) then err_Local_grant_L <= '1'; else err_Local_grant_L <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 2 --checked process (state, req_X_N, req_X_E, state_in) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_IDLE_Req_E <= '1'; else err_IDLE_Req_E <= '0'; end if; end process; process (state, req_X_N, req_X_E, X_E) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '1' and X_E = '0' ) then err_IDLE_grant_E <= '1'; else err_IDLE_grant_E <= '0'; end if; end process; process (state, req_X_N, req_X_E, state_in) begin if ( state = North and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_North_Req_E <= '1'; else err_North_Req_E <= '0'; end if; end process; process (state, req_X_N, req_X_E, X_E) begin if ( state = North and req_X_N = '0' and req_X_E = '1' and X_E = '0' ) then err_North_grant_E <= '1'; else err_North_grant_E <= '0'; end if; end process; process (state, req_X_E, req_X_W, state_in) begin if ( state = East and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_East_Req_W <= '1'; else err_East_Req_W <= '0'; end if; end process; process (state, req_X_E, req_X_W, X_W) begin if ( state = East and req_X_E = '0' and req_X_W = '1' and X_W = '0' ) then err_East_grant_W <= '1'; else err_East_grant_W <= '0'; end if; end process; process (state, req_X_W, req_X_S, state_in) begin if ( state = West and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_West_Req_S <= '1'; else err_West_Req_S <= '0'; end if; end process; process (state, req_X_W, req_X_S, X_S) begin if ( state = West and req_X_W = '0' and req_X_S = '1' and X_S = '0' ) then err_West_grant_S <= '1'; else err_West_grant_S <= '0'; end if; end process; -- Shall I consider local for this case or the others case ? I guess local, according to the previous checkers -- for the router with CTS/RTS handshaking Flow Control process (state, req_X_S, req_X_L, state_in) begin if ( state = South and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_South_Req_L <= '1'; else err_South_Req_L <= '0'; end if; end process; process (state, req_X_S, req_X_L, X_L) begin if ( state = South and req_X_S = '0' and req_X_L = '1' and X_L = '0' ) then err_South_grant_L <= '1'; else err_South_grant_L <= '0'; end if; end process; -- Local and invalid states (others case) process (state, req_X_L, req_X_N, state_in) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '1' and state_in /= North) then err_Local_Req_N <= '1'; else err_Local_Req_N <= '0'; end if; end process; process (state, req_X_L, req_X_N, X_N) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '1' and X_N = '0' ) then err_Local_grant_N <= '1'; else err_Local_grant_N <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 3 process (state, req_X_N, req_X_E, req_X_W, state_in) begin if (state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_IDLE_Req_W <= '1'; else err_IDLE_Req_W <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, X_W) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and X_W = '0' ) then err_IDLE_grant_W <= '1'; else err_IDLE_grant_W <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, state_in) begin if (state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_North_Req_W <= '1'; else err_North_Req_W <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, X_W) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and X_W = '0' ) then err_North_grant_W <= '1'; else err_North_grant_W <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, state_in) begin if (state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_East_Req_S <= '1'; else err_East_Req_S <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, X_S) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and X_S = '0' ) then err_East_grant_S <= '1'; else err_East_grant_S <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, state_in) begin if (state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_West_Req_L <= '1'; else err_West_Req_L <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, X_L) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and X_L = '0' ) then err_West_grant_L <= '1'; else err_West_grant_L <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, state_in) begin if (state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and state_in /= North) then err_South_Req_N <= '1'; else err_South_Req_N <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, X_N) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and X_N = '0' ) then err_South_grant_N <= '1'; else err_South_grant_N <= '0'; end if; end process; -- Local and invalid state(s) (others case) process (state, req_X_L, req_X_N, req_X_E, state_in) begin if (state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_Local_Req_E <= '1'; else err_Local_Req_E <= '0'; end if; end process; process (state, req_X_L, req_X_N, req_X_E, X_E) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and X_E = '0' ) then err_Local_grant_E <= '1'; else err_Local_grant_E <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 4 process (state, req_X_N, req_X_E, req_X_W, req_X_S, state_in) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_IDLE_Req_S <= '1'; else err_IDLE_Req_S <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, X_S) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and X_S = '0') then err_IDLE_grant_S <= '1'; else err_IDLE_grant_S <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, state_in) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_North_Req_S <= '1'; else err_North_Req_S <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, X_S) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and X_S = '0') then err_North_grant_S <= '1'; else err_North_grant_S <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, req_X_L, state_in) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_East_Req_L <= '1'; else err_East_Req_L <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, req_X_L, X_L) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and X_L = '0') then err_East_grant_L <= '1'; else err_East_grant_L <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, req_X_N, state_in) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and state_in /= North) then err_West_Req_N <= '1'; else err_West_Req_N <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, req_X_N, X_N) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and X_N = '0') then err_West_grant_N <= '1'; else err_West_grant_N <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, req_X_E, state_in) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_South_Req_E <= '1'; else err_South_Req_E <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, req_X_E, X_E) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and X_E = '0') then err_South_grant_E <= '1'; else err_South_grant_E <= '0'; end if; end process; -- Local state or invalid state(s) (others case) process (state, req_X_L, req_X_N, req_X_E, req_X_W, state_in) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_Local_Req_W <= '1'; else err_Local_Req_W <= '0'; end if; end process; process (state, req_X_L, req_X_N, req_X_E, req_X_W, X_W) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and X_W = '0') then err_Local_grant_W <= '1'; else err_Local_grant_W <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- -- Round 5 process (state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, state_in) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_IDLE_Req_L <= '1'; else err_IDLE_Req_L <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, X_L) begin if ( state = IDLE and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and X_L = '0' ) then err_IDLE_grant_L <= '1'; else err_IDLE_grant_L <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, state_in) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and state_in /= Local) then err_North_Req_L <= '1'; else err_North_Req_L <= '0'; end if; end process; process (state, req_X_N, req_X_E, req_X_W, req_X_S, req_X_L, X_L) begin if ( state = North and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '1' and X_L = '0' ) then err_North_grant_L <= '1'; else err_North_grant_L <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, req_X_L, req_X_N, state_in) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and state_in /= North) then err_East_Req_N <= '1'; else err_East_Req_N <= '0'; end if; end process; process (state, req_X_E, req_X_W, req_X_S, req_X_L, req_X_N, X_N) begin if ( state = East and req_X_E = '0' and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '1' and X_N = '0' ) then err_East_grant_N <= '1'; else err_East_grant_N <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, req_X_N, req_X_E, state_in) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and state_in /= East) then err_West_Req_E <= '1'; else err_West_Req_E <= '0'; end if; end process; process (state, req_X_W, req_X_S, req_X_L, req_X_N, req_X_E, X_E) begin if ( state = West and req_X_W = '0' and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '1' and X_E = '0' ) then err_West_grant_E <= '1'; else err_West_grant_E <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, req_X_E, req_X_W, state_in) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and state_in /= West) then err_South_Req_W <= '1'; else err_South_Req_W <= '0'; end if; end process; process (state, req_X_S, req_X_L, req_X_N, req_X_E, req_X_W, X_W) begin if ( state = South and req_X_S = '0' and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '1' and X_W = '0' ) then err_South_grant_W <= '1'; else err_South_grant_W <= '0'; end if; end process; -- Local state or invalid state(s) (others case) process (state, req_X_L, req_X_N, req_X_E, req_X_W, req_X_S, state_in) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and state_in /= South) then err_Local_Req_S <= '1'; else err_Local_Req_S <= '0'; end if; end process; process (state, req_X_L, req_X_N, req_X_E, req_X_W, req_X_S, X_S) begin if ( state /= IDLE and state /= North and state /=East and state /=West and state /= South and req_X_L = '0' and req_X_N = '0' and req_X_E = '0' and req_X_W = '0' and req_X_S = '1' and X_S = '0' ) then err_Local_grant_S <= '1'; else err_Local_grant_S <= '0'; end if; end process; ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- process (state_in) begin if (state_in /= IDLE and state_in /= North and state_in /= East and state_in /= West and state_in /= South and state_in /= Local) then err_state_in_onehot <= '1'; else err_state_in_onehot <= '0'; end if; end process; process (Requests, Grants) begin if ( Requests = "00000" and Grants /= "00000") then err_no_request_grants <= '1'; else err_no_request_grants <= '0'; end if; end process; process (Requests, Grants) begin if ( Requests /= "00000" and Grants = "00000") then err_request_no_grants <= '1'; else err_request_no_grants <= '0'; end if; end process; process (req_X_N, X_N) begin if (req_X_N = '0' and X_N = '1') then err_no_Req_N_grant_N <= '1'; else err_no_Req_N_grant_N <= '0'; end if; end process; process (req_X_E, X_E) begin if (req_X_E = '0' and X_E = '1') then err_no_Req_E_grant_E <= '1'; else err_no_Req_E_grant_E <= '0'; end if; end process; process (req_X_W, X_W) begin if (req_X_W = '0' and X_W = '1') then err_no_Req_W_grant_W <= '1'; else err_no_Req_W_grant_W <= '0'; end if; end process; process (req_X_S, X_S) begin if (req_X_S = '0' and X_S = '1') then err_no_Req_S_grant_S <= '1'; else err_no_Req_S_grant_S <= '0'; end if; end process; process (req_X_L, X_L) begin if (req_X_L = '0' and X_L = '1') then err_no_Req_L_grant_L <= '1'; else err_no_Req_L_grant_L <= '0'; end if; end process; end behavior;
gpl-3.0
41487ca7243a5250ef56a05c1e5d40b5
0.491352
2.605914
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Router/credit_based/RTL/LBDR.vhd
3
3,875
--Copyright (C) 2016 Siavoosh Payandeh Azad Behrad Niazmand library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity LBDR is generic ( cur_addr_rst: integer := 8; Cx_rst: integer := 8; NoC_size: integer := 4 ); port ( reset: in std_logic; clk: in std_logic; Rxy_reconf: in std_logic_vector(7 downto 0); Reconfig : in std_logic; empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N, Req_E, Req_W, Req_S, Req_L:out std_logic ); end LBDR; architecture behavior of LBDR is signal Cx: std_logic_vector(3 downto 0); signal Rxy, Rxy_in: std_logic_vector(7 downto 0); signal cur_addr: std_logic_vector(NoC_size-1 downto 0); signal N1, E1, W1, S1 :std_logic :='0'; signal Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: std_logic; signal Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: std_logic; signal grants: std_logic; signal ReConf_FF_in, ReConf_FF_out: std_logic; begin grants <= grant_N or grant_E or grant_W or grant_S or grant_L; Cx <= std_logic_vector(to_unsigned(Cx_rst, Cx'length)); cur_addr <= std_logic_vector(to_unsigned(cur_addr_rst, cur_addr'length)); N1 <= '1' when dst_addr(NoC_size-1 downto NoC_size/2) < cur_addr(NoC_size-1 downto NoC_size/2) else '0'; E1 <= '1' when cur_addr((NoC_size/2)-1 downto 0) < dst_addr((NoC_size/2)-1 downto 0) else '0'; W1 <= '1' when dst_addr((NoC_size/2)-1 downto 0) < cur_addr((NoC_size/2)-1 downto 0) else '0'; S1 <= '1' when cur_addr(NoC_size-1 downto NoC_size/2) < dst_addr(NoC_size-1 downto NoC_size/2) else '0'; process(clk, reset) begin if reset = '0' then Rxy <= Rxy_reconf; Req_N_FF <= '0'; Req_E_FF <= '0'; Req_W_FF <= '0'; Req_S_FF <= '0'; Req_L_FF <= '0'; ReConf_FF_out <= '0'; elsif clk'event and clk = '1' then Rxy <= Rxy_in; Req_N_FF <= Req_N_in; Req_E_FF <= Req_E_in; Req_W_FF <= Req_W_in; Req_S_FF <= Req_S_in; Req_L_FF <= Req_L_in; ReConf_FF_out <= ReConf_FF_in; end if; end process; -- The combionational part process(Rxy_reconf, ReConf_FF_out, Rxy, Reconfig, flit_type, grants, empty)begin if ReConf_FF_out= '1' and flit_type = "100" and empty = '0' and grants = '1' then Rxy_in <= Rxy_reconf; ReConf_FF_in <= '0'; else Rxy_in <= Rxy; if Reconfig = '1' then ReConf_FF_in <= '1'; else ReConf_FF_in <= ReConf_FF_out; end if; end if; end process; Req_N <= Req_N_FF; Req_E <= Req_E_FF; Req_W <= Req_W_FF; Req_S <= Req_S_FF; Req_L <= Req_L_FF; process(N1, E1, W1, S1, Rxy, Cx, flit_type, empty, Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF, grants) begin if flit_type = "001" and empty = '0' then Req_N_in <= ((N1 and not E1 and not W1) or (N1 and E1 and Rxy(0)) or (N1 and W1 and Rxy(1))) and Cx(0); Req_E_in <= ((E1 and not N1 and not S1) or (E1 and N1 and Rxy(2)) or (E1 and S1 and Rxy(3))) and Cx(1); Req_W_in <= ((W1 and not N1 and not S1) or (W1 and N1 and Rxy(4)) or (W1 and S1 and Rxy(5))) and Cx(2); Req_S_in <= ((S1 and not E1 and not W1) or (S1 and E1 and Rxy(6)) or (S1 and W1 and Rxy(7))) and Cx(3); Req_L_in <= not N1 and not E1 and not W1 and not S1; elsif flit_type = "100" and empty = '0' and grants = '1' then Req_N_in <= '0'; Req_E_in <= '0'; Req_W_in <= '0'; Req_S_in <= '0'; Req_L_in <= '0'; else Req_N_in <= Req_N_FF; Req_E_in <= Req_E_FF; Req_W_in <= Req_W_FF; Req_S_in <= Req_S_FF; Req_L_in <= Req_L_FF; end if; end process; END;
gpl-3.0
96e6aea30e6b173b2352560f33e4e832
0.575226
2.545992
false
false
false
false
Wynjones1/gbvhdl
synth/vga.vhd
2
2,562
library IEEE; use IEEE.numeric_std.all; use IEEE.std_logic_1164.all; entity vga_counter is generic(FP : integer; PW : integer; DT : integer; BP : integer); port(clk : in std_logic; reset : in std_logic; valid : out std_logic; sync : out std_logic; pix : out integer); end vga_counter; architecture rtl of vga_counter is signal counter : integer range 0 to FP + PW + DT + BP- 1 := 0; begin process(clk, reset) begin if reset = '1' then counter <= 0; valid <= '0'; sync <= '1'; elsif rising_edge(clk) then if counter < DT - 1 then sync <= '1'; counter <= counter + 1; valid <= '1'; elsif counter < DT + FP - 1 then sync <= '1'; counter <= counter + 1; valid <= '0'; elsif counter < DT + FP + PW - 1 then sync <= '0'; counter <= counter + 1; valid <= '0'; elsif counter < DT + FP + PW + BP - 1 then sync <= '1'; counter <= counter + 1; valid <= '0'; else sync <= '1'; counter <= 0; valid <= '1'; end if; end if; end process; pix <= counter; end rtl; library IEEE; use IEEE.numeric_std.all; use IEEE.std_logic_1164.all; entity vga is port(clk : in std_logic; reset : in std_logic; en : out std_logic; HS : out std_logic; VS : out std_logic; pix_x : out integer; pix_y : out integer); end vga; architecture rtl of vga is component vga_counter is generic(FP : integer; PW : integer; DT : integer; BP : integer); port(clk : in std_logic; reset : in std_logic; valid : out std_logic; sync : out std_logic; pix : out integer); end component; signal hs_en : std_logic := '0'; signal vs_en : std_logic := '0'; signal HS_s : std_logic := '0'; begin HS_counter : vga_counter generic map (16, 96, 640, 48) port map (clk, reset, HS_en, HS_s, pix_x); VS_counter : vga_counter generic map (10, 2, 480, 29) port map (HS_s, reset, VS_en, VS, pix_y); en <= hs_en and vs_en; HS <= HS_s; end rtl;
mit
d604aa98a7657885dc9ecb57452afd08
0.448868
3.756598
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Chip_Designs/archive/IMMORTAL_Chip_2017/With_checkers/NI.vhd
6
25,986
--------------------------------------------------------------------- -- Copyright (C) 2016 Siavoosh Payandeh Azad -- -- Network interface: Its a memory mapped I/O for sending and receiving packets. -- the data that is sent to NI should be of the following form: -- * FIRST write (HEADER INFO): 4bit source(31-28), 4 bit destination(27-14), 8bit packet length(23-16) -- * Body write: 28 bit data(27-0) -- * Last write (Tail): 28 bit data(27-0) -- The NI also collects fault information from its node router and generates diagnostic packets and sends -- them through the actual NoC to SHMU that is assumed to be mapped on Node 0. --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_misc.all; --use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; use IEEE.NUMERIC_STD.all; use ieee.std_logic_textio.all; use std.textio.all; use work.mlite_pack.all; use ieee.std_logic_misc.all; entity NI is generic(current_address : integer := 10; -- the current node's address SHMU_address : integer := 0); -- reserved address for self diagnosis register port(clk : in std_logic; reset : in std_logic; enable : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0); -- Flags used by JNIFR and JNIFW instructions --NI_read_flag : out std_logic; -- One if the N2P FIFO is empty. No read should be performed if one. --NI_write_flag : out std_logic; -- One if P2N FIFO is full. no write should be performed if one. -- interrupt signal: generated every-time a packet is received! Disabled for the time being irq_out : out std_logic; -- signals for sending packets to network credit_in : in std_logic; valid_out: out std_logic; TX: out std_logic_vector(31 downto 0); -- data sent to the NoC -- signals for receiving packets from the network credit_out : out std_logic; valid_in: in std_logic; RX: in std_logic_vector(31 downto 0); -- data received form the NoC -- fault information signals from the router link_faults: in std_logic_vector(4 downto 0); turn_faults: in std_logic_vector(19 downto 0); Rxy_reconf_PE: out std_logic_vector(7 downto 0); Cx_reconf_PE: out std_logic_vector(3 downto 0); -- if you are not going to update Cx you should write all ones! (it will be and will the current Cx bits) Reconfig_command : out std_logic ); end; --entity NI architecture logic of NI is -- all the following signals are for sending data from processor to NoC signal storage, storage_in : std_logic_vector(31 downto 0); signal valid_data_in, valid_data: std_logic; signal old_address: std_logic_vector(31 downto 2); -- Behrad: What is old address ? signal P2N_FIFO_read_pointer, P2N_FIFO_read_pointer_in, P2N_FIFO_write_pointer, P2N_FIFO_write_pointer_in: std_logic_vector(3 downto 0); signal P2N_write_en: std_logic; signal P2N_FIFO_MEM_1, P2N_FIFO_MEM_1_in : std_logic_vector(31 downto 0); signal P2N_FIFO_MEM_2, P2N_FIFO_MEM_2_in : std_logic_vector(31 downto 0); signal P2N_FIFO_MEM_3, P2N_FIFO_MEM_3_in : std_logic_vector(31 downto 0); signal P2N_FIFO_MEM_4, P2N_FIFO_MEM_4_in : std_logic_vector(31 downto 0); signal P2N_full, P2N_empty: std_logic; signal credit_counter_in, credit_counter_out: std_logic_vector(1 downto 0); signal packet_counter_in, packet_counter_out: std_logic_vector(7 downto 0); signal packet_length_counter_in, packet_length_counter_out: std_logic_vector(11 downto 0); signal grant : std_logic; type STATE_TYPE IS (IDLE, HEADER_FLIT, BODY_FLIT, TAIL_FLIT, DIAGNOSIS_HEADER, DIAGNOSIS_BODY, DIAGNOSIS_TAIL, RESET_STATE); signal state, state_in : STATE_TYPE := IDLE; signal FIFO_Data_out : std_logic_vector(31 downto 0); signal flag_register, flag_register_in : std_logic_vector(31 downto 0); -- all the following signals are for sending the packets from NoC to processor signal N2P_FIFO_MEM_1, N2P_FIFO_MEM_1_in : std_logic_vector(31 downto 0); signal N2P_FIFO_MEM_2, N2P_FIFO_MEM_2_in : std_logic_vector(31 downto 0); signal N2P_FIFO_MEM_3, N2P_FIFO_MEM_3_in : std_logic_vector(31 downto 0); signal N2P_FIFO_MEM_4, N2P_FIFO_MEM_4_in : std_logic_vector(31 downto 0); signal N2P_Data_out, data_read_in : std_logic_vector(31 downto 0); signal N2P_FIFO_read_pointer, N2P_FIFO_read_pointer_in: std_logic_vector(3 downto 0); signal N2P_FIFO_write_pointer, N2P_FIFO_write_pointer_in: std_logic_vector(3 downto 0); signal N2P_full, N2P_empty: std_logic; signal N2P_read_en, N2P_read_en_in, N2P_write_en: std_logic; signal counter_register_in, counter_register : std_logic_vector(1 downto 0); signal fault_info, fault_info_in: std_logic_vector(24 downto 0); signal sent_info, fault_info_ready, fault_info_ready_in: std_logic; signal self_diagnosis_reg_out, self_diagnosis_reg_in: std_logic_vector(31 downto 0); signal self_diagnosis_flag, self_diagnosis_flag_in: std_logic; signal Rxy_reconf_PE_in : std_logic_vector(7 downto 0); signal Cx_reconf_PE_in : std_logic_vector(3 downto 0); signal Reconfig_command_in : std_logic; begin process(clk, enable, write_byte_enable) begin if reset = '1' then storage <= (others => '0'); valid_data <= '0'; P2N_FIFO_read_pointer <= "0001"; P2N_FIFO_write_pointer <= "0001"; P2N_FIFO_MEM_1 <= (others=>'0'); P2N_FIFO_MEM_2 <= (others=>'0'); P2N_FIFO_MEM_3 <= (others=>'0'); P2N_FIFO_MEM_4 <= (others=>'0'); credit_counter_out <= "11"; packet_length_counter_out <= "000000000000"; state <= RESET_STATE; packet_counter_out <= "00000000"; ------------------------------------------------ N2P_FIFO_MEM_1 <= (others=>'0'); N2P_FIFO_MEM_2 <= (others=>'0'); N2P_FIFO_MEM_3 <= (others=>'0'); N2P_FIFO_MEM_4 <= (others=>'0'); N2P_FIFO_read_pointer <= "0001"; N2P_FIFO_write_pointer <= "0001"; credit_out <= '0'; counter_register <= (others => '0'); N2P_read_en <= '0'; flag_register <= (others =>'0'); old_address <= (others =>'0'); fault_info <= (others => '0'); fault_info_ready <= '0'; self_diagnosis_reg_out <= (others => '0'); self_diagnosis_flag <= '0'; Reconfig_command <= '0'; Cx_reconf_PE <= (others => '0'); Rxy_reconf_PE <= (others => '0'); elsif clk'event and clk = '1' then Reconfig_command <= Reconfig_command_in; Cx_reconf_PE <= Cx_reconf_PE_in; Rxy_reconf_PE <= Rxy_reconf_PE_in; old_address <= address; P2N_FIFO_write_pointer <= P2N_FIFO_write_pointer_in; P2N_FIFO_read_pointer <= P2N_FIFO_read_pointer_in; credit_counter_out <= credit_counter_in; packet_length_counter_out <= packet_length_counter_in; valid_data <= valid_data_in; if P2N_write_en = '1' then --write into the memory P2N_FIFO_MEM_1 <= P2N_FIFO_MEM_1_in; P2N_FIFO_MEM_2 <= P2N_FIFO_MEM_2_in; P2N_FIFO_MEM_3 <= P2N_FIFO_MEM_3_in; P2N_FIFO_MEM_4 <= P2N_FIFO_MEM_4_in; end if; packet_counter_out <= packet_counter_in; if write_byte_enable /= "0000" then storage <= storage_in; end if; state <= state_in; ------------------------------------------------ if N2P_write_en = '1' then --write into the memory N2P_FIFO_MEM_1 <= N2P_FIFO_MEM_1_in; N2P_FIFO_MEM_2 <= N2P_FIFO_MEM_2_in; N2P_FIFO_MEM_3 <= N2P_FIFO_MEM_3_in; N2P_FIFO_MEM_4 <= N2P_FIFO_MEM_4_in; end if; counter_register <= counter_register_in; N2P_FIFO_write_pointer <= N2P_FIFO_write_pointer_in; N2P_FIFO_read_pointer <= N2P_FIFO_read_pointer_in; credit_out <= '0'; N2P_read_en <= N2P_read_en_in; if N2P_read_en = '1' then credit_out <= '1'; end if; flag_register <= flag_register_in; fault_info <= fault_info_in; fault_info_ready <= fault_info_ready_in; self_diagnosis_reg_out <= self_diagnosis_reg_in; self_diagnosis_flag <= self_diagnosis_flag_in; end if; end process; -- everything bellow this line is pure combinatorial! --------------------------------------------------------------------------------------- --below this is code for communication from PE 2 NoC -- Process used for sending reconfiguration command from PE to router (which is part of NoC) process(enable, address, write_byte_enable) begin -- Some initializations Reconfig_command_in <= '0'; Rxy_reconf_PE_in <= (others =>'0'); Cx_reconf_PE_in <= (others =>'0'); if address = NI_reconfiguration_address and enable = '1' then if write_byte_enable /= "0000" then -- In this case, data_write definitely includes the connectivity bits and routing bits for -- reconfiguring LBDR logic. Rxy_reconf_PE_in <= data_write(7 downto 0); -- Rxy is 8 bits long Cx_reconf_PE_in <= data_write(11 downto 8); -- Cx is 4 bits long Reconfig_command_in <= '1'; end if; end if; end process; process(write_byte_enable, enable, address, storage, data_write, valid_data, P2N_write_en) begin storage_in <= storage ; valid_data_in <= valid_data; -- If PE wants to send data to NoC via NI (data is valid) if enable = '1' and address = NI_reserved_data_address then if write_byte_enable /= "0000" then valid_data_in <= '1'; end if; -- Behrad: So according to Plasma, is write_byte_enable always one-hot ? -- (of course it can also be "0000") if write_byte_enable(0) = '1' then storage_in(7 downto 0) <= data_write(7 downto 0); end if; if write_byte_enable(1) = '1' then storage_in(15 downto 8) <= data_write(15 downto 8); end if; if write_byte_enable(2) = '1' then storage_in(23 downto 16) <= data_write(23 downto 16); end if; if write_byte_enable(3) = '1' then storage_in(31 downto 24) <= data_write(31 downto 24); end if; end if; if P2N_write_en = '1' then valid_data_in <= '0'; end if; end process; -- Process for storing in FIFO (based on the position write pointer is pointing to) -- Write pointer is encoded as one-hot! process(storage, P2N_FIFO_write_pointer, P2N_FIFO_MEM_1, P2N_FIFO_MEM_2, P2N_FIFO_MEM_3, P2N_FIFO_MEM_4)begin case(P2N_FIFO_write_pointer) is when "0001" => P2N_FIFO_MEM_1_in <= storage; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; when "0010" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= storage; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; when "0100" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= storage; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; when "1000" => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= storage; when others => P2N_FIFO_MEM_1_in <= P2N_FIFO_MEM_1; P2N_FIFO_MEM_2_in <= P2N_FIFO_MEM_2; P2N_FIFO_MEM_3_in <= P2N_FIFO_MEM_3; P2N_FIFO_MEM_4_in <= P2N_FIFO_MEM_4; end case ; end process; -- Process for reading from FIFO (based on the position read pointer is pointing to) -- read pointer is encoded as one-hot! process(P2N_FIFO_read_pointer, P2N_FIFO_MEM_1, P2N_FIFO_MEM_2, P2N_FIFO_MEM_3, P2N_FIFO_MEM_4)begin case( P2N_FIFO_read_pointer ) is when "0001" => FIFO_Data_out <= P2N_FIFO_MEM_1; when "0010" => FIFO_Data_out <= P2N_FIFO_MEM_2; when "0100" => FIFO_Data_out <= P2N_FIFO_MEM_3; when "1000" => FIFO_Data_out <= P2N_FIFO_MEM_4; when others => FIFO_Data_out <= P2N_FIFO_MEM_1; end case ; end process; -- Write pointer update process (after each write operation, write pointer is rotated one bit to the left) process(P2N_write_en, P2N_FIFO_write_pointer)begin P2N_FIFO_write_pointer_in <= P2N_FIFO_write_pointer; if P2N_write_en = '1' then P2N_FIFO_write_pointer_in <= P2N_FIFO_write_pointer(2 downto 0) & P2N_FIFO_write_pointer(3); end if; end process; -- Read pointer update process (after each read operation, read pointer is rotated one bit to the left) process(P2N_FIFO_read_pointer, grant, fault_info_ready)begin P2N_FIFO_read_pointer_in <= P2N_FIFO_read_pointer; if grant = '1' and fault_info_ready = '0' then -- Behrad: so grant here works somehow like read_en signal for FIFO ? P2N_FIFO_read_pointer_in <= P2N_FIFO_read_pointer(2 downto 0) & P2N_FIFO_read_pointer(3); end if; end process; process(P2N_full, valid_data) begin P2N_write_en <= '0'; if valid_data = '1' and P2N_full ='0' then P2N_write_en <= '1'; end if; end process; -- Process for updating full and empty signals process(P2N_FIFO_write_pointer, P2N_FIFO_read_pointer) begin P2N_empty <= '0'; P2N_full <= '0'; if P2N_FIFO_read_pointer = P2N_FIFO_write_pointer then P2N_empty <= '1'; end if; if P2N_FIFO_write_pointer = P2N_FIFO_read_pointer(0) & P2N_FIFO_read_pointer(3 downto 1) then P2N_full <= '1'; end if; end process; process (credit_in, credit_counter_out, grant)begin credit_counter_in <= credit_counter_out; if credit_in = '1' and grant = '1' then credit_counter_in <= credit_counter_out; elsif credit_in = '1' and credit_counter_out < 3 then credit_counter_in <= credit_counter_out + 1; elsif grant = '1' and credit_counter_out > 0 then credit_counter_in <= credit_counter_out - 1; end if; end process; -- flag setting and clearing for self diagnosis process(link_faults, turn_faults, self_diagnosis_flag, old_address)begin if (link_faults /= "00000" or turn_faults /= "00000000000000000000") and SHMU_address = current_address then self_diagnosis_flag_in <= '1'; elsif old_address = NI_self_diagnosis_address then self_diagnosis_flag_in <= '0'; else self_diagnosis_flag_in <= self_diagnosis_flag; end if; end process; -- handling fault information! process(link_faults, turn_faults, sent_info, fault_info_ready, fault_info, self_diagnosis_reg_out)begin self_diagnosis_reg_in <= self_diagnosis_reg_out; fault_info_in <= fault_info; fault_info_ready_in <= fault_info_ready; -- If current node is not SHMU, we need to send fault information to SHMU if (link_faults /= "00000" or turn_faults /= "00000000") and SHMU_address /= current_address then fault_info_in <= turn_faults & link_faults; fault_info_ready_in <= '1'; -- If current node is SHMU, we handle it locally elsif (link_faults /= "00000" or turn_faults /= "00000000") and SHMU_address = current_address then self_diagnosis_reg_in <= "0000000" & turn_faults & link_faults; end if; if sent_info = '1' then fault_info_ready_in <= '0'; end if; end process; process(P2N_empty, state, credit_counter_out, packet_length_counter_out, packet_counter_out, FIFO_Data_out, fault_info_ready) begin -- Some initializations sent_info <= '0'; TX <= (others => '0'); grant<= '0'; packet_length_counter_in <= packet_length_counter_out; packet_counter_in <= packet_counter_out; case(state) is when IDLE => if fault_info_ready = '1' then state_in <= DIAGNOSIS_HEADER; elsif P2N_empty = '0' then state_in <= HEADER_FLIT; else state_in <= IDLE; end if; when HEADER_FLIT => state_in <= HEADER_FLIT; if credit_counter_out /= "00" and P2N_empty = '0' then packet_length_counter_in <= ("0000" & FIFO_Data_out(23 downto 16))-1; grant <= '1'; TX <= "001" & "0000" & FIFO_Data_out(23 downto 16) & FIFO_Data_out(31 downto 28) & std_logic_vector(to_unsigned(current_address, 4)) & packet_counter_out & XOR_REDUCE("001" & "0000" & FIFO_Data_out(23 downto 16) & FIFO_Data_out(31 downto 28) & std_logic_vector(to_unsigned(current_address, 4)) & packet_counter_out); -- for synthesis comment out the next line report "Packet generated at " & time'image(now) & " From " & integer'image(current_address) & " to " & integer'image(to_integer(unsigned(FIFO_Data_out(31 downto 28)))) & " with length: "& integer'image(to_integer(unsigned(FIFO_Data_out(23 downto 16)))) & " id: " & integer'image(to_integer(unsigned(packet_counter_out))); state_in <= BODY_FLIT; end if; when BODY_FLIT => state_in <= BODY_FLIT; if credit_counter_out /= "00" and P2N_empty = '0'then grant <= '1'; TX <= "010" & FIFO_Data_out(27 downto 0) & XOR_REDUCE("010" & FIFO_Data_out(27 downto 0)); packet_length_counter_in <= packet_length_counter_out - 1; if packet_length_counter_out > 2 then state_in <= BODY_FLIT; else state_in <= TAIL_FLIT; end if; end if; when TAIL_FLIT => state_in <= TAIL_FLIT; if credit_counter_out /= "00" and P2N_empty = '0' then grant <= '1'; packet_length_counter_in <= packet_length_counter_out - 1; TX <= "100" & FIFO_Data_out(27 downto 0) & XOR_REDUCE("100" & FIFO_Data_out(27 downto 0)); packet_counter_in <= packet_counter_out +1; state_in <= IDLE; end if; -- SHMU stuff ---------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------ when DIAGNOSIS_HEADER => state_in <= DIAGNOSIS_HEADER; if credit_counter_out /= "00" then grant <= '1'; TX <= "001" & "000000000011" & "0000" & std_logic_vector(to_unsigned(current_address, 4)) & packet_counter_out & XOR_REDUCE("001" & "000000000011" & "0000" & std_logic_vector(to_unsigned(current_address, 4)) & packet_counter_out); -- for synthesis comment out the next 2 line report "Packet generated at " & time'image(now) & " From " & integer'image(current_address) & " to " & integer'image(0) & " with length: "& integer'image(3) & " id: " & integer'image(to_integer(unsigned(packet_counter_out)))& " Diagnostic"; --report "Diagnostic packet generated at " & time'image(now) & " From " & integer'image(current_address) & " to " & integer'image(0) & " with length: "& integer'image(3) & " id: " & integer'image(to_integer(unsigned(packet_counter_out))); state_in <= DIAGNOSIS_BODY; end if; when DIAGNOSIS_BODY => state_in <= DIAGNOSIS_BODY; if credit_counter_out /= "00" then grant <= '1'; --FD (Fault Diagnosis) : 01000110 01000100 -- fault info is 13 bits TX <= "010" & "0100011001000100" & fault_info(11 downto 0) & XOR_REDUCE("010" & "0100011001000100" & fault_info(11 downto 0)); state_in <= DIAGNOSIS_TAIL; end if; when DIAGNOSIS_TAIL => state_in <= DIAGNOSIS_TAIL; if credit_counter_out /= "00" then grant <= '1'; TX <= "100" & fault_info(24 downto 12) & "000000000000000" & XOR_REDUCE("100" & fault_info(24 downto 12) & "000000000000000"); state_in <= IDLE; sent_info <= '1'; packet_counter_in <= packet_counter_out +1; end if; when RESET_STATE => state_in <= IDLE; end case ; end procesS; valid_out <= grant; ---------------------------------------------------------------------------------------- --below this is code for communication from NoC 2 PE process(RX, N2P_FIFO_write_pointer, N2P_FIFO_MEM_1, N2P_FIFO_MEM_2, N2P_FIFO_MEM_3, N2P_FIFO_MEM_4)begin case( N2P_FIFO_write_pointer ) is when "0001" => N2P_FIFO_MEM_1_in <= RX; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; when "0010" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= RX; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; when "0100" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= RX; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; when "1000" => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= RX; when others => N2P_FIFO_MEM_1_in <= N2P_FIFO_MEM_1; N2P_FIFO_MEM_2_in <= N2P_FIFO_MEM_2; N2P_FIFO_MEM_3_in <= N2P_FIFO_MEM_3; N2P_FIFO_MEM_4_in <= N2P_FIFO_MEM_4; end case ; end process; process(N2P_FIFO_read_pointer, N2P_FIFO_MEM_1, N2P_FIFO_MEM_2, N2P_FIFO_MEM_3, N2P_FIFO_MEM_4)begin case( N2P_FIFO_read_pointer ) is when "0001" => N2P_Data_out <= N2P_FIFO_MEM_1; when "0010" => N2P_Data_out <= N2P_FIFO_MEM_2; when "0100" => N2P_Data_out <= N2P_FIFO_MEM_3; when "1000" => N2P_Data_out <= N2P_FIFO_MEM_4; when others => N2P_Data_out <= N2P_FIFO_MEM_1; end case ; end process; process(address, write_byte_enable, N2P_empty)begin N2P_read_en_in <= '0'; if address = NI_reserved_data_address and write_byte_enable = "0000" and N2P_empty = '0' then N2P_read_en_in <= '1'; end if; end process; process(N2P_write_en, N2P_FIFO_write_pointer)begin N2P_FIFO_write_pointer_in <= N2P_FIFO_write_pointer; if N2P_write_en = '1'then N2P_FIFO_write_pointer_in <= N2P_FIFO_write_pointer(2 downto 0)&N2P_FIFO_write_pointer(3); end if; end process; process(N2P_read_en, N2P_empty, N2P_FIFO_read_pointer)begin N2P_FIFO_read_pointer_in <= N2P_FIFO_read_pointer; if (N2P_read_en = '1' and N2P_empty = '0') then N2P_FIFO_read_pointer_in <= N2P_FIFO_read_pointer(2 downto 0)&N2P_FIFO_read_pointer(3); end if; end process; process(N2P_full, valid_in) begin N2P_write_en <= '0'; if (valid_in = '1' and N2P_full ='0') then N2P_write_en <= '1'; end if; end process; process(N2P_FIFO_write_pointer, N2P_FIFO_read_pointer) begin N2P_empty <= '0'; N2P_full <= '0'; if N2P_FIFO_read_pointer = N2P_FIFO_write_pointer then N2P_empty <= '1'; end if; if N2P_FIFO_write_pointer = N2P_FIFO_read_pointer(0)&N2P_FIFO_read_pointer(3 downto 1) then N2P_full <= '1'; end if; end process; process(N2P_read_en, N2P_Data_out, old_address, flag_register) begin if old_address = NI_reserved_data_address and N2P_read_en = '1' then data_read <= N2P_Data_out; elsif old_address = NI_flag_address then data_read <= flag_register; elsif old_address = NI_counter_address then data_read <= "000000000000000000000000000000" & counter_register; elsif old_address = NI_self_diagnosis_address then data_read <= self_diagnosis_reg_out; else data_read <= (others => 'U'); end if; end process; process(N2P_write_en, N2P_read_en, RX, N2P_Data_out,counter_register) -- for synthesis comment the following 4 lines variable destination_node : std_logic_vector(3 downto 0); variable source_node : std_logic_vector(3 downto 0); variable id : std_logic_vector(7 downto 0); variable length : std_logic_vector(11 downto 0); -- end of unnecessary block begin counter_register_in <= counter_register; if N2P_write_en = '1' and RX(31 downto 29) = "001" and N2P_read_en = '1' and N2P_Data_out(31 downto 29) = "100" then counter_register_in <= counter_register; elsif N2P_write_en = '1' and RX(31 downto 29) = "001" then counter_register_in <= counter_register +1; elsif N2P_read_en = '1' and N2P_Data_out(31 downto 29) = "100" then counter_register_in <= counter_register -1; end if; -- for synthesis comment the following 9 lines if N2P_read_en = '1' and N2P_Data_out(31 downto 29) = "001" then source_node := N2P_Data_out(16 downto 13); destination_node := N2P_Data_out(12 downto 9); id := N2P_Data_out(8 downto 1); length := N2P_Data_out(28 downto 17); end if; if N2P_read_en = '1' and N2P_Data_out(31 downto 29) = "100" then report "Packet received at " & time'image(now) & " From: " & integer'image(to_integer(unsigned(destination_node))) & " to: " & integer'image(to_integer(unsigned(source_node))) & " length: "& integer'image(to_integer(unsigned(length))) & " id: "& integer'image(to_integer(unsigned(id))); end if; -- end of unnecessary block end process; flag_register_in <= N2P_empty & P2N_full & self_diagnosis_flag & "00000000000000000000000000000"; --NI_read_flag <= N2P_empty; --NI_write_flag <= P2N_full; irq_out <= '0'; end; --architecture logic
gpl-3.0
196e983fc82044839b551cdf68655f68
0.593281
3.134242
false
false
false
false
siavooshpayandehazad/NoC_Router
RTL/Processor_NI/memory_xilinx.vhd
3
2,722
library ieee; use ieee.std_logic_1164.all; use work.mlite_pack.all; use ieee.std_logic_unsigned.all; use IEEE.numeric_std.all; Library UNISIM; use UNISIM.vcomponents.all; Library UNIMACRO; use UNIMACRO.vcomponents.all; entity memory is generic(address_width : natural := 16); port(clk : in std_logic; address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); pause : in std_logic; byte_we : in std_logic_vector(3 downto 0); data_read : out std_logic_vector(31 downto 0) ); end; --entity memory architecture rtl of memory is signal data : std_logic_vector(31 downto 0); signal index : integer := 0; type storage_array is array(natural range 0 to (2 ** address_width) / 4 - 1) of std_logic_vector(31 downto 0); signal storage : storage_array; begin BRAM_SINGLE_MACRO_inst : BRAM_SINGLE_MACRO generic map( BRAM_SIZE => "36Kb", -- Target BRAM, "18Kb" or "36Kb" DEVICE => "7SERIES", -- Target Device: "VIRTEX5", "7SERIES", "VIRTEX6, "SPARTAN6" DO_REG => 0, -- Optional output register (0 or 1) INIT => X"000000000000000000", -- Initial values on output port INIT_FILE => "NONE", WRITE_WIDTH => 32, -- Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") READ_WIDTH => 32, -- Valid values are 1-72 (37-72 only valid when BRAM_SIZE="36Kb") SRVAL => X"000000000000000000", -- Set/Reset value for port output WRITE_MODE => "READ_FIRST" -- "WRITE_FIRST", "READ_FIRST" or "NO_CHANGE" ) port map( DO => data, -- Output data, width defined by READ_WIDTH parameter ADDR => STD_logic_vector(to_unsigned(index, 10)), -- Input address, width defined by read/write port depth CLK => CLK, -- 1-bit input clock DI => data_write, -- Input data port, width defined by WRITE_WIDTH parameter EN => '1', -- 1-bit input RAM enable REGCE => '0', -- 1-bit input output register enable RST => '0', -- 1-bit input reset WE => byte_we -- Input write enable, width defined by write port depth ); dram_proc : process(clk, address, byte_we, pause) begin if rising_edge(clk) then if pause = '0' then data_read <= data; end if; end if; end process; end; --architecture logic
gpl-3.0
74dcdbaffdcdee427ea0a4b92a450ebc
0.541146
3.933526
false
false
false
false
domagalski/pocketcorr
fpga/snap/pfb_fir_2048ch_2i_core.vhd
1
2,704
-- Generated from Simulink block library IEEE; use IEEE.std_logic_1164.all; library xil_defaultlib; use xil_defaultlib.conv_pkg.all; entity pfb_fir_2048ch_2i_core_ip is port ( pol0_in0 : in std_logic_vector( 8-1 downto 0 ); pol1_in0 : in std_logic_vector( 8-1 downto 0 ); sync : in std_logic_vector( 32-1 downto 0 ); pol0_in1 : in std_logic_vector( 8-1 downto 0 ); pol1_in1 : in std_logic_vector( 8-1 downto 0 ); pol0_out0 : out std_logic_vector( 18-1 downto 0 ); pol1_out0 : out std_logic_vector( 18-1 downto 0 ); sync_out : out std_logic_vector( 1-1 downto 0 ); pol0_out1 : out std_logic_vector( 18-1 downto 0 ); pol1_out1 : out std_logic_vector( 18-1 downto 0 ); clk : in std_logic ); end pfb_fir_2048ch_2i_core_ip; -- Generated from Simulink block library IEEE; use IEEE.std_logic_1164.all; library xil_defaultlib; use xil_defaultlib.conv_pkg.all; entity pfb_fir_2048ch_2i_core_ip_struct is port ( pol0_in0 : in std_logic_vector( 8-1 downto 0 ); pol1_in0 : in std_logic_vector( 8-1 downto 0 ); sync : in std_logic_vector( 32-1 downto 0 ); pol0_in1 : in std_logic_vector( 8-1 downto 0 ); pol1_in1 : in std_logic_vector( 8-1 downto 0 ); clk_1 : in std_logic; ce_1 : in std_logic; pol0_out0 : out std_logic_vector( 18-1 downto 0 ); pol1_out0 : out std_logic_vector( 18-1 downto 0 ); sync_out : out std_logic_vector( 1-1 downto 0 ); pol0_out1 : out std_logic_vector( 18-1 downto 0 ); pol1_out1 : out std_logic_vector( 18-1 downto 0 ) ); end pfb_fir_2048ch_2i_core_ip_struct; architecture structural of pfb_fir_2048ch_2i_core_ip_struct is component pfb_fir_2048ch_2i_core_ip port ( pol0_in0 : in std_logic_vector( 8-1 downto 0 ); pol1_in0 : in std_logic_vector( 8-1 downto 0 ); sync : in std_logic_vector( 32-1 downto 0 ); pol0_in1 : in std_logic_vector( 8-1 downto 0 ); pol1_in1 : in std_logic_vector( 8-1 downto 0 ); pol0_out0 : out std_logic_vector( 18-1 downto 0 ); pol1_out0 : out std_logic_vector( 18-1 downto 0 ); sync_out : out std_logic_vector( 1-1 downto 0 ); pol0_out1 : out std_logic_vector( 18-1 downto 0 ); pol1_out1 : out std_logic_vector( 18-1 downto 0 ); clk : in std_logic ); end component; begin pfb_fir_2048ch_2i_core_ip_inst : pfb_fir_2048ch_2i_core_ip port map ( pol0_in0 => pol0_in0, pol1_in0 => pol1_in0, sync => sync, pol0_in1 => pol0_in1, pol1_in1 => pol1_in1, clk => clk_1, pol0_out0 => pol0_out0, pol1_out0 => pol1_out0, sync_out => sync_out, pol0_out1 => pol0_out1, pol1_out1 => pol1_out1 ); end structural;
gpl-3.0
e96213af06d40fe9a7409909121e407d
0.626109
2.728557
false
false
false
false