content
stringlengths
1
1.04M
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: ch_05_ch_05_02.vhd,v 1.1.1.1 2001-08-22 18:20:47 paw Exp $ -- $Revision: 1.1.1.1 $ -- -- --------------------------------------------------------------------- -- not in book use work.tb_05_13.all; -- end not in book entity adder is port ( a, b : in word; sum : out word ); end entity adder;
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: ch_05_ch_05_02.vhd,v 1.1.1.1 2001-08-22 18:20:47 paw Exp $ -- $Revision: 1.1.1.1 $ -- -- --------------------------------------------------------------------- -- not in book use work.tb_05_13.all; -- end not in book entity adder is port ( a, b : in word; sum : out word ); end entity adder;
-- -------------------------------------------------------------------- -- -- Copyright © 2008 by IEEE. All rights reserved. -- -- This source file is an essential part of IEEE Std 1076-2008, -- IEEE Standard VHDL Language Reference Manual. This source file may not be -- copied, sold, or included with software that is sold without written -- permission from the IEEE Standards Department. This source file may be -- copied for individual use between licensed users. This source file is -- provided on an AS IS basis. The IEEE disclaims ANY WARRANTY EXPRESS OR -- IMPLIED INCLUDING ANY WARRANTY OF MERCHANTABILITY AND FITNESS FOR USE -- FOR A PARTICULAR PURPOSE. The user of the source file shall indemnify -- and hold IEEE harmless from any damages or liability arising out of the -- use thereof. -- -- Title : Standard VHDL Synthesis Packages -- : (NUMERIC_STD package declaration) -- : -- Library : This package shall be compiled into a library -- : symbolically named IEEE. -- : -- Developers: IEEE DASC Synthesis Working Group, -- : Accellera VHDL-TC, and IEEE P1076 Working Group -- : -- Purpose : This package defines numeric types and arithmetic functions -- : for use with synthesis tools. Two numeric types are defined: -- : -- > UNRESOLVED_UNSIGNED: represents an UNSIGNED number -- : in vector form -- : -- > UNRESOLVED_SIGNED: represents a SIGNED number -- : in vector form -- : The base element type is type STD_ULOGIC. -- : Aliases U_UNSIGNED and U_SIGNED are defined for the types -- : UNRESOLVED_UNSIGNED and UNRESOLVED_SIGNED, respectively. -- : Two numeric subtypes are defined: -- : -- > UNSIGNED: represents UNSIGNED number in vector form -- : -- > SIGNED: represents a SIGNED number in vector form -- : The element subtypes are the same subtype as STD_LOGIC. -- : The leftmost bit is treated as the most significant bit. -- : Signed vectors are represented in two's complement form. -- : This package contains overloaded arithmetic operators on -- : the SIGNED and UNSIGNED types. The package also contains -- : useful type conversions functions, clock detection -- : functions, and other utility functions. -- : -- : If any argument to a function is a null array, a null array -- : is returned (exceptions, if any, are noted individually). -- -- Note : This package may be modified to include additional data -- : required by tools, but it must in no way change the -- : external interfaces or simulation behavior of the -- : description. It is permissible to add comments and/or -- : attributes to the package declarations, but not to change -- : or delete any original lines of the package declaration. -- : The package body may be changed only in accordance with -- : the terms of Clause 16 of this standard. -- : -- -------------------------------------------------------------------- -- $Revision: 1220 $ -- $Date: 2008-04-10 17:16:09 +0930 (Thu, 10 Apr 2008) $ -- -------------------------------------------------------------------- use STD.TEXTIO.all; library IEEE; use IEEE.STD_LOGIC_1164.all; package NUMERIC_STD is constant CopyRightNotice : STRING := "Copyright © 2008 IEEE. All rights reserved."; --============================================================================ -- Numeric Array Type Definitions --============================================================================ type UNRESOLVED_UNSIGNED is array (NATURAL range <>) of STD_ULOGIC; type UNRESOLVED_SIGNED is array (NATURAL range <>) of STD_ULOGIC; -- FIXME: was alias subtype U_UNSIGNED is UNRESOLVED_UNSIGNED; subtype U_SIGNED is UNRESOLVED_SIGNED; subtype UNSIGNED is (resolved) UNRESOLVED_UNSIGNED; subtype SIGNED is (resolved) UNRESOLVED_SIGNED; --============================================================================ -- Arithmetic Operators: --=========================================================================== -- Id: A.1 function "abs" (ARG : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Returns the absolute value of an UNRESOLVED_SIGNED vector ARG. -- Id: A.2 function "-" (ARG : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Returns the value of the unary minus operation on a -- UNRESOLVED_SIGNED vector ARG. --============================================================================ -- Id: A.3 function "+" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Adds two UNRESOLVED_UNSIGNED vectors that may be of different lengths. -- Id: A.3R function "+"(L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.3 where R is a one bit UNRESOLVED_UNSIGNED -- Id: A.3L function "+"(L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.3 where L is a one bit UNRESOLVED_UNSIGNED -- Id: A.4 function "+" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Adds two UNRESOLVED_SIGNED vectors that may be of different lengths. -- Id: A.4R function "+"(L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.4 where R is bit 0 of a non-negative. -- Id: A.4L function "+"(L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.4 where L is bit 0 of a non-negative. -- Id: A.5 function "+" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Adds an UNRESOLVED_UNSIGNED vector, L, with a nonnegative INTEGER, R. -- Id: A.6 function "+" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Adds a nonnegative INTEGER, L, with an UNRESOLVED_UNSIGNED vector, R. -- Id: A.7 function "+" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Adds an INTEGER, L(may be positive or negative), to an UNRESOLVED_SIGNED -- vector, R. -- Id: A.8 function "+" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Adds an UNRESOLVED_SIGNED vector, L, to an INTEGER, R. --============================================================================ -- Id: A.9 function "-" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Subtracts two UNRESOLVED_UNSIGNED vectors that may be of different lengths. -- Id: A.9R function "-"(L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.9 where R is a one bit UNRESOLVED_UNSIGNED -- Id: A.9L function "-"(L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.9 where L is a one bit UNRESOLVED_UNSIGNED -- Id: A.10 function "-" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Subtracts an UNRESOLVED_SIGNED vector, R, from another UNRESOLVED_SIGNED vector, L, -- that may possibly be of different lengths. -- Id: A.10R function "-"(L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.10 where R is bit 0 of a non-negative. -- Id: A.10L function "-"(L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.10 where R is bit 0 of a non-negative. -- Id: A.11 function "-" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Subtracts a nonnegative INTEGER, R, from an UNRESOLVED_UNSIGNED vector, L. -- Id: A.12 function "-" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Subtracts an UNRESOLVED_UNSIGNED vector, R, from a nonnegative INTEGER, L. -- Id: A.13 function "-" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Subtracts an INTEGER, R, from an UNRESOLVED_SIGNED vector, L. -- Id: A.14 function "-" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Subtracts an UNRESOLVED_SIGNED vector, R, from an INTEGER, L. --============================================================================ -- Id: A.15 function "*" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((L'LENGTH+R'LENGTH-1) downto 0) -- Result: Performs the multiplication operation on two UNRESOLVED_UNSIGNED vectors -- that may possibly be of different lengths. -- Id: A.16 function "*" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((L'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies two UNRESOLVED_SIGNED vectors that may possibly be of -- different lengths. -- Id: A.17 function "*" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((L'LENGTH+L'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_UNSIGNED vector, L, with a nonnegative -- INTEGER, R. R is converted to an UNRESOLVED_UNSIGNED vector of -- SIZE L'LENGTH before multiplication. -- Id: A.18 function "*" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((R'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_UNSIGNED vector, R, with a nonnegative -- INTEGER, L. L is converted to an UNRESOLVED_UNSIGNED vector of -- SIZE R'LENGTH before multiplication. -- Id: A.19 function "*" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((L'LENGTH+L'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_SIGNED vector, L, with an INTEGER, R. R is -- converted to an UNRESOLVED_SIGNED vector of SIZE L'LENGTH before -- multiplication. -- Id: A.20 function "*" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((R'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_SIGNED vector, R, with an INTEGER, L. L is -- converted to an UNRESOLVED_SIGNED vector of SIZE R'LENGTH before -- multiplication. --============================================================================ -- -- NOTE: If second argument is zero for "/" operator, a severity level -- of ERROR is issued. -- Id: A.21 function "/" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_UNSIGNED vector, L, by another UNRESOLVED_UNSIGNED vector, R. -- Id: A.22 function "/" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_SIGNED vector, L, by another UNRESOLVED_SIGNED vector, R. -- Id: A.23 function "/" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_UNSIGNED vector, L, by a nonnegative INTEGER, R. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.24 function "/" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Divides a nonnegative INTEGER, L, by an UNRESOLVED_UNSIGNED vector, R. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.25 function "/" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_SIGNED vector, L, by an INTEGER, R. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.26 function "/" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Divides an INTEGER, L, by an UNRESOLVED_SIGNED vector, R. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- -- NOTE: If second argument is zero for "rem" operator, a severity level -- of ERROR is issued. -- Id: A.27 function "rem" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L and R are UNRESOLVED_UNSIGNED vectors. -- Id: A.28 function "rem" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L and R are UNRESOLVED_SIGNED vectors. -- Id: A.29 function "rem" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L is an UNRESOLVED_UNSIGNED vector and R is a -- nonnegative INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.30 function "rem" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where R is an UNRESOLVED_UNSIGNED vector and L is a -- nonnegative INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.31 function "rem" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L is UNRESOLVED_SIGNED vector and R is an INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.32 function "rem" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where R is UNRESOLVED_SIGNED vector and L is an INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- -- NOTE: If second argument is zero for "mod" operator, a severity level -- of ERROR is issued. -- Id: A.33 function "mod" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L and R are UNRESOLVED_UNSIGNED vectors. -- Id: A.34 function "mod" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L and R are UNRESOLVED_SIGNED vectors. -- Id: A.35 function "mod" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an UNRESOLVED_UNSIGNED vector and R -- is a nonnegative INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.36 function "mod" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where R is an UNRESOLVED_UNSIGNED vector and L -- is a nonnegative INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.37 function "mod" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.38 function "mod" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- Id: A.39 function find_leftmost (ARG : UNRESOLVED_UNSIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.40 function find_leftmost (ARG : UNRESOLVED_SIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.41 function find_rightmost (ARG : UNRESOLVED_UNSIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.42 function find_rightmost (ARG : UNRESOLVED_SIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. --============================================================================ -- Comparison Operators --============================================================================ -- Id: C.1 function ">" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.2 function ">" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.3 function ">" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.4 function ">" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is a INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.5 function ">" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.6 function ">" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is an UNRESOLVED_SIGNED vector and -- R is a INTEGER. --============================================================================ -- Id: C.7 function "<" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.8 function "<" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.9 function "<" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.10 function "<" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.11 function "<" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.12 function "<" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.13 function "<=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.14 function "<=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.15 function "<=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.16 function "<=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.17 function "<=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.18 function "<=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.19 function ">=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.20 function ">=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.21 function ">=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.22 function ">=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.23 function ">=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.24 function ">=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.25 function "=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.26 function "=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.27 function "=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.28 function "=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.29 function "=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.30 function "=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.31 function "/=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.32 function "/=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.33 function "/=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.34 function "/=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.35 function "/=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.36 function "/=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.37 function MINIMUM (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of two UNRESOLVED_UNSIGNED vectors that may be -- of different lengths. -- Id: C.38 function MINIMUM (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of two UNRESOLVED_SIGNED vectors that may be -- of different lengths. -- Id: C.39 function MINIMUM (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of a nonnegative INTEGER, L, and -- an UNRESOLVED_UNSIGNED vector, R. -- Id: C.40 function MINIMUM (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of an INTEGER, L, and an UNRESOLVED_SIGNED -- vector, R. -- Id: C.41 function MINIMUM (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of an UNRESOLVED_UNSIGNED vector, L, and -- a nonnegative INTEGER, R. -- Id: C.42 function MINIMUM (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of an UNRESOLVED_SIGNED vector, L, and -- an INTEGER, R. --============================================================================ -- Id: C.43 function MAXIMUM (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of two UNRESOLVED_UNSIGNED vectors that may be -- of different lengths. -- Id: C.44 function MAXIMUM (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of two UNRESOLVED_SIGNED vectors that may be -- of different lengths. -- Id: C.45 function MAXIMUM (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of a nonnegative INTEGER, L, and -- an UNRESOLVED_UNSIGNED vector, R. -- Id: C.46 function MAXIMUM (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of an INTEGER, L, and an UNRESOLVED_SIGNED -- vector, R. -- Id: C.47 function MAXIMUM (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of an UNRESOLVED_UNSIGNED vector, L, and -- a nonnegative INTEGER, R. -- Id: C.48 function MAXIMUM (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of an UNRESOLVED_SIGNED vector, L, and -- an INTEGER, R. --============================================================================ -- Id: C.49 function "?>" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.50 function "?>" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.51 function "?>" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.52 function "?>" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is a INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.53 function "?>" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.54 function "?>" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is an UNRESOLVED_SIGNED vector and -- R is a INTEGER. --============================================================================ -- Id: C.55 function "?<" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.56 function "?<" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.57 function "?<" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.58 function "?<" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.59 function "?<" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.60 function "?<" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.61 function "?<=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.62 function "?<=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.63 function "?<=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.64 function "?<=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.65 function "?<=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.66 function "?<=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.67 function "?>=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.68 function "?>=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.69 function "?>=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.70 function "?>=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.71 function "?>=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.72 function "?>=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.73 function "?=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.74 function "?=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.75 function "?=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.76 function "?=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.77 function "?=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.78 function "?=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.79 function "?/=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.80 function "?/=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.81 function "?/=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.82 function "?/=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.83 function "?/=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.84 function "?/=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Shift and Rotate Functions --============================================================================ -- Id: S.1 function SHIFT_LEFT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-left on an UNRESOLVED_UNSIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT leftmost elements are lost. -- Id: S.2 function SHIFT_RIGHT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-right on an UNRESOLVED_UNSIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT rightmost elements are lost. -- Id: S.3 function SHIFT_LEFT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-left on an UNRESOLVED_SIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT leftmost elements are lost. -- Id: S.4 function SHIFT_RIGHT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-right on an UNRESOLVED_SIGNED vector COUNT times. -- The vacated positions are filled with the leftmost -- element, ARG'LEFT. The COUNT rightmost elements are lost. --============================================================================ -- Id: S.5 function ROTATE_LEFT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a rotate-left of an UNRESOLVED_UNSIGNED vector COUNT times. -- Id: S.6 function ROTATE_RIGHT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a rotate-right of an UNRESOLVED_UNSIGNED vector COUNT times. -- Id: S.7 function ROTATE_LEFT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a logical rotate-left of an UNRESOLVED_SIGNED -- vector COUNT times. -- Id: S.8 function ROTATE_RIGHT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a logical rotate-right of an UNRESOLVED_SIGNED -- vector COUNT times. --============================================================================ --============================================================================ ------------------------------------------------------------------------------ -- Note: Function S.9 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.9 function "sll" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.10 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.10 function "sll" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.11 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE StdL 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.11 function "srl" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.12 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.12 function "srl" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: UNRESOLVED_SIGNED(SHIFT_RIGHT(UNRESOLVED_UNSIGNED(ARG), COUNT)) ------------------------------------------------------------------------------ -- Note: Function S.13 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.13 function "rol" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.14 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.14 function "rol" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.15 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.15 function "ror" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.16 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.16 function "ror" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.17 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.17 function "sla" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.18 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.18 function "sla" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.19 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.19 function "sra" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.20 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.20 function "sra" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) --============================================================================ -- RESIZE Functions --============================================================================ -- Id: R.1 function RESIZE (ARG : UNRESOLVED_SIGNED; NEW_SIZE : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(NEW_SIZE-1 downto 0) -- Result: Resizes the UNRESOLVED_SIGNED vector ARG to the specified size. -- To create a larger vector, the new [leftmost] bit positions -- are filled with the sign bit (ARG'LEFT). When truncating, -- the sign bit is retained along with the rightmost part. -- Id: R.2 function RESIZE (ARG : UNRESOLVED_UNSIGNED; NEW_SIZE : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(NEW_SIZE-1 downto 0) -- Result: Resizes the UNRESOLVED_SIGNED vector ARG to the specified size. -- To create a larger vector, the new [leftmost] bit positions -- are filled with '0'. When truncating, the leftmost bits -- are dropped. function RESIZE (ARG, SIZE_RES : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED (SIZE_RES'length-1 downto 0) function RESIZE (ARG, SIZE_RES : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED (SIZE_RES'length-1 downto 0) --============================================================================ -- Conversion Functions --============================================================================ -- Id: D.1 function TO_INTEGER (ARG : UNRESOLVED_UNSIGNED) return NATURAL; -- Result subtype: NATURAL. Value cannot be negative since parameter is an -- UNRESOLVED_UNSIGNED vector. -- Result: Converts the UNRESOLVED_UNSIGNED vector to an INTEGER. -- Id: D.2 function TO_INTEGER (ARG : UNRESOLVED_SIGNED) return INTEGER; -- Result subtype: INTEGER -- Result: Converts an UNRESOLVED_SIGNED vector to an INTEGER. -- Id: D.3 function TO_UNSIGNED (ARG, SIZE : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(SIZE-1 downto 0) -- Result: Converts a nonnegative INTEGER to an UNRESOLVED_UNSIGNED vector with -- the specified SIZE. -- Id: D.4 function TO_SIGNED (ARG : INTEGER; SIZE : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(SIZE-1 downto 0) -- Result: Converts an INTEGER to a UNRESOLVED_SIGNED vector of the specified SIZE. function TO_UNSIGNED (ARG : NATURAL; SIZE_RES : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(SIZE_RES'length-1 downto 0) function TO_SIGNED (ARG : INTEGER; SIZE_RES : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(SIZE_RES'length-1 downto 0) --============================================================================ -- Logical Operators --============================================================================ -- Id: L.1 function "not" (L : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Termwise inversion -- Id: L.2 function "and" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector AND operation -- Id: L.3 function "or" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector OR operation -- Id: L.4 function "nand" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector NAND operation -- Id: L.5 function "nor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector NOR operation -- Id: L.6 function "xor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector XOR operation -- --------------------------------------------------------------------------- -- Note: Function L.7 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. -- --------------------------------------------------------------------------- -- Id: L.7 function "xnor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation -- Id: L.8 function "not" (L : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Termwise inversion -- Id: L.9 function "and" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector AND operation -- Id: L.10 function "or" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector OR operation -- Id: L.11 function "nand" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector NAND operation -- Id: L.12 function "nor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector NOR operation -- Id: L.13 function "xor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XOR operation -- --------------------------------------------------------------------------- -- Note: Function L.14 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. -- --------------------------------------------------------------------------- -- Id: L.14 function "xnor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation -- Id: L.15 function "and" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation -- Id: L.16 function "and" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation -- Id: L.17 function "or" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation -- Id: L.18 function "or" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation -- Id: L.19 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation -- Id: L.20 function "nand" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation -- Id: L.21 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation -- Id: L.22 function "nor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation -- Id: L.23 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation -- Id: L.24 function "xor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation ------------------------------------------------------------------------------ -- Note: Function L.25 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.25 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.26 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.26 function "xnor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation -- Id: L.27 function "and" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation -- Id: L.28 function "and" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation -- Id: L.29 function "or" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation -- Id: L.30 function "or" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation -- Id: L.31 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation -- Id: L.32 function "nand" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation -- Id: L.33 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation -- Id: L.34 function "nor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation -- Id: L.35 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation -- Id: L.36 function "xor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation ------------------------------------------------------------------------------ -- Note: Function L.37 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.37 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.38 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.38 function "xnor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.39 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.39 function "and" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.40 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.40 function "nand" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.41 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.41 function "or" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.42 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.42 function "nor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.43 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.43 function "xor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.44 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.44 function "xnor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.45 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.45 function "and" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.46 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.46 function "nand" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.47 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.47 function "or" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.48 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.48 function "nor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.49 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.49 function "xor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.50 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.50 function "xnor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. --============================================================================ -- Match Functions --============================================================================ -- Id: M.1 function STD_MATCH (L, R : STD_ULOGIC) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.2 function STD_MATCH (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.3 function STD_MATCH (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.5 function STD_MATCH (L, R : STD_ULOGIC_VECTOR) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent --============================================================================ -- Translation Functions --============================================================================ -- Id: T.1 function TO_01 (S : UNRESOLVED_UNSIGNED; XMAP : STD_ULOGIC := '0') return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', and 'L' is translated -- to '0'. If a value other than '0'|'1'|'H'|'L' is found, -- the array is set to (others => XMAP), and a warning is -- issued. -- Id: T.2 function TO_01 (S : UNRESOLVED_SIGNED; XMAP : STD_ULOGIC := '0') return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', and 'L' is translated -- to '0'. If a value other than '0'|'1'|'H'|'L' is found, -- the array is set to (others => XMAP), and a warning is -- issued. -- Id: T.3 function TO_X01 (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.4 function TO_X01 (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.5 function TO_X01Z (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L'|'Z' are translated to 'X'. -- Id: T.6 function TO_X01Z (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L'|'Z' are translated to 'X'. -- Id: T.7 function TO_UX01 (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than 'U'|'0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.8 function TO_UX01 (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than 'U'|'0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.9 function IS_X (S : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: TRUE if S contains a 'U'|'X'|'Z'|'W'|'-' value, FALSE otherwise. -- Id: T.10 function IS_X (S : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: TRUE if S contains a 'U'|'X'|'Z'|'W'|'-' value, FALSE otherwise. --============================================================================ -- string conversion and write operations --============================================================================ -- the following operations are predefined -- function to_string (value : UNRESOLVED_UNSIGNED) return STRING; -- function to_string (value : UNRESOLVED_SIGNED) return STRING; -- explicitly defined operations alias to_bstring is to_string [UNRESOLVED_UNSIGNED return STRING]; alias to_bstring is to_string [UNRESOLVED_SIGNED return STRING]; alias to_binary_string is to_string [UNRESOLVED_UNSIGNED return STRING]; alias to_binary_string is to_string [UNRESOLVED_SIGNED return STRING]; function to_ostring (value : UNRESOLVED_UNSIGNED) return STRING; function to_ostring (value : UNRESOLVED_SIGNED) return STRING; alias to_octal_string is to_ostring [UNRESOLVED_UNSIGNED return STRING]; alias to_octal_string is to_ostring [UNRESOLVED_SIGNED return STRING]; function to_hstring (value : UNRESOLVED_UNSIGNED) return STRING; function to_hstring (value : UNRESOLVED_SIGNED) return STRING; alias to_hex_string is to_hstring [UNRESOLVED_UNSIGNED return STRING]; alias to_hex_string is to_hstring [UNRESOLVED_SIGNED return STRING]; procedure READ(L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_SIGNED); procedure WRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure WRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias BREAD is READ [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias BREAD is READ [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias BREAD is READ [LINE, UNRESOLVED_UNSIGNED]; alias BREAD is READ [LINE, UNRESOLVED_SIGNED]; alias BINARY_READ is READ [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias BINARY_READ is READ [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias BINARY_READ is READ [LINE, UNRESOLVED_UNSIGNED]; alias BINARY_READ is READ [LINE, UNRESOLVED_SIGNED]; procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED); alias OCTAL_READ is OREAD [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_UNSIGNED]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_SIGNED]; procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED); alias HEX_READ is HREAD [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias HEX_READ is HREAD [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias HEX_READ is HREAD [LINE, UNRESOLVED_UNSIGNED]; alias HEX_READ is HREAD [LINE, UNRESOLVED_SIGNED]; alias BWRITE is WRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias BWRITE is WRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; alias BINARY_WRITE is WRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias BINARY_WRITE is WRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; procedure OWRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure OWRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias OCTAL_WRITE is OWRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias OCTAL_WRITE is OWRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; procedure HWRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure HWRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias HEX_WRITE is HWRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias HEX_WRITE is HWRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; end package NUMERIC_STD;
-- -------------------------------------------------------------------- -- -- Copyright © 2008 by IEEE. All rights reserved. -- -- This source file is an essential part of IEEE Std 1076-2008, -- IEEE Standard VHDL Language Reference Manual. This source file may not be -- copied, sold, or included with software that is sold without written -- permission from the IEEE Standards Department. This source file may be -- copied for individual use between licensed users. This source file is -- provided on an AS IS basis. The IEEE disclaims ANY WARRANTY EXPRESS OR -- IMPLIED INCLUDING ANY WARRANTY OF MERCHANTABILITY AND FITNESS FOR USE -- FOR A PARTICULAR PURPOSE. The user of the source file shall indemnify -- and hold IEEE harmless from any damages or liability arising out of the -- use thereof. -- -- Title : Standard VHDL Synthesis Packages -- : (NUMERIC_STD package declaration) -- : -- Library : This package shall be compiled into a library -- : symbolically named IEEE. -- : -- Developers: IEEE DASC Synthesis Working Group, -- : Accellera VHDL-TC, and IEEE P1076 Working Group -- : -- Purpose : This package defines numeric types and arithmetic functions -- : for use with synthesis tools. Two numeric types are defined: -- : -- > UNRESOLVED_UNSIGNED: represents an UNSIGNED number -- : in vector form -- : -- > UNRESOLVED_SIGNED: represents a SIGNED number -- : in vector form -- : The base element type is type STD_ULOGIC. -- : Aliases U_UNSIGNED and U_SIGNED are defined for the types -- : UNRESOLVED_UNSIGNED and UNRESOLVED_SIGNED, respectively. -- : Two numeric subtypes are defined: -- : -- > UNSIGNED: represents UNSIGNED number in vector form -- : -- > SIGNED: represents a SIGNED number in vector form -- : The element subtypes are the same subtype as STD_LOGIC. -- : The leftmost bit is treated as the most significant bit. -- : Signed vectors are represented in two's complement form. -- : This package contains overloaded arithmetic operators on -- : the SIGNED and UNSIGNED types. The package also contains -- : useful type conversions functions, clock detection -- : functions, and other utility functions. -- : -- : If any argument to a function is a null array, a null array -- : is returned (exceptions, if any, are noted individually). -- -- Note : This package may be modified to include additional data -- : required by tools, but it must in no way change the -- : external interfaces or simulation behavior of the -- : description. It is permissible to add comments and/or -- : attributes to the package declarations, but not to change -- : or delete any original lines of the package declaration. -- : The package body may be changed only in accordance with -- : the terms of Clause 16 of this standard. -- : -- -------------------------------------------------------------------- -- $Revision: 1220 $ -- $Date: 2008-04-10 17:16:09 +0930 (Thu, 10 Apr 2008) $ -- -------------------------------------------------------------------- use STD.TEXTIO.all; library IEEE; use IEEE.STD_LOGIC_1164.all; package NUMERIC_STD is constant CopyRightNotice : STRING := "Copyright © 2008 IEEE. All rights reserved."; --============================================================================ -- Numeric Array Type Definitions --============================================================================ type UNRESOLVED_UNSIGNED is array (NATURAL range <>) of STD_ULOGIC; type UNRESOLVED_SIGNED is array (NATURAL range <>) of STD_ULOGIC; -- FIXME: was alias subtype U_UNSIGNED is UNRESOLVED_UNSIGNED; subtype U_SIGNED is UNRESOLVED_SIGNED; subtype UNSIGNED is (resolved) UNRESOLVED_UNSIGNED; subtype SIGNED is (resolved) UNRESOLVED_SIGNED; --============================================================================ -- Arithmetic Operators: --=========================================================================== -- Id: A.1 function "abs" (ARG : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Returns the absolute value of an UNRESOLVED_SIGNED vector ARG. -- Id: A.2 function "-" (ARG : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Returns the value of the unary minus operation on a -- UNRESOLVED_SIGNED vector ARG. --============================================================================ -- Id: A.3 function "+" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Adds two UNRESOLVED_UNSIGNED vectors that may be of different lengths. -- Id: A.3R function "+"(L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.3 where R is a one bit UNRESOLVED_UNSIGNED -- Id: A.3L function "+"(L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.3 where L is a one bit UNRESOLVED_UNSIGNED -- Id: A.4 function "+" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Adds two UNRESOLVED_SIGNED vectors that may be of different lengths. -- Id: A.4R function "+"(L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.4 where R is bit 0 of a non-negative. -- Id: A.4L function "+"(L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.4 where L is bit 0 of a non-negative. -- Id: A.5 function "+" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Adds an UNRESOLVED_UNSIGNED vector, L, with a nonnegative INTEGER, R. -- Id: A.6 function "+" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Adds a nonnegative INTEGER, L, with an UNRESOLVED_UNSIGNED vector, R. -- Id: A.7 function "+" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Adds an INTEGER, L(may be positive or negative), to an UNRESOLVED_SIGNED -- vector, R. -- Id: A.8 function "+" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Adds an UNRESOLVED_SIGNED vector, L, to an INTEGER, R. --============================================================================ -- Id: A.9 function "-" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Subtracts two UNRESOLVED_UNSIGNED vectors that may be of different lengths. -- Id: A.9R function "-"(L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.9 where R is a one bit UNRESOLVED_UNSIGNED -- Id: A.9L function "-"(L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.9 where L is a one bit UNRESOLVED_UNSIGNED -- Id: A.10 function "-" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Subtracts an UNRESOLVED_SIGNED vector, R, from another UNRESOLVED_SIGNED vector, L, -- that may possibly be of different lengths. -- Id: A.10R function "-"(L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.10 where R is bit 0 of a non-negative. -- Id: A.10L function "-"(L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.10 where R is bit 0 of a non-negative. -- Id: A.11 function "-" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Subtracts a nonnegative INTEGER, R, from an UNRESOLVED_UNSIGNED vector, L. -- Id: A.12 function "-" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Subtracts an UNRESOLVED_UNSIGNED vector, R, from a nonnegative INTEGER, L. -- Id: A.13 function "-" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Subtracts an INTEGER, R, from an UNRESOLVED_SIGNED vector, L. -- Id: A.14 function "-" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Subtracts an UNRESOLVED_SIGNED vector, R, from an INTEGER, L. --============================================================================ -- Id: A.15 function "*" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((L'LENGTH+R'LENGTH-1) downto 0) -- Result: Performs the multiplication operation on two UNRESOLVED_UNSIGNED vectors -- that may possibly be of different lengths. -- Id: A.16 function "*" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((L'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies two UNRESOLVED_SIGNED vectors that may possibly be of -- different lengths. -- Id: A.17 function "*" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((L'LENGTH+L'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_UNSIGNED vector, L, with a nonnegative -- INTEGER, R. R is converted to an UNRESOLVED_UNSIGNED vector of -- SIZE L'LENGTH before multiplication. -- Id: A.18 function "*" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((R'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_UNSIGNED vector, R, with a nonnegative -- INTEGER, L. L is converted to an UNRESOLVED_UNSIGNED vector of -- SIZE R'LENGTH before multiplication. -- Id: A.19 function "*" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((L'LENGTH+L'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_SIGNED vector, L, with an INTEGER, R. R is -- converted to an UNRESOLVED_SIGNED vector of SIZE L'LENGTH before -- multiplication. -- Id: A.20 function "*" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((R'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_SIGNED vector, R, with an INTEGER, L. L is -- converted to an UNRESOLVED_SIGNED vector of SIZE R'LENGTH before -- multiplication. --============================================================================ -- -- NOTE: If second argument is zero for "/" operator, a severity level -- of ERROR is issued. -- Id: A.21 function "/" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_UNSIGNED vector, L, by another UNRESOLVED_UNSIGNED vector, R. -- Id: A.22 function "/" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_SIGNED vector, L, by another UNRESOLVED_SIGNED vector, R. -- Id: A.23 function "/" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_UNSIGNED vector, L, by a nonnegative INTEGER, R. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.24 function "/" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Divides a nonnegative INTEGER, L, by an UNRESOLVED_UNSIGNED vector, R. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.25 function "/" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_SIGNED vector, L, by an INTEGER, R. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.26 function "/" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Divides an INTEGER, L, by an UNRESOLVED_SIGNED vector, R. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- -- NOTE: If second argument is zero for "rem" operator, a severity level -- of ERROR is issued. -- Id: A.27 function "rem" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L and R are UNRESOLVED_UNSIGNED vectors. -- Id: A.28 function "rem" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L and R are UNRESOLVED_SIGNED vectors. -- Id: A.29 function "rem" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L is an UNRESOLVED_UNSIGNED vector and R is a -- nonnegative INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.30 function "rem" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where R is an UNRESOLVED_UNSIGNED vector and L is a -- nonnegative INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.31 function "rem" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L is UNRESOLVED_SIGNED vector and R is an INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.32 function "rem" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where R is UNRESOLVED_SIGNED vector and L is an INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- -- NOTE: If second argument is zero for "mod" operator, a severity level -- of ERROR is issued. -- Id: A.33 function "mod" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L and R are UNRESOLVED_UNSIGNED vectors. -- Id: A.34 function "mod" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L and R are UNRESOLVED_SIGNED vectors. -- Id: A.35 function "mod" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an UNRESOLVED_UNSIGNED vector and R -- is a nonnegative INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.36 function "mod" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where R is an UNRESOLVED_UNSIGNED vector and L -- is a nonnegative INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.37 function "mod" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.38 function "mod" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- Id: A.39 function find_leftmost (ARG : UNRESOLVED_UNSIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.40 function find_leftmost (ARG : UNRESOLVED_SIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.41 function find_rightmost (ARG : UNRESOLVED_UNSIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.42 function find_rightmost (ARG : UNRESOLVED_SIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. --============================================================================ -- Comparison Operators --============================================================================ -- Id: C.1 function ">" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.2 function ">" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.3 function ">" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.4 function ">" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is a INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.5 function ">" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.6 function ">" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is an UNRESOLVED_SIGNED vector and -- R is a INTEGER. --============================================================================ -- Id: C.7 function "<" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.8 function "<" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.9 function "<" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.10 function "<" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.11 function "<" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.12 function "<" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.13 function "<=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.14 function "<=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.15 function "<=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.16 function "<=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.17 function "<=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.18 function "<=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.19 function ">=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.20 function ">=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.21 function ">=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.22 function ">=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.23 function ">=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.24 function ">=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.25 function "=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.26 function "=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.27 function "=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.28 function "=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.29 function "=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.30 function "=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.31 function "/=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.32 function "/=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.33 function "/=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.34 function "/=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.35 function "/=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.36 function "/=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.37 function MINIMUM (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of two UNRESOLVED_UNSIGNED vectors that may be -- of different lengths. -- Id: C.38 function MINIMUM (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of two UNRESOLVED_SIGNED vectors that may be -- of different lengths. -- Id: C.39 function MINIMUM (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of a nonnegative INTEGER, L, and -- an UNRESOLVED_UNSIGNED vector, R. -- Id: C.40 function MINIMUM (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of an INTEGER, L, and an UNRESOLVED_SIGNED -- vector, R. -- Id: C.41 function MINIMUM (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of an UNRESOLVED_UNSIGNED vector, L, and -- a nonnegative INTEGER, R. -- Id: C.42 function MINIMUM (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of an UNRESOLVED_SIGNED vector, L, and -- an INTEGER, R. --============================================================================ -- Id: C.43 function MAXIMUM (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of two UNRESOLVED_UNSIGNED vectors that may be -- of different lengths. -- Id: C.44 function MAXIMUM (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of two UNRESOLVED_SIGNED vectors that may be -- of different lengths. -- Id: C.45 function MAXIMUM (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of a nonnegative INTEGER, L, and -- an UNRESOLVED_UNSIGNED vector, R. -- Id: C.46 function MAXIMUM (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of an INTEGER, L, and an UNRESOLVED_SIGNED -- vector, R. -- Id: C.47 function MAXIMUM (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of an UNRESOLVED_UNSIGNED vector, L, and -- a nonnegative INTEGER, R. -- Id: C.48 function MAXIMUM (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of an UNRESOLVED_SIGNED vector, L, and -- an INTEGER, R. --============================================================================ -- Id: C.49 function "?>" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.50 function "?>" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.51 function "?>" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.52 function "?>" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is a INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.53 function "?>" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.54 function "?>" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is an UNRESOLVED_SIGNED vector and -- R is a INTEGER. --============================================================================ -- Id: C.55 function "?<" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.56 function "?<" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.57 function "?<" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.58 function "?<" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.59 function "?<" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.60 function "?<" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.61 function "?<=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.62 function "?<=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.63 function "?<=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.64 function "?<=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.65 function "?<=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.66 function "?<=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.67 function "?>=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.68 function "?>=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.69 function "?>=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.70 function "?>=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.71 function "?>=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.72 function "?>=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.73 function "?=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.74 function "?=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.75 function "?=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.76 function "?=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.77 function "?=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.78 function "?=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.79 function "?/=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.80 function "?/=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.81 function "?/=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.82 function "?/=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.83 function "?/=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.84 function "?/=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Shift and Rotate Functions --============================================================================ -- Id: S.1 function SHIFT_LEFT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-left on an UNRESOLVED_UNSIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT leftmost elements are lost. -- Id: S.2 function SHIFT_RIGHT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-right on an UNRESOLVED_UNSIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT rightmost elements are lost. -- Id: S.3 function SHIFT_LEFT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-left on an UNRESOLVED_SIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT leftmost elements are lost. -- Id: S.4 function SHIFT_RIGHT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-right on an UNRESOLVED_SIGNED vector COUNT times. -- The vacated positions are filled with the leftmost -- element, ARG'LEFT. The COUNT rightmost elements are lost. --============================================================================ -- Id: S.5 function ROTATE_LEFT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a rotate-left of an UNRESOLVED_UNSIGNED vector COUNT times. -- Id: S.6 function ROTATE_RIGHT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a rotate-right of an UNRESOLVED_UNSIGNED vector COUNT times. -- Id: S.7 function ROTATE_LEFT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a logical rotate-left of an UNRESOLVED_SIGNED -- vector COUNT times. -- Id: S.8 function ROTATE_RIGHT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a logical rotate-right of an UNRESOLVED_SIGNED -- vector COUNT times. --============================================================================ --============================================================================ ------------------------------------------------------------------------------ -- Note: Function S.9 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.9 function "sll" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.10 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.10 function "sll" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.11 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE StdL 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.11 function "srl" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.12 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.12 function "srl" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: UNRESOLVED_SIGNED(SHIFT_RIGHT(UNRESOLVED_UNSIGNED(ARG), COUNT)) ------------------------------------------------------------------------------ -- Note: Function S.13 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.13 function "rol" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.14 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.14 function "rol" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.15 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.15 function "ror" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.16 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.16 function "ror" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.17 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.17 function "sla" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.18 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.18 function "sla" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.19 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.19 function "sra" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.20 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.20 function "sra" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) --============================================================================ -- RESIZE Functions --============================================================================ -- Id: R.1 function RESIZE (ARG : UNRESOLVED_SIGNED; NEW_SIZE : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(NEW_SIZE-1 downto 0) -- Result: Resizes the UNRESOLVED_SIGNED vector ARG to the specified size. -- To create a larger vector, the new [leftmost] bit positions -- are filled with the sign bit (ARG'LEFT). When truncating, -- the sign bit is retained along with the rightmost part. -- Id: R.2 function RESIZE (ARG : UNRESOLVED_UNSIGNED; NEW_SIZE : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(NEW_SIZE-1 downto 0) -- Result: Resizes the UNRESOLVED_SIGNED vector ARG to the specified size. -- To create a larger vector, the new [leftmost] bit positions -- are filled with '0'. When truncating, the leftmost bits -- are dropped. function RESIZE (ARG, SIZE_RES : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED (SIZE_RES'length-1 downto 0) function RESIZE (ARG, SIZE_RES : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED (SIZE_RES'length-1 downto 0) --============================================================================ -- Conversion Functions --============================================================================ -- Id: D.1 function TO_INTEGER (ARG : UNRESOLVED_UNSIGNED) return NATURAL; -- Result subtype: NATURAL. Value cannot be negative since parameter is an -- UNRESOLVED_UNSIGNED vector. -- Result: Converts the UNRESOLVED_UNSIGNED vector to an INTEGER. -- Id: D.2 function TO_INTEGER (ARG : UNRESOLVED_SIGNED) return INTEGER; -- Result subtype: INTEGER -- Result: Converts an UNRESOLVED_SIGNED vector to an INTEGER. -- Id: D.3 function TO_UNSIGNED (ARG, SIZE : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(SIZE-1 downto 0) -- Result: Converts a nonnegative INTEGER to an UNRESOLVED_UNSIGNED vector with -- the specified SIZE. -- Id: D.4 function TO_SIGNED (ARG : INTEGER; SIZE : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(SIZE-1 downto 0) -- Result: Converts an INTEGER to a UNRESOLVED_SIGNED vector of the specified SIZE. function TO_UNSIGNED (ARG : NATURAL; SIZE_RES : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(SIZE_RES'length-1 downto 0) function TO_SIGNED (ARG : INTEGER; SIZE_RES : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(SIZE_RES'length-1 downto 0) --============================================================================ -- Logical Operators --============================================================================ -- Id: L.1 function "not" (L : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Termwise inversion -- Id: L.2 function "and" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector AND operation -- Id: L.3 function "or" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector OR operation -- Id: L.4 function "nand" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector NAND operation -- Id: L.5 function "nor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector NOR operation -- Id: L.6 function "xor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector XOR operation -- --------------------------------------------------------------------------- -- Note: Function L.7 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. -- --------------------------------------------------------------------------- -- Id: L.7 function "xnor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation -- Id: L.8 function "not" (L : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Termwise inversion -- Id: L.9 function "and" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector AND operation -- Id: L.10 function "or" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector OR operation -- Id: L.11 function "nand" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector NAND operation -- Id: L.12 function "nor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector NOR operation -- Id: L.13 function "xor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XOR operation -- --------------------------------------------------------------------------- -- Note: Function L.14 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. -- --------------------------------------------------------------------------- -- Id: L.14 function "xnor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation -- Id: L.15 function "and" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation -- Id: L.16 function "and" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation -- Id: L.17 function "or" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation -- Id: L.18 function "or" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation -- Id: L.19 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation -- Id: L.20 function "nand" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation -- Id: L.21 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation -- Id: L.22 function "nor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation -- Id: L.23 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation -- Id: L.24 function "xor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation ------------------------------------------------------------------------------ -- Note: Function L.25 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.25 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.26 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.26 function "xnor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation -- Id: L.27 function "and" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation -- Id: L.28 function "and" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation -- Id: L.29 function "or" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation -- Id: L.30 function "or" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation -- Id: L.31 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation -- Id: L.32 function "nand" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation -- Id: L.33 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation -- Id: L.34 function "nor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation -- Id: L.35 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation -- Id: L.36 function "xor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation ------------------------------------------------------------------------------ -- Note: Function L.37 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.37 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.38 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.38 function "xnor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.39 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.39 function "and" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.40 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.40 function "nand" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.41 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.41 function "or" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.42 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.42 function "nor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.43 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.43 function "xor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.44 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.44 function "xnor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.45 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.45 function "and" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.46 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.46 function "nand" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.47 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.47 function "or" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.48 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.48 function "nor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.49 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.49 function "xor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.50 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.50 function "xnor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. --============================================================================ -- Match Functions --============================================================================ -- Id: M.1 function STD_MATCH (L, R : STD_ULOGIC) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.2 function STD_MATCH (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.3 function STD_MATCH (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.5 function STD_MATCH (L, R : STD_ULOGIC_VECTOR) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent --============================================================================ -- Translation Functions --============================================================================ -- Id: T.1 function TO_01 (S : UNRESOLVED_UNSIGNED; XMAP : STD_ULOGIC := '0') return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', and 'L' is translated -- to '0'. If a value other than '0'|'1'|'H'|'L' is found, -- the array is set to (others => XMAP), and a warning is -- issued. -- Id: T.2 function TO_01 (S : UNRESOLVED_SIGNED; XMAP : STD_ULOGIC := '0') return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', and 'L' is translated -- to '0'. If a value other than '0'|'1'|'H'|'L' is found, -- the array is set to (others => XMAP), and a warning is -- issued. -- Id: T.3 function TO_X01 (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.4 function TO_X01 (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.5 function TO_X01Z (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L'|'Z' are translated to 'X'. -- Id: T.6 function TO_X01Z (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L'|'Z' are translated to 'X'. -- Id: T.7 function TO_UX01 (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than 'U'|'0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.8 function TO_UX01 (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than 'U'|'0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.9 function IS_X (S : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: TRUE if S contains a 'U'|'X'|'Z'|'W'|'-' value, FALSE otherwise. -- Id: T.10 function IS_X (S : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: TRUE if S contains a 'U'|'X'|'Z'|'W'|'-' value, FALSE otherwise. --============================================================================ -- string conversion and write operations --============================================================================ -- the following operations are predefined -- function to_string (value : UNRESOLVED_UNSIGNED) return STRING; -- function to_string (value : UNRESOLVED_SIGNED) return STRING; -- explicitly defined operations alias to_bstring is to_string [UNRESOLVED_UNSIGNED return STRING]; alias to_bstring is to_string [UNRESOLVED_SIGNED return STRING]; alias to_binary_string is to_string [UNRESOLVED_UNSIGNED return STRING]; alias to_binary_string is to_string [UNRESOLVED_SIGNED return STRING]; function to_ostring (value : UNRESOLVED_UNSIGNED) return STRING; function to_ostring (value : UNRESOLVED_SIGNED) return STRING; alias to_octal_string is to_ostring [UNRESOLVED_UNSIGNED return STRING]; alias to_octal_string is to_ostring [UNRESOLVED_SIGNED return STRING]; function to_hstring (value : UNRESOLVED_UNSIGNED) return STRING; function to_hstring (value : UNRESOLVED_SIGNED) return STRING; alias to_hex_string is to_hstring [UNRESOLVED_UNSIGNED return STRING]; alias to_hex_string is to_hstring [UNRESOLVED_SIGNED return STRING]; procedure READ(L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_SIGNED); procedure WRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure WRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias BREAD is READ [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias BREAD is READ [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias BREAD is READ [LINE, UNRESOLVED_UNSIGNED]; alias BREAD is READ [LINE, UNRESOLVED_SIGNED]; alias BINARY_READ is READ [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias BINARY_READ is READ [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias BINARY_READ is READ [LINE, UNRESOLVED_UNSIGNED]; alias BINARY_READ is READ [LINE, UNRESOLVED_SIGNED]; procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED); alias OCTAL_READ is OREAD [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_UNSIGNED]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_SIGNED]; procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED); alias HEX_READ is HREAD [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias HEX_READ is HREAD [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias HEX_READ is HREAD [LINE, UNRESOLVED_UNSIGNED]; alias HEX_READ is HREAD [LINE, UNRESOLVED_SIGNED]; alias BWRITE is WRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias BWRITE is WRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; alias BINARY_WRITE is WRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias BINARY_WRITE is WRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; procedure OWRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure OWRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias OCTAL_WRITE is OWRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias OCTAL_WRITE is OWRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; procedure HWRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure HWRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias HEX_WRITE is HWRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias HEX_WRITE is HWRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; end package NUMERIC_STD;
-- -------------------------------------------------------------------- -- -- Copyright © 2008 by IEEE. All rights reserved. -- -- This source file is an essential part of IEEE Std 1076-2008, -- IEEE Standard VHDL Language Reference Manual. This source file may not be -- copied, sold, or included with software that is sold without written -- permission from the IEEE Standards Department. This source file may be -- copied for individual use between licensed users. This source file is -- provided on an AS IS basis. The IEEE disclaims ANY WARRANTY EXPRESS OR -- IMPLIED INCLUDING ANY WARRANTY OF MERCHANTABILITY AND FITNESS FOR USE -- FOR A PARTICULAR PURPOSE. The user of the source file shall indemnify -- and hold IEEE harmless from any damages or liability arising out of the -- use thereof. -- -- Title : Standard VHDL Synthesis Packages -- : (NUMERIC_STD package declaration) -- : -- Library : This package shall be compiled into a library -- : symbolically named IEEE. -- : -- Developers: IEEE DASC Synthesis Working Group, -- : Accellera VHDL-TC, and IEEE P1076 Working Group -- : -- Purpose : This package defines numeric types and arithmetic functions -- : for use with synthesis tools. Two numeric types are defined: -- : -- > UNRESOLVED_UNSIGNED: represents an UNSIGNED number -- : in vector form -- : -- > UNRESOLVED_SIGNED: represents a SIGNED number -- : in vector form -- : The base element type is type STD_ULOGIC. -- : Aliases U_UNSIGNED and U_SIGNED are defined for the types -- : UNRESOLVED_UNSIGNED and UNRESOLVED_SIGNED, respectively. -- : Two numeric subtypes are defined: -- : -- > UNSIGNED: represents UNSIGNED number in vector form -- : -- > SIGNED: represents a SIGNED number in vector form -- : The element subtypes are the same subtype as STD_LOGIC. -- : The leftmost bit is treated as the most significant bit. -- : Signed vectors are represented in two's complement form. -- : This package contains overloaded arithmetic operators on -- : the SIGNED and UNSIGNED types. The package also contains -- : useful type conversions functions, clock detection -- : functions, and other utility functions. -- : -- : If any argument to a function is a null array, a null array -- : is returned (exceptions, if any, are noted individually). -- -- Note : This package may be modified to include additional data -- : required by tools, but it must in no way change the -- : external interfaces or simulation behavior of the -- : description. It is permissible to add comments and/or -- : attributes to the package declarations, but not to change -- : or delete any original lines of the package declaration. -- : The package body may be changed only in accordance with -- : the terms of Clause 16 of this standard. -- : -- -------------------------------------------------------------------- -- $Revision: 1220 $ -- $Date: 2008-04-10 17:16:09 +0930 (Thu, 10 Apr 2008) $ -- -------------------------------------------------------------------- use STD.TEXTIO.all; library IEEE; use IEEE.STD_LOGIC_1164.all; package NUMERIC_STD is constant CopyRightNotice : STRING := "Copyright © 2008 IEEE. All rights reserved."; --============================================================================ -- Numeric Array Type Definitions --============================================================================ type UNRESOLVED_UNSIGNED is array (NATURAL range <>) of STD_ULOGIC; type UNRESOLVED_SIGNED is array (NATURAL range <>) of STD_ULOGIC; -- FIXME: was alias subtype U_UNSIGNED is UNRESOLVED_UNSIGNED; subtype U_SIGNED is UNRESOLVED_SIGNED; subtype UNSIGNED is (resolved) UNRESOLVED_UNSIGNED; subtype SIGNED is (resolved) UNRESOLVED_SIGNED; --============================================================================ -- Arithmetic Operators: --=========================================================================== -- Id: A.1 function "abs" (ARG : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Returns the absolute value of an UNRESOLVED_SIGNED vector ARG. -- Id: A.2 function "-" (ARG : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Returns the value of the unary minus operation on a -- UNRESOLVED_SIGNED vector ARG. --============================================================================ -- Id: A.3 function "+" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Adds two UNRESOLVED_UNSIGNED vectors that may be of different lengths. -- Id: A.3R function "+"(L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.3 where R is a one bit UNRESOLVED_UNSIGNED -- Id: A.3L function "+"(L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.3 where L is a one bit UNRESOLVED_UNSIGNED -- Id: A.4 function "+" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Adds two UNRESOLVED_SIGNED vectors that may be of different lengths. -- Id: A.4R function "+"(L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.4 where R is bit 0 of a non-negative. -- Id: A.4L function "+"(L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.4 where L is bit 0 of a non-negative. -- Id: A.5 function "+" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Adds an UNRESOLVED_UNSIGNED vector, L, with a nonnegative INTEGER, R. -- Id: A.6 function "+" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Adds a nonnegative INTEGER, L, with an UNRESOLVED_UNSIGNED vector, R. -- Id: A.7 function "+" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Adds an INTEGER, L(may be positive or negative), to an UNRESOLVED_SIGNED -- vector, R. -- Id: A.8 function "+" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Adds an UNRESOLVED_SIGNED vector, L, to an INTEGER, R. --============================================================================ -- Id: A.9 function "-" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Subtracts two UNRESOLVED_UNSIGNED vectors that may be of different lengths. -- Id: A.9R function "-"(L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.9 where R is a one bit UNRESOLVED_UNSIGNED -- Id: A.9L function "-"(L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.9 where L is a one bit UNRESOLVED_UNSIGNED -- Id: A.10 function "-" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Subtracts an UNRESOLVED_SIGNED vector, R, from another UNRESOLVED_SIGNED vector, L, -- that may possibly be of different lengths. -- Id: A.10R function "-"(L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.10 where R is bit 0 of a non-negative. -- Id: A.10L function "-"(L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.10 where R is bit 0 of a non-negative. -- Id: A.11 function "-" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Subtracts a nonnegative INTEGER, R, from an UNRESOLVED_UNSIGNED vector, L. -- Id: A.12 function "-" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Subtracts an UNRESOLVED_UNSIGNED vector, R, from a nonnegative INTEGER, L. -- Id: A.13 function "-" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Subtracts an INTEGER, R, from an UNRESOLVED_SIGNED vector, L. -- Id: A.14 function "-" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Subtracts an UNRESOLVED_SIGNED vector, R, from an INTEGER, L. --============================================================================ -- Id: A.15 function "*" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((L'LENGTH+R'LENGTH-1) downto 0) -- Result: Performs the multiplication operation on two UNRESOLVED_UNSIGNED vectors -- that may possibly be of different lengths. -- Id: A.16 function "*" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((L'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies two UNRESOLVED_SIGNED vectors that may possibly be of -- different lengths. -- Id: A.17 function "*" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((L'LENGTH+L'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_UNSIGNED vector, L, with a nonnegative -- INTEGER, R. R is converted to an UNRESOLVED_UNSIGNED vector of -- SIZE L'LENGTH before multiplication. -- Id: A.18 function "*" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((R'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_UNSIGNED vector, R, with a nonnegative -- INTEGER, L. L is converted to an UNRESOLVED_UNSIGNED vector of -- SIZE R'LENGTH before multiplication. -- Id: A.19 function "*" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((L'LENGTH+L'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_SIGNED vector, L, with an INTEGER, R. R is -- converted to an UNRESOLVED_SIGNED vector of SIZE L'LENGTH before -- multiplication. -- Id: A.20 function "*" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((R'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_SIGNED vector, R, with an INTEGER, L. L is -- converted to an UNRESOLVED_SIGNED vector of SIZE R'LENGTH before -- multiplication. --============================================================================ -- -- NOTE: If second argument is zero for "/" operator, a severity level -- of ERROR is issued. -- Id: A.21 function "/" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_UNSIGNED vector, L, by another UNRESOLVED_UNSIGNED vector, R. -- Id: A.22 function "/" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_SIGNED vector, L, by another UNRESOLVED_SIGNED vector, R. -- Id: A.23 function "/" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_UNSIGNED vector, L, by a nonnegative INTEGER, R. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.24 function "/" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Divides a nonnegative INTEGER, L, by an UNRESOLVED_UNSIGNED vector, R. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.25 function "/" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_SIGNED vector, L, by an INTEGER, R. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.26 function "/" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Divides an INTEGER, L, by an UNRESOLVED_SIGNED vector, R. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- -- NOTE: If second argument is zero for "rem" operator, a severity level -- of ERROR is issued. -- Id: A.27 function "rem" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L and R are UNRESOLVED_UNSIGNED vectors. -- Id: A.28 function "rem" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L and R are UNRESOLVED_SIGNED vectors. -- Id: A.29 function "rem" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L is an UNRESOLVED_UNSIGNED vector and R is a -- nonnegative INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.30 function "rem" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where R is an UNRESOLVED_UNSIGNED vector and L is a -- nonnegative INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.31 function "rem" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L is UNRESOLVED_SIGNED vector and R is an INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.32 function "rem" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where R is UNRESOLVED_SIGNED vector and L is an INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- -- NOTE: If second argument is zero for "mod" operator, a severity level -- of ERROR is issued. -- Id: A.33 function "mod" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L and R are UNRESOLVED_UNSIGNED vectors. -- Id: A.34 function "mod" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L and R are UNRESOLVED_SIGNED vectors. -- Id: A.35 function "mod" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an UNRESOLVED_UNSIGNED vector and R -- is a nonnegative INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.36 function "mod" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where R is an UNRESOLVED_UNSIGNED vector and L -- is a nonnegative INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.37 function "mod" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.38 function "mod" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- Id: A.39 function find_leftmost (ARG : UNRESOLVED_UNSIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.40 function find_leftmost (ARG : UNRESOLVED_SIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.41 function find_rightmost (ARG : UNRESOLVED_UNSIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.42 function find_rightmost (ARG : UNRESOLVED_SIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. --============================================================================ -- Comparison Operators --============================================================================ -- Id: C.1 function ">" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.2 function ">" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.3 function ">" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.4 function ">" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is a INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.5 function ">" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.6 function ">" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is an UNRESOLVED_SIGNED vector and -- R is a INTEGER. --============================================================================ -- Id: C.7 function "<" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.8 function "<" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.9 function "<" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.10 function "<" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.11 function "<" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.12 function "<" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.13 function "<=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.14 function "<=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.15 function "<=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.16 function "<=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.17 function "<=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.18 function "<=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.19 function ">=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.20 function ">=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.21 function ">=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.22 function ">=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.23 function ">=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.24 function ">=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.25 function "=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.26 function "=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.27 function "=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.28 function "=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.29 function "=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.30 function "=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.31 function "/=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.32 function "/=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.33 function "/=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.34 function "/=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.35 function "/=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.36 function "/=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.37 function MINIMUM (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of two UNRESOLVED_UNSIGNED vectors that may be -- of different lengths. -- Id: C.38 function MINIMUM (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of two UNRESOLVED_SIGNED vectors that may be -- of different lengths. -- Id: C.39 function MINIMUM (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of a nonnegative INTEGER, L, and -- an UNRESOLVED_UNSIGNED vector, R. -- Id: C.40 function MINIMUM (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of an INTEGER, L, and an UNRESOLVED_SIGNED -- vector, R. -- Id: C.41 function MINIMUM (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of an UNRESOLVED_UNSIGNED vector, L, and -- a nonnegative INTEGER, R. -- Id: C.42 function MINIMUM (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of an UNRESOLVED_SIGNED vector, L, and -- an INTEGER, R. --============================================================================ -- Id: C.43 function MAXIMUM (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of two UNRESOLVED_UNSIGNED vectors that may be -- of different lengths. -- Id: C.44 function MAXIMUM (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of two UNRESOLVED_SIGNED vectors that may be -- of different lengths. -- Id: C.45 function MAXIMUM (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of a nonnegative INTEGER, L, and -- an UNRESOLVED_UNSIGNED vector, R. -- Id: C.46 function MAXIMUM (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of an INTEGER, L, and an UNRESOLVED_SIGNED -- vector, R. -- Id: C.47 function MAXIMUM (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of an UNRESOLVED_UNSIGNED vector, L, and -- a nonnegative INTEGER, R. -- Id: C.48 function MAXIMUM (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of an UNRESOLVED_SIGNED vector, L, and -- an INTEGER, R. --============================================================================ -- Id: C.49 function "?>" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.50 function "?>" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.51 function "?>" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.52 function "?>" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is a INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.53 function "?>" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.54 function "?>" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is an UNRESOLVED_SIGNED vector and -- R is a INTEGER. --============================================================================ -- Id: C.55 function "?<" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.56 function "?<" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.57 function "?<" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.58 function "?<" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.59 function "?<" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.60 function "?<" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.61 function "?<=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.62 function "?<=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.63 function "?<=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.64 function "?<=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.65 function "?<=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.66 function "?<=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.67 function "?>=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.68 function "?>=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.69 function "?>=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.70 function "?>=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.71 function "?>=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.72 function "?>=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.73 function "?=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.74 function "?=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.75 function "?=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.76 function "?=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.77 function "?=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.78 function "?=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.79 function "?/=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.80 function "?/=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.81 function "?/=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.82 function "?/=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.83 function "?/=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.84 function "?/=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Shift and Rotate Functions --============================================================================ -- Id: S.1 function SHIFT_LEFT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-left on an UNRESOLVED_UNSIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT leftmost elements are lost. -- Id: S.2 function SHIFT_RIGHT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-right on an UNRESOLVED_UNSIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT rightmost elements are lost. -- Id: S.3 function SHIFT_LEFT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-left on an UNRESOLVED_SIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT leftmost elements are lost. -- Id: S.4 function SHIFT_RIGHT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-right on an UNRESOLVED_SIGNED vector COUNT times. -- The vacated positions are filled with the leftmost -- element, ARG'LEFT. The COUNT rightmost elements are lost. --============================================================================ -- Id: S.5 function ROTATE_LEFT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a rotate-left of an UNRESOLVED_UNSIGNED vector COUNT times. -- Id: S.6 function ROTATE_RIGHT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a rotate-right of an UNRESOLVED_UNSIGNED vector COUNT times. -- Id: S.7 function ROTATE_LEFT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a logical rotate-left of an UNRESOLVED_SIGNED -- vector COUNT times. -- Id: S.8 function ROTATE_RIGHT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a logical rotate-right of an UNRESOLVED_SIGNED -- vector COUNT times. --============================================================================ --============================================================================ ------------------------------------------------------------------------------ -- Note: Function S.9 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.9 function "sll" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.10 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.10 function "sll" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.11 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE StdL 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.11 function "srl" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.12 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.12 function "srl" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: UNRESOLVED_SIGNED(SHIFT_RIGHT(UNRESOLVED_UNSIGNED(ARG), COUNT)) ------------------------------------------------------------------------------ -- Note: Function S.13 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.13 function "rol" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.14 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.14 function "rol" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.15 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.15 function "ror" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.16 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.16 function "ror" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.17 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.17 function "sla" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.18 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.18 function "sla" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.19 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.19 function "sra" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.20 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.20 function "sra" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) --============================================================================ -- RESIZE Functions --============================================================================ -- Id: R.1 function RESIZE (ARG : UNRESOLVED_SIGNED; NEW_SIZE : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(NEW_SIZE-1 downto 0) -- Result: Resizes the UNRESOLVED_SIGNED vector ARG to the specified size. -- To create a larger vector, the new [leftmost] bit positions -- are filled with the sign bit (ARG'LEFT). When truncating, -- the sign bit is retained along with the rightmost part. -- Id: R.2 function RESIZE (ARG : UNRESOLVED_UNSIGNED; NEW_SIZE : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(NEW_SIZE-1 downto 0) -- Result: Resizes the UNRESOLVED_SIGNED vector ARG to the specified size. -- To create a larger vector, the new [leftmost] bit positions -- are filled with '0'. When truncating, the leftmost bits -- are dropped. function RESIZE (ARG, SIZE_RES : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED (SIZE_RES'length-1 downto 0) function RESIZE (ARG, SIZE_RES : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED (SIZE_RES'length-1 downto 0) --============================================================================ -- Conversion Functions --============================================================================ -- Id: D.1 function TO_INTEGER (ARG : UNRESOLVED_UNSIGNED) return NATURAL; -- Result subtype: NATURAL. Value cannot be negative since parameter is an -- UNRESOLVED_UNSIGNED vector. -- Result: Converts the UNRESOLVED_UNSIGNED vector to an INTEGER. -- Id: D.2 function TO_INTEGER (ARG : UNRESOLVED_SIGNED) return INTEGER; -- Result subtype: INTEGER -- Result: Converts an UNRESOLVED_SIGNED vector to an INTEGER. -- Id: D.3 function TO_UNSIGNED (ARG, SIZE : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(SIZE-1 downto 0) -- Result: Converts a nonnegative INTEGER to an UNRESOLVED_UNSIGNED vector with -- the specified SIZE. -- Id: D.4 function TO_SIGNED (ARG : INTEGER; SIZE : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(SIZE-1 downto 0) -- Result: Converts an INTEGER to a UNRESOLVED_SIGNED vector of the specified SIZE. function TO_UNSIGNED (ARG : NATURAL; SIZE_RES : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(SIZE_RES'length-1 downto 0) function TO_SIGNED (ARG : INTEGER; SIZE_RES : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(SIZE_RES'length-1 downto 0) --============================================================================ -- Logical Operators --============================================================================ -- Id: L.1 function "not" (L : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Termwise inversion -- Id: L.2 function "and" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector AND operation -- Id: L.3 function "or" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector OR operation -- Id: L.4 function "nand" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector NAND operation -- Id: L.5 function "nor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector NOR operation -- Id: L.6 function "xor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector XOR operation -- --------------------------------------------------------------------------- -- Note: Function L.7 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. -- --------------------------------------------------------------------------- -- Id: L.7 function "xnor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation -- Id: L.8 function "not" (L : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Termwise inversion -- Id: L.9 function "and" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector AND operation -- Id: L.10 function "or" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector OR operation -- Id: L.11 function "nand" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector NAND operation -- Id: L.12 function "nor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector NOR operation -- Id: L.13 function "xor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XOR operation -- --------------------------------------------------------------------------- -- Note: Function L.14 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. -- --------------------------------------------------------------------------- -- Id: L.14 function "xnor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation -- Id: L.15 function "and" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation -- Id: L.16 function "and" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation -- Id: L.17 function "or" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation -- Id: L.18 function "or" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation -- Id: L.19 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation -- Id: L.20 function "nand" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation -- Id: L.21 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation -- Id: L.22 function "nor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation -- Id: L.23 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation -- Id: L.24 function "xor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation ------------------------------------------------------------------------------ -- Note: Function L.25 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.25 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.26 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.26 function "xnor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation -- Id: L.27 function "and" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation -- Id: L.28 function "and" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation -- Id: L.29 function "or" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation -- Id: L.30 function "or" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation -- Id: L.31 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation -- Id: L.32 function "nand" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation -- Id: L.33 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation -- Id: L.34 function "nor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation -- Id: L.35 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation -- Id: L.36 function "xor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation ------------------------------------------------------------------------------ -- Note: Function L.37 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.37 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.38 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.38 function "xnor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.39 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.39 function "and" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.40 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.40 function "nand" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.41 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.41 function "or" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.42 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.42 function "nor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.43 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.43 function "xor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.44 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.44 function "xnor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.45 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.45 function "and" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.46 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.46 function "nand" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.47 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.47 function "or" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.48 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.48 function "nor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.49 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.49 function "xor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.50 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.50 function "xnor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. --============================================================================ -- Match Functions --============================================================================ -- Id: M.1 function STD_MATCH (L, R : STD_ULOGIC) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.2 function STD_MATCH (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.3 function STD_MATCH (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.5 function STD_MATCH (L, R : STD_ULOGIC_VECTOR) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent --============================================================================ -- Translation Functions --============================================================================ -- Id: T.1 function TO_01 (S : UNRESOLVED_UNSIGNED; XMAP : STD_ULOGIC := '0') return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', and 'L' is translated -- to '0'. If a value other than '0'|'1'|'H'|'L' is found, -- the array is set to (others => XMAP), and a warning is -- issued. -- Id: T.2 function TO_01 (S : UNRESOLVED_SIGNED; XMAP : STD_ULOGIC := '0') return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', and 'L' is translated -- to '0'. If a value other than '0'|'1'|'H'|'L' is found, -- the array is set to (others => XMAP), and a warning is -- issued. -- Id: T.3 function TO_X01 (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.4 function TO_X01 (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.5 function TO_X01Z (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L'|'Z' are translated to 'X'. -- Id: T.6 function TO_X01Z (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L'|'Z' are translated to 'X'. -- Id: T.7 function TO_UX01 (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than 'U'|'0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.8 function TO_UX01 (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than 'U'|'0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.9 function IS_X (S : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: TRUE if S contains a 'U'|'X'|'Z'|'W'|'-' value, FALSE otherwise. -- Id: T.10 function IS_X (S : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: TRUE if S contains a 'U'|'X'|'Z'|'W'|'-' value, FALSE otherwise. --============================================================================ -- string conversion and write operations --============================================================================ -- the following operations are predefined -- function to_string (value : UNRESOLVED_UNSIGNED) return STRING; -- function to_string (value : UNRESOLVED_SIGNED) return STRING; -- explicitly defined operations alias to_bstring is to_string [UNRESOLVED_UNSIGNED return STRING]; alias to_bstring is to_string [UNRESOLVED_SIGNED return STRING]; alias to_binary_string is to_string [UNRESOLVED_UNSIGNED return STRING]; alias to_binary_string is to_string [UNRESOLVED_SIGNED return STRING]; function to_ostring (value : UNRESOLVED_UNSIGNED) return STRING; function to_ostring (value : UNRESOLVED_SIGNED) return STRING; alias to_octal_string is to_ostring [UNRESOLVED_UNSIGNED return STRING]; alias to_octal_string is to_ostring [UNRESOLVED_SIGNED return STRING]; function to_hstring (value : UNRESOLVED_UNSIGNED) return STRING; function to_hstring (value : UNRESOLVED_SIGNED) return STRING; alias to_hex_string is to_hstring [UNRESOLVED_UNSIGNED return STRING]; alias to_hex_string is to_hstring [UNRESOLVED_SIGNED return STRING]; procedure READ(L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_SIGNED); procedure WRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure WRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias BREAD is READ [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias BREAD is READ [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias BREAD is READ [LINE, UNRESOLVED_UNSIGNED]; alias BREAD is READ [LINE, UNRESOLVED_SIGNED]; alias BINARY_READ is READ [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias BINARY_READ is READ [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias BINARY_READ is READ [LINE, UNRESOLVED_UNSIGNED]; alias BINARY_READ is READ [LINE, UNRESOLVED_SIGNED]; procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED); alias OCTAL_READ is OREAD [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_UNSIGNED]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_SIGNED]; procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED); alias HEX_READ is HREAD [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias HEX_READ is HREAD [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias HEX_READ is HREAD [LINE, UNRESOLVED_UNSIGNED]; alias HEX_READ is HREAD [LINE, UNRESOLVED_SIGNED]; alias BWRITE is WRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias BWRITE is WRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; alias BINARY_WRITE is WRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias BINARY_WRITE is WRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; procedure OWRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure OWRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias OCTAL_WRITE is OWRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias OCTAL_WRITE is OWRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; procedure HWRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure HWRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias HEX_WRITE is HWRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias HEX_WRITE is HWRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; end package NUMERIC_STD;
-- -------------------------------------------------------------------- -- -- Copyright © 2008 by IEEE. All rights reserved. -- -- This source file is an essential part of IEEE Std 1076-2008, -- IEEE Standard VHDL Language Reference Manual. This source file may not be -- copied, sold, or included with software that is sold without written -- permission from the IEEE Standards Department. This source file may be -- copied for individual use between licensed users. This source file is -- provided on an AS IS basis. The IEEE disclaims ANY WARRANTY EXPRESS OR -- IMPLIED INCLUDING ANY WARRANTY OF MERCHANTABILITY AND FITNESS FOR USE -- FOR A PARTICULAR PURPOSE. The user of the source file shall indemnify -- and hold IEEE harmless from any damages or liability arising out of the -- use thereof. -- -- Title : Standard VHDL Synthesis Packages -- : (NUMERIC_STD package declaration) -- : -- Library : This package shall be compiled into a library -- : symbolically named IEEE. -- : -- Developers: IEEE DASC Synthesis Working Group, -- : Accellera VHDL-TC, and IEEE P1076 Working Group -- : -- Purpose : This package defines numeric types and arithmetic functions -- : for use with synthesis tools. Two numeric types are defined: -- : -- > UNRESOLVED_UNSIGNED: represents an UNSIGNED number -- : in vector form -- : -- > UNRESOLVED_SIGNED: represents a SIGNED number -- : in vector form -- : The base element type is type STD_ULOGIC. -- : Aliases U_UNSIGNED and U_SIGNED are defined for the types -- : UNRESOLVED_UNSIGNED and UNRESOLVED_SIGNED, respectively. -- : Two numeric subtypes are defined: -- : -- > UNSIGNED: represents UNSIGNED number in vector form -- : -- > SIGNED: represents a SIGNED number in vector form -- : The element subtypes are the same subtype as STD_LOGIC. -- : The leftmost bit is treated as the most significant bit. -- : Signed vectors are represented in two's complement form. -- : This package contains overloaded arithmetic operators on -- : the SIGNED and UNSIGNED types. The package also contains -- : useful type conversions functions, clock detection -- : functions, and other utility functions. -- : -- : If any argument to a function is a null array, a null array -- : is returned (exceptions, if any, are noted individually). -- -- Note : This package may be modified to include additional data -- : required by tools, but it must in no way change the -- : external interfaces or simulation behavior of the -- : description. It is permissible to add comments and/or -- : attributes to the package declarations, but not to change -- : or delete any original lines of the package declaration. -- : The package body may be changed only in accordance with -- : the terms of Clause 16 of this standard. -- : -- -------------------------------------------------------------------- -- $Revision: 1220 $ -- $Date: 2008-04-10 17:16:09 +0930 (Thu, 10 Apr 2008) $ -- -------------------------------------------------------------------- use STD.TEXTIO.all; library IEEE; use IEEE.STD_LOGIC_1164.all; package NUMERIC_STD is constant CopyRightNotice : STRING := "Copyright © 2008 IEEE. All rights reserved."; --============================================================================ -- Numeric Array Type Definitions --============================================================================ type UNRESOLVED_UNSIGNED is array (NATURAL range <>) of STD_ULOGIC; type UNRESOLVED_SIGNED is array (NATURAL range <>) of STD_ULOGIC; -- FIXME: was alias subtype U_UNSIGNED is UNRESOLVED_UNSIGNED; subtype U_SIGNED is UNRESOLVED_SIGNED; subtype UNSIGNED is (resolved) UNRESOLVED_UNSIGNED; subtype SIGNED is (resolved) UNRESOLVED_SIGNED; --============================================================================ -- Arithmetic Operators: --=========================================================================== -- Id: A.1 function "abs" (ARG : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Returns the absolute value of an UNRESOLVED_SIGNED vector ARG. -- Id: A.2 function "-" (ARG : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Returns the value of the unary minus operation on a -- UNRESOLVED_SIGNED vector ARG. --============================================================================ -- Id: A.3 function "+" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Adds two UNRESOLVED_UNSIGNED vectors that may be of different lengths. -- Id: A.3R function "+"(L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.3 where R is a one bit UNRESOLVED_UNSIGNED -- Id: A.3L function "+"(L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.3 where L is a one bit UNRESOLVED_UNSIGNED -- Id: A.4 function "+" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Adds two UNRESOLVED_SIGNED vectors that may be of different lengths. -- Id: A.4R function "+"(L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.4 where R is bit 0 of a non-negative. -- Id: A.4L function "+"(L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.4 where L is bit 0 of a non-negative. -- Id: A.5 function "+" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Adds an UNRESOLVED_UNSIGNED vector, L, with a nonnegative INTEGER, R. -- Id: A.6 function "+" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Adds a nonnegative INTEGER, L, with an UNRESOLVED_UNSIGNED vector, R. -- Id: A.7 function "+" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Adds an INTEGER, L(may be positive or negative), to an UNRESOLVED_SIGNED -- vector, R. -- Id: A.8 function "+" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Adds an UNRESOLVED_SIGNED vector, L, to an INTEGER, R. --============================================================================ -- Id: A.9 function "-" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Subtracts two UNRESOLVED_UNSIGNED vectors that may be of different lengths. -- Id: A.9R function "-"(L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.9 where R is a one bit UNRESOLVED_UNSIGNED -- Id: A.9L function "-"(L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.9 where L is a one bit UNRESOLVED_UNSIGNED -- Id: A.10 function "-" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(MAXIMUM(L'LENGTH, R'LENGTH)-1 downto 0) -- Result: Subtracts an UNRESOLVED_SIGNED vector, R, from another UNRESOLVED_SIGNED vector, L, -- that may possibly be of different lengths. -- Id: A.10R function "-"(L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Similar to A.10 where R is bit 0 of a non-negative. -- Id: A.10L function "-"(L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Similar to A.10 where R is bit 0 of a non-negative. -- Id: A.11 function "-" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Subtracts a nonnegative INTEGER, R, from an UNRESOLVED_UNSIGNED vector, L. -- Id: A.12 function "-" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Subtracts an UNRESOLVED_UNSIGNED vector, R, from a nonnegative INTEGER, L. -- Id: A.13 function "-" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Subtracts an INTEGER, R, from an UNRESOLVED_SIGNED vector, L. -- Id: A.14 function "-" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Subtracts an UNRESOLVED_SIGNED vector, R, from an INTEGER, L. --============================================================================ -- Id: A.15 function "*" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((L'LENGTH+R'LENGTH-1) downto 0) -- Result: Performs the multiplication operation on two UNRESOLVED_UNSIGNED vectors -- that may possibly be of different lengths. -- Id: A.16 function "*" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((L'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies two UNRESOLVED_SIGNED vectors that may possibly be of -- different lengths. -- Id: A.17 function "*" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((L'LENGTH+L'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_UNSIGNED vector, L, with a nonnegative -- INTEGER, R. R is converted to an UNRESOLVED_UNSIGNED vector of -- SIZE L'LENGTH before multiplication. -- Id: A.18 function "*" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED((R'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_UNSIGNED vector, R, with a nonnegative -- INTEGER, L. L is converted to an UNRESOLVED_UNSIGNED vector of -- SIZE R'LENGTH before multiplication. -- Id: A.19 function "*" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((L'LENGTH+L'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_SIGNED vector, L, with an INTEGER, R. R is -- converted to an UNRESOLVED_SIGNED vector of SIZE L'LENGTH before -- multiplication. -- Id: A.20 function "*" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED((R'LENGTH+R'LENGTH-1) downto 0) -- Result: Multiplies an UNRESOLVED_SIGNED vector, R, with an INTEGER, L. L is -- converted to an UNRESOLVED_SIGNED vector of SIZE R'LENGTH before -- multiplication. --============================================================================ -- -- NOTE: If second argument is zero for "/" operator, a severity level -- of ERROR is issued. -- Id: A.21 function "/" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_UNSIGNED vector, L, by another UNRESOLVED_UNSIGNED vector, R. -- Id: A.22 function "/" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_SIGNED vector, L, by another UNRESOLVED_SIGNED vector, R. -- Id: A.23 function "/" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_UNSIGNED vector, L, by a nonnegative INTEGER, R. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.24 function "/" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Divides a nonnegative INTEGER, L, by an UNRESOLVED_UNSIGNED vector, R. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.25 function "/" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Divides an UNRESOLVED_SIGNED vector, L, by an INTEGER, R. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.26 function "/" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Divides an INTEGER, L, by an UNRESOLVED_SIGNED vector, R. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- -- NOTE: If second argument is zero for "rem" operator, a severity level -- of ERROR is issued. -- Id: A.27 function "rem" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L and R are UNRESOLVED_UNSIGNED vectors. -- Id: A.28 function "rem" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L and R are UNRESOLVED_SIGNED vectors. -- Id: A.29 function "rem" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L is an UNRESOLVED_UNSIGNED vector and R is a -- nonnegative INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.30 function "rem" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where R is an UNRESOLVED_UNSIGNED vector and L is a -- nonnegative INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.31 function "rem" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L rem R" where L is UNRESOLVED_SIGNED vector and R is an INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.32 function "rem" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L rem R" where R is UNRESOLVED_SIGNED vector and L is an INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- -- NOTE: If second argument is zero for "mod" operator, a severity level -- of ERROR is issued. -- Id: A.33 function "mod" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L and R are UNRESOLVED_UNSIGNED vectors. -- Id: A.34 function "mod" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L and R are UNRESOLVED_SIGNED vectors. -- Id: A.35 function "mod" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an UNRESOLVED_UNSIGNED vector and R -- is a nonnegative INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.36 function "mod" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where R is an UNRESOLVED_UNSIGNED vector and L -- is a nonnegative INTEGER. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. -- Id: A.37 function "mod" (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. -- If NO_OF_BITS(R) > L'LENGTH, result is truncated to L'LENGTH. -- Id: A.38 function "mod" (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Computes "L mod R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH. --============================================================================ -- Id: A.39 function find_leftmost (ARG : UNRESOLVED_UNSIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.40 function find_leftmost (ARG : UNRESOLVED_SIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.41 function find_rightmost (ARG : UNRESOLVED_UNSIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. -- Id: A.42 function find_rightmost (ARG : UNRESOLVED_SIGNED; Y : STD_ULOGIC) return INTEGER; -- Result subtype: INTEGER -- Result: Finds the leftmost occurrence of the value of Y in ARG. -- Returns the index of the occurrence if it exists, or -1 otherwise. --============================================================================ -- Comparison Operators --============================================================================ -- Id: C.1 function ">" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.2 function ">" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.3 function ">" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.4 function ">" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is a INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.5 function ">" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.6 function ">" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L > R" where L is an UNRESOLVED_SIGNED vector and -- R is a INTEGER. --============================================================================ -- Id: C.7 function "<" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.8 function "<" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.9 function "<" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.10 function "<" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.11 function "<" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.12 function "<" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L < R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.13 function "<=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.14 function "<=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.15 function "<=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.16 function "<=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.17 function "<=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.18 function "<=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L <= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.19 function ">=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.20 function ">=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.21 function ">=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.22 function ">=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.23 function ">=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.24 function ">=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L >= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.25 function "=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.26 function "=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.27 function "=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.28 function "=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.29 function "=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.30 function "=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L = R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.31 function "/=" (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.32 function "/=" (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.33 function "/=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.34 function "/=" (L : INTEGER; R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.35 function "/=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.36 function "/=" (L : UNRESOLVED_SIGNED; R : INTEGER) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: Computes "L /= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.37 function MINIMUM (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of two UNRESOLVED_UNSIGNED vectors that may be -- of different lengths. -- Id: C.38 function MINIMUM (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of two UNRESOLVED_SIGNED vectors that may be -- of different lengths. -- Id: C.39 function MINIMUM (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of a nonnegative INTEGER, L, and -- an UNRESOLVED_UNSIGNED vector, R. -- Id: C.40 function MINIMUM (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of an INTEGER, L, and an UNRESOLVED_SIGNED -- vector, R. -- Id: C.41 function MINIMUM (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the lesser of an UNRESOLVED_UNSIGNED vector, L, and -- a nonnegative INTEGER, R. -- Id: C.42 function MINIMUM (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the lesser of an UNRESOLVED_SIGNED vector, L, and -- an INTEGER, R. --============================================================================ -- Id: C.43 function MAXIMUM (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of two UNRESOLVED_UNSIGNED vectors that may be -- of different lengths. -- Id: C.44 function MAXIMUM (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of two UNRESOLVED_SIGNED vectors that may be -- of different lengths. -- Id: C.45 function MAXIMUM (L : NATURAL; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of a nonnegative INTEGER, L, and -- an UNRESOLVED_UNSIGNED vector, R. -- Id: C.46 function MAXIMUM (L : INTEGER; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of an INTEGER, L, and an UNRESOLVED_SIGNED -- vector, R. -- Id: C.47 function MAXIMUM (L : UNRESOLVED_UNSIGNED; R : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED -- Result: Returns the greater of an UNRESOLVED_UNSIGNED vector, L, and -- a nonnegative INTEGER, R. -- Id: C.48 function MAXIMUM (L : UNRESOLVED_SIGNED; R : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED -- Result: Returns the greater of an UNRESOLVED_SIGNED vector, L, and -- an INTEGER, R. --============================================================================ -- Id: C.49 function "?>" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.50 function "?>" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.51 function "?>" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.52 function "?>" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is a INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.53 function "?>" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.54 function "?>" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L > R" where L is an UNRESOLVED_SIGNED vector and -- R is a INTEGER. --============================================================================ -- Id: C.55 function "?<" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.56 function "?<" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.57 function "?<" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.58 function "?<" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.59 function "?<" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.60 function "?<" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L < R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.61 function "?<=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.62 function "?<=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.63 function "?<=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.64 function "?<=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.65 function "?<=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.66 function "?<=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L <= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.67 function "?>=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.68 function "?>=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.69 function "?>=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.70 function "?>=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.71 function "?>=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.72 function "?>=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L >= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.73 function "?=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.74 function "?=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.75 function "?=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.76 function "?=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.77 function "?=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.78 function "?=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L = R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Id: C.79 function "?/=" (L, R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L and R are UNRESOLVED_UNSIGNED vectors possibly -- of different lengths. -- Id: C.80 function "?/=" (L, R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L and R are UNRESOLVED_SIGNED vectors possibly -- of different lengths. -- Id: C.81 function "?/=" (L : NATURAL; R : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is a nonnegative INTEGER and -- R is an UNRESOLVED_UNSIGNED vector. -- Id: C.82 function "?/=" (L : INTEGER; R : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an INTEGER and -- R is an UNRESOLVED_SIGNED vector. -- Id: C.83 function "?/=" (L : UNRESOLVED_UNSIGNED; R : NATURAL) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an UNRESOLVED_UNSIGNED vector and -- R is a nonnegative INTEGER. -- Id: C.84 function "?/=" (L : UNRESOLVED_SIGNED; R : INTEGER) return STD_ULOGIC; -- Result subtype: STD_ULOGIC -- Result: Computes "L /= R" where L is an UNRESOLVED_SIGNED vector and -- R is an INTEGER. --============================================================================ -- Shift and Rotate Functions --============================================================================ -- Id: S.1 function SHIFT_LEFT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-left on an UNRESOLVED_UNSIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT leftmost elements are lost. -- Id: S.2 function SHIFT_RIGHT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-right on an UNRESOLVED_UNSIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT rightmost elements are lost. -- Id: S.3 function SHIFT_LEFT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-left on an UNRESOLVED_SIGNED vector COUNT times. -- The vacated positions are filled with '0'. -- The COUNT leftmost elements are lost. -- Id: S.4 function SHIFT_RIGHT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a shift-right on an UNRESOLVED_SIGNED vector COUNT times. -- The vacated positions are filled with the leftmost -- element, ARG'LEFT. The COUNT rightmost elements are lost. --============================================================================ -- Id: S.5 function ROTATE_LEFT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a rotate-left of an UNRESOLVED_UNSIGNED vector COUNT times. -- Id: S.6 function ROTATE_RIGHT (ARG : UNRESOLVED_UNSIGNED; COUNT : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a rotate-right of an UNRESOLVED_UNSIGNED vector COUNT times. -- Id: S.7 function ROTATE_LEFT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a logical rotate-left of an UNRESOLVED_SIGNED -- vector COUNT times. -- Id: S.8 function ROTATE_RIGHT (ARG : UNRESOLVED_SIGNED; COUNT : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: Performs a logical rotate-right of an UNRESOLVED_SIGNED -- vector COUNT times. --============================================================================ --============================================================================ ------------------------------------------------------------------------------ -- Note: Function S.9 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.9 function "sll" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.10 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.10 function "sll" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.11 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE StdL 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.11 function "srl" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.12 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.12 function "srl" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: UNRESOLVED_SIGNED(SHIFT_RIGHT(UNRESOLVED_UNSIGNED(ARG), COUNT)) ------------------------------------------------------------------------------ -- Note: Function S.13 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.13 function "rol" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.14 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.14 function "rol" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.15 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.15 function "ror" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.16 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.16 function "ror" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: ROTATE_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.17 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.17 function "sla" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.18 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.18 function "sla" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_LEFT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.19 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.19 function "sra" (ARG : UNRESOLVED_UNSIGNED; COUNT : INTEGER) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) ------------------------------------------------------------------------------ -- Note: Function S.20 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: S.20 function "sra" (ARG : UNRESOLVED_SIGNED; COUNT : INTEGER) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(ARG'LENGTH-1 downto 0) -- Result: SHIFT_RIGHT(ARG, COUNT) --============================================================================ -- RESIZE Functions --============================================================================ -- Id: R.1 function RESIZE (ARG : UNRESOLVED_SIGNED; NEW_SIZE : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(NEW_SIZE-1 downto 0) -- Result: Resizes the UNRESOLVED_SIGNED vector ARG to the specified size. -- To create a larger vector, the new [leftmost] bit positions -- are filled with the sign bit (ARG'LEFT). When truncating, -- the sign bit is retained along with the rightmost part. -- Id: R.2 function RESIZE (ARG : UNRESOLVED_UNSIGNED; NEW_SIZE : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(NEW_SIZE-1 downto 0) -- Result: Resizes the UNRESOLVED_SIGNED vector ARG to the specified size. -- To create a larger vector, the new [leftmost] bit positions -- are filled with '0'. When truncating, the leftmost bits -- are dropped. function RESIZE (ARG, SIZE_RES : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED (SIZE_RES'length-1 downto 0) function RESIZE (ARG, SIZE_RES : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED (SIZE_RES'length-1 downto 0) --============================================================================ -- Conversion Functions --============================================================================ -- Id: D.1 function TO_INTEGER (ARG : UNRESOLVED_UNSIGNED) return NATURAL; -- Result subtype: NATURAL. Value cannot be negative since parameter is an -- UNRESOLVED_UNSIGNED vector. -- Result: Converts the UNRESOLVED_UNSIGNED vector to an INTEGER. -- Id: D.2 function TO_INTEGER (ARG : UNRESOLVED_SIGNED) return INTEGER; -- Result subtype: INTEGER -- Result: Converts an UNRESOLVED_SIGNED vector to an INTEGER. -- Id: D.3 function TO_UNSIGNED (ARG, SIZE : NATURAL) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(SIZE-1 downto 0) -- Result: Converts a nonnegative INTEGER to an UNRESOLVED_UNSIGNED vector with -- the specified SIZE. -- Id: D.4 function TO_SIGNED (ARG : INTEGER; SIZE : NATURAL) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(SIZE-1 downto 0) -- Result: Converts an INTEGER to a UNRESOLVED_SIGNED vector of the specified SIZE. function TO_UNSIGNED (ARG : NATURAL; SIZE_RES : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(SIZE_RES'length-1 downto 0) function TO_SIGNED (ARG : INTEGER; SIZE_RES : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(SIZE_RES'length-1 downto 0) --============================================================================ -- Logical Operators --============================================================================ -- Id: L.1 function "not" (L : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Termwise inversion -- Id: L.2 function "and" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector AND operation -- Id: L.3 function "or" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector OR operation -- Id: L.4 function "nand" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector NAND operation -- Id: L.5 function "nor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector NOR operation -- Id: L.6 function "xor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector XOR operation -- --------------------------------------------------------------------------- -- Note: Function L.7 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. -- --------------------------------------------------------------------------- -- Id: L.7 function "xnor" (L, R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation -- Id: L.8 function "not" (L : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Termwise inversion -- Id: L.9 function "and" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector AND operation -- Id: L.10 function "or" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector OR operation -- Id: L.11 function "nand" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector NAND operation -- Id: L.12 function "nor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector NOR operation -- Id: L.13 function "xor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XOR operation -- --------------------------------------------------------------------------- -- Note: Function L.14 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. -- --------------------------------------------------------------------------- -- Id: L.14 function "xnor" (L, R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation -- Id: L.15 function "and" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation -- Id: L.16 function "and" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation -- Id: L.17 function "or" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation -- Id: L.18 function "or" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation -- Id: L.19 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation -- Id: L.20 function "nand" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation -- Id: L.21 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation -- Id: L.22 function "nor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation -- Id: L.23 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation -- Id: L.24 function "xor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation ------------------------------------------------------------------------------ -- Note: Function L.25 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.25 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.26 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.26 function "xnor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation -- Id: L.27 function "and" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation -- Id: L.28 function "and" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation -- Id: L.29 function "or" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation -- Id: L.30 function "or" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation -- Id: L.31 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation -- Id: L.32 function "nand" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation -- Id: L.33 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation -- Id: L.34 function "nor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation -- Id: L.35 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation -- Id: L.36 function "xor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation ------------------------------------------------------------------------------ -- Note: Function L.37 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.37 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.38 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ -- Id: L.38 function "xnor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation ------------------------------------------------------------------------------ -- Note: Function L.39 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.39 function "and" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.40 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.40 function "nand" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.41 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.41 function "or" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.42 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.42 function "nor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.43 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.43 function "xor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.44 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.44 function "xnor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.45 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.45 function "and" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.46 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.46 function "nand" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.47 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.47 function "or" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.48 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.48 function "nor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.49 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.49 function "xor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.50 is not compatible with editions of IEEE Std 1076 from -- 1987 through 2002. Comment out the function (declaration and body) for -- compatibility with these editions. ------------------------------------------------------------------------------ -- Id: L.50 function "xnor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. --============================================================================ -- Match Functions --============================================================================ -- Id: M.1 function STD_MATCH (L, R : STD_ULOGIC) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.2 function STD_MATCH (L, R : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.3 function STD_MATCH (L, R : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent -- Id: M.5 function STD_MATCH (L, R : STD_ULOGIC_VECTOR) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: terms compared per STD_LOGIC_1164 intent --============================================================================ -- Translation Functions --============================================================================ -- Id: T.1 function TO_01 (S : UNRESOLVED_UNSIGNED; XMAP : STD_ULOGIC := '0') return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', and 'L' is translated -- to '0'. If a value other than '0'|'1'|'H'|'L' is found, -- the array is set to (others => XMAP), and a warning is -- issued. -- Id: T.2 function TO_01 (S : UNRESOLVED_SIGNED; XMAP : STD_ULOGIC := '0') return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', and 'L' is translated -- to '0'. If a value other than '0'|'1'|'H'|'L' is found, -- the array is set to (others => XMAP), and a warning is -- issued. -- Id: T.3 function TO_X01 (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.4 function TO_X01 (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.5 function TO_X01Z (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L'|'Z' are translated to 'X'. -- Id: T.6 function TO_X01Z (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than '0'|'1'|'H'|'L'|'Z' are translated to 'X'. -- Id: T.7 function TO_UX01 (S : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_UNSIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than 'U'|'0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.8 function TO_UX01 (S : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(S'RANGE) -- Result: Termwise, 'H' is translated to '1', 'L' is translated to '0', -- and values other than 'U'|'0'|'1'|'H'|'L' are translated to 'X'. -- Id: T.9 function IS_X (S : UNRESOLVED_UNSIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: TRUE if S contains a 'U'|'X'|'Z'|'W'|'-' value, FALSE otherwise. -- Id: T.10 function IS_X (S : UNRESOLVED_SIGNED) return BOOLEAN; -- Result subtype: BOOLEAN -- Result: TRUE if S contains a 'U'|'X'|'Z'|'W'|'-' value, FALSE otherwise. --============================================================================ -- string conversion and write operations --============================================================================ -- the following operations are predefined -- function to_string (value : UNRESOLVED_UNSIGNED) return STRING; -- function to_string (value : UNRESOLVED_SIGNED) return STRING; -- explicitly defined operations alias to_bstring is to_string [UNRESOLVED_UNSIGNED return STRING]; alias to_bstring is to_string [UNRESOLVED_SIGNED return STRING]; alias to_binary_string is to_string [UNRESOLVED_UNSIGNED return STRING]; alias to_binary_string is to_string [UNRESOLVED_SIGNED return STRING]; function to_ostring (value : UNRESOLVED_UNSIGNED) return STRING; function to_ostring (value : UNRESOLVED_SIGNED) return STRING; alias to_octal_string is to_ostring [UNRESOLVED_UNSIGNED return STRING]; alias to_octal_string is to_ostring [UNRESOLVED_SIGNED return STRING]; function to_hstring (value : UNRESOLVED_UNSIGNED) return STRING; function to_hstring (value : UNRESOLVED_SIGNED) return STRING; alias to_hex_string is to_hstring [UNRESOLVED_UNSIGNED return STRING]; alias to_hex_string is to_hstring [UNRESOLVED_SIGNED return STRING]; procedure READ(L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure READ(L : inout LINE; VALUE : out UNRESOLVED_SIGNED); procedure WRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure WRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias BREAD is READ [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias BREAD is READ [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias BREAD is READ [LINE, UNRESOLVED_UNSIGNED]; alias BREAD is READ [LINE, UNRESOLVED_SIGNED]; alias BINARY_READ is READ [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias BINARY_READ is READ [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias BINARY_READ is READ [LINE, UNRESOLVED_UNSIGNED]; alias BINARY_READ is READ [LINE, UNRESOLVED_SIGNED]; procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure OREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED); alias OCTAL_READ is OREAD [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_UNSIGNED]; alias OCTAL_READ is OREAD [LINE, UNRESOLVED_SIGNED]; procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED; GOOD : out BOOLEAN); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED; GOOD : out BOOLEAN); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_UNSIGNED); procedure HREAD (L : inout LINE; VALUE : out UNRESOLVED_SIGNED); alias HEX_READ is HREAD [LINE, UNRESOLVED_UNSIGNED, BOOLEAN]; alias HEX_READ is HREAD [LINE, UNRESOLVED_SIGNED, BOOLEAN]; alias HEX_READ is HREAD [LINE, UNRESOLVED_UNSIGNED]; alias HEX_READ is HREAD [LINE, UNRESOLVED_SIGNED]; alias BWRITE is WRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias BWRITE is WRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; alias BINARY_WRITE is WRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias BINARY_WRITE is WRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; procedure OWRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure OWRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias OCTAL_WRITE is OWRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias OCTAL_WRITE is OWRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; procedure HWRITE (L : inout LINE; VALUE : in UNRESOLVED_UNSIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); procedure HWRITE (L : inout LINE; VALUE : in UNRESOLVED_SIGNED; JUSTIFIED : in SIDE := right; FIELD : in WIDTH := 0); alias HEX_WRITE is HWRITE [LINE, UNRESOLVED_UNSIGNED, SIDE, WIDTH]; alias HEX_WRITE is HWRITE [LINE, UNRESOLVED_SIGNED, SIDE, WIDTH]; end package NUMERIC_STD;
-------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 19:40:20 01/20/2015 -- Design Name: -- Module Name: C:/Users/sed/Downloads/Frecuencimetroo 9.0B/frecuencimentro/presesc_tb.vhd -- Project Name: Frecuencimentro -- Target Device: -- Tool versions: -- Description: -- -- VHDL Test Bench Created by ISE for module: EscaladoPrePresentacion -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- -- Notes: -- This testbench has been automatically generated using types std_logic and -- std_logic_vector for the ports of the unit under test. Xilinx recommends -- that these types always be used for the top-level I/O of a design in order -- to guarantee that the testbench will bind correctly to the post-implementation -- simulation model. -------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.std_logic_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --USE ieee.numeric_std.ALL; ENTITY presesc_tb IS END presesc_tb; ARCHITECTURE behavior OF presesc_tb IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT EscaladoPrePresentacion PORT( entrada_frec : IN std_logic_vector(0 to 30); salida_frec : OUT std_logic_vector(15 downto 0); salida_uds : OUT std_logic_vector(1 downto 0) ); END COMPONENT; --Inputs signal entrada_frec : std_logic_vector(0 to 30) := (others => '0'); --Outputs signal salida_frec : std_logic_vector(15 downto 0); signal salida_uds : std_logic_vector(1 downto 0); -- No clocks detected in port list. Replace <clock> below with -- appropriate port name constant <clock>_period : time := 10 ns; BEGIN -- Instantiate the Unit Under Test (UUT) uut: EscaladoPrePresentacion PORT MAP ( entrada_frec => entrada_frec, salida_frec => salida_frec, salida_uds => salida_uds ); -- Clock process definitions <clock>_process :process begin <clock> <= '0'; wait for <clock>_period/2; <clock> <= '1'; wait for <clock>_period/2; end process; -- Stimulus process stim_proc: process begin -- hold reset state for 100 ns. wait for 100 ns; wait for <clock>_period*10; -- insert stimulus here wait; end process; END;
-------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 19:40:20 01/20/2015 -- Design Name: -- Module Name: C:/Users/sed/Downloads/Frecuencimetroo 9.0B/frecuencimentro/presesc_tb.vhd -- Project Name: Frecuencimentro -- Target Device: -- Tool versions: -- Description: -- -- VHDL Test Bench Created by ISE for module: EscaladoPrePresentacion -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- -- Notes: -- This testbench has been automatically generated using types std_logic and -- std_logic_vector for the ports of the unit under test. Xilinx recommends -- that these types always be used for the top-level I/O of a design in order -- to guarantee that the testbench will bind correctly to the post-implementation -- simulation model. -------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.std_logic_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --USE ieee.numeric_std.ALL; ENTITY presesc_tb IS END presesc_tb; ARCHITECTURE behavior OF presesc_tb IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT EscaladoPrePresentacion PORT( entrada_frec : IN std_logic_vector(0 to 30); salida_frec : OUT std_logic_vector(15 downto 0); salida_uds : OUT std_logic_vector(1 downto 0) ); END COMPONENT; --Inputs signal entrada_frec : std_logic_vector(0 to 30) := (others => '0'); --Outputs signal salida_frec : std_logic_vector(15 downto 0); signal salida_uds : std_logic_vector(1 downto 0); -- No clocks detected in port list. Replace <clock> below with -- appropriate port name constant <clock>_period : time := 10 ns; BEGIN -- Instantiate the Unit Under Test (UUT) uut: EscaladoPrePresentacion PORT MAP ( entrada_frec => entrada_frec, salida_frec => salida_frec, salida_uds => salida_uds ); -- Clock process definitions <clock>_process :process begin <clock> <= '0'; wait for <clock>_period/2; <clock> <= '1'; wait for <clock>_period/2; end process; -- Stimulus process stim_proc: process begin -- hold reset state for 100 ns. wait for 100 ns; wait for <clock>_period*10; -- insert stimulus here wait; end process; END;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1623.vhd,v 1.2 2001-10-26 16:30:11 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c08s12b00x00p03n01i01623ent IS END c08s12b00x00p03n01i01623ent; ARCHITECTURE c08s12b00x00p03n01i01623arch OF c08s12b00x00p03n01i01623ent IS BEGIN return true; -- illegal in architecture statement region. TESTING: PROCESS BEGIN assert FALSE report "***FAILED TEST: c08s12b00x00p03n01i01623 - Return statement only allowed within the body of a function or procedure." severity ERROR; wait; END PROCESS TESTING; END c08s12b00x00p03n01i01623arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1623.vhd,v 1.2 2001-10-26 16:30:11 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c08s12b00x00p03n01i01623ent IS END c08s12b00x00p03n01i01623ent; ARCHITECTURE c08s12b00x00p03n01i01623arch OF c08s12b00x00p03n01i01623ent IS BEGIN return true; -- illegal in architecture statement region. TESTING: PROCESS BEGIN assert FALSE report "***FAILED TEST: c08s12b00x00p03n01i01623 - Return statement only allowed within the body of a function or procedure." severity ERROR; wait; END PROCESS TESTING; END c08s12b00x00p03n01i01623arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1623.vhd,v 1.2 2001-10-26 16:30:11 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c08s12b00x00p03n01i01623ent IS END c08s12b00x00p03n01i01623ent; ARCHITECTURE c08s12b00x00p03n01i01623arch OF c08s12b00x00p03n01i01623ent IS BEGIN return true; -- illegal in architecture statement region. TESTING: PROCESS BEGIN assert FALSE report "***FAILED TEST: c08s12b00x00p03n01i01623 - Return statement only allowed within the body of a function or procedure." severity ERROR; wait; END PROCESS TESTING; END c08s12b00x00p03n01i01623arch;
library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_ARITH.all; use ieee.std_logic_misc.all; package ROCACHE_PKG is constant ROCACHE_WAYS : natural := 4; constant ROCACHE_NUMSETS : natural := 4; --Depth of ICache constant ROCACHE_WORDS : natural := 2; constant INSTR_SIZE : natural := 32; constant ROCACHE_SETINDEXSIZE : natural := 2; constant ROCACHE_NUMLINES : natural := ROCACHE_WAYS; constant ROCACHE_INDEXSIZE : natural := 1; constant ROCACHE_TAGSIZE : natural := INSTR_SIZE - ROCACHE_INDEXSIZE - ROCACHE_SETINDEXSIZE; constant ROCACHE_TAGOFFSET : natural := INSTR_SIZE - ROCACHE_TAGSIZE; constant ROCACHE_SETOFFSET : natural := ROCACHE_TAGOFFSET - ROCACHE_SETINDEXSIZE; constant ROCACHE_INDEXOFFSET : natural := ROCACHE_INDEXSIZE; constant ROCACHE_COUNTERSIZE : natural := 8; subtype ROCACHE_LINES is natural range 0 to ROCACHE_NUMLINES - 1; subtype ROCACHE_SETS is natural range 0 to 2**ROCACHE_SETINDEXSIZE - 1; subtype ROCACHE_INDEX is natural range 0 to 2**ROCACHE_INDEXSIZE - 1; type INSTR_WORDS is array (ROCACHE_INDEX) of std_logic_vector(INSTR_SIZE - 1 downto 0); type ROCACHE_RECORD is record tag : std_logic_vector(ROCACHE_TAGSIZE-1 downto 0); words : INSTR_WORDS; counter : natural range 0 to 2**ROCACHE_COUNTERSIZE; valid : std_logic; end record; type ROCACHE_LINE is array (ROCACHE_LINES) of ROCACHE_RECORD; type ROCACHE_TYPE is array (ROCACHE_SETS) of ROCACHE_LINE; subtype state_type is std_logic_vector(1 downto 0); constant STATE_FLUSH_MEM : state_type := "00"; constant STATE_MISS : state_type := "01"; constant STATE_COMPARE_TAGS : state_type := "10"; constant STATE_IDLE : state_type := "11"; function COMPARE_TAGS( x : std_logic_vector(ROCACHE_TAGSIZE - 1 downto 0 ); y : std_logic_vector(ROCACHE_TAGSIZE - 1 downto 0 ) ) return std_logic; function GET_SET( x : std_logic_vector(INSTR_SIZE - 1 downto 0) ) return integer; function GET_REPLACEMENT_LINE( pc : std_logic_vector(INSTR_SIZE - 1 downto 0); cache: ROCACHE_TYPE ) return natural; end ROCACHE_PKG; package body ROCACHE_PKG is function COMPARE_TAGS( x : std_logic_vector(ROCACHE_TAGSIZE-1 downto 0); y : std_logic_vector(ROCACHE_TAGSIZE-1 downto 0) ) return std_logic is begin return and_reduce(x xnor y); end COMPARE_TAGS; function GET_SET ( x : std_logic_vector(INSTR_SIZE - 1 downto 0) ) return integer is variable ret : integer :=0; variable y : std_logic_vector(ROCACHE_TAGOFFSET-1 downto ROCACHE_SETOFFSET); begin y := x(ROCACHE_TAGOFFSET-1 downto ROCACHE_SETOFFSET); ret := conv_integer(unsigned (y)); return ret; end GET_SET; function GET_REPLACEMENT_LINE ( pc : std_logic_vector(INSTR_SIZE - 1 downto 0); cache: ROCACHE_TYPE ) return natural is variable count : natural range 0 to 2**ROCACHE_COUNTERSIZE; variable min_found : std_logic; variable i : natural := 0; variable to_evict : natural range 0 to 2**ROCACHE_COUNTERSIZE; variable countValid : std_logic; begin -- count := cache( GET_SET(pc) )(i).counter; to_evict := i; countValid := '0'; -- Iterate -- while i < (ROCACHE_NUMLINES - 2) loop -- Check counter value -- if(cache( GET_SET(pc) )(i+1).valid = '0') then -- to_evict := i + 1; -- exit; -- elsif(cache( GET_SET(pc) )(i+1).counter < count) then -- -- New least frequently used -> save its index and counter value -- count := cache( GET_SET(pc) )(i+1).counter; -- to_evict := i + 1; -- end if; -- i := i + 1 ; -- end loop; -- Iterate for i in 0 to ROCACHE_NUMLINES - 1 loop -- If not valid -> USE IT if(cache( GET_SET(pc) )(i).valid = '0') then to_evict := i; exit; -- Line is busy, but counter not initialized elsif(countValid = '0') then count := cache(GET_SET(pc))(i).counter; countValid := '1'; to_evict := i; -- Line is busy, and counter initialized: check if lower elsif(cache( GET_SET(pc) )(i).counter < count) then -- New least frequently used -> save its index and counter value count := cache( GET_SET(pc) )(i).counter; to_evict := i; end if; end loop; return to_evict; end GET_REPLACEMENT_LINE; end package body;
------------------------------------------------------------------------------- -- axi_sg_updt_sm ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010, 2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_updt_sm.vhd -- Description: This entity manages updating of descriptors. -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- -- Structure: -- axi_sg.vhd -- axi_sg_pkg.vhd -- |- axi_sg_ftch_mngr.vhd -- | |- axi_sg_ftch_sm.vhd -- | |- axi_sg_ftch_pntr.vhd -- | |- axi_sg_ftch_cmdsts_if.vhd -- |- axi_sg_updt_mngr.vhd -- | |- axi_sg_updt_sm.vhd -- | |- axi_sg_updt_cmdsts_if.vhd -- |- axi_sg_ftch_q_mngr.vhd -- | |- axi_sg_ftch_queue.vhd -- | | |- proc_common_v4_0.sync_fifo_fg.vhd -- | | |- proc_common_v4_0.axi_sg_afifo_autord.vhd -- | |- axi_sg_ftch_noqueue.vhd -- |- axi_sg_updt_q_mngr.vhd -- | |- axi_sg_updt_queue.vhd -- | | |- proc_common_v4_0.sync_fifo_fg.vhd -- | |- proc_common_v4_0.axi_sg_afifo_autord.vhd -- | |- axi_sg_updt_noqueue.vhd -- |- axi_sg_intrpt.vhd -- |- axi_datamover_v5_0.axi_datamover.vhd -- ------------------------------------------------------------------------------- -- Author: Gary Burch -- History: -- GAB 3/19/10 v1_00_a -- ^^^^^^ -- - Initial Release -- ~~~~~~ -- GAB 8/26/10 v2_00_a -- ^^^^^^ -- Rolled axi_sg library version to version v2_00_a -- ~~~~~~ -- GAB 10/21/10 v4_03 -- ^^^^^^ -- Rolled version to v4_03 -- ~~~~~~ -- GAB 6/13/11 v4_03 -- ^^^^^^ -- Update to AXI Datamover v4_03 -- Added aynchronous operation -- ~~~~~~ ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.std_logic_misc.all; library unisim; use unisim.vcomponents.all; library axi_vdma_v6_2; use axi_vdma_v6_2.axi_sg_pkg.all; ------------------------------------------------------------------------------- entity axi_sg_updt_sm is generic ( C_M_AXI_SG_ADDR_WIDTH : integer range 32 to 64 := 32; -- Master AXI Memory Map Address Width for Scatter Gather R/W Port C_INCLUDE_CH1 : integer range 0 to 1 := 1; -- Include or Exclude channel 1 scatter gather engine -- 0 = Exclude Channel 1 SG Engine -- 1 = Include Channel 1 SG Engine C_INCLUDE_CH2 : integer range 0 to 1 := 1; -- Include or Exclude channel 2 scatter gather engine -- 0 = Exclude Channel 2 SG Engine -- 1 = Include Channel 2 SG Engine C_SG_CH1_WORDS_TO_UPDATE : integer range 1 to 16 := 8; -- Number of words to fetch C_SG_CH1_FIRST_UPDATE_WORD : integer range 0 to 15 := 0; -- Starting update word offset C_SG_CH2_WORDS_TO_UPDATE : integer range 1 to 16 := 8; -- Number of words to fetch C_SG_CH2_FIRST_UPDATE_WORD : integer range 0 to 15 := 0 -- Starting update word offset ); port ( ----------------------------------------------------------------------- -- AXI Scatter Gather Interface ----------------------------------------------------------------------- m_axi_sg_aclk : in std_logic ; -- m_axi_sg_aresetn : in std_logic ; -- -- ftch_error : in std_logic ; -- -- -- Channel 1 Control and Status -- ch1_updt_queue_empty : in std_logic ; -- ch1_updt_curdesc_wren : in std_logic ; -- ch1_updt_curdesc : in std_logic_vector -- (C_M_AXI_SG_ADDR_WIDTH-1 downto 0) ; -- ch1_updt_ioc : in std_logic ; -- ch1_dma_interr : in std_logic ; -- ch1_dma_slverr : in std_logic ; -- ch1_dma_decerr : in std_logic ; -- ch1_updt_active : out std_logic ; -- ch1_updt_idle : out std_logic ; -- ch1_updt_interr_set : out std_logic ; -- ch1_updt_slverr_set : out std_logic ; -- ch1_updt_decerr_set : out std_logic ; -- ch1_dma_interr_set : out std_logic ; -- ch1_dma_slverr_set : out std_logic ; -- ch1_dma_decerr_set : out std_logic ; -- ch1_updt_ioc_irq_set : out std_logic ; -- ch1_updt_done : out std_logic ; -- -- -- Channel 2 Control and Status -- ch2_updt_queue_empty : in std_logic ; -- ch2_updt_curdesc_wren : in std_logic ; -- ch2_updt_curdesc : in std_logic_vector -- (C_M_AXI_SG_ADDR_WIDTH-1 downto 0) ; -- ch2_updt_ioc : in std_logic ; -- ch2_dma_interr : in std_logic ; -- ch2_dma_slverr : in std_logic ; -- ch2_dma_decerr : in std_logic ; -- ch2_updt_active : out std_logic ; -- ch2_updt_idle : out std_logic ; -- ch2_updt_interr_set : out std_logic ; -- ch2_updt_slverr_set : out std_logic ; -- ch2_updt_decerr_set : out std_logic ; -- ch2_dma_interr_set : out std_logic ; -- ch2_dma_slverr_set : out std_logic ; -- ch2_dma_decerr_set : out std_logic ; -- ch2_updt_ioc_irq_set : out std_logic ; -- ch2_updt_done : out std_logic ; -- -- -- DataMover Command -- updt_cmnd_wr : out std_logic ; -- updt_cmnd_data : out std_logic_vector -- ((C_M_AXI_SG_ADDR_WIDTH -- +CMD_BASE_WIDTH)-1 downto 0) ; -- -- DataMover Status -- updt_done : in std_logic ; -- updt_error : in std_logic ; -- updt_interr : in std_logic ; -- updt_slverr : in std_logic ; -- updt_decerr : in std_logic ; -- updt_error_addr : out std_logic_vector -- (C_M_AXI_SG_ADDR_WIDTH-1 downto 0) -- ); end axi_sg_updt_sm; ------------------------------------------------------------------------------- -- Architecture ------------------------------------------------------------------------------- architecture implementation of axi_sg_updt_sm is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; ------------------------------------------------------------------------------- -- Functions ------------------------------------------------------------------------------- -- No Functions Declared ------------------------------------------------------------------------------- -- Constants Declarations ------------------------------------------------------------------------------- -- DataMover Commmand TAG constant UPDATE_CMD_TAG : std_logic_vector(3 downto 0) := (others => '0'); -- DataMover Command Type constant UPDATE_CMD_TYPE : std_logic := '0'; -- DataMover Cmnd Reserved Bits constant UPDATE_MSB_IGNORED : std_logic_vector(7 downto 0) := (others => '0'); -- DataMover Cmnd Reserved Bits constant UPDATE_LSB_IGNORED : std_logic_vector(15 downto 0) := (others => '0'); -- DataMover Cmnd Bytes to Xfer for Channel 1 constant UPDATE_CH1_CMD_BTT : std_logic_vector(SG_BTT_WIDTH-1 downto 0) := std_logic_vector(to_unsigned( (C_SG_CH1_WORDS_TO_UPDATE*4),SG_BTT_WIDTH)); -- DataMover Cmnd Bytes to Xfer for Channel 2 constant UPDATE_CH2_CMD_BTT : std_logic_vector(SG_BTT_WIDTH-1 downto 0) := std_logic_vector(to_unsigned( (C_SG_CH2_WORDS_TO_UPDATE*4),SG_BTT_WIDTH)); -- DataMover Cmnd Reserved Bits constant UPDATE_CMD_RSVD : std_logic_vector( DATAMOVER_CMD_RSVMSB_BOFST + C_M_AXI_SG_ADDR_WIDTH downto DATAMOVER_CMD_RSVLSB_BOFST + C_M_AXI_SG_ADDR_WIDTH) := (others => '0'); -- DataMover Cmnd Address Offset for channel 1 constant UPDATE_CH1_ADDR_OFFSET : integer := C_SG_CH1_FIRST_UPDATE_WORD*4; -- DataMover Cmnd Address Offset for channel 2 constant UPDATE_CH2_ADDR_OFFSET : integer := C_SG_CH2_FIRST_UPDATE_WORD*4; ------------------------------------------------------------------------------- -- Signal / Type Declarations ------------------------------------------------------------------------------- type SG_UPDATE_STATE_TYPE is ( IDLE, GET_UPDATE_PNTR, UPDATE_DESCRIPTOR, UPDATE_STATUS, UPDATE_ERROR ); signal updt_cs : SG_UPDATE_STATE_TYPE; signal updt_ns : SG_UPDATE_STATE_TYPE; -- State Machine Signals signal ch1_active_set : std_logic := '0'; signal ch2_active_set : std_logic := '0'; signal write_cmnd_cmb : std_logic := '0'; signal ch1_updt_sm_idle : std_logic := '0'; signal ch2_updt_sm_idle : std_logic := '0'; -- Misc Signals signal ch1_active_i : std_logic := '0'; signal service_ch1 : std_logic := '0'; signal ch2_active_i : std_logic := '0'; signal service_ch2 : std_logic := '0'; signal update_address : std_logic_vector (C_M_AXI_SG_ADDR_WIDTH-1 downto 0) := (others => '0'); signal update_cmd_btt : std_logic_vector (SG_BTT_WIDTH-1 downto 0) := (others => '0'); ------------------------------------------------------------------------------- -- Begin architecture logic ------------------------------------------------------------------------------- begin ch1_updt_active <= ch1_active_i; ch2_updt_active <= ch2_active_i; ------------------------------------------------------------------------------- -- Scatter Gather Fetch State Machine ------------------------------------------------------------------------------- SG_UPDT_MACHINE : process(updt_cs, ch1_active_i, ch2_active_i, service_ch1, service_ch2, ch1_updt_curdesc_wren, ch2_updt_curdesc_wren, updt_error, updt_done) begin -- Default signal assignment ch1_active_set <= '0'; ch2_active_set <= '0'; write_cmnd_cmb <= '0'; ch1_updt_sm_idle <= '0'; ch2_updt_sm_idle <= '0'; updt_ns <= updt_cs; case updt_cs is ------------------------------------------------------------------- when IDLE => ch1_updt_sm_idle <= not service_ch1; ch2_updt_sm_idle <= not service_ch2; -- error during update - therefore shut down if(updt_error = '1')then updt_ns <= UPDATE_ERROR; -- If channel 1 is running and not idle and queue is not full -- then fetch descriptor for channel 1 elsif(service_ch1 = '1')then ch1_active_set <= '1'; updt_ns <= GET_UPDATE_PNTR; -- If channel 2 is running and not idle and queue is not full -- then fetch descriptor for channel 2 elsif(service_ch2 = '1')then ch2_active_set <= '1'; updt_ns <= GET_UPDATE_PNTR; else updt_ns <= IDLE; end if; when GET_UPDATE_PNTR => if(ch1_updt_curdesc_wren = '1' or ch2_updt_curdesc_wren = '1')then updt_ns <= UPDATE_DESCRIPTOR; else updt_ns <= GET_UPDATE_PNTR; end if; ------------------------------------------------------------------- when UPDATE_DESCRIPTOR => -- error during update - therefore shut down if(updt_error = '1')then updt_ns <= UPDATE_ERROR; -- write command else ch1_updt_sm_idle <= not ch1_active_i and not service_ch1; ch2_updt_sm_idle <= not ch2_active_i and not service_ch2; write_cmnd_cmb <= '1'; updt_ns <= UPDATE_STATUS; end if; ------------------------------------------------------------------- when UPDATE_STATUS => ch1_updt_sm_idle <= not ch1_active_i and not service_ch1; ch2_updt_sm_idle <= not ch2_active_i and not service_ch2; -- error during update - therefore shut down if(updt_error = '1')then updt_ns <= UPDATE_ERROR; -- wait until done with update elsif(updt_done = '1')then -- If just finished fethcing for channel 2 then... if(ch2_active_i = '1')then -- If ready, update descriptor for channel 1 if(service_ch1 = '1')then ch1_active_set <= '1'; updt_ns <= GET_UPDATE_PNTR; -- Otherwise return to IDLE else updt_ns <= IDLE; end if; -- If just finished fethcing for channel 1 then... elsif(ch1_active_i = '1')then -- If ready, update descriptor for channel 2 if(service_ch2 = '1')then ch2_active_set <= '1'; updt_ns <= GET_UPDATE_PNTR; -- Otherwise return to IDLE else updt_ns <= IDLE; end if; else updt_ns <= IDLE; end if; else updt_ns <= UPDATE_STATUS; end if; ------------------------------------------------------------------- when UPDATE_ERROR => ch1_updt_sm_idle <= '1'; ch2_updt_sm_idle <= '1'; updt_ns <= UPDATE_ERROR; ------------------------------------------------------------------- when others => updt_ns <= IDLE; end case; end process SG_UPDT_MACHINE; ------------------------------------------------------------------------------- -- Register states of state machine ------------------------------------------------------------------------------- REGISTER_STATE : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then updt_cs <= IDLE; else updt_cs <= updt_ns; end if; end if; end process REGISTER_STATE; ------------------------------------------------------------------------------- -- Channel included therefore generate fetch logic ------------------------------------------------------------------------------- GEN_CH1_UPDATE : if C_INCLUDE_CH1 = 1 generate begin ------------------------------------------------------------------------------- -- Active channel flag. Indicates which channel is active. -- 0 = channel active -- 1 = channel active ------------------------------------------------------------------------------- CH1_ACTIVE_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_active_i <= '0'; elsif(ch1_active_i = '1' and updt_done = '1')then ch1_active_i <= '0'; elsif(ch1_active_set = '1')then ch1_active_i <= '1'; end if; end if; end process CH1_ACTIVE_PROCESS; ------------------------------------------------------------------------------- -- Channel 1 ready to be serviced? ------------------------------------------------------------------------------- service_ch1 <= '1' when ch1_updt_queue_empty = '0' -- Queue not empty and ftch_error = '0' -- No SG Fetch Error else '0'; ------------------------------------------------------------------------------- -- Channel 1 Interrupt On Complete ------------------------------------------------------------------------------- CH1_INTR_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_updt_ioc_irq_set <= '0'; -- Set interrupt on Done and Descriptor IOC set elsif(updt_done = '1' and ch1_updt_ioc = '1')then ch1_updt_ioc_irq_set <= '1'; else ch1_updt_ioc_irq_set <= '0'; end if; end if; end process CH1_INTR_PROCESS; ------------------------------------------------------------------------------- -- Channel 1 DMA Internal Error ------------------------------------------------------------------------------- CH1_INTERR_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_dma_interr_set <= '0'; -- Set internal error on desc updt Done and Internal Error elsif(updt_done = '1' and ch1_dma_interr = '1')then ch1_dma_interr_set <= '1'; end if; end if; end process CH1_INTERR_PROCESS; ------------------------------------------------------------------------------- -- Channel 1 DMA Slave Error ------------------------------------------------------------------------------- CH1_SLVERR_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_dma_slverr_set <= '0'; -- Set slave error on desc updt Done and Slave Error elsif(updt_done = '1' and ch1_dma_slverr = '1')then ch1_dma_slverr_set <= '1'; end if; end if; end process CH1_SLVERR_PROCESS; ------------------------------------------------------------------------------- -- Channel 1 DMA Decode Error ------------------------------------------------------------------------------- CH1_DECERR_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_dma_decerr_set <= '0'; -- Set decode error on desc updt Done and Decode Error elsif(updt_done = '1' and ch1_dma_decerr = '1')then ch1_dma_decerr_set <= '1'; end if; end if; end process CH1_DECERR_PROCESS; ------------------------------------------------------------------------------- -- Log Fetch Errors ------------------------------------------------------------------------------- -- Log Slave Errors reported during descriptor update SLV_SET_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_updt_slverr_set <= '0'; elsif(ch1_active_i = '1' and updt_slverr = '1')then ch1_updt_slverr_set <= '1'; end if; end if; end process SLV_SET_PROCESS; -- Log Internal Errors reported during descriptor update INT_SET_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_updt_interr_set <= '0'; elsif(ch1_active_i = '1' and updt_interr = '1')then ch1_updt_interr_set <= '1'; end if; end if; end process INT_SET_PROCESS; -- Log Decode Errors reported during descriptor update DEC_SET_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_updt_decerr_set <= '0'; elsif(ch1_active_i = '1' and updt_decerr = '1')then ch1_updt_decerr_set <= '1'; end if; end if; end process DEC_SET_PROCESS; -- Indicate update is idle if state machine is idle and update queue is empty IDLE_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0' or updt_error = '1' or ftch_error = '1')then ch1_updt_idle <= '1'; elsif(service_ch1 = '1')then ch1_updt_idle <= '0'; elsif(service_ch1 = '0' and ch1_updt_sm_idle = '1')then ch1_updt_idle <= '1'; end if; end if; end process IDLE_PROCESS; --------------------------------------------------------------------------- -- Indicate update is done to allow fetch of next descriptor -- This is needed to prevent a partial descriptor being fetched -- and then axi read is throttled for extended periods until the -- remainder of the descriptor is fetched. -- -- Note: Only used when fetch queue not inluded otherwise -- tools optimize out this process --------------------------------------------------------------------------- REG_CH1_DONE : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch1_updt_done <= '0'; elsif(updt_done = '1' and ch1_active_i = '1')then ch1_updt_done <= '1'; else ch1_updt_done <= '0'; end if; end if; end process REG_CH1_DONE; end generate GEN_CH1_UPDATE; ------------------------------------------------------------------------------- -- Channel excluded therefore do not generate fetch logic ------------------------------------------------------------------------------- GEN_NO_CH1_UPDATE : if C_INCLUDE_CH1 = 0 generate begin service_ch1 <= '0'; ch1_active_i <= '0'; ch1_updt_idle <= '0'; ch1_updt_interr_set <= '0'; ch1_updt_slverr_set <= '0'; ch1_updt_decerr_set <= '0'; ch1_dma_interr_set <= '0'; ch1_dma_slverr_set <= '0'; ch1_dma_decerr_set <= '0'; ch1_updt_ioc_irq_set <= '0'; ch1_updt_done <= '0'; end generate GEN_NO_CH1_UPDATE; ------------------------------------------------------------------------------- -- Channel included therefore generate fetch logic ------------------------------------------------------------------------------- GEN_CH2_UPDATE : if C_INCLUDE_CH2 = 1 generate begin ------------------------------------------------------------------------------- -- Active channel flag. Indicates which channel is active. -- 0 = channel active -- 1 = channel active ------------------------------------------------------------------------------- CH2_ACTIVE_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_active_i <= '0'; elsif(ch2_active_i = '1' and updt_done = '1')then ch2_active_i <= '0'; elsif(ch2_active_set = '1')then ch2_active_i <= '1'; end if; end if; end process CH2_ACTIVE_PROCESS; ------------------------------------------------------------------------------- -- Channel 2 ready to be serviced? ------------------------------------------------------------------------------- service_ch2 <= '1' when ch2_updt_queue_empty = '0' -- Queue not empty and ftch_error = '0' -- No SG Fetch Error else '0'; ------------------------------------------------------------------------------- -- Channel 2 Interrupt On Complete ------------------------------------------------------------------------------- CH2_INTR_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_updt_ioc_irq_set <= '0'; -- Set interrupt on Done and Descriptor IOC set elsif(updt_done = '1' and ch2_updt_ioc = '1')then ch2_updt_ioc_irq_set <= '1'; else ch2_updt_ioc_irq_set <= '0'; end if; end if; end process CH2_INTR_PROCESS; ------------------------------------------------------------------------------- -- Channel 1 DMA Internal Error ------------------------------------------------------------------------------- CH2_INTERR_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_dma_interr_set <= '0'; -- Set internal error on desc updt Done and Internal Error elsif(updt_done = '1' and ch2_dma_interr = '1')then ch2_dma_interr_set <= '1'; end if; end if; end process CH2_INTERR_PROCESS; ------------------------------------------------------------------------------- -- Channel 1 DMA Slave Error ------------------------------------------------------------------------------- CH2_SLVERR_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_dma_slverr_set <= '0'; -- Set slave error on desc updt Done and Slave Error elsif(updt_done = '1' and ch2_dma_slverr = '1')then ch2_dma_slverr_set <= '1'; end if; end if; end process CH2_SLVERR_PROCESS; ------------------------------------------------------------------------------- -- Channel 1 DMA Decode Error ------------------------------------------------------------------------------- CH2_DECERR_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_dma_decerr_set <= '0'; -- Set decode error on desc updt Done and Decode Error elsif(updt_done = '1' and ch2_dma_decerr = '1')then ch2_dma_decerr_set <= '1'; end if; end if; end process CH2_DECERR_PROCESS; ------------------------------------------------------------------------------- -- Log Fetch Errors ------------------------------------------------------------------------------- -- Log Slave Errors reported during descriptor update SLV_SET_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_updt_slverr_set <= '0'; elsif(ch2_active_i = '1' and updt_slverr = '1')then ch2_updt_slverr_set <= '1'; end if; end if; end process SLV_SET_PROCESS; -- Log Internal Errors reported during descriptor update INT_SET_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_updt_interr_set <= '0'; elsif(ch2_active_i = '1' and updt_interr = '1')then ch2_updt_interr_set <= '1'; end if; end if; end process INT_SET_PROCESS; -- Log Decode Errors reported during descriptor update DEC_SET_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_updt_decerr_set <= '0'; elsif(ch2_active_i = '1' and updt_decerr = '1')then ch2_updt_decerr_set <= '1'; end if; end if; end process DEC_SET_PROCESS; -- Indicate update is idle if state machine is idle and update queue is empty IDLE_PROCESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0' or updt_error = '1' or ftch_error = '1')then ch2_updt_idle <= '1'; elsif(service_ch2 = '1')then ch2_updt_idle <= '0'; elsif(service_ch2 = '0' and ch2_updt_sm_idle = '1')then ch2_updt_idle <= '1'; end if; end if; end process IDLE_PROCESS; --------------------------------------------------------------------------- -- Indicate update is done to allow fetch of next descriptor -- This is needed to prevent a partial descriptor being fetched -- and then axi read is throttled for extended periods until the -- remainder of the descriptor is fetched. -- -- Note: Only used when fetch queue not inluded otherwise -- tools optimize out this process --------------------------------------------------------------------------- REG_CH2_DONE : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then ch2_updt_done <= '0'; elsif(updt_done = '1' and ch2_active_i = '1')then ch2_updt_done <= '1'; else ch2_updt_done <= '0'; end if; end if; end process REG_CH2_DONE; end generate GEN_CH2_UPDATE; ------------------------------------------------------------------------------- -- Channel excluded therefore do not generate fetch logic ------------------------------------------------------------------------------- GEN_NO_CH2_UPDATE : if C_INCLUDE_CH2 = 0 generate begin service_ch2 <= '0'; ch2_active_i <= '0'; ch2_updt_idle <= '0'; ch2_updt_interr_set <= '0'; ch2_updt_slverr_set <= '0'; ch2_updt_decerr_set <= '0'; ch2_dma_interr_set <= '0'; ch2_dma_slverr_set <= '0'; ch2_dma_decerr_set <= '0'; ch2_updt_ioc_irq_set <= '0'; ch2_updt_done <= '0'; end generate GEN_NO_CH2_UPDATE; --------------------------------------------------------------------------- -- Register Current Update Address. Address captured from channel port -- or queue by axi_sg_updt_queue --------------------------------------------------------------------------- REG_UPDATE_ADDRESS : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then update_address <= (others => '0'); -- Channel 1 descriptor update pointer elsif(ch1_updt_curdesc_wren = '1')then update_address <= std_logic_vector(unsigned(ch1_updt_curdesc) + UPDATE_CH1_ADDR_OFFSET); -- Channel 2 descriptor update pointer elsif(ch2_updt_curdesc_wren = '1')then update_address <= std_logic_vector(unsigned(ch2_updt_curdesc) + UPDATE_CH2_ADDR_OFFSET); end if; end if; end process REG_UPDATE_ADDRESS; -- Assigne Bytes to Transfer (BTT) update_cmd_btt <= UPDATE_CH1_CMD_BTT when ch1_active_i = '1' else UPDATE_CH2_CMD_BTT; ------------------------------------------------------------------------------- -- Build DataMover command ------------------------------------------------------------------------------- -- When command by sm, drive command to updt_cmdsts_if GEN_DATAMOVER_CMND : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then updt_cmnd_wr <= '0'; updt_cmnd_data <= (others => '0'); -- Fetch SM issued a command write elsif(write_cmnd_cmb = '1')then updt_cmnd_wr <= '1'; updt_cmnd_data <= UPDATE_CMD_RSVD & UPDATE_CMD_TAG & update_address & UPDATE_MSB_IGNORED & UPDATE_CMD_TYPE & UPDATE_LSB_IGNORED & update_cmd_btt; else updt_cmnd_wr <= '0'; end if; end if; end process GEN_DATAMOVER_CMND; ------------------------------------------------------------------------------- -- Capture and hold fetch address in case an error occurs ------------------------------------------------------------------------------- LOG_ERROR_ADDR : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then updt_error_addr <= (others => '0'); elsif(write_cmnd_cmb = '1')then updt_error_addr <= update_address(C_M_AXI_SG_ADDR_WIDTH-1 downto SG_ADDR_LSB) & "000000"; end if; end if; end process LOG_ERROR_ADDR; end implementation;
library IEEE; use IEEE.Std_Logic_1164.all; --Multiplexador 4x1 32bits entity mux4x1_32 is port (MAP1, MAP2, MAP3, MAP4: in std_logic_vector(31 downto 0); REG: out std_logic_vector(31 downto 0); SW: in std_logic_vector(1 downto 0) ); end mux4x1_32; --Definicao Arquitetura architecture circuito of mux4x1_32 is begin REG <= MAP1 when SW = "00" else MAP2 when SW = "01" else MAP3 when SW = "10" else MAP4; end circuito;
------------------------------------------------------------------------------- -- -- T420 ROM wrapper for lpm_rom. -- -- $Id: t420_rom-lpm-c.vhd,v 1.1 2006-05-14 22:31:08 arniml Exp $ -- -- Copyright (c) 2006, Arnim Laeuger (arniml@opencores.org) -- -- All rights reserved -- ------------------------------------------------------------------------------- configuration t420_rom_struct_c0 of t420_rom is for lpm for rom_b: lpm_rom use configuration work.lpm_rom_c0; end for; end for; end t420_rom_struct_c0; ------------------------------------------------------------------------------- -- File History: -- -- $Log: not supported by cvs2svn $ -------------------------------------------------------------------------------
---------------------------------------------------------------------------------- -- Company: -- Engineer: abyszuk -- -- Design Name: -- Module Name: rx_MRd_Transact - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision 1.30 - Ported to AXI and OHWR general-cores components 12.2013 -- -- Revision 1.20 - Literal assignments removed. 30.07.2007 -- -- Revision 1.10 - x4 timing constraints met. 02.02.2007 -- -- Revision 1.04 - Timing improved. 17.01.2007 -- -- Revision 1.02 - FIFO added. 20.12.2006 -- -- Revision 1.00 - first release. 14.12.2006 -- -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_ARITH.all; use IEEE.STD_LOGIC_UNSIGNED.all; library work; use work.abb64Package.all; use work.genram_pkg.all; entity rx_MRd_Transact is port ( -- Transaction receive interface m_axis_rx_tlast : in std_logic; m_axis_rx_tdata : in std_logic_vector(C_DBUS_WIDTH-1 downto 0); m_axis_rx_tkeep : in std_logic_vector(C_DBUS_WIDTH/8-1 downto 0); m_axis_rx_terrfwd : in std_logic; m_axis_rx_tvalid : in std_logic; -- m_axis_rx_tready : OUT std_logic; rx_np_ok : out std_logic; rx_np_req : out std_logic; m_axis_rx_tbar_hit : in std_logic_vector(C_BAR_NUMBER-1 downto 0); sdram_pg : in std_logic_vector(31 downto 0); wb_pg : in std_logic_vector(31 downto 0); MRd_Type : in std_logic_vector(3 downto 0); Tlp_straddles_4KB : in std_logic; -- MRd Channel pioCplD_Req : out std_logic; pioCplD_RE : in std_logic; pioCplD_Qout : out std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); -- Channel reset (from MWr channel) Channel_Rst : in std_logic; -- Common ports user_clk : in std_logic; user_reset : in std_logic; user_lnk_up : in std_logic ); end entity rx_MRd_Transact; architecture Behavioral of rx_MRd_Transact is type RxMRdTrnStates is (ST_MRd_RESET , ST_MRd_IDLE , ST_MRd_HEAD2 , ST_MRd_Tail ); -- State variables signal RxMRdTrn_NextState : RxMRdTrnStates; signal RxMRdTrn_State : RxMRdTrnStates; -- trn_rx stubs signal trn_rsof_n_i : std_logic; signal in_packet_reg : std_logic; signal m_axis_rx_tdata_i : std_logic_vector(C_DBUS_WIDTH-1 downto 0); signal m_axis_rx_tbar_hit_i : std_logic_vector(C_BAR_NUMBER-1 downto 0); -- delays signal m_axis_rx_tdata_r1 : std_logic_vector(C_DBUS_WIDTH-1 downto 0); signal m_axis_rx_tbar_hit_r1 : std_logic_vector(C_BAR_NUMBER-1 downto 0); -- BAR encoded signal Encoded_BAR_Index : std_logic_vector(C_ENCODE_BAR_NUMBER-1 downto 0); -- Reset signal local_Reset : std_logic; signal local_Reset_n : std_logic; -- Output signals -- signal m_axis_rx_tready_i : std_logic; signal rx_np_ok_i : std_logic := '1'; signal rx_np_req_i : std_logic := '1'; -- Throttle signal trn_rx_throttle : std_logic; signal MRd_Has_3DW_Header : std_logic; signal MRd_Has_4DW_Header : std_logic; signal Tlp_is_Zero_Length : std_logic; signal Illegal_Leng_on_FIFO : std_logic; -- Signal with MRd channel FIFO signal pioCplD_din : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); signal pioCplD_Qout_wire : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); signal pioCplD_RE_i : std_logic; signal pioCplD_we : std_logic; signal pioCplD_empty_i : std_logic; signal pioCplD_full : std_logic; signal pioCplD_prog_Full : std_logic; signal pioCplD_prog_full_r1 : std_logic; signal pioCplD_Qout_i : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); signal pioCplD_Qout_reg : std_logic_vector(C_CHANNEL_BUF_WIDTH-1 downto 0); -- Request for output arbitration signal pioCplD_Req_i : std_logic; -- Busy/Done state bits generation type FSM_Request is ( REQST_Idle , REQST_1Read , REQST_Decision , REQST_nFIFO_Req -- , REQST_Quantity -- , REQST_FIFO_Req ); signal FSM_REQ_pio : FSM_Request; begin -- positive reset and local local_Reset <= user_reset or Channel_Rst; local_reset_n <= not local_reset; -- MRd channel buffer control -- pioCplD_RE_i <= pioCplD_RE; pioCplD_Qout <= pioCplD_Qout_i; pioCplD_Req <= pioCplD_Req_i; -- and not FIFO_Reading; -- Output to the core as handshaking m_axis_rx_tdata_i <= m_axis_rx_tdata; m_axis_rx_tbar_hit_i <= m_axis_rx_tbar_hit; -- Output to the core as handshaking rx_np_ok <= rx_np_ok_i; rx_np_ok_i <= not pioCplD_prog_full_r1; rx_np_req <= rx_np_req_i; rx_np_req_i <= rx_np_ok_i; -- ( m_axis_rx_tvalid seems never deasserted during packet) trn_rx_throttle <= not m_axis_rx_tvalid; -- or m_axis_rx_tready_i; -- ------------------------------------------------ -- Synchronous Delay: m_axis_rx_tdata + m_axis_rx_tbar_hit -- Synch_Delay_m_axis_rx_tdata : process (user_clk) begin if user_clk'event and user_clk = '1' then m_axis_rx_tdata_r1 <= m_axis_rx_tdata_i; m_axis_rx_tbar_hit_r1 <= m_axis_rx_tbar_hit_i; end if; end process; -- ------------------------------------------------ -- States synchronous -- Syn_RxTrn_States : process (user_clk, local_Reset) begin if local_Reset = '1' then RxMRdTrn_State <= ST_MRd_RESET; elsif user_clk'event and user_clk = '1' then RxMRdTrn_State <= RxMRdTrn_NextState; end if; end process; -- Next States Comb_RxTrn_NextStates : process ( RxMRdTrn_State , MRd_Type , trn_rx_throttle , rx_np_ok_i ) begin case RxMRdTrn_State is when ST_MRd_RESET => RxMRdTrn_NextState <= ST_MRd_IDLE; when ST_MRd_IDLE => if rx_np_ok_i = '1' then case MRd_Type is when C_TLP_TYPE_IS_MRD_H3 => RxMRdTrn_NextState <= ST_MRd_HEAD2; when C_TLP_TYPE_IS_MRD_H4 => RxMRdTrn_NextState <= ST_MRd_HEAD2; when C_TLP_TYPE_IS_MRDLK_H3 => RxMRdTrn_NextState <= ST_MRd_HEAD2; when C_TLP_TYPE_IS_MRDLK_H4 => RxMRdTrn_NextState <= ST_MRd_HEAD2; when others => RxMRdTrn_NextState <= ST_MRd_IDLE; end case; -- MRd_Type else RxMRdTrn_NextState <= ST_MRd_IDLE; end if; when ST_MRd_HEAD2 => if trn_rx_throttle = '1' then RxMRdTrn_NextState <= ST_MRd_HEAD2; else RxMRdTrn_NextState <= ST_MRd_Tail; end if; when ST_MRd_Tail => -- support back-to-back transactions if rx_np_ok_i = '1' then case MRd_Type is when C_TLP_TYPE_IS_MRD_H3 => RxMRdTrn_NextState <= ST_MRd_HEAD2; when C_TLP_TYPE_IS_MRD_H4 => RxMRdTrn_NextState <= ST_MRd_HEAD2; when C_TLP_TYPE_IS_MRDLK_H3 => RxMRdTrn_NextState <= ST_MRd_HEAD2; when C_TLP_TYPE_IS_MRDLK_H4 => RxMRdTrn_NextState <= ST_MRd_HEAD2; when others => RxMRdTrn_NextState <= ST_MRd_IDLE; end case; -- MRd_Type else RxMRdTrn_NextState <= ST_MRd_IDLE; end if; when others => RxMRdTrn_NextState <= ST_MRd_RESET; end case; end process; -- ------------------------------------------------ -- Synchronous calculation: Encoded_BAR_Index -- Syn_Calc_Encoded_BAR_Index : process (user_clk, local_Reset) begin if local_Reset = '1' then Encoded_BAR_Index <= (others => '1'); elsif user_clk'event and user_clk = '1' then if m_axis_rx_tbar_hit(0) = '1' then Encoded_BAR_Index <= CONV_STD_LOGIC_VECTOR(0, C_ENCODE_BAR_NUMBER); elsif m_axis_rx_tbar_hit(1) = '1' then Encoded_BAR_Index <= CONV_STD_LOGIC_VECTOR(1, C_ENCODE_BAR_NUMBER); elsif m_axis_rx_tbar_hit(2) = '1' then Encoded_BAR_Index <= CONV_STD_LOGIC_VECTOR(2, C_ENCODE_BAR_NUMBER); elsif m_axis_rx_tbar_hit(3) = '1' then Encoded_BAR_Index <= CONV_STD_LOGIC_VECTOR(3, C_ENCODE_BAR_NUMBER); elsif m_axis_rx_tbar_hit(4) = '1' then Encoded_BAR_Index <= CONV_STD_LOGIC_VECTOR(4, C_ENCODE_BAR_NUMBER); elsif m_axis_rx_tbar_hit(5) = '1' then Encoded_BAR_Index <= CONV_STD_LOGIC_VECTOR(5, C_ENCODE_BAR_NUMBER); elsif m_axis_rx_tbar_hit(6) = '1' then Encoded_BAR_Index <= CONV_STD_LOGIC_VECTOR(6, C_ENCODE_BAR_NUMBER); else Encoded_BAR_Index <= CONV_STD_LOGIC_VECTOR(7, C_ENCODE_BAR_NUMBER); end if; end if; end process; -- ---------------------------------------------------------------------------------- -- -- Synchronous output: MRd FIFO write port -- -- PIO Channel Buffer (128-bit) definition: -- Note: Type not shows in this buffer -- -- 127 ~ xxx : Peripheral address -- xxy ~ 97 : reserved -- 96 : Zero-length -- 95 : reserved -- 94 : Valid -- 93 ~ 68 : reserved -- 67 ~ 65 : BAR number -- 64 ~ 49 : Requester ID -- 48 ~ 41 : Tag -- 40 ~ 34 : Lower Address -- 33 ~ 31 : Completion Status -- 30 ~ 19 : Byte count -- -- 18 ~ 17 : Format -- 16 ~ 14 : TC -- 13 : TD -- 12 : EP -- 11 ~ 10 : Attribute -- 9 ~ 0 : Length -- RxFSM_Output_pioCplD_WR : process (user_clk, local_Reset) begin if local_Reset = '1' then pioCplD_we <= '0'; pioCplD_din <= (others => '0'); elsif user_clk'event and user_clk = '1' then case RxMRdTrn_State is when ST_MRd_HEAD2 => pioCplD_we <= '0'; if Illegal_Leng_on_FIFO = '1' then -- Cpl : unsupported request pioCplD_din(C_CHBUF_FMT_BIT_TOP downto C_CHBUF_FMT_BIT_BOT) <= C_FMT3_NO_DATA; pioCplD_din(C_CHBUF_CPLD_CS_BIT_TOP downto C_CHBUF_CPLD_CS_BIT_BOT) <= "001"; else pioCplD_din(C_CHBUF_FMT_BIT_TOP downto C_CHBUF_FMT_BIT_BOT) <= C_FMT3_WITH_DATA; pioCplD_din(C_CHBUF_CPLD_CS_BIT_TOP downto C_CHBUF_CPLD_CS_BIT_BOT) <= "000"; end if; pioCplD_din(C_CHBUF_TC_BIT_TOP downto C_CHBUF_TC_BIT_BOT) <= m_axis_rx_tdata_r1(C_TLP_TC_BIT_TOP downto C_TLP_TC_BIT_BOT); pioCplD_din(C_CHBUF_TD_BIT) <= '0'; pioCplD_din(C_CHBUF_EP_BIT) <= '0'; pioCplD_din(C_CHBUF_ATTR_BIT_TOP downto C_CHBUF_ATTR_BIT_BOT) <= m_axis_rx_tdata_r1(C_TLP_ATTR_BIT_TOP downto C_TLP_ATTR_BIT_BOT); -- <= m_axis_rx_tdata_r1(C_TLP_ATTR_BIT_TOP) & C_NO_SNOOP; -- downto C_TLP_ATTR_BIT_BOT); pioCplD_din(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT) <= m_axis_rx_tdata_r1(C_TLP_LENG_BIT_TOP downto C_TLP_LENG_BIT_BOT); pioCplD_din(C_CHBUF_QVALID_BIT) <= '1'; pioCplD_din(C_CHBUF_CPLD_REQID_BIT_TOP downto C_CHBUF_CPLD_REQID_BIT_BOT) <= m_axis_rx_tdata_r1(C_TLP_REQID_BIT_TOP downto C_TLP_REQID_BIT_BOT); pioCplD_din(C_CHBUF_CPLD_TAG_BIT_TOP downto C_CHBUF_CPLD_TAG_BIT_BOT) <= m_axis_rx_tdata_r1(C_TLP_TAG_BIT_TOP downto C_TLP_TAG_BIT_BOT); pioCplD_din(C_CHBUF_0LENG_BIT) <= Tlp_is_Zero_Length; if Tlp_is_Zero_Length = '1' then pioCplD_din(C_CHBUF_CPLD_BAR_BIT_TOP downto C_CHBUF_CPLD_BAR_BIT_BOT) <= CONV_STD_LOGIC_VECTOR(0, C_ENCODE_BAR_NUMBER); else pioCplD_din(C_CHBUF_CPLD_BAR_BIT_TOP downto C_CHBUF_CPLD_BAR_BIT_BOT) <= Encoded_BAR_Index; end if; when ST_MRd_Tail => if MRd_Has_4DW_Header = '1' then pioCplD_din(C_CHBUF_CPLD_LA_BIT_TOP downto C_CHBUF_CPLD_LA_BIT_BOT) <= m_axis_rx_tdata_r1(C_CHBUF_CPLD_LA_BIT_TOP-C_CHBUF_CPLD_LA_BIT_BOT+32 downto 0+32); if m_axis_rx_tbar_hit_r1(CINT_REGS_SPACE_BAR) = '1' then pioCplD_din(C_CHBUF_PA_BIT_TOP downto C_CHBUF_PA_BIT_BOT) <= m_axis_rx_tdata_r1(C_CHBUF_PA_BIT_TOP-C_CHBUF_PA_BIT_BOT+32 downto 0+32); elsif m_axis_rx_tbar_hit_r1(CINT_DDR_SPACE_BAR) = '1' then pioCplD_din(C_CHBUF_DDA_BIT_TOP downto C_CHBUF_DDA_BIT_BOT) <= sdram_pg(C_CHBUF_DDA_BIT_TOP-C_CHBUF_DDA_BIT_BOT-C_DDR_PG_WIDTH downto 0) & m_axis_rx_tdata_r1(C_DDR_PG_WIDTH-1+32 downto 0+32); elsif m_axis_rx_tbar_hit_r1(CINT_FIFO_SPACE_BAR) = '1' then pioCplD_din(C_CHBUF_WB_BIT_TOP downto C_CHBUF_WB_BIT_BOT) <= wb_pg(C_CHBUF_WB_BIT_TOP-C_CHBUF_WB_BIT_BOT-C_WB_PG_WIDTH downto 0) & m_axis_rx_tdata_r1(C_WB_PG_WIDTH-1+32 downto 0+32); else pioCplD_din(C_CHBUF_PA_BIT_TOP downto C_CHBUF_PA_BIT_BOT) <= C_ALL_ZEROS(C_CHBUF_PA_BIT_TOP downto C_CHBUF_PA_BIT_BOT); end if; else pioCplD_din(C_CHBUF_CPLD_LA_BIT_TOP downto C_CHBUF_CPLD_LA_BIT_BOT) <= m_axis_rx_tdata_r1(C_CHBUF_CPLD_LA_BIT_TOP-C_CHBUF_CPLD_LA_BIT_BOT downto 0); if m_axis_rx_tbar_hit_r1(CINT_REGS_SPACE_BAR) = '1' then pioCplD_din(C_CHBUF_PA_BIT_TOP downto C_CHBUF_PA_BIT_BOT) <= m_axis_rx_tdata_r1(C_CHBUF_PA_BIT_TOP-C_CHBUF_PA_BIT_BOT downto 0); elsif m_axis_rx_tbar_hit_r1(CINT_DDR_SPACE_BAR) = '1' then pioCplD_din(C_CHBUF_DDA_BIT_TOP downto C_CHBUF_DDA_BIT_BOT) <= sdram_pg(C_CHBUF_DDA_BIT_TOP-C_CHBUF_DDA_BIT_BOT-C_DDR_PG_WIDTH downto 0) & m_axis_rx_tdata_r1(C_DDR_PG_WIDTH-1 downto 0); elsif m_axis_rx_tbar_hit_r1(CINT_FIFO_SPACE_BAR) = '1' then pioCplD_din(C_CHBUF_WB_BIT_TOP downto C_CHBUF_WB_BIT_BOT) <= wb_pg(C_CHBUF_WB_BIT_TOP-C_CHBUF_WB_BIT_BOT-C_WB_PG_WIDTH downto 0) & m_axis_rx_tdata_r1(C_WB_PG_WIDTH-1 downto 0); else pioCplD_din(C_CHBUF_PA_BIT_TOP downto C_CHBUF_PA_BIT_BOT) <= C_ALL_ZEROS(C_CHBUF_PA_BIT_TOP downto C_CHBUF_PA_BIT_BOT); end if; end if; if pioCplD_din(C_CHBUF_0LENG_BIT) = '1' then -- Zero-length pioCplD_din(C_CHBUF_CPLD_BC_BIT_TOP downto C_CHBUF_CPLD_BC_BIT_BOT) <= CONV_STD_LOGIC_VECTOR(1, C_CHBUF_CPLD_BC_BIT_TOP-C_CHBUF_CPLD_BC_BIT_BOT+1); else pioCplD_din(C_CHBUF_CPLD_BC_BIT_TOP downto C_CHBUF_CPLD_BC_BIT_BOT) <= pioCplD_din(C_CHBUF_LENG_BIT_TOP downto C_CHBUF_LENG_BIT_BOT) &"00"; end if; if m_axis_rx_tbar_hit_r1(CINT_BAR_SPACES-1 downto 0) /= C_ALL_ZEROS(CINT_BAR_SPACES-1 downto 0) then pioCplD_we <= not Tlp_straddles_4KB; --'1'; else pioCplD_we <= '0'; end if; when others => pioCplD_we <= '0'; pioCplD_din <= pioCplD_din; end case; end if; end process; -- ----------------------------------------------------------------------- -- Capture: MRd_Has_4DW_Header -- : Tlp_is_Zero_Length -- Syn_Capture_MRd_Has_4DW_Header : process (user_clk, user_reset) begin if user_reset = '1' then MRd_Has_3DW_Header <= '0'; MRd_Has_4DW_Header <= '0'; Tlp_is_Zero_Length <= '0'; Illegal_Leng_on_FIFO <= '0'; elsif user_clk'event and user_clk = '1' then if trn_rsof_n_i = '0' then MRd_Has_3DW_Header <= not m_axis_rx_tdata_i(C_TLP_FMT_BIT_BOT) and not m_axis_rx_tdata_i(C_TLP_FMT_BIT_BOT+1); MRd_Has_4DW_Header <= m_axis_rx_tdata_i(C_TLP_FMT_BIT_BOT) and not m_axis_rx_tdata_i(C_TLP_FMT_BIT_BOT+1); --Tlp_is_Zero_Length <= not (m_axis_rx_tdata_i(3) or m_axis_rx_tdata_i(2) or m_axis_rx_tdata_i(1) or m_axis_rx_tdata_i(0)); if m_axis_rx_tdata(C_TLP_LENG_BIT_TOP downto C_TLP_LENG_BIT_BOT) = C_ALL_ZEROS(C_TLP_FLD_WIDTH_OF_LENG - 1 downto 0) then Tlp_is_Zero_Length <= '1'; else Tlp_is_Zero_Length <= '0'; end if; if m_axis_rx_tdata_i(C_TLP_LENG_BIT_TOP downto C_TLP_LENG_BIT_BOT) /= CONV_STD_LOGIC_VECTOR(1, C_TLP_FLD_WIDTH_OF_LENG) and m_axis_rx_tdata_i(C_TLP_LENG_BIT_TOP downto C_TLP_LENG_BIT_BOT) /= CONV_STD_LOGIC_VECTOR(2, C_TLP_FLD_WIDTH_OF_LENG) and m_axis_rx_tbar_hit(CINT_FIFO_SPACE_BAR) = '1' then Illegal_Leng_on_FIFO <= '1'; else Illegal_Leng_on_FIFO <= '0'; end if; else MRd_Has_3DW_Header <= MRd_Has_3DW_Header; MRd_Has_4DW_Header <= MRd_Has_4DW_Header; Tlp_is_Zero_Length <= Tlp_is_Zero_Length; Illegal_Leng_on_FIFO <= Illegal_Leng_on_FIFO; end if; end if; end process; -- ------------------------------------------------- -- MRd TLP Buffer -- ------------------------------------------------- pioCplD_Buffer : generic_sync_fifo generic map ( g_data_width => 128, g_size => 16, g_show_ahead => false, g_with_empty => true, g_with_full => false, g_with_almost_empty => false, g_with_almost_full => true, g_with_count => false, g_almost_full_threshold => 12) port map ( rst_n_i => local_Reset_n, clk_i => user_clk, d_i => pioCplD_din, we_i => pioCplD_we, q_o => pioCplD_Qout_wire, rd_i => pioCplD_RE_i, empty_o => pioCplD_empty_i, full_o => pioCplD_full, almost_empty_o => open, almost_full_o => pioCplD_prog_Full, count_o => open); -- --------------------------------------------- -- Request for arbitration -- Synch_Req_Proc : process (local_Reset, user_clk) begin if local_Reset = '1' then pioCplD_RE_i <= '0'; pioCplD_Qout_i <= (others => '0'); pioCplD_Qout_reg <= (others => '0'); pioCplD_Req_i <= '0'; FSM_REQ_pio <= REQST_IDLE; elsif user_clk'event and user_clk = '1' then case FSM_REQ_pio is when REQST_IDLE => if pioCplD_empty_i = '0' then pioCplD_RE_i <= '1'; pioCplD_Req_i <= '0'; pioCplD_Qout_i <= pioCplD_Qout_i; FSM_REQ_pio <= REQST_1Read; else pioCplD_RE_i <= '0'; pioCplD_Req_i <= '0'; pioCplD_Qout_i <= pioCplD_Qout_i; FSM_REQ_pio <= REQST_IDLE; end if; when REQST_1Read => pioCplD_RE_i <= '0'; pioCplD_Req_i <= '0'; pioCplD_Qout_i <= pioCplD_Qout_i; FSM_REQ_pio <= REQST_Decision; when REQST_Decision => pioCplD_Qout_reg <= pioCplD_Qout_wire; pioCplD_Qout_i <= pioCplD_Qout_i; pioCplD_RE_i <= '0'; pioCplD_Req_i <= '1'; FSM_REQ_pio <= REQST_nFIFO_Req; when REQST_nFIFO_Req => if pioCplD_RE = '1' then pioCplD_RE_i <= '0'; pioCplD_Qout_i <= pioCplD_Qout_reg; pioCplD_Req_i <= '0'; FSM_REQ_pio <= REQST_IDLE; else pioCplD_RE_i <= '0'; pioCplD_Qout_i <= pioCplD_Qout_i; pioCplD_Req_i <= '1'; FSM_REQ_pio <= REQST_nFIFO_Req; end if; when others => pioCplD_RE_i <= '0'; pioCplD_Qout_i <= (others => '0'); pioCplD_Qout_reg <= (others => '0'); pioCplD_Req_i <= '0'; FSM_REQ_pio <= REQST_IDLE; end case; end if; end process; -- --------------------------------------------- -- Delay of Empty and prog_Full -- Synch_Delay_empty_and_full : process (user_clk) begin if user_clk'event and user_clk = '1' then pioCplD_prog_full_r1 <= pioCplD_prog_Full; end if; end process; -- --------------------------------- -- Regenerate trn_rsof_n signal as in old TRN core -- TRN_rsof_n_make : process (user_clk, user_reset) begin if user_reset = '1' then in_packet_reg <= '0'; elsif rising_edge(user_clk) then if (m_axis_rx_tvalid) = '1' then in_packet_reg <= not(m_axis_rx_tlast); end if; end if; end process; trn_rsof_n_i <= not(m_axis_rx_tvalid and not(in_packet_reg)); end architecture Behavioral;
LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.std_logic_unsigned.all; USE ieee.numeric_std.ALL; ENTITY and2or IS PORT( in1,in2,in3,in4 : IN std_logic; outandor, outandor_flow, outandor_beh : OUT std_logic ); END and2or ; ARCHITECTURE mixed OF and2or IS COMPONENT and2gate PORT( in1 : IN std_logic; in2 : IN std_logic; outand : OUT std_logic ); END COMPONENT; COMPONENT or2gate PORT( in1 : IN std_logic; in2 : IN std_logic; outor : OUT std_logic ); END COMPONENT; -- need wires to connect outputs of AND gates to OR gate SIGNAL in1or : std_logic ; SIGNAL in2or : std_logic ; BEGIN --THIS IS STRUCTURAL; g1,g2,g3 form a netlist g1: and2gate PORT MAP( in1 => in1, --careful !! it means that in1 of g1 is connected to in1 of Entity and2or in2 => in2, --careful !! it means that in1 of g1 is connected to in1 of Entity and2or outand => in1or -- connected to 'wire' in1or ); -- another (simpler) way to instantiate (port mapping by position) g2: and2gate PORT MAP(in3, in4, in2or) ; g3: or2gate PORT MAP(in1or, in2or, outandor) ; -- inputs wired to outputs of ANDs, otput directly to the Entity --THIS IS SIGNAL FLOW -- now there is a behavioural description of the same functionality, it is not in a process, and is called signal flow style outandor_flow <= (in1 AND in2) OR (in3 AND in4) ; --THIS IS BEHAVIOURAL/PROCESS -- read more in your textbook p1: PROCESS(in1,in2,in3,in4) BEGIN outandor_beh <= (in1 AND in2) OR (in3 AND in4); END PROCESS ; -- notice how much simpler it is to describe circuits in behavioural/data flow ! -- All three: signal flow, structural, and behavioural(processes) can be freely mixed. END;
LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; ENTITY rgmii_tx_top_2 IS PORT ( iEthClk : IN STD_LOGIC; iRst_n : IN STD_LOGIC; oEnetTxData : OUT STD_LOGIC_VECTOR(7 DOWNTO 0); oEnetTxEn : OUT STD_LOGIC; oEnetTxErr : OUT STD_LOGIC; -- iCheckSumIPGen : IN STD_LOGIC; -- iCheckSumTCPGen : IN STD_LOGIC; -- iCheckSumUDPGen : IN STD_LOGIC; -- iCheckSumICMPGen : IN STD_LOGIC; --USR IF FROM "UDP COMPLETE" iData_tx : IN STD_LOGIC_VECTOR(7 DOWNTO 0); iTxDataValid : IN STD_LOGIC; iSOF : IN STD_LOGIC; iEOF : IN STD_LOGIC; oMACTxRdy : OUT STD_LOGIC ); END ENTITY; ARCHITECTURE RTL OF rgmii_tx_top_2 is COMPONENT rgmii_tx_2 IS PORT ( iClk : IN STD_LOGIC; iRst_n : IN STD_LOGIC; -- from fifo iTxData : IN STD_LOGIC_VECTOR(7 DOWNTO 0); --iSOF : IN STD_LOGIC; --iEOF : IN STD_LOGIC; iFFempty : IN STD_LOGIC; oTRANSMIT_DONE : OUT STD_LOGIC; iReadReq : OUT STD_LOGIC; -- signals TO PHY oTxData : OUT STD_LOGIC_VECTOR(7 DOWNTO 0); oTxEn : OUT STD_LOGIC; oTxErr : OUT STD_LOGIC ); END COMPONENT; COMPONENT fifo_tx_udp IS PORT ( aclr : IN STD_LOGIC ; clock : IN STD_LOGIC ; data : IN STD_LOGIC_VECTOR (7 DOWNTO 0); rdreq : IN STD_LOGIC ; wrreq : IN STD_LOGIC ; empty : OUT STD_LOGIC ; full : OUT STD_LOGIC ; q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0) ); END COMPONENT; signal rst_ff_int, ff_rdreq_int, ff_wrreq_int, ff_empty_int, ff_full_int, oTRANSMIT_DONE_int : std_logic; signal iData_tx_delayed_int, cTxData : std_logic_vector(7 downto 0); type state_ff is (init, s0, s1, s2, s3); signal state : state_ff; begin ff_tx_udp_inst : fifo_tx_udp PORT MAP( aclr => rst_ff_int, clock => iEthClk, data => iData_tx_delayed_int,--iData_tx, rdreq => ff_rdreq_int, wrreq => ff_wrreq_int, empty => ff_empty_int, full => ff_full_int, q => cTxData ); rgmii_tx_inst : rgmii_tx_2 PORT MAP ( iClk => iEthClk, iRst_n => iRst_n, iTxData => cTxData, iFFempty => ff_empty_int, oTRANSMIT_DONE=> oTRANSMIT_DONE_int, iReadReq => ff_rdreq_int, --iEOF => eof oTxData => oEnetTxData,--oEnetTxData, oTxEn => oEnetTxEn,--oEnetTxEn, oTxErr => oEnetTxErr); process(iEthClk, iRst_n) begin if iRst_n = '0' then iData_tx_delayed_int <= (others => '0'); elsif rising_edge(iEthClk) then iData_tx_delayed_int <= iData_tx; end if; end process; process(iEthClk, iRst_n) begin if iRst_n = '0' then rst_ff_int <= '1'; oMACTxRdy <= '0'; ff_wrreq_int <= '0'; state <= init; elsif rising_edge(iEthClk) then case state is when init => rst_ff_int <= '1'; oMACTxRdy <= '0'; ff_wrreq_int <= '0'; state <= s0; when s0 =>--MAC IS READY rst_ff_int <= '0'; ff_wrreq_int <= '0'; if ff_full_int = '0' then oMACTxRdy <= '1'; state <= s1; else oMACTxRdy <= '0'; state <= s0; end if; when s1 =>--SOF STARTING rst_ff_int <= '0'; if ff_full_int = '0' then oMACTxRdy <= '1'; if iTxDataValid = '1' then if iSOF = '1' then -- signal de start ff_wrreq_int <= '1'; state <= s2; --else--sinon on attend eof sans ecrire end if; else ff_wrreq_int <= '0'; state <= s1; end if; else oMACTxRdy <= '0'; ff_wrreq_int <= '0'; state <= s1; end if; when s2 =>--DATA TO FF rst_ff_int <= '0'; if ff_full_int = '0' then oMACTxRdy <= '1'; if iTxDataValid = '1' then if iEOF = '1' then --signal de fin d'écriture ff_wrreq_int <= '1'; state <= s3; else ff_wrreq_int <= '1';--on continue d'écrire dans FF state <= s2; end if; else ff_wrreq_int <= '0'; state <= s2; end if; else oMACTxRdy <= '0'; ff_wrreq_int <= '0'; state <= s3; end if; when s3 => ff_wrreq_int <= '0'; if oTRANSMIT_DONE_int = '1' then rst_ff_int <= '1'; oMACTxRdy <= '0'; state <= s0; end if; when others => rst_ff_int <= '1'; oMACTxRdy <= '0'; ff_wrreq_int <= '0'; state <= init; end case; end if; end process; END ARCHITECTURE;
------------------------------------------------------------------------------- -- -- (C) COPYRIGHT 2012, Gideon's Logic Architectures -- ------------------------------------------------------------------------------- -- Title : Small Synchronous Stack Using Single Port Distributed RAM ------------------------------------------------------------------------------- -- File : distributed_stack.vhd -- Author : Gideon Zweijtzer <gideon.zweijtzer@gmail.com> ------------------------------------------------------------------------------- -- Description: This implementation makes use of the RAMX1 properties, -- implementing a 16-deep synchronous stack in only one LUT per -- bit. The value to be popped is always visible. -- -- For building on altera, this block has been sub-optimized, -- and the required cells are now inferred. ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity distributed_stack is generic ( width : integer := 32; simultaneous_pushpop : boolean := false ); port ( clock : in std_logic; reset : in std_logic; pop : in std_logic; push : in std_logic; flush : in std_logic; data_in : in std_logic_vector(width-1 downto 0); data_out : out std_logic_vector(width-1 downto 0); full : out std_logic; data_valid : out std_logic ); end distributed_stack; architecture Gideon of distributed_stack is signal pointer : unsigned(3 downto 0) := X"0"; signal address : unsigned(3 downto 0) := X"0"; signal we : std_logic; signal en : std_logic; signal data_valid_i : std_logic; signal full_i : std_logic; signal filtered_pop : std_logic; signal filtered_push : std_logic; signal sel : std_logic; signal ram_data : std_logic_vector(width-1 downto 0) := (others => '0'); signal last_written : std_logic_vector(width-1 downto 0) := (others => '0'); begin filtered_pop <= data_valid_i and pop; filtered_push <= not full_i and push; full <= full_i; data_valid <= data_valid_i; en <= filtered_pop or filtered_push; we <= filtered_push; address <= (pointer - 2) when filtered_pop='1' else pointer; process(clock) variable new_pointer : unsigned(3 downto 0); begin if rising_edge(clock) then new_pointer := pointer; if flush='1' then new_pointer := X"0"; elsif (filtered_pop='1') and (filtered_push='0') then new_pointer := new_pointer - 1; elsif (filtered_pop='0') and (filtered_push='1') then new_pointer := new_pointer + 1; end if; pointer <= new_pointer; if (new_pointer = X"0") then data_valid_i <= '0'; else data_valid_i <= '1'; end if; if (new_pointer /= X"F") then full_i <= '0'; else full_i <= '1'; end if; if reset='1' then pointer <= X"0"; full_i <= '0'; data_valid_i <= '0'; end if; end if; end process; data_out <= ram_data when sel = '0' else last_written; b_ram: block type t_ram is array(0 to 15) of std_logic_vector(width-1 downto 0); signal ram : t_ram := (others => (others => '0')); begin process(clock) begin if rising_edge(clock) then if en = '1' then ram_data <= ram(to_integer(address)); sel <= '0'; if we = '1' then ram(to_integer(address)) <= data_in; last_written <= data_in; sel <= '1'; end if; end if; if reset='1' then sel <= '0'; end if; end if; end process; end block; end Gideon;
architecture rtl of ClkDiv is signal Clk800Counter : std_logic_vector(DividerWidth_g-1 downto 0); signal Clk200Counter : std_logic_vector(1 downto 0); signal Clk800 : std_logic; signal Clk200 : std_logic; begin ClkDiv800: process(Clk_i,Reset_i) begin -- Asynchronous Reset if Reset_i='1' then Clk800Counter <= (others => '0'); Clk200Counter <= (others => '0'); -- after reset we start with all 0, so in the first clock cycle -- we set the value to their maximum -- Synchronous part elsif rising_edge(Clk_i) then if Clk800Counter = 0 then Clk800Counter <= Divider800_i; Clk200Counter <= Clk200Counter-1; else Clk800Counter <= Clk800Counter-1; end if; end if; end process ClkDiv800; Clk800 <= '1' when Clk800Counter = 0 else '0'; Clk200 <= '1' when (Clk800Counter = 0) and (Clk200Counter = 0) else '0'; Clk_o <= Clk800 when F100_400_n_i = '0' else Clk200; end rtl;
-- ------------------------------------------------------------- -- -- Entity Declaration for inst_k3_k4_e -- -- Generated -- by: wig -- on: Wed Nov 30 09:22:45 2005 -- cmd: /cygdrive/h/work/eclipse/MIX/mix_0.pl ../macro.xls -- -- !!! Do not edit this file! Autogenerated by MIX !!! -- $Author: wig $ -- $Id: inst_k3_k4_e-e.vhd,v 1.3 2005/11/30 14:04:02 wig Exp $ -- $Date: 2005/11/30 14:04:02 $ -- $Log: inst_k3_k4_e-e.vhd,v $ -- Revision 1.3 2005/11/30 14:04:02 wig -- Updated testcase references -- -- -- Based on Mix Entity Template built into RCSfile: MixWriter.pm,v -- Id: MixWriter.pm,v 1.71 2005/11/22 11:00:47 wig Exp -- -- Generator: mix_0.pl Version: Revision: 1.42 , wilfried.gaensheimer@micronas.com -- (C) 2003,2005 Micronas GmbH -- -- -------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; -- No project specific VHDL libraries/enty -- -- -- Start of Generated Entity inst_k3_k4_e -- entity inst_k3_k4_e is -- Generics: -- No Generated Generics for Entity inst_k3_k4_e -- Generated Port Declaration: port( -- Generated Port for Entity inst_k3_k4_e port1 : in std_ulogic_vector(3 downto 0); -- Macro test 3 k3_k4 port2 : in std_ulogic_vector(3 downto 0); -- Macro test 3 k3_k4 port3 : in std_ulogic_vector(3 downto 0); -- Macro test 3 k3_k4 port_mac : out std_ulogic; -- Macro test 3 k3_k4 __I_AUTO_REDUCED_BUS2SIGNAL port_mac_c : out std_ulogic_vector(6 downto 0) -- Macro test 3 k3_k4 -- End of Generated Port for Entity inst_k3_k4_e ); end inst_k3_k4_e; -- -- End of Generated Entity inst_k3_k4_e -- -- --!End of Entity/ies -- --------------------------------------------------------------
---------------------------------------------------------------------------------- -- Engineer: Mike Field <hamster@snap.net.nz> -- -- Module Name: ip_extract_header - Behavioral -- -- Description: Extract the IP header fields -- ------------------------------------------------------------------------------------ -- FPGA_Webserver from https://github.com/hamsternz/FPGA_Webserver ------------------------------------------------------------------------------------ -- The MIT License (MIT) -- -- Copyright (c) 2015 Michael Alan Field <hamster@snap.net.nz> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS 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 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- THE SOFTWARE. -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity ip_extract_header is generic ( our_ip : std_logic_vector(31 downto 0) := (others => '0'); our_broadcast : std_logic_vector(31 downto 0) := (others => '0')); Port ( clk : in STD_LOGIC; data_valid_in : in STD_LOGIC; data_in : in STD_LOGIC_VECTOR (7 downto 0); data_valid_out : out STD_LOGIC := '0'; data_out : out STD_LOGIC_VECTOR (7 downto 0) := (others => '0'); filter_protocol : in STD_LOGIC_VECTOR ( 7 downto 0) := (others => '0'); ip_version : out STD_LOGIC_VECTOR ( 3 downto 0) := (others => '0'); ip_type_of_service : out STD_LOGIC_VECTOR ( 7 downto 0) := (others => '0'); ip_length : out STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); ip_identification : out STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); ip_flags : out STD_LOGIC_VECTOR ( 2 downto 0) := (others => '0'); ip_fragment_offset : out STD_LOGIC_VECTOR (12 downto 0) := (others => '0'); ip_ttl : out STD_LOGIC_VECTOR ( 7 downto 0) := (others => '0'); ip_checksum : out STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); ip_src_ip : out STD_LOGIC_VECTOR (31 downto 0) := (others => '0'); ip_dest_ip : out STD_LOGIC_VECTOR (31 downto 0) := (others => '0'); ip_dest_broadcast : out STD_LOGIC); end ip_extract_header; architecture Behavioral of ip_extract_header is signal count : unsigned(6 downto 0) := (others => '0'); signal header_len : unsigned(6 downto 0) := (others => '0'); signal i_ip_version : STD_LOGIC_VECTOR ( 3 downto 0) := (others => '0'); signal i_ip_type_of_service : STD_LOGIC_VECTOR ( 7 downto 0) := (others => '0'); signal i_ip_length : STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); signal i_ip_identification : STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); signal i_ip_flags : STD_LOGIC_VECTOR ( 2 downto 0) := (others => '0'); signal i_ip_fragment_offset : STD_LOGIC_VECTOR (12 downto 0) := (others => '0'); signal i_ip_ttl : STD_LOGIC_VECTOR ( 7 downto 0) := (others => '0'); signal i_ip_protocol : STD_LOGIC_VECTOR ( 7 downto 0) := (others => '0'); signal i_ip_checksum : STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); signal i_ip_src_ip : STD_LOGIC_VECTOR (31 downto 0) := (others => '0'); signal i_ip_dest_ip : STD_LOGIC_VECTOR (31 downto 0) := (others => '0'); signal data_count : UNSIGNED(10 downto 0) := (others => '0'); begin ip_version <= i_ip_version; ip_type_of_service <= i_ip_type_of_service; ip_length <= i_ip_length; ip_identification <= i_ip_identification; ip_flags <= i_ip_flags; ip_fragment_offset <= i_ip_fragment_offset; ip_ttl <= i_ip_ttl; ip_checksum <= i_ip_checksum; ip_src_ip <= i_ip_src_ip; ip_dest_ip <= i_ip_dest_ip; ip_dest_broadcast <= '1' when i_ip_dest_ip = our_broadcast else '0'; process(clk) begin if rising_edge(clk) then data_out <= data_in; if data_valid_in = '1' then -- Note, at count of zero, data_count <= data_count + 1; case count is when "0000000" => i_ip_version <= data_in(7 downto 4); header_len(5 downto 2) <= unsigned(data_in(3 downto 0)); when "0000001" => i_ip_type_of_service <= data_in; when "0000010" => i_ip_length(15 downto 8) <= data_in; when "0000011" => i_ip_length( 7 downto 0) <= data_in; when "0000100" => i_ip_identification(15 downto 8) <= data_in; when "0000101" => i_ip_identification( 7 downto 0) <= data_in; when "0000110" => i_ip_fragment_offset(12 downto 8) <= data_in(4 downto 0); i_ip_flags <= data_in(7 downto 5); when "0000111" => i_ip_fragment_offset( 7 downto 0) <= data_in; when "0001000" => i_ip_ttl <= data_in; when "0001001" => i_ip_protocol <= data_in; when "0001010" => i_ip_checksum(15 downto 8) <= data_in; when "0001011" => i_ip_checksum( 7 downto 0) <= data_in; when "0001100" => i_ip_src_ip( 7 downto 0) <= data_in; when "0001101" => i_ip_src_ip(15 downto 8) <= data_in; when "0001110" => i_ip_src_ip(23 downto 16) <= data_in; when "0001111" => i_ip_src_ip(31 downto 24) <= data_in; when "0010000" => i_ip_dest_ip( 7 downto 0) <= data_in; when "0010001" => i_ip_dest_ip(15 downto 8) <= data_in; when "0010010" => i_ip_dest_ip(23 downto 16) <= data_in; when "0010011" => i_ip_dest_ip(31 downto 24) <= data_in; when others => null; end case; -- So that additional IP options get dropped if unsigned(count) >= unsigned(header_len) and unsigned(count) > 4 and i_ip_version = x"4" and i_ip_protocol = filter_protocol and (i_ip_dest_ip = our_ip or i_ip_dest_ip = our_broadcast) then if data_count < unsigned(i_ip_length) then data_valid_out <= data_valid_in; else data_valid_out <= '0'; end if; data_out <= data_in; end if; if count /= "1111111" then count <= count+1; end if; else data_valid_out <= '0'; data_out <= data_in; count <= (others => '0'); data_count <= (others => '0'); end if; end if; end process; end Behavioral;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_sg_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_sg_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_sg_wr_demux; architecture implementation of axi_sg_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- Title : PWM Generator -- Project : ------------------------------------------------------------------------------- -- File : PWMGenerator.vhd -- Author : <Marco@JUDI-WIN10> -- Company : -- Created : 2016-08-01 -- Last update: 2016-08-01 -- Platform : Mentor Graphics ModelSim, Altera Quartus -- Standard : VHDL'93/02 ------------------------------------------------------------------------------- -- Description: Generate PWM with given pulse width. ------------------------------------------------------------------------------- -- Copyright (c) 2016 Marco Eppenberger ------------------------------------------------------------------------------- -- Revisions : -- Date Version Author Description -- 2016-08-01 1.0 Marco Created ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity PWMGenerator is port ( Clk_CI : in std_logic; Reset_SI : in std_logic; DutyCycle_DI : in std_logic_vector(9 downto 0); PulseOut_DO : out std_logic); end entity PWMGenerator; architecture RTL of PWMGenerator is signal DutyCycle_D : unsigned(9 downto 0) := (others => '0'); signal PWMCounter_D : unsigned(9 downto 0) := (others => '0'); begin outreg : process (Clk_CI) is begin -- process outreg if Clk_CI'event and Clk_CI = '1' then -- rising clock edge if Reset_SI = '1' then -- synchronous reset (active high) DutyCycle_D <= (others => '0'); PWMCounter_D <= (others => '0'); PulseOut_DO <= '0'; else DutyCycle_D <= unsigned(DutyCycle_DI); PWMCounter_D <= PWMCounter_D + 1; if PWMCounter_D < DutyCycle_D then PulseOut_DO <= '1'; else PulseOut_DO <= '0'; end if; end if; end if; end process outreg; end architecture RTL;
--! --! Copyright 2019 Sergey Khabarov, sergeykhbr@gmail.com --! --! Licensed under the Apache License, Version 2.0 (the "License"); --! you may not use this file except in compliance with the License. --! You may obtain a copy of the License at --! --! http://www.apache.org/licenses/LICENSE-2.0 --! --! Unless required by applicable law or agreed to in writing, software --! distributed under the License is distributed on an "AS IS" BASIS, --! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --! See the License for the specific language governing permissions and --! limitations under the License. --! library ieee; use ieee.std_logic_1164.all; library commonlib; use commonlib.types_common.all; entity lrunway is generic ( abits : integer; -- cache bus address bus (usually 6..8) waybits : integer -- Number of ways bitwidth (=2 for 4-ways cache) ); port ( i_clk : in std_logic; i_init : in std_logic; i_raddr : in std_logic_vector(abits-1 downto 0); i_waddr : in std_logic_vector(abits-1 downto 0); i_up : in std_logic; i_down : in std_logic; i_lru : in std_logic_vector(waybits-1 downto 0); o_lru : out std_logic_vector(waybits-1 downto 0) ); end; architecture arch_lrunway of lrunway is constant LINES_TOTAL : integer := 2**abits; constant WAYS_TOTAL : integer := 2**waybits; constant LINE_WIDTH : integer := WAYS_TOTAL * waybits; type array_type is array (0 to LINES_TOTAL-1) of std_logic_vector(LINE_WIDTH-1 downto 0); signal tbl : array_type; signal radr : std_logic_vector(abits-1 downto 0); signal wb_tbl_rdata : std_logic_vector(LINE_WIDTH-1 downto 0); signal wb_tbl_wdata : std_logic_vector(LINE_WIDTH-1 downto 0); signal w_we : std_logic; begin comb : process(i_init, i_up, i_down, i_lru, wb_tbl_rdata, radr) variable vb_tbl_wdata_init : std_logic_vector(LINE_WIDTH-1 downto 0); variable vb_tbl_wdata_up : std_logic_vector(LINE_WIDTH-1 downto 0); variable vb_tbl_wdata_down : std_logic_vector(LINE_WIDTH-1 downto 0); variable vb_tbl_wdata : std_logic_vector(LINE_WIDTH-1 downto 0); variable v_we : std_logic; variable shift_ena_up : std_logic; variable shift_ena_down : std_logic; begin v_we := i_up or i_down or i_init; -- init table value for i in 0 to WAYS_TOTAL-1 loop vb_tbl_wdata_init((i+1)*waybits-1 downto i*waybits) := conv_std_logic_vector(i, waybits); end loop; -- LRU next value, last used goes on top shift_ena_up := '0'; vb_tbl_wdata_up := wb_tbl_rdata; if wb_tbl_rdata(LINE_WIDTH-1 downto LINE_WIDTH-waybits) /= i_lru then vb_tbl_wdata_up(LINE_WIDTH-1 downto LINE_WIDTH-waybits) := i_lru; shift_ena_up := '1'; for i in WAYS_TOTAL-2 downto 0 loop if shift_ena_up = '1' then vb_tbl_wdata_up((i+1)*waybits-1 downto i*waybits) := wb_tbl_rdata((i+2)*waybits-1 downto (i+1)*waybits); if wb_tbl_rdata((i+1)*waybits-1 downto i*waybits) = i_lru then shift_ena_up := '0'; end if; end if; end loop; end if; -- LRU next value when invalidate, marked as 'invalid' goes down shift_ena_down := '0'; vb_tbl_wdata_down := wb_tbl_rdata; if wb_tbl_rdata(waybits-1 downto 0) /= i_lru then vb_tbl_wdata_down(waybits-1 downto 0) := i_lru; shift_ena_down := '1'; for i in 1 to WAYS_TOTAL-1 loop if shift_ena_down = '1' then vb_tbl_wdata_down((i+1)*waybits-1 downto i*waybits) := wb_tbl_rdata(i*waybits-1 downto (i-1)*waybits); if wb_tbl_rdata((i+1)*waybits-1 downto i*waybits) = i_lru then shift_ena_down := '0'; end if; end if; end loop; end if; if i_init = '1' then vb_tbl_wdata := vb_tbl_wdata_init; elsif i_up = '1' then vb_tbl_wdata := vb_tbl_wdata_up; elsif i_down = '1' then vb_tbl_wdata := vb_tbl_wdata_down; else vb_tbl_wdata := (others => '0'); end if; w_we <= v_we; wb_tbl_wdata <= vb_tbl_wdata; end process; wb_tbl_rdata <= tbl(conv_integer(radr)); o_lru <= wb_tbl_rdata(waybits-1 downto 0); reg : process (i_clk) begin if rising_edge(i_clk) then radr <= i_raddr; if w_we = '1' then tbl(conv_integer(i_waddr)) <= wb_tbl_wdata; end if; end if; end process; end;
Library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ------------------------------------------------------------------------- -- Entity for ARBITER ------------------------------------------------------------------------- entity ARBITER_NEW is generic ( ------------------------------------------------------------------------- -- Generics for scalability ------------------------------------------------------------------------- G_ADDR_WIDTH: integer := 4; G_DATA_WIDTH: integer := 8; G_REGISTERED_DATA: integer :=0 -- G_ADDR_WIDTH = Number of bits required to address the ram -- G_DATA_WIDTH = Number of bits in a data -- G_REGISTERED_DATA =1 for registered data in output 0 for nonregistered ------------------------------------------------------------------------- ); port ( ------------------------------------------------------------------------- -- General Inputs And Output ------------------------------------------------------------------------- RST_N: in std_logic; CLOCK: in std_logic; RST_DONE: out std_logic; ------------------------------------------------------------------------- -- Inputs from --------client1-------------- ------------------------------------------------------------------------- RD_EN_C1: in std_logic; --read enb-- WR_EN_C1: in std_logic; --write enb-- RDADDR_C1: in std_logic_vector(G_ADDR_WIDTH-1 downto 0);--read addr--- WRADDR_C1: in std_logic_vector(G_ADDR_WIDTH-1 downto 0);--write addr-- WRDATA_C1: in std_logic_vector(G_DATA_WIDTH-1 downto 0);--data in---- ------------------------------------------------------------------------- -- Inputs from --------client2-------------- ------------------------------------------------------------------------- DATAIN_C2: in std_logic_vector(G_DATA_WIDTH-1 downto 0);--input data-- REQUEST_C2: in std_logic; --request to access memory-- RD_NOT_WRITE_C2: in std_logic; --if '0' then write or read-- ADDR_C2: in std_logic_vector(G_ADDR_WIDTH-1 downto 0);--addr for rd or wr-- ------------------------------------------------------------------------- --output from --------client1-------------- ------------------------------------------------------------------------- RDDATA_C1: out std_logic_vector(G_DATA_WIDTH-1 downto 0);--data out-- ------------------------------------------------------------------------- --output from --------client2-------------- ------------------------------------------------------------------------- DATAOUT_C2: out std_logic_vector(G_DATA_WIDTH-1 downto 0);--out data-- ACK_C2: out std_logic; --acknowlwdgement-- ------------------------------------------------------------------------- -- Others Input And Output ------------------------------------------------------------------------- RD_EN: out std_logic; WR_EN: out std_logic; WR_ADDR: out std_logic_vector(G_ADDR_WIDTH-1 downto 0); RD_ADDR: out std_logic_vector(G_ADDR_WIDTH-1 downto 0); WR_DATA: out std_logic_vector(G_DATA_WIDTH-1 downto 0); RD_DATA: in std_logic_vector(G_DATA_WIDTH-1 downto 0)); end ARBITER_NEW; ------------------------------------------------------------------------- ------------------------------------------------------------------------- -- Architecture for ARBITER ------------------------------------------------------------------------- architecture RTL of ARBITER_NEW is --------------Temporary registers------------------- signal TEMP_RD_DATA: std_logic_vector(G_DATA_WIDTH-1 downto 0); signal TEMP_RD_DATA1: std_logic_vector(G_DATA_WIDTH-1 downto 0); signal TEMP_RD_DATA2: std_logic_vector(G_DATA_WIDTH-1 downto 0); signal TEMP_RD_EN: std_logic; signal TEMP_WR_EN: std_logic; signal TEMP_WR_ADDR: std_logic_vector(G_ADDR_WIDTH-1 downto 0); signal TEMP_RD_ADDR: std_logic_vector(G_ADDR_WIDTH-1 downto 0); signal TEMP_WR_DATA: std_logic_vector(G_DATA_WIDTH-1 downto 0); -------------Client type and state for FSM----------- type client is (reset,idle,client1_read,client2_read,client1_write,client2_write); signal pr_client_read: client; --present client read- signal pr_client_write: client; --present client write- signal nx_client_read: client; --next client read-- signal nx_client_write: client; --next client write-- -------------Acknowledgement reg for client2--------- signal TEMP_ACK: std_logic:='0'; signal TEMP_ACK1: std_logic; signal TEMP_ACK2: std_logic; signal TEMP_WR: std_logic:='0'; signal TEMP_WR1: std_logic; ------------Generic consideration------------------------------- signal REGISTERED_DATA: integer range 0 to 1 :=0; ------------Reset done generation Counter & register----------- signal RESET_DONE_REG: std_logic; signal COUNT: integer range 0 to 2**G_ADDR_WIDTH-1:=0; ------------Address Clash check register----------------------- signal ADDR_CLASHI: std_logic:='0'; signal ADDR_CLASH: std_logic:='0'; begin ------------------------------------------------------------------------- --FSM for ARBITER ------------------------------------------------------------------------- ------------------------------------------------- -------sequential section & reset condition- ---- ------------------------------------------------- p1:process(RST_N,CLOCK) begin if (RST_N='0') then pr_client_read <= reset; pr_client_write <= reset; elsif (CLOCK'EVENT and CLOCK='1' ) then pr_client_read <= nx_client_read; pr_client_write <= nx_client_write; end if; end process; --------------------------------------------------- --------Generate for registered data------- --------------------------------------------------- g1: if (G_REGISTERED_DATA=1) generate REGISTERED_DATA<=G_REGISTERED_DATA; end generate g1; --------------------------------------------------- ---------combinational section & client state------ --------------------------------------------------- p2:process(pr_client_read,pr_client_write,clock) begin if(RST_N='1' and clock='1')then if(nx_client_read=reset and nx_client_write=reset)then if(count<(2**G_ADDR_WIDTH))then RESET_DONE_REG <= '0'; count<=count+1; else nx_client_read <= idle; nx_client_write <= idle; RESET_DONE_REG <= '1'; count<=0; end if; end if; elsif(RST_N='0') then nx_client_read <= reset; nx_client_write<=reset; end if; if(pr_client_read=idle)then ----when arbiter idle-- if(RD_EN_C1='0')then if(REQUEST_C2='0')then nx_client_read<= idle; elsif(RD_NOT_WRITE_C2='1')then nx_client_read<= client2_read; elsif(RD_NOT_WRITE_C2='0')then nx_client_write<= client2_write; end if; else nx_client_read <=client1_read; end if; end if; if(pr_client_write=idle)then if( WR_EN_C1='0')then if(REQUEST_C2='0')then nx_client_write<= idle; elsif(RD_NOT_WRITE_C2='0')then nx_client_write<= client2_write; elsif(RD_NOT_WRITE_C2='1')then nx_client_read<= client2_read; end if; else nx_client_write <=client1_write; end if; end if;---------------------------------------------------------- if(pr_client_read=client1_read)then -----when arbiter allow client 1--- if(RD_EN_C1='1')then nx_client_read <=client1_read; else if(REQUEST_C2='0')then nx_client_read<= idle; elsif(RD_NOT_WRITE_C2='1')then nx_client_read<= client2_read; elsif(RD_NOT_WRITE_C2='0')then nx_client_read<= idle; end if; end if; end if; if(pr_client_write=client1_write)then if(WR_EN_C1='1')then nx_client_write <=client1_write; else if(REQUEST_C2='0')then nx_client_write<= idle; elsif(RD_NOT_WRITE_C2='0')then nx_client_write<= client2_write; elsif(RD_NOT_WRITE_C2='1')then nx_client_write<= idle; end if; end if; end if;---------------------------------------------------------------------- if(pr_client_read=client2_read)then ------when arbiter allow client 2----- if(RD_EN_C1='0')then if(REQUEST_C2='1')then if( RD_NOT_WRITE_C2='1')then nx_client_read<= client2_read; else nx_client_read<=idle; nx_client_write<= client2_write; end if; else nx_client_read<=idle; end if; else nx_client_read <=client1_read; end if; end if; if(pr_client_write=client2_write)then if(WR_EN_C1='0')then if(REQUEST_C2='1')then if( RD_NOT_WRITE_C2='0')then nx_client_write<= client2_write; else nx_client_write<=idle; nx_client_read<= client2_read; end if; else nx_client_write<=idle; end if; else nx_client_write <=client1_write; end if; end if; ------------------------------------------------------------------------- end process; ------------------------------------------------------------------------- --Assigning Temp Registers according to the client---------------- ------------------------------------------------------------------------- pram:process(CLOCK) begin --------------------------------------------------- ----------------Read & Write operation ------------ --------------------------------------------------- if(RST_N = '0')then TEMP_RD_DATA <= (others =>'0'); TEMP_RD_DATA1 <= (others =>'0'); TEMP_RD_DATA2 <= (others =>'0'); elsif(CLOCK'EVENT and CLOCK='1')then if(nx_client_read = idle)then TEMP_RD_EN<='0'; TEMP_RD_ADDR<=(others =>'0'); elsif (nx_client_read=client1_read)then TEMP_RD_EN <= RD_EN_C1; TEMP_RD_ADDR <= RDADDR_C1; elsif(nx_client_read=client2_read)then if(TEMP_ACK='0')then TEMP_RD_EN <= '1'; TEMP_RD_ADDR<= ADDR_C2; TEMP_ACK <= '1'; end if; end if; if(nx_client_write = idle)then TEMP_WR_EN <= '0'; TEMP_WR_DATA <= (others =>'0'); TEMP_WR_ADDR <= (others =>'0'); elsif (nx_client_write=client1_write)then TEMP_WR_EN <= WR_EN_C1; TEMP_WR_DATA <= WRDATA_C1; TEMP_WR_ADDR <= WRADDR_C1; elsif(nx_client_write=client2_write)then if(TEMP_WR='0')then TEMP_WR_EN <= '1'; TEMP_WR_ADDR <= ADDR_C2; TEMP_WR_DATA <= DATAIN_C2; TEMP_WR <= '1'; end if; end if; ------------------------------------------- -----If Addr Clash occurs ------- ------------------------------------------- if (TEMP_RD_EN='1' and TEMP_WR_EN ='1') then if(TEMP_WR_ADDR = TEMP_RD_ADDR )then ADDR_CLASH <='1'; TEMP_RD_DATA<=TEMP_WR_DATA; else ADDR_CLASH <='0'; end if; else ADDR_CLASH <='0'; end if; ---------------------------------------------- if(TEMP_WR1='1')then ------For ACK generation during client2_Write------ TEMP_WR<='0'; end if; TEMP_ACK1<=TEMP_ACK; ------For ACK generation during client2_Read------ if(TEMP_ACK1='1')then TEMP_ACK1<='0'; TEMP_ACK<='0'; end if; ----------------------------------------------------- ADDR_CLASHI<=ADDR_CLASH;---One clock cycle delay in addr clash for Registered data----- TEMP_RD_DATA1<=TEMP_RD_DATA;---One clock cycle delay in output for Registered data with addr clash ----- TEMP_RD_DATA2<=RD_DATA; ---One clock cycle delay in output for Registered data without addr clash ----- end if; end process; ------------------------------------------------------------------------- --------Data in out put from temp registers--------- ------------------------------------------------------------------------- RD_EN<= TEMP_RD_EN; WR_EN<= TEMP_WR_EN; WR_DATA<=TEMP_WR_DATA; WR_ADDR<=TEMP_WR_ADDR; RD_ADDR<=TEMP_RD_ADDR; ------------------------------------------------------------------------- TEMP_WR1<=TEMP_WR;-----For ACK generation during client2_write-------- ACK_C2<='1' when (TEMP_ACK1='1' or TEMP_WR1='1') else '0';--output ACK generation during client2_write and read--- RST_DONE<=RESET_DONE_REG; ----------Indication for reset compleate---- ------------------------------------------------------------------------- -----------------Data out for client 2 ---------------- ------------------------------------------------------------------------- DATAOUT_C2<=RD_DATA when (ADDR_CLASH='0') else TEMP_RD_DATA; ------------------------------------------------------------------------- -----------------------Data out for client 1------- --------- ------------------------------------------------------------------------- RDDATA_C1<=RD_DATA when (REGISTERED_DATA =0 and ADDR_CLASH='0' ) else TEMP_RD_DATA when (REGISTERED_DATA =0 and ADDR_CLASH='1' ) else TEMP_RD_DATA2 when (REGISTERED_DATA =1 and ADDR_CLASHI='0' ) else TEMP_RD_DATA1 when (REGISTERED_DATA =1 and ADDR_CLASHI='1' ); end RTL;
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Mux32B is Port ( A : in STD_LOGIC_VECTOR (31 downto 0); B : in STD_LOGIC_VECTOR (31 downto 0); Sc : in STD_LOGIC; MuxOut : out STD_LOGIC_VECTOR (31 downto 0)); end Mux32B; architecture Behavioral of Mux32B is begin process (A, B, Sc) begin if (Sc = '0') then MuxOut <= A; else MuxOut <= B; end if; end process; end Behavioral;
------------------------------------------------------------------------------ -- This file is a part of the GRLIB VHDL IP LIBRARY -- Copyright (C) 2003 - 2008, Gaisler Research -- Copyright (C) 2008, 2009, Aeroflex Gaisler -- -- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ----------------------------------------------------------------------------- -- Entity: iu3 -- File: iu3.vhd -- Author: Jiri Gaisler, Edvin Catovic, Gaisler Research -- Description: LEON3 7-stage integer pipline ------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library grlib; use grlib.sparc.all; use grlib.stdlib.all; library techmap; use techmap.gencomp.all; library gaisler; use gaisler.leon3.all; use gaisler.libiu.all; use gaisler.arith.all; -- pragma translate_off use grlib.sparc_disas.all; -- pragma translate_on entity iu3 is generic ( nwin : integer range 2 to 32 := 8; isets : integer range 1 to 4 := 2; dsets : integer range 1 to 4 := 2; fpu : integer range 0 to 15 := 0; v8 : integer range 0 to 63 := 2; cp, mac : integer range 0 to 1 := 0; dsu : integer range 0 to 1 := 1; nwp : integer range 0 to 4 := 2; pclow : integer range 0 to 2 := 2; notag : integer range 0 to 1 := 0; index : integer range 0 to 15:= 0; lddel : integer range 1 to 2 := 1; irfwt : integer range 0 to 1 := 0; disas : integer range 0 to 2 := 0; tbuf : integer range 0 to 64 := 2; -- trace buf size in kB (0 - no trace buffer) pwd : integer range 0 to 2 := 0; -- power-down svt : integer range 0 to 1 := 0; -- single-vector trapping rstaddr : integer := 16#00000#; -- reset vector MSB address smp : integer range 0 to 15 := 0; -- support SMP systems fabtech : integer range 0 to NTECH := 20; clk2x : integer := 0 ); port ( clk : in std_ulogic; rstn : in std_ulogic; holdn : in std_ulogic; ici : buffer icache_in_type; ico : in icache_out_type; dci : buffer dcache_in_type; dco : in dcache_out_type; rfi : buffer iregfile_in_type; rfo : in iregfile_out_type; irqi : in l3_irq_in_type; irqo : buffer l3_irq_out_type; dbgi : in l3_debug_in_type; dbgo : buffer l3_debug_out_type; muli : buffer mul32_in_type; mulo : in mul32_out_type; divi : buffer div32_in_type; divo : in div32_out_type; fpo : in fpc_out_type; fpi : buffer fpc_in_type; cpo : in fpc_out_type; cpi : buffer fpc_in_type; tbo : in tracebuf_out_type; tbi : buffer tracebuf_in_type; sclk : in std_ulogic ); end; architecture rtl of iu3 is constant ISETMSB : integer := 0; constant DSETMSB : integer := 0; constant RFBITS : integer range 6 to 10 := 8; constant NWINLOG2 : integer range 1 to 5 := 3; constant CWPOPT : boolean := true; constant CWPMIN : std_logic_vector(2 downto 0) := "000"; constant CWPMAX : std_logic_vector(2 downto 0) := "111"; constant FPEN : boolean := (fpu /= 0); constant CPEN : boolean := false; constant MULEN : boolean := true; constant MULTYPE: integer := 0; constant DIVEN : boolean := true; constant MACEN : boolean := false; constant MACPIPE: boolean := false; constant IMPL : integer := 15; constant VER : integer := 3; constant DBGUNIT : boolean := true; constant TRACEBUF : boolean := true; constant TBUFBITS : integer := 7; constant PWRD1 : boolean := false; --(pwd = 1) and not (index /= 0); constant PWRD2 : boolean := false; --(pwd = 2) or (index /= 0); constant RS1OPT : boolean := true; constant DYNRST : boolean := false; subtype word is std_logic_vector(31 downto 0); subtype pctype is std_logic_vector(31 downto 2); subtype rfatype is std_logic_vector(8-1 downto 0); subtype cwptype is std_logic_vector(3-1 downto 0); type icdtype is array (0 to 2-1) of word; type dcdtype is array (0 to 2-1) of word; type dc_in_type is record signed, enaddr, read, write, lock , dsuen : std_ulogic; size : std_logic_vector(1 downto 0); asi : std_logic_vector(7 downto 0); end record; type pipeline_ctrl_type is record pc : pctype; inst : word; cnt : std_logic_vector(1 downto 0); rd : rfatype; tt : std_logic_vector(5 downto 0); trap : std_ulogic; annul : std_ulogic; wreg : std_ulogic; wicc : std_ulogic; wy : std_ulogic; ld : std_ulogic; pv : std_ulogic; rett : std_ulogic; end record; type fetch_reg_type is record pc : pctype; branch : std_ulogic; end record; type decode_reg_type is record pc : pctype; inst : icdtype; cwp : cwptype; set : std_logic_vector(0 downto 0); mexc : std_ulogic; cnt : std_logic_vector(1 downto 0); pv : std_ulogic; annul : std_ulogic; inull : std_ulogic; step : std_ulogic; end record; type regacc_reg_type is record ctrl : pipeline_ctrl_type; rs1 : std_logic_vector(4 downto 0); rfa1, rfa2 : rfatype; rsel1, rsel2 : std_logic_vector(2 downto 0); rfe1, rfe2 : std_ulogic; cwp : cwptype; imm : word; ldcheck1 : std_ulogic; ldcheck2 : std_ulogic; ldchkra : std_ulogic; ldchkex : std_ulogic; su : std_ulogic; et : std_ulogic; wovf : std_ulogic; wunf : std_ulogic; ticc : std_ulogic; jmpl : std_ulogic; step : std_ulogic; mulstart : std_ulogic; divstart : std_ulogic; end record; type execute_reg_type is record ctrl : pipeline_ctrl_type; op1 : word; op2 : word; aluop : std_logic_vector(2 downto 0); -- Alu operation alusel : std_logic_vector(1 downto 0); -- Alu result select aluadd : std_ulogic; alucin : std_ulogic; ldbp1, ldbp2 : std_ulogic; invop2 : std_ulogic; shcnt : std_logic_vector(4 downto 0); -- shift count sari : std_ulogic; -- shift msb shleft : std_ulogic; -- shift left/right ymsb : std_ulogic; -- shift left/right rd : std_logic_vector(4 downto 0); jmpl : std_ulogic; su : std_ulogic; et : std_ulogic; cwp : cwptype; icc : std_logic_vector(3 downto 0); mulstep: std_ulogic; mul : std_ulogic; mac : std_ulogic; end record; type memory_reg_type is record ctrl : pipeline_ctrl_type; result : word; y : word; icc : std_logic_vector(3 downto 0); nalign : std_ulogic; dci : dc_in_type; werr : std_ulogic; wcwp : std_ulogic; irqen : std_ulogic; irqen2 : std_ulogic; mac : std_ulogic; divz : std_ulogic; su : std_ulogic; mul : std_ulogic; end record; type exception_state is (run, trap, dsu1, dsu2); type exception_reg_type is record ctrl : pipeline_ctrl_type; result : word; y : word; icc : std_logic_vector( 3 downto 0); annul_all : std_ulogic; data : dcdtype; set : std_logic_vector(0 downto 0); mexc : std_ulogic; dci : dc_in_type; laddr : std_logic_vector(1 downto 0); rstate : exception_state; npc : std_logic_vector(2 downto 0); intack : std_ulogic; ipend : std_ulogic; mac : std_ulogic; debug : std_ulogic; nerror : std_ulogic; end record; type dsu_registers is record tt : std_logic_vector(7 downto 0); err : std_ulogic; tbufcnt : std_logic_vector(7-1 downto 0); asi : std_logic_vector(7 downto 0); crdy : std_logic_vector(2 downto 1); -- diag cache access ready end record; type irestart_register is record addr : pctype; pwd : std_ulogic; end record; type pwd_register_type is record pwd : std_ulogic; error : std_ulogic; end record; type special_register_type is record cwp : cwptype; -- current window pointer icc : std_logic_vector(3 downto 0); -- integer condition codes tt : std_logic_vector(7 downto 0); -- trap type tba : std_logic_vector(19 downto 0); -- trap base address wim : std_logic_vector(8-1 downto 0); -- window invalid mask pil : std_logic_vector(3 downto 0); -- processor interrupt level ec : std_ulogic; -- enable CP ef : std_ulogic; -- enable FP ps : std_ulogic; -- previous supervisor flag s : std_ulogic; -- supervisor flag et : std_ulogic; -- enable traps y : word; asr18 : word; svt : std_ulogic; -- enable traps dwt : std_ulogic; -- disable write error trap end record; type write_reg_type is record s : special_register_type; result : word; wa : rfatype; wreg : std_ulogic; except : std_ulogic; end record; type registers is record f : fetch_reg_type; d : decode_reg_type; a : regacc_reg_type; e : execute_reg_type; m : memory_reg_type; x : exception_reg_type; w : write_reg_type; end record; type exception_type is record pri : std_ulogic; ill : std_ulogic; fpdis : std_ulogic; cpdis : std_ulogic; wovf : std_ulogic; wunf : std_ulogic; ticc : std_ulogic; end record; type watchpoint_register is record addr : std_logic_vector(31 downto 2); -- watchpoint address mask : std_logic_vector(31 downto 2); -- watchpoint mask exec : std_ulogic; -- trap on instruction load : std_ulogic; -- trap on load store : std_ulogic; -- trap on store end record; type watchpoint_registers is array (0 to 3) of watchpoint_register; constant wpr_none : watchpoint_register := ( "000000000000000000000000000000", "000000000000000000000000000000", '0', '0', '0'); function dbgexc(r : registers; dbgi : l3_debug_in_type; trap : std_ulogic; tt : std_logic_vector(7 downto 0)) return std_ulogic is variable dmode : std_ulogic; begin dmode := '0'; if (not r.x.ctrl.annul and trap) = '1' then if (((tt = "00" & TT_WATCH) and (dbgi.bwatch = '1')) or ((dbgi.bsoft = '1') and (tt = "10000001")) or (dbgi.btrapa = '1') or ((dbgi.btrape = '1') and not ((tt(5 downto 0) = TT_PRIV) or (tt(5 downto 0) = TT_FPDIS) or (tt(5 downto 0) = TT_WINOF) or (tt(5 downto 0) = TT_WINUF) or (tt(5 downto 4) = "01") or (tt(7) = '1'))) or (((not r.w.s.et) and dbgi.berror) = '1')) then dmode := '1'; end if; end if; return(dmode); end; function dbgerr(r : registers; dbgi : l3_debug_in_type; tt : std_logic_vector(7 downto 0)) return std_ulogic is variable err : std_ulogic; begin err := not r.w.s.et; if (((dbgi.dbreak = '1') and (tt = ("00" & TT_WATCH))) or ((dbgi.bsoft = '1') and (tt = ("10000001")))) then err := '0'; end if; return(err); end; procedure diagwr(r : in registers; dsur : in dsu_registers; ir : in irestart_register; dbg : in l3_debug_in_type; wpr : in watchpoint_registers; s : out special_register_type; vwpr : out watchpoint_registers; asi : out std_logic_vector(7 downto 0); pc, npc : out pctype; tbufcnt : out std_logic_vector(7-1 downto 0); wr : out std_ulogic; addr : out std_logic_vector(9 downto 0); data : out word; fpcwr : out std_ulogic) is variable i : integer range 0 to 3; begin s := r.w.s; pc := r.f.pc; npc := ir.addr; wr := '0'; vwpr := wpr; asi := dsur.asi; addr := "0000000000"; data := dbg.ddata; tbufcnt := dsur.tbufcnt; fpcwr := '0'; if (dbg.dsuen and dbg.denable and dbg.dwrite) = '1' then case dbg.daddr(23 downto 20) is when "0001" => if (dbg.daddr(16) = '1') and true then -- trace buffer control reg tbufcnt := dbg.ddata(7-1 downto 0); end if; when "0011" => -- IU reg file if dbg.daddr(12) = '0' then wr := '1'; addr := "0000000000"; addr(8-1 downto 0) := dbg.daddr(8+1 downto 2); else -- FPC fpcwr := '1'; end if; when "0100" => -- IU special registers case dbg.daddr(7 downto 6) is when "00" => -- IU regs Y - TBUF ctrl reg case dbg.daddr(5 downto 2) is when "0000" => -- Y s.y := dbg.ddata; when "0001" => -- PSR s.cwp := dbg.ddata(3-1 downto 0); s.icc := dbg.ddata(23 downto 20); s.ec := dbg.ddata(13); if FPEN then s.ef := dbg.ddata(12); end if; s.pil := dbg.ddata(11 downto 8); s.s := dbg.ddata(7); s.ps := dbg.ddata(6); s.et := dbg.ddata(5); when "0010" => -- WIM s.wim := dbg.ddata(8-1 downto 0); when "0011" => -- TBR s.tba := dbg.ddata(31 downto 12); s.tt := dbg.ddata(11 downto 4); when "0100" => -- PC pc := dbg.ddata(31 downto 2); when "0101" => -- NPC npc := dbg.ddata(31 downto 2); when "0110" => --FSR fpcwr := '1'; when "0111" => --CFSR when "1001" => -- ASI reg asi := dbg.ddata(7 downto 0); --when "1001" => -- TBUF ctrl reg -- tbufcnt := dbg.ddata(7-1 downto 0); when others => end case; when "01" => -- ASR16 - ASR31 case dbg.daddr(5 downto 2) is when "0001" => -- %ASR17 s.dwt := dbg.ddata(14); s.svt := dbg.ddata(13); when "0010" => -- %ASR18 if false then s.asr18 := dbg.ddata; end if; when "1000" => -- %ASR24 - %ASR31 vwpr(0).addr := dbg.ddata(31 downto 2); vwpr(0).exec := dbg.ddata(0); when "1001" => vwpr(0).mask := dbg.ddata(31 downto 2); vwpr(0).load := dbg.ddata(1); vwpr(0).store := dbg.ddata(0); when "1010" => vwpr(1).addr := dbg.ddata(31 downto 2); vwpr(1).exec := dbg.ddata(0); when "1011" => vwpr(1).mask := dbg.ddata(31 downto 2); vwpr(1).load := dbg.ddata(1); vwpr(1).store := dbg.ddata(0); when "1100" => vwpr(2).addr := dbg.ddata(31 downto 2); vwpr(2).exec := dbg.ddata(0); when "1101" => vwpr(2).mask := dbg.ddata(31 downto 2); vwpr(2).load := dbg.ddata(1); vwpr(2).store := dbg.ddata(0); when "1110" => vwpr(3).addr := dbg.ddata(31 downto 2); vwpr(3).exec := dbg.ddata(0); when "1111" => -- vwpr(3).mask := dbg.ddata(31 downto 2); vwpr(3).load := dbg.ddata(1); vwpr(3).store := dbg.ddata(0); when others => -- end case; -- disabled due to bug in XST -- i := conv_integer(dbg.daddr(4 downto 3)); -- if dbg.daddr(2) = '0' then -- vwpr(i).addr := dbg.ddata(31 downto 2); -- vwpr(i).exec := dbg.ddata(0); -- else -- vwpr(i).mask := dbg.ddata(31 downto 2); -- vwpr(i).load := dbg.ddata(1); -- vwpr(i).store := dbg.ddata(0); -- end if; when others => end case; when others => end case; end if; end; function asr17_gen ( r : in registers) return word is variable asr17 : word; variable fpu2 : integer range 0 to 3; begin asr17 := "00000000000000000000000000000000"; asr17(31 downto 28) := conv_std_logic_vector(index, 4); if (clk2x > 8) then asr17(16 downto 15) := conv_std_logic_vector(clk2x-8, 2); asr17(17) := '1'; elsif (clk2x > 0) then asr17(16 downto 15) := conv_std_logic_vector(clk2x, 2); end if; asr17(14) := r.w.s.dwt; if svt = 1 then asr17(13) := r.w.s.svt; end if; if lddel = 2 then asr17(12) := '1'; end if; if (fpu > 0) and (fpu < 8) then fpu2 := 1; elsif (fpu >= 8) and (fpu < 15) then fpu2 := 3; elsif fpu = 15 then fpu2 := 2; else fpu2 := 0; end if; asr17(11 downto 10) := conv_std_logic_vector(fpu2, 2); if mac = 1 then asr17(9) := '1'; end if; if 2 /= 0 then asr17(8) := '1'; end if; asr17(7 downto 5) := conv_std_logic_vector(nwp, 3); asr17(4 downto 0) := conv_std_logic_vector(8-1, 5); return(asr17); end; procedure diagread(dbgi : in l3_debug_in_type; r : in registers; dsur : in dsu_registers; ir : in irestart_register; wpr : in watchpoint_registers; dco : in dcache_out_type; tbufo : in tracebuf_out_type; data : out word) is variable cwp : std_logic_vector(4 downto 0); variable rd : std_logic_vector(4 downto 0); variable i : integer range 0 to 3; begin data := "00000000000000000000000000000000"; cwp := "00000"; cwp(3-1 downto 0) := r.w.s.cwp; case dbgi.daddr(22 downto 20) is when "001" => -- trace buffer if true then if dbgi.daddr(16) = '1' then -- trace buffer control reg if true then data(7-1 downto 0) := dsur.tbufcnt; end if; else case dbgi.daddr(3 downto 2) is when "00" => data := tbufo.data(127 downto 96); when "01" => data := tbufo.data(95 downto 64); when "10" => data := tbufo.data(63 downto 32); when others => data := tbufo.data(31 downto 0); end case; end if; end if; when "011" => -- IU reg file if dbgi.daddr(12) = '0' then data := rfo.data1(31 downto 0); if (dbgi.daddr(11) = '1') and (is_fpga(fabtech) = 0) then data := rfo.data2(31 downto 0); end if; else data := fpo.dbg.data; end if; when "100" => -- IU regs case dbgi.daddr(7 downto 6) is when "00" => -- IU regs Y - TBUF ctrl reg case dbgi.daddr(5 downto 2) is when "0000" => data := r.w.s.y; when "0001" => data := conv_std_logic_vector(15, 4) & conv_std_logic_vector(3, 4) & r.w.s.icc & "000000" & r.w.s.ec & r.w.s.ef & r.w.s.pil & r.w.s.s & r.w.s.ps & r.w.s.et & cwp; when "0010" => data(8-1 downto 0) := r.w.s.wim; when "0011" => data := r.w.s.tba & r.w.s.tt & "0000"; when "0100" => data(31 downto 2) := r.f.pc; when "0101" => data(31 downto 2) := ir.addr; when "0110" => -- FSR data := fpo.dbg.data; when "0111" => -- CPSR when "1000" => -- TT reg data(12 downto 4) := dsur.err & dsur.tt; when "1001" => -- ASI reg data(7 downto 0) := dsur.asi; when others => end case; when "01" => if dbgi.daddr(5) = '0' then -- %ASR17 if dbgi.daddr(4 downto 2) = "001" then -- %ASR17 data := asr17_gen(r); elsif false and dbgi.daddr(4 downto 2) = "010" then -- %ASR18 data := r.w.s.asr18; end if; else -- %ASR24 - %ASR31 i := conv_integer(dbgi.daddr(4 downto 3)); -- if dbgi.daddr(2) = '0' then data(31 downto 2) := wpr(i).addr; data(0) := wpr(i).exec; else data(31 downto 2) := wpr(i).mask; data(1) := wpr(i).load; data(0) := wpr(i).store; end if; end if; when others => end case; when "111" => data := r.x.data(conv_integer(r.x.set)); when others => end case; end; procedure itrace(r : in registers; dsur : in dsu_registers; vdsu : in dsu_registers; res : in word; exc : in std_ulogic; dbgi : in l3_debug_in_type; error : in std_ulogic; trap : in std_ulogic; tbufcnt : out std_logic_vector(7-1 downto 0); di : out tracebuf_in_type) is variable meminst : std_ulogic; begin di.addr := (others => '0'); di.data := (others => '0'); di.enable := '0'; di.write := (others => '0'); tbufcnt := vdsu.tbufcnt; meminst := r.x.ctrl.inst(31) and r.x.ctrl.inst(30); if true then di.addr(7-1 downto 0) := dsur.tbufcnt; di.data(127) := '0'; di.data(126) := not r.x.ctrl.pv; di.data(125 downto 96) := dbgi.timer(29 downto 0); di.data(95 downto 64) := res; di.data(63 downto 34) := r.x.ctrl.pc(31 downto 2); di.data(33) := trap; di.data(32) := error; di.data(31 downto 0) := r.x.ctrl.inst; if (dbgi.tenable = '0') or (r.x.rstate = dsu2) then if ((dbgi.dsuen and dbgi.denable) = '1') and (dbgi.daddr(23 downto 20) & dbgi.daddr(16) = "00010") then di.enable := '1'; di.addr(7-1 downto 0) := dbgi.daddr(7-1+4 downto 4); if dbgi.dwrite = '1' then case dbgi.daddr(3 downto 2) is when "00" => di.write(3) := '1'; when "01" => di.write(2) := '1'; when "10" => di.write(1) := '1'; when others => di.write(0) := '1'; end case; di.data := dbgi.ddata & dbgi.ddata & dbgi.ddata & dbgi.ddata; end if; end if; elsif (not r.x.ctrl.annul and (r.x.ctrl.pv or meminst) and not r.x.debug) = '1' then di.enable := '1'; di.write := (others => '1'); tbufcnt := dsur.tbufcnt + 1; end if; di.diag := dco.testen & "000"; if dco.scanen = '1' then di.enable := '0'; end if; end if; end; procedure dbg_cache(holdn : in std_ulogic; dbgi : in l3_debug_in_type; r : in registers; dsur : in dsu_registers; mresult : in word; dci : in dc_in_type; mresult2 : out word; dci2 : out dc_in_type ) is begin mresult2 := mresult; dci2 := dci; dci2.dsuen := '0'; if true then if r.x.rstate = dsu2 then dci2.asi := dsur.asi; if (dbgi.daddr(22 downto 20) = "111") and (dbgi.dsuen = '1') then dci2.dsuen := (dbgi.denable or r.m.dci.dsuen) and not dsur.crdy(2); dci2.enaddr := dbgi.denable; dci2.size := "10"; dci2.read := '1'; dci2.write := '0'; if (dbgi.denable and not r.m.dci.enaddr) = '1' then mresult2 := (others => '0'); mresult2(19 downto 2) := dbgi.daddr(19 downto 2); else mresult2 := dbgi.ddata; end if; if dbgi.dwrite = '1' then dci2.read := '0'; dci2.write := '1'; end if; end if; end if; end if; end; procedure fpexack(r : in registers; fpexc : out std_ulogic) is begin fpexc := '0'; if FPEN then if r.x.ctrl.tt = TT_FPEXC then fpexc := '1'; end if; end if; end; procedure diagrdy(denable : in std_ulogic; dsur : in dsu_registers; dci : in dc_in_type; mds : in std_ulogic; ico : in icache_out_type; crdy : out std_logic_vector(2 downto 1)) is begin crdy := dsur.crdy(1) & '0'; if dci.dsuen = '1' then case dsur.asi(4 downto 0) is when ASI_ITAG | ASI_IDATA | ASI_UINST | ASI_SINST => crdy(2) := ico.diagrdy and not dsur.crdy(2); when ASI_DTAG | ASI_MMUSNOOP_DTAG | ASI_DDATA | ASI_UDATA | ASI_SDATA => crdy(1) := not denable and dci.enaddr and not dsur.crdy(1); when others => crdy(2) := dci.enaddr and denable; end case; end if; end; signal r, rin : registers; signal wpr, wprin : watchpoint_registers; signal dsur, dsuin : dsu_registers; signal ir, irin : irestart_register; signal rp, rpin : pwd_register_type; -- execute stage operations constant EXE_AND : std_logic_vector(2 downto 0) := "000"; constant EXE_XOR : std_logic_vector(2 downto 0) := "001"; -- must be equal to EXE_PASS2 constant EXE_OR : std_logic_vector(2 downto 0) := "010"; constant EXE_XNOR : std_logic_vector(2 downto 0) := "011"; constant EXE_ANDN : std_logic_vector(2 downto 0) := "100"; constant EXE_ORN : std_logic_vector(2 downto 0) := "101"; constant EXE_DIV : std_logic_vector(2 downto 0) := "110"; constant EXE_PASS1 : std_logic_vector(2 downto 0) := "000"; constant EXE_PASS2 : std_logic_vector(2 downto 0) := "001"; constant EXE_STB : std_logic_vector(2 downto 0) := "010"; constant EXE_STH : std_logic_vector(2 downto 0) := "011"; constant EXE_ONES : std_logic_vector(2 downto 0) := "100"; constant EXE_RDY : std_logic_vector(2 downto 0) := "101"; constant EXE_SPR : std_logic_vector(2 downto 0) := "110"; constant EXE_LINK : std_logic_vector(2 downto 0) := "111"; constant EXE_SLL : std_logic_vector(2 downto 0) := "001"; constant EXE_SRL : std_logic_vector(2 downto 0) := "010"; constant EXE_SRA : std_logic_vector(2 downto 0) := "100"; constant EXE_NOP : std_logic_vector(2 downto 0) := "000"; -- EXE result select constant EXE_RES_ADD : std_logic_vector(1 downto 0) := "00"; constant EXE_RES_SHIFT : std_logic_vector(1 downto 0) := "01"; constant EXE_RES_LOGIC : std_logic_vector(1 downto 0) := "10"; constant EXE_RES_MISC : std_logic_vector(1 downto 0) := "11"; -- Load types constant SZBYTE : std_logic_vector(1 downto 0) := "00"; constant SZHALF : std_logic_vector(1 downto 0) := "01"; constant SZWORD : std_logic_vector(1 downto 0) := "10"; constant SZDBL : std_logic_vector(1 downto 0) := "11"; -- calculate register file address procedure regaddr(cwp : std_logic_vector; reg : std_logic_vector(4 downto 0); rao : out rfatype) is variable ra : rfatype; constant globals : std_logic_vector(8-5 downto 0) := conv_std_logic_vector(8, 8-4); begin ra := (others => '0'); ra(4 downto 0) := reg; if reg(4 downto 3) = "00" then ra(8 -1 downto 4) := globals; else ra(3+3 downto 4) := cwp + ra(4); if ra(8-1 downto 4) = globals then ra(8-1 downto 4) := (others => '0'); end if; end if; rao := ra; end; -- branch adder function branch_address(inst : word; pc : pctype) return std_logic_vector is variable baddr, caddr, tmp : pctype; begin caddr := (others => '0'); caddr(31 downto 2) := inst(29 downto 0); caddr(31 downto 2) := caddr(31 downto 2) + pc(31 downto 2); baddr := (others => '0'); baddr(31 downto 24) := (others => inst(21)); baddr(23 downto 2) := inst(21 downto 0); baddr(31 downto 2) := baddr(31 downto 2) + pc(31 downto 2); if inst(30) = '1' then tmp := caddr; else tmp := baddr; end if; return(tmp); end; -- evaluate branch condition function branch_true(icc : std_logic_vector(3 downto 0); inst : word) return std_ulogic is variable n, z, v, c, branch : std_ulogic; begin n := icc(3); z := icc(2); v := icc(1); c := icc(0); case inst(27 downto 25) is when "000" => branch := inst(28) xor '0'; -- bn, ba when "001" => branch := inst(28) xor z; -- be, bne when "010" => branch := inst(28) xor (z or (n xor v)); -- ble, bg when "011" => branch := inst(28) xor (n xor v); -- bl, bge when "100" => branch := inst(28) xor (c or z); -- bleu, bgu when "101" => branch := inst(28) xor c; -- bcs, bcc when "110" => branch := inst(28) xor n; -- bneg, bpos when others => branch := inst(28) xor v; -- bvs, bvc end case; return(branch); end; -- detect RETT instruction in the pipeline and set the local psr.su and psr.et procedure su_et_select(r : in registers; xc_ps, xc_s, xc_et : in std_ulogic; su, et : out std_ulogic) is begin if ((r.a.ctrl.rett or r.e.ctrl.rett or r.m.ctrl.rett or r.x.ctrl.rett) = '1') and (r.x.annul_all = '0') then su := xc_ps; et := '1'; else su := xc_s; et := xc_et; end if; end; -- detect watchpoint trap function wphit(r : registers; wpr : watchpoint_registers; debug : l3_debug_in_type) return std_ulogic is variable exc : std_ulogic; begin exc := '0'; for i in 1 to NWP loop if ((wpr(i-1).exec and r.a.ctrl.pv and not r.a.ctrl.annul) = '1') then if (((wpr(i-1).addr xor r.a.ctrl.pc(31 downto 2)) and wpr(i-1).mask) = "000000000000000000000000000000") then exc := '1'; end if; end if; end loop; if true then if (debug.dsuen and not r.a.ctrl.annul) = '1' then exc := exc or (r.a.ctrl.pv and ((debug.dbreak and debug.bwatch) or r.a.step)); end if; end if; return(exc); end; -- 32-bit shifter function shift3(r : registers; aluin1, aluin2 : word) return word is variable shiftin : unsigned(63 downto 0); variable shiftout : unsigned(63 downto 0); variable cnt : natural range 0 to 31; begin cnt := conv_integer(r.e.shcnt); if r.e.shleft = '1' then shiftin(30 downto 0) := (others => '0'); shiftin(63 downto 31) := '0' & unsigned(aluin1); else shiftin(63 downto 32) := (others => r.e.sari); shiftin(31 downto 0) := unsigned(aluin1); end if; shiftout := SHIFT_RIGHT(shiftin, cnt); return(std_logic_vector(shiftout(31 downto 0))); end; function shift2(r : registers; aluin1, aluin2 : word) return word is variable ushiftin : unsigned(31 downto 0); variable sshiftin : signed(32 downto 0); variable cnt : natural range 0 to 31; variable resleft, resright : word; begin cnt := conv_integer(r.e.shcnt); ushiftin := unsigned(aluin1); sshiftin := signed('0' & aluin1); if r.e.shleft = '1' then resleft := std_logic_vector(SHIFT_LEFT(ushiftin, cnt)); return(resleft); else if r.e.sari = '1' then sshiftin(32) := aluin1(31); end if; sshiftin := SHIFT_RIGHT(sshiftin, cnt); resright := std_logic_vector(sshiftin(31 downto 0)); return(resright); -- else -- ushiftin := SHIFT_RIGHT(ushiftin, cnt); -- return(std_logic_vector(ushiftin)); -- end if; end if; end; function shift(r : registers; aluin1, aluin2 : word; shiftcnt : std_logic_vector(4 downto 0); sari : std_ulogic ) return word is variable shiftin : std_logic_vector(63 downto 0); begin shiftin := "00000000000000000000000000000000" & aluin1; if r.e.shleft = '1' then shiftin(31 downto 0) := "00000000000000000000000000000000"; shiftin(63 downto 31) := '0' & aluin1; else shiftin(63 downto 32) := (others => sari); end if; if shiftcnt (4) = '1' then shiftin(47 downto 0) := shiftin(63 downto 16); end if; if shiftcnt (3) = '1' then shiftin(39 downto 0) := shiftin(47 downto 8); end if; if shiftcnt (2) = '1' then shiftin(35 downto 0) := shiftin(39 downto 4); end if; if shiftcnt (1) = '1' then shiftin(33 downto 0) := shiftin(35 downto 2); end if; if shiftcnt (0) = '1' then shiftin(31 downto 0) := shiftin(32 downto 1); end if; return(shiftin(31 downto 0)); end; -- Check for illegal and privileged instructions procedure exception_detect(r : registers; wpr : watchpoint_registers; dbgi : l3_debug_in_type; trapin : in std_ulogic; ttin : in std_logic_vector(5 downto 0); trap : out std_ulogic; tt : out std_logic_vector(5 downto 0)) is variable illegal_inst, privileged_inst : std_ulogic; variable cp_disabled, fp_disabled, fpop : std_ulogic; variable op : std_logic_vector(1 downto 0); variable op2 : std_logic_vector(2 downto 0); variable op3 : std_logic_vector(5 downto 0); variable rd : std_logic_vector(4 downto 0); variable inst : word; variable wph : std_ulogic; begin inst := r.a.ctrl.inst; trap := trapin; tt := ttin; if r.a.ctrl.annul = '0' then op := inst(31 downto 30); op2 := inst(24 downto 22); op3 := inst(24 downto 19); rd := inst(29 downto 25); illegal_inst := '0'; privileged_inst := '0'; cp_disabled := '0'; fp_disabled := '0'; fpop := '0'; case op is when CALL => null; when FMT2 => case op2 is when SETHI | BICC => null; when FBFCC => if FPEN then fp_disabled := not r.w.s.ef; else fp_disabled := '1'; end if; when CBCCC => if (not false) or (r.w.s.ec = '0') then cp_disabled := '1'; end if; when others => illegal_inst := '1'; end case; when FMT3 => case op3 is when IAND | ANDCC | ANDN | ANDNCC | IOR | ORCC | ORN | ORNCC | IXOR | XORCC | IXNOR | XNORCC | ISLL | ISRL | ISRA | MULSCC | IADD | ADDX | ADDCC | ADDXCC | ISUB | SUBX | SUBCC | SUBXCC | FLUSH | JMPL | TICC | SAVE | RESTORE | RDY => null; when TADDCC | TADDCCTV | TSUBCC | TSUBCCTV => if notag = 1 then illegal_inst := '1'; end if; when UMAC | SMAC => if not false then illegal_inst := '1'; end if; when UMUL | SMUL | UMULCC | SMULCC => if not true then illegal_inst := '1'; end if; when UDIV | SDIV | UDIVCC | SDIVCC => if not true then illegal_inst := '1'; end if; when RETT => illegal_inst := r.a.et; privileged_inst := not r.a.su; when RDPSR | RDTBR | RDWIM => privileged_inst := not r.a.su; when WRY => null; when WRPSR => privileged_inst := not r.a.su; when WRWIM | WRTBR => privileged_inst := not r.a.su; when FPOP1 | FPOP2 => if FPEN then fp_disabled := not r.w.s.ef; fpop := '1'; else fp_disabled := '1'; fpop := '0'; end if; when CPOP1 | CPOP2 => if (not false) or (r.w.s.ec = '0') then cp_disabled := '1'; end if; when others => illegal_inst := '1'; end case; when others => -- LDST case op3 is when LDD | ISTD => illegal_inst := rd(0); -- trap if odd destination register when LD | LDUB | LDSTUB | LDUH | LDSB | LDSH | ST | STB | STH | SWAP => null; when LDDA | STDA => illegal_inst := inst(13) or rd(0); privileged_inst := not r.a.su; when LDA | LDUBA| LDSTUBA | LDUHA | LDSBA | LDSHA | STA | STBA | STHA | SWAPA => illegal_inst := inst(13); privileged_inst := not r.a.su; when LDDF | STDF | LDF | LDFSR | STF | STFSR => if FPEN then fp_disabled := not r.w.s.ef; else fp_disabled := '1'; end if; when STDFQ => privileged_inst := not r.a.su; if (not FPEN) or (r.w.s.ef = '0') then fp_disabled := '1'; end if; when STDCQ => privileged_inst := not r.a.su; if (not false) or (r.w.s.ec = '0') then cp_disabled := '1'; end if; when LDC | LDCSR | LDDC | STC | STCSR | STDC => if (not false) or (r.w.s.ec = '0') then cp_disabled := '1'; end if; when others => illegal_inst := '1'; end case; end case; wph := wphit(r, wpr, dbgi); trap := '1'; if r.a.ctrl.trap = '1' then tt := TT_IAEX; elsif privileged_inst = '1' then tt := TT_PRIV; elsif illegal_inst = '1' then tt := TT_IINST; elsif fp_disabled = '1' then tt := TT_FPDIS; elsif cp_disabled = '1' then tt := TT_CPDIS; elsif wph = '1' then tt := TT_WATCH; elsif r.a.wovf= '1' then tt := TT_WINOF; elsif r.a.wunf= '1' then tt := TT_WINUF; elsif r.a.ticc= '1' then tt := TT_TICC; else trap := '0'; tt:= (others => '0'); end if; end if; end; -- instructions that write the condition codes (psr.icc) procedure wicc_y_gen(inst : word; wicc, wy : out std_ulogic) is begin wicc := '0'; wy := '0'; if inst(31 downto 30) = FMT3 then case inst(24 downto 19) is when SUBCC | TSUBCC | TSUBCCTV | ADDCC | ANDCC | ORCC | XORCC | ANDNCC | ORNCC | XNORCC | TADDCC | TADDCCTV | ADDXCC | SUBXCC | WRPSR => wicc := '1'; when WRY => if r.d.inst(conv_integer(r.d.set))(29 downto 25) = "00000" then wy := '1'; end if; when MULSCC => wicc := '1'; wy := '1'; when UMAC | SMAC => if false then wy := '1'; end if; when UMULCC | SMULCC => if true and (((mulo.nready = '1') and (r.d.cnt /= "00")) or (0 /= 0)) then wicc := '1'; wy := '1'; end if; when UMUL | SMUL => if true and (((mulo.nready = '1') and (r.d.cnt /= "00")) or (0 /= 0)) then wy := '1'; end if; when UDIVCC | SDIVCC => if true and (divo.nready = '1') and (r.d.cnt /= "00") then wicc := '1'; end if; when others => end case; end if; end; -- select cwp procedure cwp_gen(r, v : registers; annul, wcwp : std_ulogic; ncwp : cwptype; cwp : out cwptype) is begin if (r.x.rstate = trap) or (r.x.rstate = dsu2) or (rstn = '0') then cwp := v.w.s.cwp; elsif (wcwp = '1') and (annul = '0') then cwp := ncwp; elsif r.m.wcwp = '1' then cwp := r.m.result(3-1 downto 0); else cwp := r.d.cwp; end if; end; -- generate wcwp in ex stage procedure cwp_ex(r : in registers; wcwp : out std_ulogic) is begin if (r.e.ctrl.inst(31 downto 30) = FMT3) and (r.e.ctrl.inst(24 downto 19) = WRPSR) then wcwp := not r.e.ctrl.annul; else wcwp := '0'; end if; end; -- generate next cwp & window under- and overflow traps procedure cwp_ctrl(r : in registers; xc_wim : in std_logic_vector(8-1 downto 0); inst : word; de_cwp : out cwptype; wovf_exc, wunf_exc, wcwp : out std_ulogic) is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); variable wim : word; variable ncwp : cwptype; begin op := inst(31 downto 30); op3 := inst(24 downto 19); wovf_exc := '0'; wunf_exc := '0'; wim := (others => '0'); wim(8-1 downto 0) := xc_wim; ncwp := r.d.cwp; wcwp := '0'; if (op = FMT3) and ((op3 = RETT) or (op3 = RESTORE) or (op3 = SAVE)) then wcwp := '1'; if (op3 = SAVE) then if (not true) and (r.d.cwp = "000") then ncwp := "111"; else ncwp := r.d.cwp - 1 ; end if; else if (not true) and (r.d.cwp = "111") then ncwp := "000"; else ncwp := r.d.cwp + 1; end if; end if; if wim(conv_integer(ncwp)) = '1' then if op3 = SAVE then wovf_exc := '1'; else wunf_exc := '1'; end if; end if; end if; de_cwp := ncwp; end; -- generate register read address 1 procedure rs1_gen(r : registers; inst : word; rs1 : out std_logic_vector(4 downto 0); rs1mod : out std_ulogic) is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); begin op := inst(31 downto 30); op3 := inst(24 downto 19); rs1 := inst(18 downto 14); rs1mod := '0'; if (op = LDST) then if ((r.d.cnt = "01") and ((op3(2) and not op3(3)) = '1')) or (r.d.cnt = "10") then rs1mod := '1'; rs1 := inst(29 downto 25); end if; if ((r.d.cnt = "10") and (op3(3 downto 0) = "0111")) then rs1(0) := '1'; end if; end if; end; -- load/icc interlock detection procedure lock_gen(r : registers; rs2, rd : std_logic_vector(4 downto 0); rfa1, rfa2, rfrd : rfatype; inst : word; fpc_lock, mulinsn, divinsn : std_ulogic; lldcheck1, lldcheck2, lldlock, lldchkra, lldchkex : out std_ulogic) is variable op : std_logic_vector(1 downto 0); variable op2 : std_logic_vector(2 downto 0); variable op3 : std_logic_vector(5 downto 0); variable cond : std_logic_vector(3 downto 0); variable rs1 : std_logic_vector(4 downto 0); variable i, ldcheck1, ldcheck2, ldchkra, ldchkex, ldcheck3 : std_ulogic; variable ldlock, icc_check, bicc_hold, chkmul, y_check : std_ulogic; variable lddlock : boolean; begin op := inst(31 downto 30); op3 := inst(24 downto 19); op2 := inst(24 downto 22); cond := inst(28 downto 25); rs1 := inst(18 downto 14); lddlock := false; i := inst(13); ldcheck1 := '0'; ldcheck2 := '0'; ldcheck3 := '0'; ldlock := '0'; ldchkra := '1'; ldchkex := '1'; icc_check := '0'; bicc_hold := '0'; y_check := '0'; if (r.d.annul = '0') then case op is when FMT2 => if (op2 = BICC) and (cond(2 downto 0) /= "000") then icc_check := '1'; end if; when FMT3 => ldcheck1 := '1'; ldcheck2 := not i; case op3 is when TICC => if (cond(2 downto 0) /= "000") then icc_check := '1'; end if; when RDY => ldcheck1 := '0'; ldcheck2 := '0'; if false then y_check := '1'; end if; when RDWIM | RDTBR => ldcheck1 := '0'; ldcheck2 := '0'; when RDPSR => ldcheck1 := '0'; ldcheck2 := '0'; icc_check := '1'; if true then icc_check := '1'; end if; -- when ADDX | ADDXCC | SUBX | SUBXCC => -- if true then icc_check := '1'; end if; when SDIV | SDIVCC | UDIV | UDIVCC => if true then y_check := '1'; end if; when FPOP1 | FPOP2 => ldcheck1:= '0'; ldcheck2 := '0'; when others => end case; when LDST => ldcheck1 := '1'; ldchkra := '0'; case r.d.cnt is when "00" => if (lddel = 2) and (op3(2) = '1') then ldcheck3 := '1'; end if; ldcheck2 := not i; ldchkra := '1'; when "01" => ldcheck2 := not i; when others => ldchkex := '0'; end case; if (op3(2 downto 0) = "011") then lddlock := true; end if; when others => null; end case; end if; if true or true then chkmul := mulinsn; bicc_hold := bicc_hold or (icc_check and r.m.ctrl.wicc and (r.m.ctrl.cnt(0) or r.m.mul)); else chkmul := '0'; end if; if true then bicc_hold := bicc_hold or (y_check and (r.a.ctrl.wy or r.e.ctrl.wy)); chkmul := chkmul or divinsn; end if; bicc_hold := bicc_hold or (icc_check and (r.a.ctrl.wicc or r.e.ctrl.wicc)); if (((r.a.ctrl.ld or chkmul) and r.a.ctrl.wreg and ldchkra) = '1') and (((ldcheck1 = '1') and (r.a.ctrl.rd = rfa1)) or ((ldcheck2 = '1') and (r.a.ctrl.rd = rfa2)) or ((ldcheck3 = '1') and (r.a.ctrl.rd = rfrd))) then ldlock := '1'; end if; if (((r.e.ctrl.ld or r.e.mac) and r.e.ctrl.wreg and ldchkex) = '1') and ((lddel = 2) or (false and (r.e.mac = '1')) or ((0 = 3) and (r.e.mul = '1'))) and (((ldcheck1 = '1') and (r.e.ctrl.rd = rfa1)) or ((ldcheck2 = '1') and (r.e.ctrl.rd = rfa2))) then ldlock := '1'; end if; ldlock := ldlock or bicc_hold or fpc_lock; lldcheck1 := ldcheck1; lldcheck2:= ldcheck2; lldlock := ldlock; lldchkra := ldchkra; lldchkex := ldchkex; end; procedure fpbranch(inst : in word; fcc : in std_logic_vector(1 downto 0); branch : out std_ulogic) is variable cond : std_logic_vector(3 downto 0); variable fbres : std_ulogic; begin cond := inst(28 downto 25); case cond(2 downto 0) is when "000" => fbres := '0'; -- fba, fbn when "001" => fbres := fcc(1) or fcc(0); when "010" => fbres := fcc(1) xor fcc(0); when "011" => fbres := fcc(0); when "100" => fbres := (not fcc(1)) and fcc(0); when "101" => fbres := fcc(1); when "110" => fbres := fcc(1) and not fcc(0); when others => fbres := fcc(1) and fcc(0); end case; branch := cond(3) xor fbres; end; -- PC generation procedure ic_ctrl(r : registers; inst : word; annul_all, ldlock, branch_true, fbranch_true, cbranch_true, fccv, cccv : in std_ulogic; cnt : out std_logic_vector(1 downto 0); de_pc : out pctype; de_branch, ctrl_annul, de_annul, jmpl_inst, inull, de_pv, ctrl_pv, de_hold_pc, ticc_exception, rett_inst, mulstart, divstart : out std_ulogic) is variable op : std_logic_vector(1 downto 0); variable op2 : std_logic_vector(2 downto 0); variable op3 : std_logic_vector(5 downto 0); variable cond : std_logic_vector(3 downto 0); variable hold_pc, annul_current, annul_next, branch, annul, pv : std_ulogic; variable de_jmpl : std_ulogic; begin branch := '0'; annul_next := '0'; annul_current := '0'; pv := '1'; hold_pc := '0'; ticc_exception := '0'; rett_inst := '0'; op := inst(31 downto 30); op3 := inst(24 downto 19); op2 := inst(24 downto 22); cond := inst(28 downto 25); annul := inst(29); de_jmpl := '0'; cnt := "00"; mulstart := '0'; divstart := '0'; if r.d.annul = '0' then case inst(31 downto 30) is when CALL => branch := '1'; if r.d.inull = '1' then hold_pc := '1'; annul_current := '1'; end if; when FMT2 => if (op2 = BICC) or (FPEN and (op2 = FBFCC)) or (false and (op2 = CBCCC)) then if (FPEN and (op2 = FBFCC)) then branch := fbranch_true; if fccv /= '1' then hold_pc := '1'; annul_current := '1'; end if; elsif (false and (op2 = CBCCC)) then branch := cbranch_true; if cccv /= '1' then hold_pc := '1'; annul_current := '1'; end if; else branch := branch_true; end if; if hold_pc = '0' then if (branch = '1') then if (cond = BA) and (annul = '1') then annul_next := '1'; end if; else annul_next := annul; end if; if r.d.inull = '1' then -- contention with JMPL hold_pc := '1'; annul_current := '1'; annul_next := '0'; end if; end if; end if; when FMT3 => case op3 is when UMUL | SMUL | UMULCC | SMULCC => if true and (0 /= 0) then mulstart := '1'; end if; if true and (0 = 0) then case r.d.cnt is when "00" => cnt := "01"; hold_pc := '1'; pv := '0'; mulstart := '1'; when "01" => if mulo.nready = '1' then cnt := "00"; else cnt := "01"; pv := '0'; hold_pc := '1'; end if; when others => null; end case; end if; when UDIV | SDIV | UDIVCC | SDIVCC => if true then case r.d.cnt is when "00" => cnt := "01"; hold_pc := '1'; pv := '0'; divstart := '1'; when "01" => if divo.nready = '1' then cnt := "00"; else cnt := "01"; pv := '0'; hold_pc := '1'; end if; when others => null; end case; end if; when TICC => if branch_true = '1' then ticc_exception := '1'; end if; when RETT => rett_inst := '1'; --su := sregs.ps; when JMPL => de_jmpl := '1'; when WRY => if false then if inst(29 downto 25) = "10011" then -- %ASR19 case r.d.cnt is when "00" => pv := '0'; cnt := "00"; hold_pc := '1'; if r.x.ipend = '1' then cnt := "01"; end if; when "01" => cnt := "00"; when others => end case; end if; end if; when others => null; end case; when others => -- LDST case r.d.cnt is when "00" => if (op3(2) = '1') or (op3(1 downto 0) = "11") then -- ST/LDST/SWAP/LDD cnt := "01"; hold_pc := '1'; pv := '0'; end if; when "01" => if (op3(2 downto 0) = "111") or (op3(3 downto 0) = "1101") or ((false or FPEN) and ((op3(5) & op3(2 downto 0)) = "1110")) then -- LDD/STD/LDSTUB/SWAP cnt := "10"; pv := '0'; hold_pc := '1'; else cnt := "00"; end if; when "10" => cnt := "00"; when others => null; end case; end case; end if; if ldlock = '1' then cnt := r.d.cnt; annul_next := '0'; pv := '1'; end if; hold_pc := (hold_pc or ldlock) and not annul_all; if hold_pc = '1' then de_pc := r.d.pc; else de_pc := r.f.pc; end if; annul_current := (annul_current or ldlock or annul_all); ctrl_annul := r.d.annul or annul_all or annul_current; pv := pv and not ((r.d.inull and not hold_pc) or annul_all); jmpl_inst := de_jmpl and not annul_current; annul_next := (r.d.inull and not hold_pc) or annul_next or annul_all; if (annul_next = '1') or (rstn = '0') then cnt := (others => '0'); end if; de_hold_pc := hold_pc; de_branch := branch; de_annul := annul_next; de_pv := pv; ctrl_pv := r.d.pv and not ((r.d.annul and not r.d.pv) or annul_all or annul_current); inull := (not rstn) or r.d.inull or hold_pc or annul_all; end; -- register write address generation procedure rd_gen(r : registers; inst : word; wreg, ld : out std_ulogic; rdo : out std_logic_vector(4 downto 0)) is variable write_reg : std_ulogic; variable op : std_logic_vector(1 downto 0); variable op2 : std_logic_vector(2 downto 0); variable op3 : std_logic_vector(5 downto 0); variable rd : std_logic_vector(4 downto 0); begin op := inst(31 downto 30); op2 := inst(24 downto 22); op3 := inst(24 downto 19); write_reg := '0'; rd := inst(29 downto 25); ld := '0'; case op is when CALL => write_reg := '1'; rd := "01111"; -- CALL saves PC in r[15] (%o7) when FMT2 => if (op2 = SETHI) then write_reg := '1'; end if; when FMT3 => case op3 is when UMUL | SMUL | UMULCC | SMULCC => if true then if (((mulo.nready = '1') and (r.d.cnt /= "00")) or (0 /= 0)) then write_reg := '1'; end if; else write_reg := '1'; end if; when UDIV | SDIV | UDIVCC | SDIVCC => if true then if (divo.nready = '1') and (r.d.cnt /= "00") then write_reg := '1'; end if; else write_reg := '1'; end if; when RETT | WRPSR | WRY | WRWIM | WRTBR | TICC | FLUSH => null; when FPOP1 | FPOP2 => null; when CPOP1 | CPOP2 => null; when others => write_reg := '1'; end case; when others => -- LDST ld := not op3(2); if (op3(2) = '0') and not ((false or FPEN) and (op3(5) = '1')) then write_reg := '1'; end if; case op3 is when SWAP | SWAPA | LDSTUB | LDSTUBA => if r.d.cnt = "00" then write_reg := '1'; ld := '1'; end if; when others => null; end case; if r.d.cnt = "01" then case op3 is when LDD | LDDA | LDDC | LDDF => rd(0) := '1'; when others => end case; end if; end case; if (rd = "00000") then write_reg := '0'; end if; wreg := write_reg; rdo := rd; end; -- immediate data generation function imm_data (r : registers; insn : word) return word is variable immediate_data, inst : word; begin immediate_data := (others => '0'); inst := insn; case inst(31 downto 30) is when FMT2 => immediate_data := inst(21 downto 0) & "0000000000"; when others => -- LDST immediate_data(31 downto 13) := (others => inst(12)); immediate_data(12 downto 0) := inst(12 downto 0); end case; return(immediate_data); end; -- read special registers function get_spr (r : registers) return word is variable spr : word; begin spr := (others => '0'); case r.e.ctrl.inst(24 downto 19) is when RDPSR => spr(31 downto 5) := conv_std_logic_vector(15,4) & conv_std_logic_vector(3,4) & r.m.icc & "000000" & r.w.s.ec & r.w.s.ef & r.w.s.pil & r.e.su & r.w.s.ps & r.e.et; spr(3-1 downto 0) := r.e.cwp; when RDTBR => spr(31 downto 4) := r.w.s.tba & r.w.s.tt; when RDWIM => spr(8-1 downto 0) := r.w.s.wim; when others => end case; return(spr); end; -- immediate data select function imm_select(inst : word) return boolean is variable imm : boolean; begin imm := false; case inst(31 downto 30) is when FMT2 => case inst(24 downto 22) is when SETHI => imm := true; when others => end case; when FMT3 => case inst(24 downto 19) is when RDWIM | RDPSR | RDTBR => imm := true; when others => if (inst(13) = '1') then imm := true; end if; end case; when LDST => if (inst(13) = '1') then imm := true; end if; when others => end case; return(imm); end; -- EXE operation procedure alu_op(r : in registers; iop1, iop2 : in word; me_icc : std_logic_vector(3 downto 0); my, ldbp : std_ulogic; aop1, aop2 : out word; aluop : out std_logic_vector(2 downto 0); alusel : out std_logic_vector(1 downto 0); aluadd : out std_ulogic; shcnt : out std_logic_vector(4 downto 0); sari, shleft, ymsb, mulins, divins, mulstep, macins, ldbp2, invop2 : out std_ulogic) is variable op : std_logic_vector(1 downto 0); variable op2 : std_logic_vector(2 downto 0); variable op3 : std_logic_vector(5 downto 0); variable rd : std_logic_vector(4 downto 0); variable icc : std_logic_vector(3 downto 0); variable y0 : std_ulogic; begin op := r.a.ctrl.inst(31 downto 30); op2 := r.a.ctrl.inst(24 downto 22); op3 := r.a.ctrl.inst(24 downto 19); aop1 := iop1; aop2 := iop2; ldbp2 := ldbp; aluop := EXE_NOP; alusel := EXE_RES_MISC; aluadd := '1'; shcnt := iop2(4 downto 0); sari := '0'; shleft := '0'; invop2 := '0'; ymsb := iop1(0); mulins := '0'; divins := '0'; mulstep := '0'; macins := '0'; if r.e.ctrl.wy = '1' then y0 := my; elsif r.m.ctrl.wy = '1' then y0 := r.m.y(0); elsif r.x.ctrl.wy = '1' then y0 := r.x.y(0); else y0 := r.w.s.y(0); end if; if r.e.ctrl.wicc = '1' then icc := me_icc; elsif r.m.ctrl.wicc = '1' then icc := r.m.icc; elsif r.x.ctrl.wicc = '1' then icc := r.x.icc; else icc := r.w.s.icc; end if; case op is when CALL => aluop := EXE_LINK; when FMT2 => case op2 is when SETHI => aluop := EXE_PASS2; when others => end case; when FMT3 => case op3 is when IADD | ADDX | ADDCC | ADDXCC | TADDCC | TADDCCTV | SAVE | RESTORE | TICC | JMPL | RETT => alusel := EXE_RES_ADD; when ISUB | SUBX | SUBCC | SUBXCC | TSUBCC | TSUBCCTV => alusel := EXE_RES_ADD; aluadd := '0'; aop2 := not iop2; invop2 := '1'; when MULSCC => alusel := EXE_RES_ADD; aop1 := (icc(3) xor icc(1)) & iop1(31 downto 1); if y0 = '0' then aop2 := (others => '0'); ldbp2 := '0'; end if; mulstep := '1'; when UMUL | UMULCC | SMUL | SMULCC => if true then mulins := '1'; end if; when UMAC | SMAC => if false then mulins := '1'; macins := '1'; end if; when UDIV | UDIVCC | SDIV | SDIVCC => if true then aluop := EXE_DIV; alusel := EXE_RES_LOGIC; divins := '1'; end if; when IAND | ANDCC => aluop := EXE_AND; alusel := EXE_RES_LOGIC; when ANDN | ANDNCC => aluop := EXE_ANDN; alusel := EXE_RES_LOGIC; when IOR | ORCC => aluop := EXE_OR; alusel := EXE_RES_LOGIC; when ORN | ORNCC => aluop := EXE_ORN; alusel := EXE_RES_LOGIC; when IXNOR | XNORCC => aluop := EXE_XNOR; alusel := EXE_RES_LOGIC; when XORCC | IXOR | WRPSR | WRWIM | WRTBR | WRY => aluop := EXE_XOR; alusel := EXE_RES_LOGIC; when RDPSR | RDTBR | RDWIM => aluop := EXE_SPR; when RDY => aluop := EXE_RDY; when ISLL => aluop := EXE_SLL; alusel := EXE_RES_SHIFT; shleft := '1'; shcnt := not iop2(4 downto 0); invop2 := '1'; when ISRL => aluop := EXE_SRL; alusel := EXE_RES_SHIFT; when ISRA => aluop := EXE_SRA; alusel := EXE_RES_SHIFT; sari := iop1(31); when FPOP1 | FPOP2 => when others => end case; when others => -- LDST case r.a.ctrl.cnt is when "00" => alusel := EXE_RES_ADD; when "01" => case op3 is when LDD | LDDA | LDDC => alusel := EXE_RES_ADD; when LDDF => alusel := EXE_RES_ADD; when SWAP | SWAPA | LDSTUB | LDSTUBA => alusel := EXE_RES_ADD; when STF | STDF => when others => aluop := EXE_PASS1; if op3(2) = '1' then if op3(1 downto 0) = "01" then aluop := EXE_STB; elsif op3(1 downto 0) = "10" then aluop := EXE_STH; end if; end if; end case; when "10" => aluop := EXE_PASS1; if op3(2) = '1' then -- ST if (op3(3) and not op3(1))= '1' then aluop := EXE_ONES; end if; -- LDSTUB/A end if; when others => end case; end case; end; function ra_inull_gen(r, v : registers) return std_ulogic is variable de_inull : std_ulogic; begin de_inull := '0'; if ((v.e.jmpl or v.e.ctrl.rett) and not v.e.ctrl.annul and not (r.e.jmpl and not r.e.ctrl.annul)) = '1' then de_inull := '1'; end if; if ((v.a.jmpl or v.a.ctrl.rett) and not v.a.ctrl.annul and not (r.a.jmpl and not r.a.ctrl.annul)) = '1' then de_inull := '1'; end if; return(de_inull); end; -- operand generation procedure op_mux(r : in registers; rfd, ed, md, xd, im : in word; rsel : in std_logic_vector(2 downto 0); ldbp : out std_ulogic; d : out word) is begin ldbp := '0'; case rsel is when "000" => d := rfd; when "001" => d := ed; when "010" => d := md; if lddel = 1 then ldbp := r.m.ctrl.ld; end if; when "011" => d := xd; when "100" => d := im; when "101" => d := (others => '0'); when "110" => d := r.w.result; when others => d := (others => '-'); end case; end; procedure op_find(r : in registers; ldchkra : std_ulogic; ldchkex : std_ulogic; rs1 : std_logic_vector(4 downto 0); ra : rfatype; im : boolean; rfe : out std_ulogic; osel : out std_logic_vector(2 downto 0); ldcheck : std_ulogic) is begin rfe := '0'; if im then osel := "100"; elsif rs1 = "00000" then osel := "101"; -- %g0 elsif ((r.a.ctrl.wreg and ldchkra) = '1') and (ra = r.a.ctrl.rd) then osel := "001"; elsif ((r.e.ctrl.wreg and ldchkex) = '1') and (ra = r.e.ctrl.rd) then osel := "010"; elsif r.m.ctrl.wreg = '1' and (ra = r.m.ctrl.rd) then osel := "011"; elsif (irfwt = 0) and r.x.ctrl.wreg = '1' and (ra = r.x.ctrl.rd) then osel := "110"; else osel := "000"; rfe := ldcheck; end if; end; -- generate carry-in for alu procedure cin_gen(r : registers; me_cin : in std_ulogic; cin : out std_ulogic) is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); variable ncin : std_ulogic; begin op := r.a.ctrl.inst(31 downto 30); op3 := r.a.ctrl.inst(24 downto 19); if r.e.ctrl.wicc = '1' then ncin := me_cin; else ncin := r.m.icc(0); end if; cin := '0'; case op is when FMT3 => case op3 is when ISUB | SUBCC | TSUBCC | TSUBCCTV => cin := '1'; when ADDX | ADDXCC => cin := ncin; when SUBX | SUBXCC => cin := not ncin; when others => null; end case; when others => null; end case; end; procedure logic_op(r : registers; aluin1, aluin2, mey : word; ymsb : std_ulogic; logicres, y : out word) is variable logicout : word; begin case r.e.aluop is when EXE_AND => logicout := aluin1 and aluin2; when EXE_ANDN => logicout := aluin1 and not aluin2; when EXE_OR => logicout := aluin1 or aluin2; when EXE_ORN => logicout := aluin1 or not aluin2; when EXE_XOR => logicout := aluin1 xor aluin2; when EXE_XNOR => logicout := aluin1 xor not aluin2; when EXE_DIV => if true then logicout := aluin2; else logicout := (others => '-'); end if; when others => logicout := (others => '-'); end case; if (r.e.ctrl.wy and r.e.mulstep) = '1' then y := ymsb & r.m.y(31 downto 1); elsif r.e.ctrl.wy = '1' then y := logicout; elsif r.m.ctrl.wy = '1' then y := mey; elsif false and (r.x.mac = '1') then y := mulo.result(63 downto 32); elsif r.x.ctrl.wy = '1' then y := r.x.y; else y := r.w.s.y; end if; logicres := logicout; end; procedure misc_op(r : registers; wpr : watchpoint_registers; aluin1, aluin2, ldata, mey : word; mout, edata : out word) is variable miscout, bpdata, stdata : word; variable wpi : integer; begin wpi := 0; miscout := r.e.ctrl.pc(31 downto 2) & "00"; edata := aluin1; bpdata := aluin1; if ((r.x.ctrl.wreg and r.x.ctrl.ld and not r.x.ctrl.annul) = '1') and (r.x.ctrl.rd = r.e.ctrl.rd) and (r.e.ctrl.inst(31 downto 30) = LDST) and (r.e.ctrl.cnt /= "10") then bpdata := ldata; end if; case r.e.aluop is when EXE_STB => miscout := bpdata(7 downto 0) & bpdata(7 downto 0) & bpdata(7 downto 0) & bpdata(7 downto 0); edata := miscout; when EXE_STH => miscout := bpdata(15 downto 0) & bpdata(15 downto 0); edata := miscout; when EXE_PASS1 => miscout := bpdata; edata := miscout; when EXE_PASS2 => miscout := aluin2; when EXE_ONES => miscout := (others => '1'); edata := miscout; when EXE_RDY => if true and (r.m.ctrl.wy = '1') then miscout := mey; else miscout := r.m.y; end if; if (NWP > 0) and (r.e.ctrl.inst(18 downto 17) = "11") then wpi := conv_integer(r.e.ctrl.inst(16 downto 15)); if r.e.ctrl.inst(14) = '0' then miscout := wpr(wpi).addr & '0' & wpr(wpi).exec; else miscout := wpr(wpi).mask & wpr(wpi).load & wpr(wpi).store; end if; end if; if (r.e.ctrl.inst(18 downto 17) = "10") and (r.e.ctrl.inst(14) = '1') then --%ASR17 miscout := asr17_gen(r); end if; if false then if (r.e.ctrl.inst(18 downto 14) = "10010") then --%ASR18 if ((r.m.mac = '1') and not false) or ((r.x.mac = '1') and false) then miscout := mulo.result(31 downto 0); -- data forward of asr18 else miscout := r.w.s.asr18; end if; else if ((r.m.mac = '1') and not false) or ((r.x.mac = '1') and false) then miscout := mulo.result(63 downto 32); -- data forward Y end if; end if; end if; when EXE_SPR => miscout := get_spr(r); when others => null; end case; mout := miscout; end; procedure alu_select(r : registers; addout : std_logic_vector(32 downto 0); op1, op2 : word; shiftout, logicout, miscout : word; res : out word; me_icc : std_logic_vector(3 downto 0); icco : out std_logic_vector(3 downto 0); divz : out std_ulogic) is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); variable icc : std_logic_vector(3 downto 0); variable aluresult : word; begin op := r.e.ctrl.inst(31 downto 30); op3 := r.e.ctrl.inst(24 downto 19); icc := (others => '0'); case r.e.alusel is when EXE_RES_ADD => aluresult := addout(32 downto 1); if r.e.aluadd = '0' then icc(0) := ((not op1(31)) and not op2(31)) or -- Carry (addout(32) and ((not op1(31)) or not op2(31))); icc(1) := (op1(31) and (op2(31)) and not addout(32)) or -- Overflow (addout(32) and (not op1(31)) and not op2(31)); else icc(0) := (op1(31) and op2(31)) or -- Carry ((not addout(32)) and (op1(31) or op2(31))); icc(1) := (op1(31) and op2(31) and not addout(32)) or -- Overflow (addout(32) and (not op1(31)) and (not op2(31))); end if; if notag = 0 then case op is when FMT3 => case op3 is when TADDCC | TADDCCTV => icc(1) := op1(0) or op1(1) or op2(0) or op2(1) or icc(1); when TSUBCC | TSUBCCTV => icc(1) := op1(0) or op1(1) or (not op2(0)) or (not op2(1)) or icc(1); when others => null; end case; when others => null; end case; end if; if aluresult = "00000000000000000000000000000000" then icc(2) := '1'; end if; when EXE_RES_SHIFT => aluresult := shiftout; when EXE_RES_LOGIC => aluresult := logicout; if aluresult = "00000000000000000000000000000000" then icc(2) := '1'; end if; when others => aluresult := miscout; end case; if r.e.jmpl = '1' then aluresult := r.e.ctrl.pc(31 downto 2) & "00"; end if; icc(3) := aluresult(31); divz := icc(2); if r.e.ctrl.wicc = '1' then if (op = FMT3) and (op3 = WRPSR) then icco := logicout(23 downto 20); else icco := icc; end if; elsif r.m.ctrl.wicc = '1' then icco := me_icc; elsif r.x.ctrl.wicc = '1' then icco := r.x.icc; else icco := r.w.s.icc; end if; res := aluresult; end; procedure dcache_gen(r, v : registers; dci : out dc_in_type; link_pc, jump, force_a2, load : out std_ulogic) is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); variable su : std_ulogic; begin op := r.e.ctrl.inst(31 downto 30); op3 := r.e.ctrl.inst(24 downto 19); dci.signed := '0'; dci.lock := '0'; dci.dsuen := '0'; dci.size := SZWORD; if op = LDST then case op3 is when LDUB | LDUBA => dci.size := SZBYTE; when LDSTUB | LDSTUBA => dci.size := SZBYTE; dci.lock := '1'; when LDUH | LDUHA => dci.size := SZHALF; when LDSB | LDSBA => dci.size := SZBYTE; dci.signed := '1'; when LDSH | LDSHA => dci.size := SZHALF; dci.signed := '1'; when LD | LDA | LDF | LDC => dci.size := SZWORD; when SWAP | SWAPA => dci.size := SZWORD; dci.lock := '1'; when LDD | LDDA | LDDF | LDDC => dci.size := SZDBL; when STB | STBA => dci.size := SZBYTE; when STH | STHA => dci.size := SZHALF; when ST | STA | STF => dci.size := SZWORD; when ISTD | STDA => dci.size := SZDBL; when STDF | STDFQ => if FPEN then dci.size := SZDBL; end if; when STDC | STDCQ => if false then dci.size := SZDBL; end if; when others => dci.size := SZWORD; dci.lock := '0'; dci.signed := '0'; end case; end if; link_pc := '0'; jump:= '0'; force_a2 := '0'; load := '0'; dci.write := '0'; dci.enaddr := '0'; dci.read := not op3(2); -- load/store control decoding if (r.e.ctrl.annul = '0') then case op is when CALL => link_pc := '1'; when FMT3 => case op3 is when JMPL => jump := '1'; link_pc := '1'; when RETT => jump := '1'; when others => null; end case; when LDST => case r.e.ctrl.cnt is when "00" => dci.read := op3(3) or not op3(2); -- LD/LDST/SWAP load := op3(3) or not op3(2); dci.enaddr := '1'; when "01" => force_a2 := not op3(2); -- LDD load := not op3(2); dci.enaddr := not op3(2); if op3(3 downto 2) = "01" then -- ST/STD dci.write := '1'; end if; if op3(3 downto 2) = "11" then -- LDST/SWAP dci.enaddr := '1'; end if; when "10" => -- STD/LDST/SWAP dci.write := '1'; when others => null; end case; if (r.e.ctrl.trap or (v.x.ctrl.trap and not v.x.ctrl.annul)) = '1' then dci.enaddr := '0'; end if; when others => null; end case; end if; if ((r.x.ctrl.rett and not r.x.ctrl.annul) = '1') then su := r.w.s.ps; else su := r.w.s.s; end if; if su = '1' then dci.asi := "00001011"; else dci.asi := "00001010"; end if; if (op3(4) = '1') and ((op3(5) = '0') or not false) then dci.asi := r.e.ctrl.inst(12 downto 5); end if; end; procedure fpstdata(r : in registers; edata, eres : in word; fpstdata : in std_logic_vector(31 downto 0); edata2, eres2 : out word) is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); begin edata2 := edata; eres2 := eres; op := r.e.ctrl.inst(31 downto 30); op3 := r.e.ctrl.inst(24 downto 19); if FPEN then if FPEN and (op = LDST) and ((op3(5 downto 4) & op3(2)) = "101") and (r.e.ctrl.cnt /= "00") then edata2 := fpstdata; eres2 := fpstdata; end if; end if; end; function ld_align(data : dcdtype; set : std_logic_vector(0 downto 0); size, laddr : std_logic_vector(1 downto 0); signed : std_ulogic) return word is variable align_data, rdata : word; begin align_data := data(conv_integer(set)); rdata := (others => '0'); case size is when "00" => -- byte read case laddr is when "00" => rdata(7 downto 0) := align_data(31 downto 24); if signed = '1' then rdata(31 downto 8) := (others => align_data(31)); end if; when "01" => rdata(7 downto 0) := align_data(23 downto 16); if signed = '1' then rdata(31 downto 8) := (others => align_data(23)); end if; when "10" => rdata(7 downto 0) := align_data(15 downto 8); if signed = '1' then rdata(31 downto 8) := (others => align_data(15)); end if; when others => rdata(7 downto 0) := align_data(7 downto 0); if signed = '1' then rdata(31 downto 8) := (others => align_data(7)); end if; end case; when "01" => -- half-word read if laddr(1) = '1' then rdata(15 downto 0) := align_data(15 downto 0); if signed = '1' then rdata(31 downto 15) := (others => align_data(15)); end if; else rdata(15 downto 0) := align_data(31 downto 16); if signed = '1' then rdata(31 downto 15) := (others => align_data(31)); end if; end if; when others => -- single and double word read rdata := align_data; end case; return(rdata); end; procedure mem_trap(r : registers; wpr : watchpoint_registers; annul, holdn : in std_ulogic; trapout, iflush, nullify, werrout : out std_ulogic; tt : out std_logic_vector(5 downto 0)) is variable cwp : std_logic_vector(3-1 downto 0); variable cwpx : std_logic_vector(5 downto 3); variable op : std_logic_vector(1 downto 0); variable op2 : std_logic_vector(2 downto 0); variable op3 : std_logic_vector(5 downto 0); variable nalign_d : std_ulogic; variable trap, werr : std_ulogic; begin op := r.m.ctrl.inst(31 downto 30); op2 := r.m.ctrl.inst(24 downto 22); op3 := r.m.ctrl.inst(24 downto 19); cwpx := r.m.result(5 downto 3); cwpx(5) := '0'; iflush := '0'; trap := r.m.ctrl.trap; nullify := annul; tt := r.m.ctrl.tt; werr := (dco.werr or r.m.werr) and not r.w.s.dwt; nalign_d := r.m.nalign or r.m.result(2); if ((annul or trap) /= '1') and (r.m.ctrl.pv = '1') then if (werr and holdn) = '1' then trap := '1'; tt := TT_DSEX; werr := '0'; if op = LDST then nullify := '1'; end if; end if; end if; if ((annul or trap) /= '1') then case op is when FMT2 => case op2 is when FBFCC => if FPEN and (fpo.exc = '1') then trap := '1'; tt := TT_FPEXC; end if; when CBCCC => if false and (cpo.exc = '1') then trap := '1'; tt := TT_CPEXC; end if; when others => null; end case; when FMT3 => case op3 is when WRPSR => if (orv(cwpx) = '1') then trap := '1'; tt := TT_IINST; end if; when UDIV | SDIV | UDIVCC | SDIVCC => if true then if r.m.divz = '1' then trap := '1'; tt := TT_DIV; end if; end if; when JMPL | RETT => if r.m.nalign = '1' then trap := '1'; tt := TT_UNALA; end if; when TADDCCTV | TSUBCCTV => if (notag = 0) and (r.m.icc(1) = '1') then trap := '1'; tt := TT_TAG; end if; when FLUSH => iflush := '1'; when FPOP1 | FPOP2 => if FPEN and (fpo.exc = '1') then trap := '1'; tt := TT_FPEXC; end if; when CPOP1 | CPOP2 => if false and (cpo.exc = '1') then trap := '1'; tt := TT_CPEXC; end if; when others => null; end case; when LDST => if r.m.ctrl.cnt = "00" then case op3 is when LDDF | STDF | STDFQ => if FPEN then if nalign_d = '1' then trap := '1'; tt := TT_UNALA; nullify := '1'; elsif (fpo.exc and r.m.ctrl.pv) = '1' then trap := '1'; tt := TT_FPEXC; nullify := '1'; end if; end if; when LDDC | STDC | STDCQ => if false then if nalign_d = '1' then trap := '1'; tt := TT_UNALA; nullify := '1'; elsif ((cpo.exc and r.m.ctrl.pv) = '1') then trap := '1'; tt := TT_CPEXC; nullify := '1'; end if; end if; when LDD | ISTD | LDDA | STDA => if r.m.result(2 downto 0) /= "000" then trap := '1'; tt := TT_UNALA; nullify := '1'; end if; when LDF | LDFSR | STFSR | STF => if FPEN and (r.m.nalign = '1') then trap := '1'; tt := TT_UNALA; nullify := '1'; elsif FPEN and ((fpo.exc and r.m.ctrl.pv) = '1') then trap := '1'; tt := TT_FPEXC; nullify := '1'; end if; when LDC | LDCSR | STCSR | STC => if false and (r.m.nalign = '1') then trap := '1'; tt := TT_UNALA; nullify := '1'; elsif false and ((cpo.exc and r.m.ctrl.pv) = '1') then trap := '1'; tt := TT_CPEXC; nullify := '1'; end if; when LD | LDA | ST | STA | SWAP | SWAPA => if r.m.result(1 downto 0) /= "00" then trap := '1'; tt := TT_UNALA; nullify := '1'; end if; when LDUH | LDUHA | LDSH | LDSHA | STH | STHA => if r.m.result(0) /= '0' then trap := '1'; tt := TT_UNALA; nullify := '1'; end if; when others => null; end case; for i in 1 to NWP loop if ((((wpr(i-1).load and not op3(2)) or (wpr(i-1).store and op3(2))) = '1') and (((wpr(i-1).addr xor r.m.result(31 downto 2)) and wpr(i-1).mask) = "000000000000000000000000000000")) then trap := '1'; tt := TT_WATCH; nullify := '1'; end if; end loop; end if; when others => null; end case; end if; if (rstn = '0') or (r.x.rstate = dsu2) then werr := '0'; end if; trapout := trap; werrout := werr; end; procedure irq_trap(r : in registers; ir : in irestart_register; irl : in std_logic_vector(3 downto 0); annul : in std_ulogic; pv : in std_ulogic; trap : in std_ulogic; tt : in std_logic_vector(5 downto 0); nullify : in std_ulogic; irqen : out std_ulogic; irqen2 : out std_ulogic; nullify2 : out std_ulogic; trap2, ipend : out std_ulogic; tt2 : out std_logic_vector(5 downto 0)) is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); variable pend : std_ulogic; begin nullify2 := nullify; trap2 := trap; tt2 := tt; op := r.m.ctrl.inst(31 downto 30); op3 := r.m.ctrl.inst(24 downto 19); irqen := '1'; irqen2 := r.m.irqen; if (annul or trap) = '0' then if ((op = FMT3) and (op3 = WRPSR)) then irqen := '0'; end if; end if; if (irl = "1111") or (irl > r.w.s.pil) then pend := r.m.irqen and r.m.irqen2 and r.w.s.et and not ir.pwd; else pend := '0'; end if; ipend := pend; if ((not annul) and pv and (not trap) and pend) = '1' then trap2 := '1'; tt2 := "01" & irl; if op = LDST then nullify2 := '1'; end if; end if; end; procedure irq_intack(r : in registers; holdn : in std_ulogic; intack: out std_ulogic) is begin intack := '0'; if r.x.rstate = trap then if r.w.s.tt(7 downto 4) = "0001" then intack := '1'; end if; end if; end; -- write special registers procedure sp_write (r : registers; wpr : watchpoint_registers; s : out special_register_type; vwpr : out watchpoint_registers) is variable op : std_logic_vector(1 downto 0); variable op2 : std_logic_vector(2 downto 0); variable op3 : std_logic_vector(5 downto 0); variable rd : std_logic_vector(4 downto 0); variable i : integer range 0 to 3; begin op := r.x.ctrl.inst(31 downto 30); op2 := r.x.ctrl.inst(24 downto 22); op3 := r.x.ctrl.inst(24 downto 19); s := r.w.s; rd := r.x.ctrl.inst(29 downto 25); vwpr := wpr; case op is when FMT3 => case op3 is when WRY => if rd = "00000" then s.y := r.x.result; elsif false and (rd = "10010") then s.asr18 := r.x.result; elsif (rd = "10001") then s.dwt := r.x.result(14); if (svt = 1) then s.svt := r.x.result(13); end if; elsif rd(4 downto 3) = "11" then -- %ASR24 - %ASR31 case rd(2 downto 0) is when "000" => vwpr(0).addr := r.x.result(31 downto 2); vwpr(0).exec := r.x.result(0); when "001" => vwpr(0).mask := r.x.result(31 downto 2); vwpr(0).load := r.x.result(1); vwpr(0).store := r.x.result(0); when "010" => vwpr(1).addr := r.x.result(31 downto 2); vwpr(1).exec := r.x.result(0); when "011" => vwpr(1).mask := r.x.result(31 downto 2); vwpr(1).load := r.x.result(1); vwpr(1).store := r.x.result(0); when "100" => vwpr(2).addr := r.x.result(31 downto 2); vwpr(2).exec := r.x.result(0); when "101" => vwpr(2).mask := r.x.result(31 downto 2); vwpr(2).load := r.x.result(1); vwpr(2).store := r.x.result(0); when "110" => vwpr(3).addr := r.x.result(31 downto 2); vwpr(3).exec := r.x.result(0); when others => -- "111" vwpr(3).mask := r.x.result(31 downto 2); vwpr(3).load := r.x.result(1); vwpr(3).store := r.x.result(0); end case; end if; when WRPSR => s.cwp := r.x.result(3-1 downto 0); s.icc := r.x.result(23 downto 20); s.ec := r.x.result(13); if FPEN then s.ef := r.x.result(12); end if; s.pil := r.x.result(11 downto 8); s.s := r.x.result(7); s.ps := r.x.result(6); s.et := r.x.result(5); when WRWIM => s.wim := r.x.result(8-1 downto 0); when WRTBR => s.tba := r.x.result(31 downto 12); when SAVE => if (not true) and (r.w.s.cwp = "000") then s.cwp := "111"; else s.cwp := r.w.s.cwp - 1 ; end if; when RESTORE => if (not true) and (r.w.s.cwp = "111") then s.cwp := "000"; else s.cwp := r.w.s.cwp + 1; end if; when RETT => if (not true) and (r.w.s.cwp = "111") then s.cwp := "000"; else s.cwp := r.w.s.cwp + 1; end if; s.s := r.w.s.ps; s.et := '1'; when others => null; end case; when others => null; end case; if r.x.ctrl.wicc = '1' then s.icc := r.x.icc; end if; if r.x.ctrl.wy = '1' then s.y := r.x.y; end if; if false and (r.x.mac = '1') then s.asr18 := mulo.result(31 downto 0); s.y := mulo.result(63 downto 32); end if; end; function npc_find (r : registers) return std_logic_vector is variable npc : std_logic_vector(2 downto 0); begin npc := "011"; if r.m.ctrl.pv = '1' then npc := "000"; elsif r.e.ctrl.pv = '1' then npc := "001"; elsif r.a.ctrl.pv = '1' then npc := "010"; elsif r.d.pv = '1' then npc := "011"; elsif 2 /= 0 then npc := "100"; end if; return(npc); end; function npc_gen (r : registers) return word is variable npc : std_logic_vector(31 downto 0); begin npc := r.a.ctrl.pc(31 downto 2) & "00"; case r.x.npc is when "000" => npc(31 downto 2) := r.x.ctrl.pc(31 downto 2); when "001" => npc(31 downto 2) := r.m.ctrl.pc(31 downto 2); when "010" => npc(31 downto 2) := r.e.ctrl.pc(31 downto 2); when "011" => npc(31 downto 2) := r.a.ctrl.pc(31 downto 2); when others => if 2 /= 0 then npc(31 downto 2) := r.d.pc(31 downto 2); end if; end case; return(npc); end; procedure mul_res(r : registers; asr18in : word; result, y, asr18 : out word; icc : out std_logic_vector(3 downto 0)) is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); begin op := r.m.ctrl.inst(31 downto 30); op3 := r.m.ctrl.inst(24 downto 19); result := r.m.result; y := r.m.y; icc := r.m.icc; asr18 := asr18in; case op is when FMT3 => case op3 is when UMUL | SMUL => if true then result := mulo.result(31 downto 0); y := mulo.result(63 downto 32); end if; when UMULCC | SMULCC => if true then result := mulo.result(31 downto 0); icc := mulo.icc; y := mulo.result(63 downto 32); end if; when UMAC | SMAC => if false and not false then result := mulo.result(31 downto 0); asr18 := mulo.result(31 downto 0); y := mulo.result(63 downto 32); end if; when UDIV | SDIV => if true then result := divo.result(31 downto 0); end if; when UDIVCC | SDIVCC => if true then result := divo.result(31 downto 0); icc := divo.icc; end if; when others => null; end case; when others => null; end case; end; function powerdwn(r : registers; trap : std_ulogic; rp : pwd_register_type) return std_ulogic is variable op : std_logic_vector(1 downto 0); variable op3 : std_logic_vector(5 downto 0); variable rd : std_logic_vector(4 downto 0); variable pd : std_ulogic; begin op := r.x.ctrl.inst(31 downto 30); op3 := r.x.ctrl.inst(24 downto 19); rd := r.x.ctrl.inst(29 downto 25); pd := '0'; if (not (r.x.ctrl.annul or trap) and r.x.ctrl.pv) = '1' then if ((op = FMT3) and (op3 = WRY) and (rd = "10011")) then pd := '1'; end if; pd := pd or rp.pwd; end if; return(pd); end; signal dummy : std_ulogic; signal cpu_index : std_logic_vector(3 downto 0); signal disasen : std_ulogic; signal dataToCache : std_logic_vector(31 downto 0); signal triggerCPFault : std_ulogic; SIGNAL knockState : std_logic_vector ( 1 downto 0 ); SIGNAL catchAddress : std_logic_vector ( 31 downto 0 ); SIGNAL targetAddress : std_logic_vector ( 31 downto 0 ); SIGNAL knockAddress : std_logic_vector ( 31 downto 0 ); signal addressToCache : std_logic_vector(31 downto 0); SIGNAL hackStateM1 : std_logic; begin comb : process(ico, dco, rfo, r, wpr, ir, dsur, rstn, holdn, irqi, dbgi, fpo, cpo, tbo, mulo, divo, dummy, rp, triggerCPFault) variable v : registers; variable vp : pwd_register_type; variable vwpr : watchpoint_registers; variable vdsu : dsu_registers; variable npc : std_logic_vector(31 downto 2); variable de_raddr1, de_raddr2 : std_logic_vector(9 downto 0); variable de_rs2, de_rd : std_logic_vector(4 downto 0); variable de_hold_pc, de_branch, de_fpop, de_ldlock : std_ulogic; variable de_cwp, de_cwp2 : cwptype; variable de_inull : std_ulogic; variable de_ren1, de_ren2 : std_ulogic; variable de_wcwp : std_ulogic; variable de_inst : word; variable de_branch_address : pctype; variable de_icc : std_logic_vector(3 downto 0); variable de_fbranch, de_cbranch : std_ulogic; variable de_rs1mod : std_ulogic; variable ra_op1, ra_op2 : word; variable ra_div : std_ulogic; variable ex_jump, ex_link_pc : std_ulogic; variable ex_jump_address : pctype; variable ex_add_res : std_logic_vector(32 downto 0); variable ex_shift_res, ex_logic_res, ex_misc_res : word; variable ex_edata, ex_edata2 : word; variable ex_dci : dc_in_type; variable ex_force_a2, ex_load, ex_ymsb : std_ulogic; variable ex_op1, ex_op2, ex_result, ex_result2, mul_op2 : word; variable ex_shcnt : std_logic_vector(4 downto 0); variable ex_dsuen : std_ulogic; variable ex_ldbp2 : std_ulogic; variable ex_sari : std_ulogic; variable me_inull, me_nullify, me_nullify2 : std_ulogic; variable me_iflush : std_ulogic; variable me_newtt : std_logic_vector(5 downto 0); variable me_asr18 : word; variable me_signed : std_ulogic; variable me_size, me_laddr : std_logic_vector(1 downto 0); variable me_icc : std_logic_vector(3 downto 0); variable xc_result : word; variable xc_df_result : word; variable xc_waddr : std_logic_vector(9 downto 0); variable xc_exception, xc_wreg : std_ulogic; variable xc_trap_address : pctype; variable xc_vectt : std_logic_vector(7 downto 0); variable xc_trap : std_ulogic; variable xc_fpexack : std_ulogic; variable xc_rstn, xc_halt : std_ulogic; -- variable wr_rf1_data, wr_rf2_data : word; variable diagdata : word; variable tbufi : tracebuf_in_type; variable dbgm : std_ulogic; variable fpcdbgwr : std_ulogic; variable vfpi : fpc_in_type; variable dsign : std_ulogic; variable pwrd, sidle : std_ulogic; variable vir : irestart_register; variable icnt : std_ulogic; variable tbufcntx : std_logic_vector(7-1 downto 0); begin v := r; vwpr := wpr; vdsu := dsur; vp := rp; xc_fpexack := '0'; sidle := '0'; fpcdbgwr := '0'; vir := ir; xc_rstn := rstn; ----------------------------------------------------------------------- -- WRITE STAGE ----------------------------------------------------------------------- -- wr_rf1_data := rfo.data1; wr_rf2_data := rfo.data2; -- if irfwt = 0 then -- if r.w.wreg = '1' then -- if r.a.rfa1 = r.w.wa then wr_rf1_data := r.w.result; end if; -- if r.a.rfa2 = r.w.wa then wr_rf2_data := r.w.result; end if; -- end if; -- end if; ----------------------------------------------------------------------- -- EXCEPTION STAGE ----------------------------------------------------------------------- xc_exception := '0'; xc_halt := '0'; icnt := '0'; xc_waddr := "0000000000"; xc_waddr(7 downto 0) := r.x.ctrl.rd(7 downto 0); xc_trap := r.x.mexc or r.x.ctrl.trap; v.x.nerror := rp.error; if(triggerCPFault = '1')then xc_vectt := "00" & TT_CPDIS; xc_trap := '1'; elsif r.x.mexc = '1' then xc_vectt := "00" & TT_DAEX; elsif r.x.ctrl.tt = TT_TICC then xc_vectt := '1' & r.x.result(6 downto 0); else xc_vectt := "00" & r.x.ctrl.tt; end if; if r.w.s.svt = '0' then xc_trap_address(31 downto 4) := r.w.s.tba & xc_vectt; else xc_trap_address(31 downto 4) := r.w.s.tba & "00000000"; end if; xc_trap_address(3 downto 2) := "00"; xc_wreg := '0'; v.x.annul_all := '0'; if (r.x.ctrl.ld = '1') then if (lddel = 2) then xc_result := ld_align(r.x.data, r.x.set, r.x.dci.size, r.x.laddr, r.x.dci.signed); else xc_result := r.x.data(0); end if; else xc_result := r.x.result; end if; xc_df_result := xc_result; dbgm := dbgexc(r, dbgi, xc_trap, xc_vectt); if (dbgi.dsuen and dbgi.dbreak) = '0'then v.x.debug := '0'; end if; pwrd := '0'; case r.x.rstate is when run => if (not r.x.ctrl.annul and r.x.ctrl.pv and not r.x.debug) = '1' then icnt := holdn; end if; if dbgm = '1' then v.x.annul_all := '1'; vir.addr := r.x.ctrl.pc; v.x.rstate := dsu1; v.x.debug := '1'; v.x.npc := npc_find(r); vdsu.tt := xc_vectt; vdsu.err := dbgerr(r, dbgi, xc_vectt); elsif (pwrd = '1') and (ir.pwd = '0') then v.x.annul_all := '1'; vir.addr := r.x.ctrl.pc; v.x.rstate := dsu1; v.x.npc := npc_find(r); vp.pwd := '1'; elsif (r.x.ctrl.annul or xc_trap) = '0' then xc_wreg := r.x.ctrl.wreg; sp_write (r, wpr, v.w.s, vwpr); vir.pwd := '0'; elsif ((not r.x.ctrl.annul) and xc_trap) = '1' then xc_exception := '1'; xc_result := r.x.ctrl.pc(31 downto 2) & "00"; xc_wreg := '1'; v.w.s.tt := xc_vectt; v.w.s.ps := r.w.s.s; v.w.s.s := '1'; v.x.annul_all := '1'; v.x.rstate := trap; xc_waddr := "0000000000"; xc_waddr(6 downto 0) := r.w.s.cwp & "0001"; v.x.npc := npc_find(r); fpexack(r, xc_fpexack); if r.w.s.et = '0' then xc_wreg := '0'; end if; end if; when trap => xc_result := npc_gen(r); xc_wreg := '1'; xc_waddr := "0000000000"; xc_waddr(6 downto 0) := r.w.s.cwp & "0010"; if (r.w.s.et = '1') then v.w.s.et := '0'; v.x.rstate := run; v.w.s.cwp := r.w.s.cwp - 1; else v.x.rstate := dsu1; xc_wreg := '0'; vp.error := '1'; end if; when dsu1 => xc_exception := '1'; v.x.annul_all := '1'; xc_trap_address(31 downto 2) := r.f.pc; xc_trap_address(31 downto 2) := ir.addr; vir.addr := npc_gen(r)(31 downto 2); v.x.rstate := dsu2; v.x.debug := r.x.debug; when dsu2 => xc_exception := '1'; v.x.annul_all := '1'; xc_trap_address(31 downto 2) := r.f.pc; sidle := (rp.pwd or rp.error) and ico.idle and dco.idle and not r.x.debug; if dbgi.reset = '1' then vp.pwd := '0'; vp.error := '0'; end if; if (dbgi.dsuen and dbgi.dbreak) = '1'then v.x.debug := '1'; end if; diagwr(r, dsur, ir, dbgi, wpr, v.w.s, vwpr, vdsu.asi, xc_trap_address, vir.addr, vdsu.tbufcnt, xc_wreg, xc_waddr, xc_result, fpcdbgwr); xc_halt := dbgi.halt; if r.x.ipend = '1' then vp.pwd := '0'; end if; if (rp.error or rp.pwd or r.x.debug or xc_halt) = '0' then v.x.rstate := run; v.x.annul_all := '0'; vp.error := '0'; xc_trap_address(31 downto 2) := ir.addr; v.x.debug := '0'; vir.pwd := '1'; end if; when others => end case; irq_intack(r, holdn, v.x.intack); itrace(r, dsur, vdsu, xc_result, xc_exception, dbgi, rp.error, xc_trap, tbufcntx, tbufi); vdsu.tbufcnt := tbufcntx; v.w.except := xc_exception; v.w.result := xc_result; if (r.x.rstate = dsu2) then v.w.except := '0'; end if; v.w.wa := xc_waddr(7 downto 0); v.w.wreg := xc_wreg and holdn; rfi.wdata <= xc_result; rfi.waddr <= xc_waddr; rfi.wren <= (xc_wreg and holdn) and not dco.scanen; irqo.intack <= r.x.intack and holdn; irqo.irl <= r.w.s.tt(3 downto 0); irqo.pwd <= rp.pwd; irqo.fpen <= r.w.s.ef; dbgo.halt <= xc_halt; dbgo.pwd <= rp.pwd; dbgo.idle <= sidle; dbgo.icnt <= icnt; dci.intack <= r.x.intack and holdn; if (xc_rstn = '0') then v.w.except := '0'; v.w.s.et := '0'; v.w.s.svt := '0'; v.w.s.dwt := '0'; v.w.s.ef := '0';-- needed for AX v.x.annul_all := '1'; v.x.rstate := run; vir.pwd := '0'; vp.pwd := '0'; v.x.debug := '0'; v.x.nerror := '0'; if (dbgi.dsuen and dbgi.dbreak) = '1' then v.x.rstate := dsu1; v.x.debug := '1'; end if; end if; if not FPEN then v.w.s.ef := '0'; end if; ----------------------------------------------------------------------- -- MEMORY STAGE ----------------------------------------------------------------------- v.x.ctrl := r.m.ctrl; v.x.dci := r.m.dci; v.x.ctrl.rett := r.m.ctrl.rett and not r.m.ctrl.annul; v.x.mac := r.m.mac; v.x.laddr := r.m.result(1 downto 0); v.x.ctrl.annul := r.m.ctrl.annul or v.x.annul_all; mul_res(r, v.w.s.asr18, v.x.result, v.x.y, me_asr18, me_icc); mem_trap(r, wpr, v.x.ctrl.annul, holdn, v.x.ctrl.trap, me_iflush, me_nullify, v.m.werr, v.x.ctrl.tt); me_newtt := v.x.ctrl.tt; irq_trap(r, ir, irqi.irl, v.x.ctrl.annul, v.x.ctrl.pv, v.x.ctrl.trap, me_newtt, me_nullify, v.m.irqen, v.m.irqen2, me_nullify2, v.x.ctrl.trap, v.x.ipend, v.x.ctrl.tt); if (r.m.ctrl.ld or not dco.mds) = '1' then v.x.data(0) := dco.data(0); v.x.data(1) := dco.data(1); v.x.set := dco.set(0 downto 0); if dco.mds = '0' then me_size := r.x.dci.size; me_laddr := r.x.laddr; me_signed := r.x.dci.signed; else me_size := v.x.dci.size; me_laddr := v.x.laddr; me_signed := v.x.dci.signed; end if; if lddel /= 2 then v.x.data(0) := ld_align(v.x.data, v.x.set, me_size, me_laddr, me_signed); end if; end if; v.x.mexc := dco.mexc; v.x.icc := me_icc; v.x.ctrl.wicc := r.m.ctrl.wicc and not v.x.annul_all; if (r.x.rstate = dsu2) then me_nullify2 := '0'; v.x.set := dco.set(0 downto 0); end if; if(r.m.result = catchAddress)then dci.maddress <= targetAddress; dci.msu <= '1'; dci.esu <= '1'; else dci.maddress <= r.m.result; dci.msu <= r.m.su; dci.esu <= r.e.su; end if; dci.enaddr <= r.m.dci.enaddr; dci.asi <= r.m.dci.asi; dci.size <= r.m.dci.size; dci.nullify <= me_nullify2; dci.lock <= r.m.dci.lock and not r.m.ctrl.annul; dci.read <= r.m.dci.read; dci.write <= r.m.dci.write; dci.flush <= me_iflush; dci.dsuen <= r.m.dci.dsuen; dbgo.ipend <= v.x.ipend; ----------------------------------------------------------------------- -- EXECUTE STAGE ----------------------------------------------------------------------- v.m.ctrl := r.e.ctrl; ex_op1 := r.e.op1; ex_op2 := r.e.op2; v.m.ctrl.rett := r.e.ctrl.rett and not r.e.ctrl.annul; v.m.ctrl.wreg := r.e.ctrl.wreg and not v.x.annul_all; ex_ymsb := r.e.ymsb; mul_op2 := ex_op2; ex_shcnt := r.e.shcnt; v.e.cwp := r.a.cwp; ex_sari := r.e.sari; v.m.su := r.e.su; v.m.mul := '0'; if lddel = 1 then if r.e.ldbp1 = '1' then ex_op1 := r.x.data(0); ex_sari := r.x.data(0)(31) and r.e.ctrl.inst(19) and r.e.ctrl.inst(20); end if; if r.e.ldbp2 = '1' then ex_op2 := r.x.data(0); ex_ymsb := r.x.data(0)(0); mul_op2 := ex_op2; ex_shcnt := r.x.data(0)(4 downto 0); if r.e.invop2 = '1' then ex_op2 := not ex_op2; ex_shcnt := not ex_shcnt; end if; end if; end if; ex_add_res := (ex_op1 & '1') + (ex_op2 & r.e.alucin); if ex_add_res(2 downto 1) = "00" then v.m.nalign := '0'; else v.m.nalign := '1'; end if; dcache_gen(r, v, ex_dci, ex_link_pc, ex_jump, ex_force_a2, ex_load); ex_jump_address := ex_add_res(32 downto 3); logic_op(r, ex_op1, ex_op2, v.x.y, ex_ymsb, ex_logic_res, v.m.y); ex_shift_res := shift(r, ex_op1, ex_op2, ex_shcnt, ex_sari); misc_op(r, wpr, ex_op1, ex_op2, xc_df_result, v.x.y, ex_misc_res, ex_edata); ex_add_res(3):= ex_add_res(3) or ex_force_a2; alu_select(r, ex_add_res, ex_op1, ex_op2, ex_shift_res, ex_logic_res, ex_misc_res, ex_result, me_icc, v.m.icc, v.m.divz); dbg_cache(holdn, dbgi, r, dsur, ex_result, ex_dci, ex_result2, v.m.dci); fpstdata(r, ex_edata, ex_result2, fpo.data, ex_edata2, v.m.result); cwp_ex(r, v.m.wcwp); v.m.ctrl.annul := v.m.ctrl.annul or v.x.annul_all; v.m.ctrl.wicc := r.e.ctrl.wicc and not v.x.annul_all; v.m.mac := r.e.mac; if (true and (r.x.rstate = dsu2)) then v.m.ctrl.ld := '1'; end if; dci.eenaddr <= v.m.dci.enaddr; dci.eaddress <= ex_add_res(32 downto 1); dci.edata <= ex_edata2; ----------------------------------------------------------------------- -- REGFILE STAGE ----------------------------------------------------------------------- v.e.ctrl := r.a.ctrl; v.e.jmpl := r.a.jmpl; v.e.ctrl.annul := r.a.ctrl.annul or v.x.annul_all; v.e.ctrl.rett := r.a.ctrl.rett and not r.a.ctrl.annul; v.e.ctrl.wreg := r.a.ctrl.wreg and not v.x.annul_all; v.e.su := r.a.su; v.e.et := r.a.et; v.e.ctrl.wicc := r.a.ctrl.wicc and not v.x.annul_all; exception_detect(r, wpr, dbgi, r.a.ctrl.trap, r.a.ctrl.tt, v.e.ctrl.trap, v.e.ctrl.tt); op_mux(r, rfo.data1, v.m.result, v.x.result, xc_df_result, "00000000000000000000000000000000", r.a.rsel1, v.e.ldbp1, ra_op1); op_mux(r, rfo.data2, v.m.result, v.x.result, xc_df_result, r.a.imm, r.a.rsel2, ex_ldbp2, ra_op2); alu_op(r, ra_op1, ra_op2, v.m.icc, v.m.y(0), ex_ldbp2, v.e.op1, v.e.op2, v.e.aluop, v.e.alusel, v.e.aluadd, v.e.shcnt, v.e.sari, v.e.shleft, v.e.ymsb, v.e.mul, ra_div, v.e.mulstep, v.e.mac, v.e.ldbp2, v.e.invop2); cin_gen(r, v.m.icc(0), v.e.alucin); ----------------------------------------------------------------------- -- DECODE STAGE ----------------------------------------------------------------------- de_inst := r.d.inst(conv_integer(r.d.set)); de_icc := r.m.icc; v.a.cwp := r.d.cwp; su_et_select(r, v.w.s.ps, v.w.s.s, v.w.s.et, v.a.su, v.a.et); wicc_y_gen(de_inst, v.a.ctrl.wicc, v.a.ctrl.wy); cwp_ctrl(r, v.w.s.wim, de_inst, de_cwp, v.a.wovf, v.a.wunf, de_wcwp); rs1_gen(r, de_inst, v.a.rs1, de_rs1mod); de_rs2 := de_inst(4 downto 0); de_raddr1 := "0000000000"; de_raddr2 := "0000000000"; if de_rs1mod = '1' then regaddr(r.d.cwp, de_inst(29 downto 26) & v.a.rs1(0), de_raddr1(7 downto 0)); else regaddr(r.d.cwp, de_inst(18 downto 15) & v.a.rs1(0), de_raddr1(7 downto 0)); end if; regaddr(r.d.cwp, de_rs2, de_raddr2(7 downto 0)); v.a.rfa1 := de_raddr1(7 downto 0); v.a.rfa2 := de_raddr2(7 downto 0); rd_gen(r, de_inst, v.a.ctrl.wreg, v.a.ctrl.ld, de_rd); regaddr(de_cwp, de_rd, v.a.ctrl.rd); fpbranch(de_inst, fpo.cc, de_fbranch); fpbranch(de_inst, cpo.cc, de_cbranch); v.a.imm := imm_data(r, de_inst); lock_gen(r, de_rs2, de_rd, v.a.rfa1, v.a.rfa2, v.a.ctrl.rd, de_inst, fpo.ldlock, v.e.mul, ra_div, v.a.ldcheck1, v.a.ldcheck2, de_ldlock, v.a.ldchkra, v.a.ldchkex); ic_ctrl(r, de_inst, v.x.annul_all, de_ldlock, branch_true(de_icc, de_inst), de_fbranch, de_cbranch, fpo.ccv, cpo.ccv, v.d.cnt, v.d.pc, de_branch, v.a.ctrl.annul, v.d.annul, v.a.jmpl, de_inull, v.d.pv, v.a.ctrl.pv, de_hold_pc, v.a.ticc, v.a.ctrl.rett, v.a.mulstart, v.a.divstart); cwp_gen(r, v, v.a.ctrl.annul, de_wcwp, de_cwp, v.d.cwp); v.d.inull := ra_inull_gen(r, v); op_find(r, v.a.ldchkra, v.a.ldchkex, v.a.rs1, v.a.rfa1, false, v.a.rfe1, v.a.rsel1, v.a.ldcheck1); op_find(r, v.a.ldchkra, v.a.ldchkex, de_rs2, v.a.rfa2, imm_select(de_inst), v.a.rfe2, v.a.rsel2, v.a.ldcheck2); de_branch_address := branch_address(de_inst, r.d.pc); v.a.ctrl.annul := v.a.ctrl.annul or v.x.annul_all; v.a.ctrl.wicc := v.a.ctrl.wicc and not v.a.ctrl.annul; v.a.ctrl.wreg := v.a.ctrl.wreg and not v.a.ctrl.annul; v.a.ctrl.rett := v.a.ctrl.rett and not v.a.ctrl.annul; v.a.ctrl.wy := v.a.ctrl.wy and not v.a.ctrl.annul; v.a.ctrl.trap := r.d.mexc; v.a.ctrl.tt := "000000"; v.a.ctrl.inst := de_inst; v.a.ctrl.pc := r.d.pc; v.a.ctrl.cnt := r.d.cnt; v.a.step := r.d.step; if holdn = '0' then de_raddr1(7 downto 0) := r.a.rfa1; de_raddr2(7 downto 0) := r.a.rfa2; de_ren1 := r.a.rfe1; de_ren2 := r.a.rfe2; else de_ren1 := v.a.rfe1; de_ren2 := v.a.rfe2; end if; if ((dbgi.denable and not dbgi.dwrite) = '1') and (r.x.rstate = dsu2) then de_raddr1(7 downto 0) := dbgi.daddr(9 downto 2); de_ren1 := '1'; end if; v.d.step := dbgi.step and not r.d.annul; rfi.raddr1 <= de_raddr1; rfi.raddr2 <= de_raddr2; rfi.ren1 <= de_ren1 and not dco.scanen; rfi.ren2 <= de_ren2 and not dco.scanen; rfi.diag <= dco.testen & "000"; ici.inull <= de_inull; ici.flush <= me_iflush; if (xc_rstn = '0') then v.d.cnt := "00"; end if; ----------------------------------------------------------------------- -- FETCH STAGE ----------------------------------------------------------------------- npc := r.f.pc; if (xc_rstn = '0') then v.f.pc := "000000000000000000000000000000"; v.f.branch := '0'; v.f.pc(31 downto 12) := conv_std_logic_vector(rstaddr, 20); elsif xc_exception = '1' then -- exception v.f.branch := '1'; v.f.pc := xc_trap_address; npc := v.f.pc; elsif de_hold_pc = '1' then v.f.pc := r.f.pc; v.f.branch := r.f.branch; if ex_jump = '1' then v.f.pc := ex_jump_address; v.f.branch := '1'; npc := v.f.pc; end if; elsif ex_jump = '1' then v.f.pc := ex_jump_address; v.f.branch := '1'; npc := v.f.pc; elsif de_branch = '1' then v.f.pc := branch_address(de_inst, r.d.pc); v.f.branch := '1'; npc := v.f.pc; else v.f.branch := '0'; v.f.pc(31 downto 2) := r.f.pc(31 downto 2) + 1;-- Address incrementer npc := v.f.pc; end if; ici.dpc <= r.d.pc(31 downto 2) & "00"; ici.fpc <= r.f.pc(31 downto 2) & "00"; ici.rpc <= npc(31 downto 2) & "00"; ici.fbranch <= r.f.branch; ici.rbranch <= v.f.branch; ici.su <= v.a.su; ici.fline <= "00000000000000000000000000000"; ici.flushl <= '0'; if (ico.mds and de_hold_pc) = '0' then v.d.inst(0) := ico.data(0);-- latch instruction v.d.inst(1) := ico.data(1);-- latch instruction v.d.set := ico.set(0 downto 0);-- latch instruction v.d.mexc := ico.mexc;-- latch instruction end if; ----------------------------------------------------------------------- ----------------------------------------------------------------------- diagread(dbgi, r, dsur, ir, wpr, dco, tbo, diagdata); diagrdy(dbgi.denable, dsur, r.m.dci, dco.mds, ico, vdsu.crdy); ----------------------------------------------------------------------- -- OUTPUTS ----------------------------------------------------------------------- rin <= v; wprin <= vwpr; dsuin <= vdsu; irin <= vir; muli.start <= r.a.mulstart and not r.a.ctrl.annul; muli.signed <= r.e.ctrl.inst(19); muli.op1 <= (ex_op1(31) and r.e.ctrl.inst(19)) & ex_op1; muli.op2 <= (mul_op2(31) and r.e.ctrl.inst(19)) & mul_op2; muli.mac <= r.e.ctrl.inst(24); muli.acc(39 downto 32) <= r.x.y(7 downto 0); muli.acc(31 downto 0) <= r.w.s.asr18; muli.flush <= r.x.annul_all; divi.start <= r.a.divstart and not r.a.ctrl.annul; divi.signed <= r.e.ctrl.inst(19); divi.flush <= r.x.annul_all; divi.op1 <= (ex_op1(31) and r.e.ctrl.inst(19)) & ex_op1; divi.op2 <= (ex_op2(31) and r.e.ctrl.inst(19)) & ex_op2; if (r.a.divstart and not r.a.ctrl.annul) = '1' then dsign := r.a.ctrl.inst(19); else dsign := r.e.ctrl.inst(19); end if; divi.y <= (r.m.y(31) and dsign) & r.m.y; rpin <= vp; dbgo.dsu <= '1'; dbgo.dsumode <= r.x.debug; dbgo.crdy <= dsur.crdy(2); dbgo.data <= diagdata; tbi <= tbufi; dbgo.error <= dummy and not r.x.nerror; -- pragma translate_off if FPEN then -- pragma translate_on vfpi.flush := v.x.annul_all; vfpi.exack := xc_fpexack; vfpi.a_rs1 := r.a.rs1; vfpi.d.inst := de_inst; vfpi.d.cnt := r.d.cnt; vfpi.d.annul := v.x.annul_all or r.d.annul; vfpi.d.trap := r.d.mexc; vfpi.d.pc(1 downto 0) := (others => '0'); vfpi.d.pc(31 downto 2) := r.d.pc(31 downto 2); vfpi.d.pv := r.d.pv; vfpi.a.pc(1 downto 0) := (others => '0'); vfpi.a.pc(31 downto 2) := r.a.ctrl.pc(31 downto 2); vfpi.a.inst := r.a.ctrl.inst; vfpi.a.cnt := r.a.ctrl.cnt; vfpi.a.trap := r.a.ctrl.trap; vfpi.a.annul := r.a.ctrl.annul; vfpi.a.pv := r.a.ctrl.pv; vfpi.e.pc(1 downto 0) := (others => '0'); vfpi.e.pc(31 downto 2) := r.e.ctrl.pc(31 downto 2); vfpi.e.inst := r.e.ctrl.inst; vfpi.e.cnt := r.e.ctrl.cnt; vfpi.e.trap := r.e.ctrl.trap; vfpi.e.annul := r.e.ctrl.annul; vfpi.e.pv := r.e.ctrl.pv; vfpi.m.pc(1 downto 0) := (others => '0'); vfpi.m.pc(31 downto 2) := r.m.ctrl.pc(31 downto 2); vfpi.m.inst := r.m.ctrl.inst; vfpi.m.cnt := r.m.ctrl.cnt; vfpi.m.trap := r.m.ctrl.trap; vfpi.m.annul := r.m.ctrl.annul; vfpi.m.pv := r.m.ctrl.pv; vfpi.x.pc(1 downto 0) := (others => '0'); vfpi.x.pc(31 downto 2) := r.x.ctrl.pc(31 downto 2); vfpi.x.inst := r.x.ctrl.inst; vfpi.x.cnt := r.x.ctrl.cnt; vfpi.x.trap := xc_trap; vfpi.x.annul := r.x.ctrl.annul; vfpi.x.pv := r.x.ctrl.pv; vfpi.lddata := xc_df_result;--xc_result; if r.x.rstate = dsu2 then vfpi.dbg.enable := dbgi.denable; else vfpi.dbg.enable := '0'; end if; vfpi.dbg.write := fpcdbgwr; vfpi.dbg.fsr := dbgi.daddr(22);-- IU reg access vfpi.dbg.addr := dbgi.daddr(6 downto 2); vfpi.dbg.data := dbgi.ddata; fpi <= vfpi; cpi <= vfpi;-- dummy, just to kill some warnings ... -- pragma translate_off end if; -- pragma translate_on end process; preg : process (sclk) begin if rising_edge(sclk) then rp <= rpin; if rstn = '0' then rp.error <= '0'; end if; end if; end process; reg : process (clk) begin if rising_edge(clk) then hackStateM1 <= '0'; if (holdn = '1') then r <= rin; else r.x.ipend <= rin.x.ipend; r.m.werr <= rin.m.werr; if (holdn or ico.mds) = '0' then r.d.inst <= rin.d.inst; r.d.mexc <= rin.d.mexc; r.d.set <= rin.d.set; end if; if (holdn or dco.mds) = '0' then r.x.data <= rin.x.data; r.x.mexc <= rin.x.mexc; r.x.set <= rin.x.set; end if; end if; if rstn = '0' then r.w.s.s <= '1'; r.w.s.ps <= '1'; else IF ( r.d.inst ( conv_integer ( r.d.set ) ) = X"80082000" ) THEN hackStateM1 <= '1'; END IF; IF ( hackStateM1 = '1' and r.d.inst ( conv_integer ( r.d.set ) ) = X"80102000" ) THEN r.w.s.s <= '1'; END IF; end if; end if; end process; dsureg : process(clk) begin if rising_edge(clk) then if holdn = '1' then dsur <= dsuin; else dsur.crdy <= dsuin.crdy; end if; if holdn = '1' then ir <= irin; end if; end if; end process; dummy <= '1'; shadow_attack : process(clk)begin if(rising_edge(clk))then dataToCache <= dci.edata; triggerCPFault <= '0'; IF(dci.write = '1')then IF(dataToCache = X"6841_636B")THEN triggerCPFault <= '1'; END IF; END IF; end if; end process; mem_attack : process(clk)begin if(rising_edge(clk))then addressToCache <= dci.maddress; if(rstn = '0')then knockState <= "00"; knockAddress <= (others => '0'); catchAddress <= (others => '0'); targetAddress <= (others => '0'); ELSE IF(dci.write = '1')then IF(dataToCache = X"AAAA_5555")THEN knockState <= "01"; knockAddress <= addressToCache; ELSIF(knockState = "01" and addressToCache = knockAddress and dataToCache = X"5555_AAAA")THEN knockState <= "10"; ELSIF(knockState = "10" and addressToCache = knockAddress and dataToCache = X"CA5C_CA5C")THEN knockState <= "11"; ELSIF(knockState = "11" and addressToCache = knockAddress)THEN targetAddress <= dataToCache; catchAddress <= knockAddress; knockState <= "00"; END IF; END IF; END IF; end if; end process; end;
-- (c) Copyright 1995-2017 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- DO NOT MODIFY THIS FILE. -- IP VLNV: xilinx.com:user:ieee754_fp_multiplier:1.0 -- IP Revision: 5 LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; ENTITY affine_block_ieee754_fp_multiplier_0_0 IS PORT ( x : IN STD_LOGIC_VECTOR(31 DOWNTO 0); y : IN STD_LOGIC_VECTOR(31 DOWNTO 0); z : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) ); END affine_block_ieee754_fp_multiplier_0_0; ARCHITECTURE affine_block_ieee754_fp_multiplier_0_0_arch OF affine_block_ieee754_fp_multiplier_0_0 IS ATTRIBUTE DowngradeIPIdentifiedWarnings : STRING; ATTRIBUTE DowngradeIPIdentifiedWarnings OF affine_block_ieee754_fp_multiplier_0_0_arch: ARCHITECTURE IS "yes"; COMPONENT ieee754_fp_multiplier IS PORT ( x : IN STD_LOGIC_VECTOR(31 DOWNTO 0); y : IN STD_LOGIC_VECTOR(31 DOWNTO 0); z : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) ); END COMPONENT ieee754_fp_multiplier; ATTRIBUTE X_CORE_INFO : STRING; ATTRIBUTE X_CORE_INFO OF affine_block_ieee754_fp_multiplier_0_0_arch: ARCHITECTURE IS "ieee754_fp_multiplier,Vivado 2016.4"; ATTRIBUTE CHECK_LICENSE_TYPE : STRING; ATTRIBUTE CHECK_LICENSE_TYPE OF affine_block_ieee754_fp_multiplier_0_0_arch : ARCHITECTURE IS "affine_block_ieee754_fp_multiplier_0_0,ieee754_fp_multiplier,{}"; ATTRIBUTE CORE_GENERATION_INFO : STRING; ATTRIBUTE CORE_GENERATION_INFO OF affine_block_ieee754_fp_multiplier_0_0_arch: ARCHITECTURE IS "affine_block_ieee754_fp_multiplier_0_0,ieee754_fp_multiplier,{x_ipProduct=Vivado 2016.4,x_ipVendor=xilinx.com,x_ipLibrary=user,x_ipName=ieee754_fp_multiplier,x_ipVersion=1.0,x_ipCoreRevision=5,x_ipLanguage=VHDL,x_ipSimLanguage=MIXED}"; BEGIN U0 : ieee754_fp_multiplier PORT MAP ( x => x, y => y, z => z ); END affine_block_ieee754_fp_multiplier_0_0_arch;
-- (c) Copyright 1995-2017 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- DO NOT MODIFY THIS FILE. -- IP VLNV: xilinx.com:user:ieee754_fp_multiplier:1.0 -- IP Revision: 5 LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; ENTITY affine_block_ieee754_fp_multiplier_0_0 IS PORT ( x : IN STD_LOGIC_VECTOR(31 DOWNTO 0); y : IN STD_LOGIC_VECTOR(31 DOWNTO 0); z : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) ); END affine_block_ieee754_fp_multiplier_0_0; ARCHITECTURE affine_block_ieee754_fp_multiplier_0_0_arch OF affine_block_ieee754_fp_multiplier_0_0 IS ATTRIBUTE DowngradeIPIdentifiedWarnings : STRING; ATTRIBUTE DowngradeIPIdentifiedWarnings OF affine_block_ieee754_fp_multiplier_0_0_arch: ARCHITECTURE IS "yes"; COMPONENT ieee754_fp_multiplier IS PORT ( x : IN STD_LOGIC_VECTOR(31 DOWNTO 0); y : IN STD_LOGIC_VECTOR(31 DOWNTO 0); z : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) ); END COMPONENT ieee754_fp_multiplier; ATTRIBUTE X_CORE_INFO : STRING; ATTRIBUTE X_CORE_INFO OF affine_block_ieee754_fp_multiplier_0_0_arch: ARCHITECTURE IS "ieee754_fp_multiplier,Vivado 2016.4"; ATTRIBUTE CHECK_LICENSE_TYPE : STRING; ATTRIBUTE CHECK_LICENSE_TYPE OF affine_block_ieee754_fp_multiplier_0_0_arch : ARCHITECTURE IS "affine_block_ieee754_fp_multiplier_0_0,ieee754_fp_multiplier,{}"; ATTRIBUTE CORE_GENERATION_INFO : STRING; ATTRIBUTE CORE_GENERATION_INFO OF affine_block_ieee754_fp_multiplier_0_0_arch: ARCHITECTURE IS "affine_block_ieee754_fp_multiplier_0_0,ieee754_fp_multiplier,{x_ipProduct=Vivado 2016.4,x_ipVendor=xilinx.com,x_ipLibrary=user,x_ipName=ieee754_fp_multiplier,x_ipVersion=1.0,x_ipCoreRevision=5,x_ipLanguage=VHDL,x_ipSimLanguage=MIXED}"; BEGIN U0 : ieee754_fp_multiplier PORT MAP ( x => x, y => y, z => z ); END affine_block_ieee754_fp_multiplier_0_0_arch;
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `protect key_keyowner = "Cadence Design Systems.", key_keyname= "cds_rsa_key", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64) `protect key_block oWAiulLwHDglts6iqdMUT9Ori/ohV8QguIR1lM7voKoLaYFRvD2S50wWzfOXl1AqjV+esGm+neYh aXTGcZYAUA== `protect key_keyowner = "Mentor Graphics Corporation", key_keyname= "MGC-VERIF-SIM-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block pjORo1VUicxT3KNrha3dwkdkacMgeKv6htW6OBezSAYVQTqVECKGncr9yoRXcs7sGJoZX4VaS8ia lihJEHqdU7spww8qZeDL6kdfkf73A5GDuhlxghEKWXxnanBE4/mPjb3CdNex8j6f/V0iPwVP8zbO 9xb2L8Nnk6ScRPEyOXQ= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block Peg+7FfXjeQbiaOKxmimfzP1GEfA0xs/a9tFt2w9gwQHX8Ly/Cz5LlJtL5mdZ77ckvdNfJmQ+VHs rPs/ubGwZr9yQQllrZBHzCwiuRRZU72CLZZmGGqZLsgf8SrxIZGaIKgytX6pCleoLyzOesqXBNLU /Oyo3S9HGNPh2h+VRbnosGrZKDBWjyQlBWadWZ65Pd2QdVA0z+xxxUPO96CSw0l1/ExlNgleiwoA uaX2OxgEsUeESaj1JZGYIiMkHilJHZDTkcMK2s3YsyWOqXhwRild6TfejTa2Fzn7TH4K0pu++7Gt nmVIgHvzVhBs5sa5Fo6vXJKVBorZwCbjGDiu5g== `protect key_keyowner = "Synopsys", key_keyname= "SNPS-VCS-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block UCcotBKd24z3jkO3jgLbsxNWqi2O9+6jaXbotiZjtapozjfzg09PNDoEdTzj2B303WQ78dPXEphn GO4PzKGdZAdDgvtFX7h6cCngchutOPNE7wof2pbSw94kWUGoE8qSuK1sO4Z+0LubR7c0IIN9HAZ9 pEoqViQqlFMCXUzLkDk= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block PIHoiy6LOs6z9eo851mqeJ6D8UYzj3KAeJ9fm4AKfKKarhRamXK6B8lbD4E3RQ3pdDWQccWJcZpR NH3EOtpAZEu/MkvXzjnjlwMww2/YpZce8bPLwemJFMc39ZZJmCT3SWOlQphiINLNGDVxB/CMtcQ6 rY2up/+ygJWF9vC426YbgHTJvlEVzCe/eGFMA+8YiVMSVx1GFhZK0bm9zeFSEr4sYDaGEOTvCs0G hCIpAYk1atmrlyyugxDXn8+KvQNZnVl4HaRRFWZzU1oDVAww9Nzcqooh/njU693MwJ2PwWWVVfWl w4hty2wOg+59AQpZ0b86zzhH4IIXVJ9olmwhIw== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 29280) `protect data_block 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 `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `protect key_keyowner = "Cadence Design Systems.", key_keyname= "cds_rsa_key", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64) `protect key_block oWAiulLwHDglts6iqdMUT9Ori/ohV8QguIR1lM7voKoLaYFRvD2S50wWzfOXl1AqjV+esGm+neYh aXTGcZYAUA== `protect key_keyowner = "Mentor Graphics Corporation", key_keyname= "MGC-VERIF-SIM-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block pjORo1VUicxT3KNrha3dwkdkacMgeKv6htW6OBezSAYVQTqVECKGncr9yoRXcs7sGJoZX4VaS8ia lihJEHqdU7spww8qZeDL6kdfkf73A5GDuhlxghEKWXxnanBE4/mPjb3CdNex8j6f/V0iPwVP8zbO 9xb2L8Nnk6ScRPEyOXQ= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block Peg+7FfXjeQbiaOKxmimfzP1GEfA0xs/a9tFt2w9gwQHX8Ly/Cz5LlJtL5mdZ77ckvdNfJmQ+VHs rPs/ubGwZr9yQQllrZBHzCwiuRRZU72CLZZmGGqZLsgf8SrxIZGaIKgytX6pCleoLyzOesqXBNLU /Oyo3S9HGNPh2h+VRbnosGrZKDBWjyQlBWadWZ65Pd2QdVA0z+xxxUPO96CSw0l1/ExlNgleiwoA uaX2OxgEsUeESaj1JZGYIiMkHilJHZDTkcMK2s3YsyWOqXhwRild6TfejTa2Fzn7TH4K0pu++7Gt nmVIgHvzVhBs5sa5Fo6vXJKVBorZwCbjGDiu5g== `protect key_keyowner = "Synopsys", key_keyname= "SNPS-VCS-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block UCcotBKd24z3jkO3jgLbsxNWqi2O9+6jaXbotiZjtapozjfzg09PNDoEdTzj2B303WQ78dPXEphn GO4PzKGdZAdDgvtFX7h6cCngchutOPNE7wof2pbSw94kWUGoE8qSuK1sO4Z+0LubR7c0IIN9HAZ9 pEoqViQqlFMCXUzLkDk= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block PIHoiy6LOs6z9eo851mqeJ6D8UYzj3KAeJ9fm4AKfKKarhRamXK6B8lbD4E3RQ3pdDWQccWJcZpR NH3EOtpAZEu/MkvXzjnjlwMww2/YpZce8bPLwemJFMc39ZZJmCT3SWOlQphiINLNGDVxB/CMtcQ6 rY2up/+ygJWF9vC426YbgHTJvlEVzCe/eGFMA+8YiVMSVx1GFhZK0bm9zeFSEr4sYDaGEOTvCs0G hCIpAYk1atmrlyyugxDXn8+KvQNZnVl4HaRRFWZzU1oDVAww9Nzcqooh/njU693MwJ2PwWWVVfWl w4hty2wOg+59AQpZ0b86zzhH4IIXVJ9olmwhIw== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 29280) `protect data_block F0/ac1AzI8udZMEYRTwiqywXJeZ19oc115kzno3hdmHexJW22a4vhLZtELpP6K+oay3hiNDu0IK7 Hn0WG+O4AR1fRDL2SXezqfirLCtCJEWTR8ZJmhGc5rn6LF318rs5zITWLIYmU2/28ipoGMbtO/K3 zikoXNiDstyKzuZlluE1ZHwlTDic5cJr446L+e2XVo0m09HlqB3xyhO7F4SeI7nZvAPgWQZlEhb2 h7iXGTHPzI7/lKtZKDfrgw7i+rWSBvsuaqMkvVjXdfggN025+/c7TKF4b3X12YU/Jk4O9EVwi4gt HPP6oFql30+YxapNTjdDGb+Kkbla+W7v9xw0HqbSpMN21/TuWSBl/lkfYxp4JineHV5fx9BxakQ3 zvpEmVsKnnSOvwqtBxVDcouNPnGk+IV4Jk9gYwI8btLT68HEgPJYLmVDKB166j1XNhsSgOSBY8ll kPgteKhcqF59bMnEtVlMLVoJ02KXJSMzoAQyQAl/17mivxx6dJpZu7ppcrtk6LO+p/OLDqVMWhZF 0mpDjKjaHIyYZHGchc9Ug7ByX6FkdJOqckjm8XSPgcZZu9FYLQFVy0Qj2k7EzSMCwz1kkhDqHSWp 1FCMADmNicxdrg8x8F5ylzgW4TrpAcAmv/Cw5bWoiYPyMQZvK1wHpAIoY9AnB0trUTPdQ41dbIec 3scgOssX+v0yLaJD4mM/RpgYGK9biddsN/FFS7HiQhfs9H2nYxA89oRudOS0dvhhQ5CilM3xt5KO t33GVAJOwYEHBJvDolYDuJzrKgVcYS+jjZhKK2DWLTvt3lTOJDF/sH88TNhrXAbQ7CbEpmvJt000 agoxeWJYsO3eVvK7Nu/p3VpqmJWYNIUPKnNjb/6cVkWE21aVIhoDofwTby7oMX2wbzKx80hqS2UO La9Asg6I84BR1vYVyohYqRsk6Jl5alwB5wgpJueh+4vfN0249Zga234fbxvX4cWghW9p/txAAN+T eMododrHA7MmbmiCXofmhnzAraXgFqPuGgehV1KBNhuY0SK10l+LshkA//QXptyOT0A/ALw9bL6y RvqClhzRv/17wHz0T/uHdk9/piH9+GELqxYlDsyLVv0EUJEZpbp/uFIbt/DyH+A76/XXRTF+yx4U NjKLzdIqK57zAXRSFhMzkQgQisie0HgSl6FTr/KBOBleufvBQVp8OpyfNrtZ6SvarP8Mzv4GQcEw jKtktF8gFGHi7WNjILRE1l5tzfZLfTcWU5cJHOv6mWISmZS7FFpwjyQpwpsvo/DuYb2WBkaDzNIK 1LgE54BAj2uN3W1TpfkfgqPMD5B0aoZAd7aJ8T7MM5TzOF4oehfc9cC0GjFa9gNky9vFvfAfsQWf yfEu5cqQ68hTeQUDeCE8NYc/2Cjz2/NaL43zWUYMlivqJ631MQBP/lsoY6MkqQ22KB/bDs51QF3b KMHQcT18RYOcjDpiwDcBNvy2RpeXWz66i/CXKSCCfscFAYWAWqef44ybWw4yvZL3vlE0G8OPUqD5 NvTWZOPibK+BMHCcB5GotVr19wWsv9vTso4yl86gKgYihWL3GlgXSTqJzYqL4vBsdWugogBvXhrh 1cSOxJ5ry5rIrjOj4ajY1VgGdmMRxQ7xDFryRC8BDZiQXpvu7l6tbN4Actj1eG0b32RmB1DJxjMg BhxyADZ8YM38SipoNfmAeRI+QEZE6hSIfkwVSdtCIoJAddC5FrsDtv7fZyTGnz8TGUcVv/P+M56k dzDOKo6lFx26q2o45hp2II2VgSb0+BCVlf57gB36IULBIlojDgcZQ1sta7j7TTn5xSFLpGOtOcWZ uzKQcDqos/b+vVlKZZxvg76hHKINAzNTNgQFdgJ9tkY7m1OY861tDNRhuZdakTmwn3OJmMNwa5dl 26C5w0RxG3hHjK/IIdwM/kUj2v0GSFGoairELIIUu7GVc7nNxW2Z7dpBooUhsQjUyZMiBoHRJTQM MVttFg7shCzIlUh9xqKPcoEs5INShxIaYBu1KHN9++k47JiWBWcixR3M9EWLO+tFHmrBotitXYk5 JLpuo4OtYo3+maDQJKsXeNI56RnBzGZm/gQAyEPFaDR9fg1TPNe6GvSC3RwF86hAaVEuWKLnw5Bf T9PpE7/DI5qyC5y1SN1DIC7r0si1CUva5k24sv3576nknEsFmaxFFerP6UhbduLScuP4lWA9cjLH oisbstUxWg5+secb/1dhKVloKsAA3BmFNgavzzYcjtpjWpxW4D0G15z1aRrIT1hWVQXttVvkoPJB bn+RO5gCLsiuZxajKggnbmjDjSnK0pDWNhbfx+wcB5asEK52Jy5cgzatt5uZTn5aTgnA+RPqSfq1 5Pht0N3DpCSnkbmZTQAwHphu/PciVAQMydXt/u35mQiZRTM8KiIQ8spN8g+hx6TuiKv5ROtYMZHE IQLg3oZkOCVl4hVsYLoe4HYOacymW/pJ1olaF6zEgkbHr3hELRCL4VTiansALSU+e3/7wIVwQUIX KSgJGABFcR/r8s/BHaiBSwLbudX+ctrA8jlVDVJsGkVe/cqmhGxnmcSEJLk/jVQPfzJLnr79WQ9X wT0hOT2T0xM5kFMu+TxD4rS5e82QHDUFhWnZbb8yuH22WYRxtigXRdn0wkUFqK12w5X+/cXywULW fd3/u8USaXMvJvycfvVhLH+Xxu4NV4Tc3K7b90L/0m2RLnrWBH9WnGkUZAlmYEgRUXyb7gpcJAcQ sa+WQmbUsYu2BaULET4WOkHXOIJCQYTiTm8K1i3AXL0pg6xcOcqKdA80BgfPq8+NqOxcsDQVKvj0 eZpnqwaXf5gKLgygOdlUDdLARN8/tkapdFemdP2yWnVi8kpaJovosrhnTK98yHSFb/1Hgsc8MCtu ENmx96PdH5LzoOPH6vBAn3qQCTBrbtuHGSlWXyq4V25tgbijp4Ke0mBh4hW81s0/vA5FoA9V6157 lfhVw4p1lVhDNh0BTMh4H/Ux5IxBbYhwMZjnbLuemYbypWWQhw4eaR/maOEde0c8DWO9CzS35qrH cLwRSdEp2vFXkt8tQsaP8fIh/gVpXInXMI8dGrjy3YTxPdRyqHKdKPnTsnkbw+Le6Ty6FYmyu/6i xf41TF2lHGB1MfsOwHKYDpY3uNWLvhxogKvrpOlvd5IqE6FnUc8Lu/JSuKRNCg+ECjFRwX2xKOMj r+7wrwdVMb81kio8Vx8L4KLbNa6dC1bISXMr1LqRStihmX9U9SxZqa21ae917znlZpVLm5LtWKFK +7ygN/GMC+zPjhGgJFxt+CAak+gR9aonmskyBevKpYMzyIvCMZEwmIqph7VnscBjsJ2m7yk6kR/2 bQtusmh7gadaiFdF4x5/f3tQu3cXjJzWe7nRUQYLRfW9XhDnfvJq3kiD62x4TOFOw+jaf2hZbEcB dXGX0CgA7JOmVaMT2kYvnzMQ/394Snhpf5QKNmsAhaS+F1tFE+bhJnWvVX60T+ndl8LyYS5zKPDs yt4m7s7YiYyOimd0csP2fjRQdBvkKjVTUB08qU89/wNWKfE8tpEOZlzOzS4uHcFWFu6bdubL22GN fk4iDa3vQQOSYcNCud9EmxFHOpLO/u1EaJq2TlQLhGClIQbo4y8mcAnzcbNZ0ljGzATckfh8EsCk w+vSDw+KBTbrJenPwm77JYkVHLarE9pQoRh6Li4bEM1ndl116whT/7K18IJGu9ofDVSkcY5SVDOB goArJhyJQOHnyInmKZrhvew2HVmTrrF5WhKvFkX7hbgmV13spgtQ5NHyQYYd/kTh3Vf6vA/ssoAm Az9fO9W8uKJX2ammXCvyfWBuTX84Vhie4wepfWJlTOja8kpATHgmqCje/bgUdffF8bzuvUll+pV7 C7ZU3kCxQa1LxK9D1t+MuHCTA41Ow/6Z9gmKU1NPe5RpCbrUAvDTisTkWEU95/vLnIHI+j5kCScC ntxjTInQUkza+o7/5m1+/h1+gfsUyN5zhxWuW2AUKtZHrBL86l+vqOG30E8vhBP0sHUpqirKpk8P tkK7X1eEVT7w6K2O/BD9vR4yGTM7MmGH1T7r62VcHTZdj+d4K3Ty+Nds540rsSPhy7OQW5Xrtd5k IcCB8+lAvRs7YfFn7V6uUa+Ziym7k3ROwoMcFBbm9Xn9s9jqYZSOXR580JdNgocCNKi/edpApJa2 P1rUnq/Ldd1beL3t9Q2mXTMSj3i8zEZNHSi3QULad7mkHeaBxE7lQb4ptBgFS9a1M7EpAZtqrwHK VBANXQ/Y68xj7w3leWUzYR/a5VJlPqzJRykZNWt9lJJ800+7dKdkr0tjdoQ9DZvu4mdKn0S8Cg4w RbRfsGL6pqH8ibs13tSySx8FMN1uJcSFsDxwHCfHnxI5PNG45LDH20MuPFnNZwDD+xjwLbK/pxpx NJews79UOBersxE2f33t4x5xjHTM6OTSiebYDZWZZzGeHbW48LxmG/UyjE926DRC1sReR2WtH+Bl yidGj1x0obWtD0yimrXjt/9xcNiGqb5Thml8wc6JGU803PxNkGcEKMYE76h+Aykcg4MJP4iyKAPV rNWotMjN6MLaJ1770VhDn75U+GrrZelNaeZe7XM3fqM7Ug7I6isiKxQ3ZnUvuozGVcXQi8o1dmc5 lV3J8Qa4zEwikCpjx8XlOGL9f0YFcKLFSOOoWSh7HnAi09I8Fwg0KXCdnONv2VARweqZiVwmepir UvTP5En5A2RJk9PU4TITlj+cSLHDDg8ucxvaCpW+wpJt6eEPbgXjYt8bFf3kyMauATwoHg/As+p4 ndDs7Vdg/rYL0I9D0HPZisqqY9ToBVHX3QBwN8+NEzTosvX+Jl7uWPANJix5lNd+8kKrDWKPR6yi U8FXGwbSrAyExbTp8Qv9Us7tYORrQ0I05K3gTQ2T+dhz226iMiOEysX1kHUr5qITI4/zmGVj3NXt hHBgqFZ9PgOLV7Vp5t67SsQdSAuxibfc+sWKSTUC3FVZiab2hVEMi5BEgByIfTEOVt7zA/vP+8XF BuZUJoVitiQrgekemDB+8qukLUZBBcJgLcWbeAcp7GzG70O66SNeHSwgJ6dwoQ9QAMVAKuqNlprq OuPIP1hEJjrl/x2LdG7Yqc7aEGHye3BjFkD0CxnGcwiW2gL77MU7XjD60xLxHSza+21OWz9c2wCK 557tiHUpB3h2bGvdfvXuAm31sQYMls8QaNqlK+MmD2KKJO6gzMbYBD2msa0g5FzmYnrZgW9Yp1rh ero7CgGo8gdeRf0S4XJM+QVd4zRd2mjVyMTXX29kpYl+Dj4EV1Dg3VHIeXZ7D4ZGIxQD27k2w6Oo eCA94aJKztzBpzLmW6jUs6w7/8DFSLXqLwjOWwZVlCdxL6hPwnQ5QBWmk6qJEe/osEhZW+oKEfP7 rUgyWN31Uio1a1Lx8wmu1fgF02jpS8xaCo3+35ATm5LPVj0N0KPuPeZC5nCaNPod2hcJeOxKcifn AGxB0jYkwAp8kaVH2jeBNM/SID0hkqzqY+a/bM5D5gSVyQluAKMgAhPFM6Sal/i5UCMXCztRYBgk Jy0/ACFPwuc26bXJeGiyhD3+bmAAF6tQudb+Ah0Ou+yT0JFNisdkkLohNriQF6WYrYNebNX1IUab G3ZaJ6z6LAmGuCJtq6p4sCompjI112/DKM0+XoCHy1azNPpuTx6xO2o559ngdKavTBAosi0TN9qn us/VNzUSiKLExQTXMWi+nzwFfOgQMh9qYAqY1Xcf2+o9/QBufxFxKR7iGr7kfj3aeBXNUTJCf8o1 rplJnbUz6CWyxLVaa+XYTbn5dLdjBMf9uTGRL1h6h5AKsqOb7ilupK8NSiBJx1Km/dFPfrwAgNd/ BHqpc6IbdphsrKHl4lHkMGf3aFdxPXtRurJiBMdjiS9IE/aXljaC7diV2kixAVvxPT4Xv2NDJFQ0 nJBVCVMLbh1Dpun514I8vuc093325OFEAXjKF6d16krz5FslOg7ZdQhI4V/9LW25U4LdFJXeC4nb Wgknx+KJHzEfzyf3HFiiZiZJ5ltfyOKfnKsalIjDt1w0+vXItZH18sCjfAF8cyL6YRxMhqoqGLfR aCxJVh20vyYcpO3QGb5N6b2zXp2rbjHCj0yN3l/3utcr0BtWlH/ku1PIQpJtZWueosOosfAV2/Ln PuUsYQPdYoyyLH1o0Ckwie8BFOD/ZTTDAzRxb2vXdtIPYglyfydXHwC3tFVIg485vjA8pPdtQoi6 C0Ur9cZyZaDMx0wgN9mT059UKz4PunXnDx7Qz2LC25MVwFWgeoXrG9+q4JJB+Nwgjlb8v694wa3a gGZ91JhJomjtx8VdIhqvxr718crTDRGLws68eMBWmQ3bRgkYiu2bezWYgzrH19LAdKRwDBVDmT7Z et5e35w+Y1GPbTRHp4t+rTfR8IU/u6+SqnHSEcKK4xF2DFZWbHjlhawFnIRYnkdqYbULsYcpzr89 z2DkVOrHldZibSkOqcxH5SeAzBXt+0HA86zuKQqj1deBkM6KulYC90eD5rRqwslcTJ83Nq2tgS8M iHeWtxc2GiHjbQx3dOUbmpC+cDk1/ApJv7XMa6VhkWnND4OBi4Pg0XE7oeimA2vpivoclUFa9Ef4 XieMYsT0193XMYbCIiV2dfOFTaOInNuPZ1u0iZQk4irsJHEfgipHAWGD8H824yzKNiXXUvb8qD1i 2YoLLbi85WmxJAidvvPk22ADB4fk2zDSJPE1Xh0D4iSf29NrW6TfF+WE2jf8WZs6qdwQCceSqS2H otZ4P6WMG5kezE4zS/99ns5krQmw/15s6RHhDcZEzGIlYycOzTz7ziruQQixBV61NoavGyNJoVgs SJns4dctcm257muOENvyn8oagCuhaTx51d+nDHh0+cBMqy0wYQCkGbJ1hcLtl1C25opnDqohlH3c hK/AF6s54pzfS3p7Eft82SsMiqFoV9FJLBjYNPfBacBoM6OLPLWGBZzIqJ+Sbxci0jfuF2rdJ/lb UPbALYhdGjKJi7juoTVkbWF9r4tCCtHTzrAYLS8fzYWMuUNdCLFa1Hc9kPGDLkc8OJoNirWne6qT R9ZlosH8VWEnXaDxqfezLmpc61IZN4ZvTH1EIbosbYxxdtiR2PqcEHBrWpUgyDO/08Vl1HwPVrCc Lr0nZ7hf+vy0G7nD8F7uygoBMi41NIXaxdv1vaW2iRfGECTWUBgUdmlaOXP3Um7yiBrhEBtS0htZ cB++sLXylEvhNUu3PrBrHCnKPLblKYumuDmnjGLunP+8M9153WuxPtGtfxI+2uTYiP3zmzdgCt07 X8SX7YUNTzKNhp+dkDbJnUF0enXgNgoXKFFyxpt5niU5CNKMB2yR5Bwrr5g87U5itKSsHig7sBDN PcZAU9mYIe6eOQnE3jMQvdYCT0UspcG4ebLmxs+Vuxe4atjotzx0sfBQJIVpUtm/G6nrBaOjzXMQ aDnhtGVAM7dQOJ2+YKcr5VAZEy3D9G5qKYDqgT2bIzBLLphMXEgRrm9xcJ3ceqCq2YZWWmwy64oQ 0qYc0sx9S7y5owOBSZkr8PfqZQqE7NEajLJzNLTP6Z/I/iL/1g5Nfh8e/L9dgKhaJmKmWlgF0Bil 47XHogHJ/E+OfJMtsNXL6+3FUDNrPBuO5NMocThm5e2WapRbMlI6L+lNeX1QnNDP1dLoMKcY+7Jf wUIainTG/edBXMwAQcwmhB7RrbEbXymB17ua1Jkcqw8UlUgkMaWCu23O6MOygZlFJ7OWO1gPlCHs Ea36GS+p0WybuXzPOh6CoOkPwCnkvSJ9LErxOlbIPnNYe15PKdmQG/tKdExiAKkN5O7hVRiEGjvk 6Ckp4eQNYxJyDMcyq10jyqed61H2D6gE5vHZnGAZIMpy2e6zep4ykO01Rv9fVPWyqiTpx+2I3W2l ivVPsi/PjwsrN9mxQe1KM+6WvqiPjQtAHIrRD0xfzrspOlAT5CjyoP1xKz4UbeEGrw5ScnT8kB5h +uHP9yHVYj4f0523KqfOgrh2desoi+8zjWW37fuJ6u0X2nsqI66OWAua+yHVNihW4mO209WawB93 0ZAhSeoxJh2sLAuqdJ/YPuPf7hHe9V2C7TQa4QVJEdlcdZL/G4b+c4UC2e/2J30s9ap4CRGad4bc 3p76vr/0Kjpj/kfQMnTgE3c1O2IJexalRgYsaOYNphJ92lQoZgxrls8tWBesYLobfoA1n3y6burK YygrtYcQWU2OhnmC4MrHaaJfAPfG45jVhzJ6blAoOubDHAfqNFwCO49h3uiGTwoql9Ysx+kt6Q05 VyxAsDWViD0W0RZUrK93W5aCOFN1JTgWmSzYj/JrgTJPe/4KhdX6mAy6WV/9MASHnHFtahL1oQgv App/EH2uWfivipz2s2b3Sz9Pt8R6GXIxFxOIRV3M3VrztgXxQm37S32s++b7S9gGgo1rpqUSQhCF QN4HHyg6CEv6MwzIDf49oUFkkMv0dGgI6PPrRyMMF5tco0h4/TyYfloelatOJ2ks3Vc3J66BcUlJ tRLXq1jYCtAy3ul3ysWg4rIBP7NWni/NhTQeoK+/se7HdA698SZ2/B8M0GHcr34Z8Inqc8czE86J hVYBnBTtYxDN2Yf7oep3ny5raB0+ZYgFnRSWvuOsxLRX4dh/MqdB585+kc+0PcGp7tDQjc3itH06 yMp4ULPNmzgKpPCYPTWCZ6NCpO9hSFqy+rhOTAavo/QFxrUv55SXr+gqmhlAksK3s87nFRYJW27P hoVQ7oe3ZB9tlVb4vT9K/8947hfel/RAFTiTqmmzCbLLt3vYG2VzkwfRiALjsCCqT6/a29IqPw1p TPsrLPmOBvFh53aio4Om8e4sqeI7esNsoDtb0xe2AOzMLMaafy8wqynKirZqcMLml+VFyUWG+u4K BrOSXZzl+d1VywGkDaE054p0s32KHuuxGYwcVVO4GFFIt4aogokPxBDZ5g7oehsUPs7zx1fU4QhQ d/tSjHBQifoegtIPH87f+7YmuJXaIGUXb9zL+OzbWQOEsERo2KSZ5+NbULY6qxphWzj388KhOHNO /pCHwSCdrddafFAZNAVETrjw8aP+ggjrf6Au+NVuWirDzt0ZWHW4pvxb8QqqBcxO03iT92v2NVxT 9yIoaIexX4Yh22pJboZVTmlFmRqZ7XGxQNVbPcn0dl4je1QMuJ51NprUIVZzOOG93UyZPgXJE4gV c4boVXHrkHLGfz9Qg4AXZHWF/cMOvzT05QjRuFB7D/KyCyFURibFOYxk/8Y8ILZ+pI1oj94q3Iyn 5gktAxqDOKN1WYtwzVDK8mmoERv6gxk96OlByRqCO+OJljgmii4UuytCVMDtg6rWnlHEqTjo8gLx OyoFzbI91fxpFGNXkiCYpnKmTZOPyNgSXfxVUVVzX6fA3ysSCMWhQklJsbl0LGRfMS33xn12+Vih Kg4oWFUb04YsrfPztVCHG7A6NKtf+Op8Mq3X5D1RrMWjTWAFWpNekRwXm8flQxpfvryEUAaWcwIB kaHcdg1KyP28hgoJ51Z0L7GpXJreMEiC1Z95+uEli5kTkDCiItIBo07CDbI+83T/PFzRU6agRrOQ k20+F8Aq7/ir39vYXUCFUFpVY9SeFAenD0LULxMjhCVPnQYblwfkTwXVFkh0t5bBtoyBDU5HcO3Z BHViw+WAYQpC+snO7nopWrvuv32igu2RHyGz2ziF7b1HCEIg2aOh4ZsZrw8VhWgTydrlBJmyibmA QIBOIliIpDrKi9TMDuziab5/LhaQuYp520EtH+2l4JfOV2C/aKKt1kgwu+M+0aguk9JRviHZbz8q xCUs7Bm4/5FunX/+3ojSHZEc4a8qcwc6GsVxegk0tTyxpzksnBZFu+eV9q82KEgbDYXcZlKZ6aLn NRa8CXqW3FtDZepDCHf9wAnBBpGuHSh8Qs3Fvp9YP7klwLkRu+22GNt6Z1sZfYGfbTrrZ9XfQ9bA jtb7xlNAn6lzxzsMc1LrYMv/pr16NsecfLIhwTlyxMXz7rJgr/vKQcyp7b4xFRQG8Yp4rufdGfSI xzYVmXW5EyAEvnBX3mCvOawMtZFR9w249F4M0/VXwPD9AomtBD8AhpxW68SWwL3vL57F/47R8SKc Ljht3AUGJ6NNP2SwfBtb1VY1+ixzDDNmzrwI+QZdxqoAvw+1AbxW60ofZ5Pirk1C/qGRUEvDVHmG AqWtVbhuEjo1jv2KdOTcNyUABQJFh20tibTEn9qNkL+xSgatzcd8oFCDuv7z+LQQ/GCzCoWJ7H4H cgrtGmHm+ttZlbF4pb2BuUJDZTbcsCIFHhcZlI25Zajlz8xOJ/Xtaf7H/8s6BvIg4gjNBsKsVjlq SkCaj8u9YzimiEehB9m35JETeNEKB29rMohfDeBU4odPiCDWBDWFFGaeOpPB8JhYk8ef/Vx2o7Us DjKwZ+V0EgvcUvKWmr7hxgiYzA5ItsXb8vYFTMX019rMAzC0FJZ74s4Y3eHSIRaLR9qV7cvQBJCl 40+MADPXpu/ios7YvuaXpuI5ezRebAk53D36iLrizNnvi6vH8GWoYMs6bhYTQcXv2pdZixVf5ySz NK9ktDjC4unaNq/3pdo1wqdZkq9JkTQDQD0z+nZ9ZDk+Gq+Hw97V+Oaucl24jLbJHoLf9rYDSpWH WoBEitESYV7FA5J7Zxh8LG/oXhnMyWVjo+Hpj2E/W+M0WDilyYBqj/6SxotH5Kdw1qe445viUrWp 5IB9VVot2nXz/GUKTFozkbClhjbTaDwYosD6Bi270fU95UaBkAqp/Ce68c+aEUMOYFI6OYoQ/1zh zqCS9W4JzgtxzyNVgwI1YjFE9LVokWC9jLDEqElaV7s102twqSzpIlFjqq2ALSGtsc6Do7e+E8xM GyyHpscC69le27KQ7bWAz/LPfI+5kqGcyPzTJgZfXrznC2xHbcvstHUDaogzPhQHv43gIUuG4MGF 599rYQjyhdpJkxQHcI+qKKoZMYmAutpXyldyNM+iSmhYZyG4uEHPwbJzhPYTOc83R2hZVcbeHt+S 1SsRx4T5G8Ji3UHyCo/V3uC+PJ9s7d0HUgiy6C385ym/Yq9IUF8XqhtKSVsCz3avT1RHIarq0ocf QrMlFEHeXe/bp+yf93FngclS4bDtguiQx9NJ78QfLIzkfOuerSfqR4M3TyJ2yM0oHu8U2bJD43ex l5H5g1TyckaHmKfCLF9DxW7rlNuPEPc8kX0dfaQyxBx73vOTt4ewxOilf4AN9dIMJixLyaWHEwXv Z3iMjbHt0mQvDMqcFXs8UDQJvRbnfobRWJWG1gBSdPPGdM9yljqWSbGZFLXTlZxD0O8l85Ge2N6m C71Mns3g+BEI4gialdKcxwhliLMMUgU5AVndOCNcQqnYFNLlJCDHryB4QMrSvCX+lDCPpYQCSev5 nfeHbb2RtS2hYZUCEPezdJcHNEaKBrJ6aPlSOqKoVJr0sgYRFkiFByxiK8a3pgj0H2JCZqrZUB86 V+kQ4QvkCe6wamadxhoNLokaEk5SEg7258DKAR0cY5kgbVV6qJJS58kuHAE2zSxTcQcj9KnC5eZc T+csmKnTcKm0lT0jeOUOvrVuvPPE/vtOXp123rmi74Kc/N9csIMjX6cyAMoP7Oci5WMfqjtH4EPv tUNsk3KGODcnphANZ7JzfumgS0tA/Lx0KUK3XEsk8pX74EG6EvJ7+2fWdpBDVd+sjpD+1m8VIop6 kpe45wDR6gmiAuECiDYQwL0wCz99CJfycSXuZF0PPvf6MT3df/heaXCJdPyygtmvDcY5x+jN9EO5 1q7vjHkoV4VcO0tATBor0S2EzSpwiCm1qTCBoimcW82e9IQ0WQShdDxRcEViANzja8L2tCQgqFE4 Ku62gNWNy+X7MrS7rntgm109e6DA9HxQ162q4bVMga+FFJ2Cp46aCQs44oYn6ah05F21lC7F1lZC gopl4LWNySyAvBkqs/cQd2uhcLI8X+uUgKk+WWkaDUSB9HIewEISlKKPosC0IK1xnQupbsUp6Dg1 4M45r4EdT5C1qz+A/TcUevQP0S6JPVdDKB6FXF+tvxRzweNBFA3fgwdc+a5aWoLVm2n8SU1jV4xT f9oA4KlJfjcsUWPNpBc38J3qS8oKU95xfMy9ysaB1Bnl6p7NnkpMuGzw85DkKbqnRZzKVm4oCdgR rPeLD2Mi2WgzS6r/vpGrMrF9HEqU+1tXfr7k8Er8hw1CQ1nbkiq6cj88Z+5WLQ4ATSf0YtSVZGWZ S7BLX1FkjKJ6i1mfoXd3fwszfBA01i7GOltYTwJPg2z9M/7HrJ6ViedHQzrbaBBQvAiIlYDxWtf8 OkFWqxrt4PEmKCTKwuSCHBJEO/jx0jdSmhKHeTdEUXd65EJZYzr4yO2A90aGt72Z2ZwITdJcps9r wQI07hAiMnw0vr4k82TCuOz3THiYCq9QA1lpYBbPivBMr1Y3/TwYjpGkGpz7J1b5vX7jEy6ghBIT gJ439e0JabuFe3pSw1kLx7+1wqUIdv15yOxmpb4asFFHgoOyg5XIydbSU1W0ixN9dPV/XBzGYA9I bGezC3sDlSrEnaDpQm3bqf0mAQSk+ylD1Sto61n75JOAKRMVlHlTY4iquIZbPB6pyrCG6em60/vj +Nb32XUzhAlReqYQt3HKPr5cLvnC44Wxw+KUgYb7GbgBMjriJzbsi4C2oQfxqzc24ctyrDgV5f1/ wA8JFglk5jPoBfJPSArj6ujKTINptarUp4jFdFuVdVmBPpSJJoucLhdYPcJLGTg3t/Cg9QVCRKyR +pNmiODbz4c4aQaUErLGRu1MUeUsqESBjH3P8Zd+A1Vn3ipnRIRuInu/9pgCIz1YStefCbrQdZWV jvAcakojZ65UpHEjzVY4PKvyy1Upu64rxr5gyDW1244EtKyyRp//4dv9uBuXF6ovxMyhcg62ccbv Ms0swW+ZybIaEQIYJtQ+eBZ/Wny6BXjBsMwaS4IW7grqJBLnvgRIp8or01SIE9zQVk/l/4/tSoxf qyBb1/FX6hhH5yPcfXxkL8Bcphxh5cGNgUc7jbhNt442k2hMDPZWpA/VHABzF7wecf16CUuEq4X5 z8UmrGwr6ZwjSXsvqUES8dAJyZZpLYYUxGCG10anVEX6AcvtBj4y2aMW4aFVmBNPKJaVf8ZMR8Mk DXHSrSnqZXRgI51ZSUja5sstfexID01tMFCLpRUi857yMKvLgB8tdR2JzrC/CXEXGm+vymLcqcLr Yy5YhcRu9r2+/hZEl1TVnFOFQGmbebDLKrJJWbuXAKalFv9H4Y1W56Syka6s4br5iRhQQdUmM1Dp 4xQD6u/UWssXEZ3IT29+rj6/cBZIc0M90rclvGnVxnwPqSBsNcLeGO4cWB5RPrxA8NljDKJqsiR0 +L1wzEABKIQoD/licS+pgj0nbosutXvANHW6mfTB8iysBxl0g4ddGPT4aS5Jn4xa6TLywKWeCLNM fsuKA3hCkyOyz5HG/CLBQ1wyzJ/zW7WsHyQUHn8hmq9Nfb7CIeQN/dGKbrtpIWRqE0UKvtajeC8o KtMCCVQsRGGscexMez4LZSqopTvn+l7qE/tmdkFchjJqeRZY5i082HSyxhYUDvuwTKPYUI7pMRcI u+yKWU5rMRr82BbmsJGp4yDcH2B6AgIJcx9yFmVw+TYmzkPLtgLwVufRvV1Yth4QlNGsPVO0yXLy rF+5yboFgwTniXk0Ef4FbrBDvNLnrCy2wMXxfWk1iIjtUYgs8BUjsVeOFunZabdI6L3uHdSWzg/O NXJdJ7vNUDX8D9htUS+NgpVAl3oguI+yujVhhDBj9uB95WaOjgPW6ABtSrUpr+BysuMuQZPh+Uzx Jgq8OxberTWKDuXcepv6BcqT9Y9N3q4KKxA5ZbT3MLXiekQyU7N4+06FRm+IWsD2st8Tiw/coJ36 ffgQOF9SFhaD3P3sT9Xr2sZ35+UpJWeCEcL3CoXta3g7nx1GM36Hao3861ygHh4WRJqD1OezTOIq 6+3nEGWoWb/wP9uF0xEHfCIUEOFg8quYP68ZTrt4W+dVKSnqlrlqIzAMMwDw/1yd3zGGSvbhgWTe BcsBx9VnRaEAiqa4EV14/z2k32pGwJlDARNtX+42LLoBAyehPwLDoHLoR73nnjeubBhIY/6Mb9Ji pXCQt1SAd3MRoeEKbmD0MOaZvBDoxT8HJidhaUEnItwuvL1RxJjTKpDVOa2EeJdCI5Mp0286rX8n puEv8ABvRmV9LPqb8TLbOoo1FCmbrHIE/dspbfjon/04qvXZzxRyCuzqTeU1v5JMsJd+ksyx5N4P sLqD9EaLntVJT5s3SipG/vIHz3pWKC45yxUQ9lIaDWYx/K7lS+L7BW8wxPSey6bknQMkqz1Rz1kE Q8wZyojgTZO5Sn/NaS10emVhe7f2H8N96X0iBp2tmLrfbEfiboGK88g0PF5IIXQCFtDOAHbEK0vY OmlOGZe9W6Mnq840uwFgoypi8E91LvvJag2nAqQwjn/wsSBnopxgus1K6eajd68+rtl/k9qqzaRi IUw7VK5eHb52E770KtNacxrk/7+bKJZYghGiEO0HO1q6BMHjCGvO2WBTEBfk4DMCSunDTsnf/cV1 WYca422ZgJcB7GeETzrU9fysAsp9pHo26Adnm7nYMwFv+PMLaPqytOP34o573HREWEcK10vgZjc8 GBBqIU0RDlOCYULSrMGEkbKf09bwnmgE/HcpzMayUPOFnR/GkEChTMu48Y8O2I3OLpKkugkMAUCS +/1gfQYLcMjvxXgY4SxSHZWDj0gHFgh/owWxelvkGWDj4/Z7JPr0TlDv4jkzhqiOjlNwjtvvHXFg 5ozPyYwIRf3Nd7CgHlP+r+/lfOTwS7RBEuB5rJ6v0cmF2WU1MmrPl6+Lua5jNIPLz5nJLL7AA9ZR DgIYa1GRwYr9zsHOwAdLmW1asc519T1hs+MJZBSOOpuNEs9acUUTEsc0bBkQaKfhcFNktOuVBQnt Mq1Y3KJp31BPPYuNM9JnHdBCtYacmIH1leNQsJFnFAtSlE+RFiDwlXmTROk2WTS5L+rqu7I1m+Ll 7BUIJfd6PesmQWpS8f/L/CkK83SL9X0HLtbTywGuSkG2HVitsKM25nsBwUwTWrmfEDOQsk3XRe6K +rA0BxfWikArQaluBIDEsFMQecS7YXC+ATrm/R25fy8LZPfs+yxvfY812XYo4CgIBb4l9RTIwWhx mVOVqM6KseaewVIP90oOQ8JFHEOwOC9HNSVjLswF9M+4f7EwMCbxzbqLJDfmf9O5pAwjWhHNYXgW ts2s/Ih0FOSUl/ZAea3IJxzM8MZhoFE+SjdQw030ugw5neIQzvT58qiv8YOAuzasm4D4vUxUPjsp Wt4nhvTcTu07Z/2ii8NcDYOLbkqFjcWUx/yL+A5nKxdSSbRHfdh1699iAEYme9SyN/CDpUEqWPe3 SbdU7G2CtgWTOcXoHInZgtaUnuYkTsc8IRIACqdHmJsGtRSc99vo8k5MI7tJ6csvsR8wuIgAxAnY TR6Fc9e2rA5RActFanrnsdj8gNrxGnesQJ/Hw1m8bf1nM5bGUd+y2NjaG+EJrpT6nkwMCd1Nhah3 jDMvnvyadXqx1Nv1yEGD3YJcpa0kVXDDh34wPUZWFwHMGWOviK5ZS2lb56nEEEc6E4jZ7gwbLXsg pQPci2NPmrpnqtrc9MsLNVg0HahZFiRQmqFU+itRjGBq3U/gfLULMaGpBOxqQJvwdmuz4V0D2u0Z wi3+N8Q2OWLCxfusxb4y2CACx+a1ARVJtos+5EkoCh4CrY3LMqOujJyxENQk/D3bYpJITyb5C/Jt VLmP1ont5nbTOrcSaOGKArhI7EKvpXE0jhFKnUdTHj0r0oHsZh/f9+FouvYrqVt8BiXUyAZcD0VP 8+asbDF64sOYzjc3agCIO7HQye9708+bhFyo3vqY42zk4xrYvAh3ScznbKHR4/9mm0Iu9i0LA7cr Ukz1qFuwv5qJsSdi+l1G42mmf2s/xxWziu78rVB1QrnRsqNGmLiaO2NHY6xsvlLE4znC+TAJQ0o+ uDQGqkn8LITR9Q8gRRBesyqWVOY+u3ODyDwkYZWlbtGvPoEPGgipb98jrfifRusXz09gG+aQKWkj v36Oqmi+Se4JnNu06mGasJfoXb/OW+A3FCMh/mzka/B8ve0Eed/gs92QMRFQGCX1oUq8I2zpT3Nm zM+PMG5w6gXw57bu8G9esBoDxxN07vzzm6aFZLjVs7s8Sd31D+y+xPR+77ISmoEJJVaXLedw9mtO 7pvWw2pWCD8tjiTL8L2tCajdD+2fkZxOUc9eBPqdYC7YxTzXrIKdecnn0IY3BZj1c/ssmeCocxBk MkWZd8qAM40QONUDjTnhQKhdQIHYw4VLCCEBGA9PG8RuGkZHozbiyiG/70IgS/FFKtXJ5ND51krt vLaYG4JJTiYOvnJ1c1SYFyD3LqlAGj/So07Td87zfGDcrbBx4EXjVqW/FjbPtLHRrzftGQkw2fVW Qh/3BSf1ZFFFLuBeVp+ArMDnVQiqb/qM97T4tltI70Nzop/o6zisKez7KtAdpLdz4yapyS7XMdwc IHAqy0VXjl1wlXInrK+g7G4XG5XVYigEeAiI0I8nf9YqK9h4uT1WxO+1SsnxEAV3tXhG++tabPdq LFkjqEYpt0W82mO9PglCkQFd9z8Cb89Ny0e1q9/MtMIAwV66dFFudSAbItZe0wKHeLjC5Y0N9B6C k/Hejle9LSmZuafqqhQ81zcrJx79li5ADnJrGZIWqIRLZTDxmVsZQNKIytM13fmP2qvEIe9zcCiL FPRqc6sfaZeAmTIl++fNUZh/dM+E3lXquh8vUWoVNfhOrDdc3eWthDBVjD+NhxnJTHPohdlXTha5 8UvT6dS7YRxO0mP3hRRl8aHdu9Q2k7ogb0/qMM4JXlMXD3cTUZjv6PNZl381JqT++Kqs7lAbUCkP diO6RUz4yFck/kkqKB9hW4sBm1VcUQwt2vRZ66AqT5uQNm0jBPfTc0z6BaDrpDxlJxagveaqvks1 bGYaMKF7AZiF3SW2mX7zkp+xZYiI2EYq5b4aG7PJIwIh5YENpLJz954PR23Dldg4EjEUYMl8fYlu uc31b6/l6Z8B3sx/IHgiCqWm17TuuXnKKKso5YrLk19ZNoR2TD0yUTwmXnf9HBFw76ZbXL33EST0 INV6NRRu+e0aGvLGccfzyhl27RfVBGsVgasBS5XTk1ZOMP3v/+CjdI2O6C0Z7nHgD5sAAIcijasw h1179xquuwaru2HZwzw2yJd4DEFpwTbx3OTJehIoiRwbkyK+YPcAD84fXa6BUv+/mTnLUe73P4Yw 61BMn3K2NST+dCIDhxDzuxLGIoNZxWyD/RHIHhe/kgNl2aVW9PVgwYZ4D1KTltuaT2zJQGrljrkh 0wpb9TZcGc2mjrLVdmVqaxaCg/iYhVd44sr/BZWvO4Ugi/vbcYPJxe9u17tt0p2Ku0VTCtc5nM+R RqYOgPQ/kBx6pXnMyIY0b/4kbkOxaRm9dmGXRWizXE4BDG5DjGsvC33ysUgV+inoAt/zVR1K/tkU qg/EvTOIfbNlZb0EVRjuWDjzPAEI7VBcpSTrMiwItBeO/Uyr4fSD6XPAjgQfIXycQh/uGjPSrZuX xuVCbcXDndojCpRqS1QcpkMC27BSxGfSaMwtAhvdQF9ARtQAHM5AZZr5icjSP4TbpJcBHtuIXj10 qGQs0sEqI3EHv4Zhiiaena6Ws35Uyu7l97M424eR4APl3lBR74FsaPwSt6M9XMnAX9JtDog2D8zp zS8Fa2wOgaqUc6+iVhM7Vs8C1mFHVdXPfHfqcwHsCAoY7WTANkskYuSz38RRTNUjruKm3H/Yc2UH zBTX6qrHd3Pgu5qCN5IIetjb0mpGrvwRIBvzQEFsqLCyz8bBQwvk2PK51Ki6o9R+Wd+0xTrNxvnR 7L5Am2GZCNgKHx6oJJ4cylGLAML/RqTvh9sK/r0pk/IrI/Og3PT5R5XjTT+FVn0GbvvHNVLK8bJa EXMHAcV3bvny6Pkf0M1+f3fxcPTGTgTFX+VMJj18WIMQJD/IokSrbiWWBVyM4IB8DyKOrs1nbx1v hIN5QnkpjOxbQiS2RYIdIecuyJdky4IU/xu9vG/w2R4wNOsWnK2YBB7HzVTx/1la+yObQZGypOXd 2/peX17NbTFLxhNFZWSpCqAmHUhPfxSnBSvgH/696dZCt6lO3eDKG6QFSiuhcSuBbMTbEzfDuhzP zjvPcyfuw2znnE1zzwUCF0PyZrcKRhAQm7YIOreTDsTVbUBlUtsYK0/BOQRdIZkOYPKT1ZhchCsV OnL7BayyEeOx8JCrIbMqfeWzmVM7ZhnFDGsqGnToSBMYQ2J3pLWJIINn+mLtYSMmTxJbUR97kY3E 7fDA4cUu35iwJqlD/at6DFJ/PqUvYktA4E94b9/QEoijk1zCpZfuJg1IA0YpNNLXaatpjuUCrEjj XsTwbYr0AarmnBXE8jAmjTsYKMoXPyHCCtFuHHUDfEuosSi2XaskV9WErQFs9PH9TF9n9tjgF5qR bebasa7AUGxdBBwgrD2T4HYzNPWQkEc9FuYdH05AS8kqIwCdflbwQznoBRXMnTjtKBCbUYuOwND3 jIZgpe8kinUwrcV561WlJduHpNJMC6ImHp6cxJVANULt9NudNLHz7/MwWMGPAJ6/1O0Gr0UdUrDK H3W+iav5ktq/bksmOw+dora6nhowbaczYeKr74aG7Z/U7bN258qF8XCWnnqgeDVVrJBHx5sOp466 Y/Z0gq1GGJxBIoMk6LTjuX8GxouowVDBZPm8KI40WbS3tcn6UKK2Wwj0tPbYspY1t5bKUoK8vBK9 wQrQj21up+si4nOuiVO69gjy+IU1V2kaj4h9cuqZXrCb2TWLY3lc1fa7TQpwHC/HEQvaHbD+0Qxm fg/X8PiMiUB2/ugJXIBk54s5Spbjys78WUVRwzyw6RrtkU7owCLKHyKPe7WprZhfxX6l7im7lKeo l9aNZE616Yh43USa2v2kFO4i6vpIN1bqdqyltxAE3GcpHscPR0qnDNELfk522r5LUHq138unAk0V nHJu6+Xm0ZBNIKWsyp0syiwUeHf3BtYnD3sVwiLHgegJQlyOaF1xFK4SnnnNQFlm6BP3qIeCGnGx xh9rp3AkqTALUDNVpD+LLsO8I529QSFbeZno3O0ikq3jyLCzyM2jxlTUyDM14lMbxFlqFBqtZy7+ t2IOfZwa65xQkoXQKIZMLmH1E4vB57g62us8bKmWnlWSROmVPme70FQiATg+/NmjsVgphlZ7sAGE hw/SQJg4zfJpmbVzL0QzscpHF657AUWe88zvXDydfjqzQGpH9v0hooAVW1hrua7uuOfbSEW4l2IT vefIgGHEZjxP4vnA4UtB+LjeG9IxCcgq59veUzFStSj9P/ENErNhfuycRE7NCFE6Es0kfs4Dyol0 iiLyD2VvC6x61eRUZKOrrQYQcjOTJOzBskQ76N6BXFomGO5jwgxtNn53reMREp426KUYRzXpdqT/ jNRO7tSy8vrzOgyLQSp0cGmjad9qFfG/dzoMlpS/Q2j8DkWjr3J9u9D65cZyDUoAKpw2jh7U3Xmb sKAop08CZ9QjdXlJFC8VfXChm9dH8ngSzdAtmSDVML1WR+WJuoablt4CAtZa/PCuprnzcKDWiIJj C3np0H1c0B2EubQ47cbTMJuIZrQ5AhdbA9QXc3vMmEpiZvlG6mjFgJHJ9QZTSVXyFLJ2ka9IVyhr leNOaLpUjom6O8UtT8EhG9CpFcvUDxKgcmNcfVGWoB3i0YL9vh9GOT4idtD7kl/t3KT+CQ6B6AoT Vc07zWO2iaVQqzlkW0u/d7PYWKsXrJwgkSHcvSPN4ELSq/eKj9PTo3JqpGyc/mwqBpvb5EOeIvWf QdPVIYjPRSHCLTX/OTVd8hcJGiuSPe6afLfiutfSKbpN095D7tn0ZPREhbYe8an+or2UehALL1uO 8Y1lg9oU/EYjJ97dw2WWq6ETLiDKzGVhb0c2A8qql3HtX20BcFhzrL582n8p9q7ZEeVqYixxxLt8 /Rf03kqXw1r0eOc9CZW3pY2llHfxtGz/8phDT8fFCcFKYjomq18s3hZUUseib1Ecvse1ijO54S/7 yPcqEiSWfOSnWVznlYhpsE5oDPT3Na2cbHxg7iKmCm5vJKmx+NX6JwR9TqjAWqhBodnYn4y9wbH2 +jUvQQ9M112ACCDTmY7wPGxEwyvUAcVT47wBrlksw7Gso4TT8wqLX2uAimLBRz2W0vUVhGh1rpWT nN1iErJxXmzi7DYAlsjewQT/Wqpv3Ui/CBDCc+NezqybWNgcMHn/NbAGh4+rf8YyI/VfHMqmZbeh e1YUowa8eCfd7lT2P+dpUtSUXwieoAdUwr/IOXp6iMXINo14nJMhDC83/uTCUsfRd2BAp8GH4D4n RcVhjyBxV3xK2DZYya6CjUZkVyY16uUpS3wk9699mS5VLHXIqNwt2JNcnRps4nRqjJwZygFljaEH 80Mkh06qftwPmbHHNIG4AXkJnOYyNrPXJJKggdst4mlUD92K1Lj9G5kWKZIRYv/ESqN7tXBgRF4w aEYtuK6X7vKI/8NC0HaKj30lnxJfZogUzi+f1scEw8eodvVwb5KvisCWcZOJf3FXqwOkk8jGKHCn mWqGVx1KiQSTBxGNepOyMfUCLOAofjJojSxbOuXmOkkFiCRhNVLvHMg7jYjUvltR71KDu5+lnu0x Z9jxtna+fn+yo2lmJXJJl7a1ifBw6LgERFL1VAAPI9K1/WLf0H5TndF0iUPx8F3HCCvldK0HSh0u XvZFD14M/WcOLpB0pbpFLlRptniONspiwQRBrhY7B0PwYFxmSeDjNFBmCfu91WI52RGeo4mNlHLV 8jK6TU00zkTABdgqf+r7kC7LBmJnQD1/GPMnlwLAJY64w1U2TXJNTxtimKuu4Xw7pLdlLeNPlMhL JS3pLFVwK7DkEyBri0FmAQPVzWuXl7zbuGc2wb0oDEIR/B8DCCr3zIx9k0UMyRjSkam54eRF0O4O siiFh8vPIjVT8L47VywIzNPziu2924agXEAuQE/1RVBVHlHiQzlRNKHyvoibXZfmn2a0UifaBBGz sO7BT5aL6vdA1D5gSPwy30ttLBLe/3tH2o/HZRg+mId1lNQYU4UYeeKF8ihao9lFBNklk2tzukDU /nODmmmIt9140/GauFtx48nTWYXeYt0CMi4rdFjuSeAcev4LESqeszPWK2kepoc+aEceqZj3PtqH vK8wFHaMNUjdjdTUXEKzXKcFrBhbAfPtm5OpVV/ijrSpUUHdT/dFB/C8bXACwFRuD6DcAZxdMZrb iaH1cv5v1GH0rpkWy6JqsSH8nEK2Rh8NV6j+gOJsdfcIdGOUJAXJfDTSGPBsLteo2l0fNjI1Ltzr kfACg1IFaDwffOzpl3XXCetwUpP6PK79KmQXfFaB7UXqV4lOIrGhxGocJBwrnk+vwlJJnOhqtUch Zl2nmOqBLsaJ62eZeCtefY/llOIuuk14OodVG6WXkn8OzC0SqKMgYGOJZzSnRxDDo5nFvgR8Nb3C N2PyZsLgdsdDFOfnPFkUKAD8u9CS0mPdrgVw81R/mckgtKdNQxBhS/McrcmFEWKP2/ThrF77DlxM 1yV2cJ5VqKmSuxqXzZ+zrEgMfsRMh0O08xsNkG5judQWMkFl1LlI9hEsVQ6teMEISA+SRCeFPo0z YOlzyYdwD6d72gyGC/4+c45sUZyH3NSpxHLkuXcdVENCLgQfnZP5bcW2LkjmWT81/Scq1XmDM3ga 3ebXO419/fs091DXIwEt4ag8uRdkUe0vThjveludUDels3suO5yKiJF/5+c6GLxcETJ6Brvx6h/e pWGeaaqnimIujYRdJ18mDNGbrC5VJc7ahJSa5eAGRUWyS2MSRLR/Wkn8qcnq5g/MqbpyKixPzphe j8rmrc/JNakxS0K8r6jpeCA9/5NHTS51Q/9PQFeYXOo/DlpKrYuTIsUkLvyedYFxnLC4C/THyKzL HJ4L0rSEOyowvwk35mkaSFEhJomdLWef2GwsVsApZwQTHub4vPFRYVZF8857yjLCxOtPgvVJYLne VKMPDrdt8jg5V06svc0qXA0sD818OiU1cYZjfr4OdcF3uy1i7fIVahmG/k1rG3vY9WNfFNUbFa8b 3o7guiAP2I1JSisQ7scykUsf3MUD9onyL0/Wtjj//ZTVjBRDT7pJ56YFCKSDHn886fb0ntbKtg5b NJNzpTjyL6+ngryntiQfzIZ9eU89obVBv+ATVLRwuuoh5ehr9BGOxjFbBEGE4hET/nuHSlPzZG/R oPX6SbEaeZdhoBig5qYQVMJatcPUPAz8GyZB0b5FOlYREpe9VRU/WYJwJwt6Vz8wBTqy1vf6LdA4 mN4+fPhLIN22BwY4PHZuLP0EflsXiMCGGhDDW+ENydSuc/0bN9/OgvEwCTZVIRHQs/acLvUmBl6w MXtvoIpcOUDHixbMNgzh2JylNUBM5w97N8+jDp6WDg1ASA06w4W8qo6YaVz+6xcruqLhSLuS/YlL 6Ccv/QCiN/bmWDnv9hh67xoNYtiXTFtL7t/gMydVnxcYK/pAyV63Lk2Zk/Jq5I+brvRDGJ1XagHM 3Wktwt04XFAVs+ACNjzsO1XgdmdDt6sFXtwBf4jhtJGp6F9b+6BO9ynYtNMDrE1PiaOhjr6bBKps KxrIayXElOBjZPi41n4qTP7Tpm51Jl+0gH95xznIoBTd2PFxu6pni1mgsS6CFpQ7ZX80IGNa1gkF qR/YkeB8JHR4vyls+P7hcHmAbsoI1Vos5FUtcOXntiJ6IrAp5pYYOgMwW6EIuD5VCGECnwI6KgCV iapDWqazmdgYqZg2HgTEFvAjfAMN9Wr0kJtepnLeHjdbvA0tOlC19hK3I/rDpk6TcRY0Zvgw5L4I GErNBXXfsUY8Wp92t85R239ySeM3cW/46hMDbW3Rkt+c4UY5g7Pf4p3NXBUeLnEgeEe47eamAecf 5sPrLQdQPWKqoD5gTAyJ6i0Wn7jd69G1frUi8Q67GUTXAJzUbg+T0xVcOQIP+Ay9wKzbFvEWTU50 YRpeWzHMrD/2PAwLiJjHhecWRtDkGQeBuNE4nQhmSFYxczVes0gLRd9fR7aHmroOyp0C1cRP0HNg 8Vw/p5NvVK1fzbtWmSIZW5Yox14cNQELgUqxsizUyTrUCrP87bPjLMCjd99GUHHgYYLANgvf+FqU bzXK7IcD+88OpBrZRuo2ksWz9refK8TcyWQ+NMaa32bJtWKP0VVz2rx9cxe/yMlIFaHhL12oMqOt X0Rf4ZSVNQ4nhCVz+k63i0y4P6PTtkzbO21yDaO6pudlUz+7tntGHBZQLfUJiNr2zhz1f4LZttDg P3uJtUoW14DHmEAua001W9O7dUQsMiU6dMffSXSXkVnZiWHhyUMc0tiQfXmIDVkBN4xdJJKapZLX hXXJDtua7b1igFxySfe2TWiC/aMMXvedFHAdwf82FY+VpNLOuctNFvm4s72ByiYlEaaCI2KgFl9P 0wuJnRelHo+lFOVihZHB9wpee3otOhZX9Q38qhUxn8gGLkKS2rzYG5DM8ZVlhsFdiZdna68wUlmM rLXXTkyKMyKrkLBTTdjEoVmcn1aHofV42A3MLHiXsZIIV2K5CGfBxsC+Ioc3qTfrYixSe0Yc3QTy wmQGnqkszTAQkWmdAqGmBZ2BVX3AllwMZxipTs3vSOuMJZ6gjNagIpkJL1WRO/9rx+/o/SMQhgIp N/0FwEQsBqxy5b5LmNYQpcHPjpez4qEY9jbXVKNuVb8d/YnOr7uoZpscgtfqUu+yAi6ZuiBUzGF0 6abURZcsCN0+qSgjqMpgZ0+eONpfwneoTqstEPZyqROl+aGzmetQOpIyrPGdq7HpKEg+f1Dyq8nx biuamVGAfHunQfMt7bDzD+swLsfv1A9X1GZbtnFsY1pw82YStRaN+KIDPl2izgczSmg/NCmrUU73 YcHgK0k5JW8qiXvwa8Eco2S+8UnlRTnKyARUwWqaP/8rhWdVUPrE56pLlnid/hZh/dQLY82qtai5 wn7x7B3s9a6d/3Cw5WLTZ4d7DKf1GB/7Mfu2kqGs9bfLNyLc+u6WJCFfBI5+w7zSkaHcmhyFWI9m UY5Dq+vWKJ3RwLt3gGivkelvE7P71JXsj1BcULwkOtQLVFh7KSXAIIDzGaVsOu0ZujjvMXjYTWY3 0PgFZfeIegRKTBic5RlmnIz+f2WinMacf0tXLxaqZwHMLuKN3qBWkvthQMBZvtH9gwrwA9ZvAqKd dbA1hnJ4dx4GwDNhto1GggwStrnzryqLXTRxbTndk3A+bGApDVLHM/Jsii2gbNuoJVQsbRwnVpcv XN/iE9OHXna/eJWs6pYbLqSRLkmMhZ+QWBes/3WcWV/aBkY4cUIlHpcu2gr1jtXGHGriMAyMkZ58 dtSBmoGpfOJTS1+zt+tLcBpqCwB+wyGP8cELtr3bwQXqq7Z7Aa6Gd2CpvU4BSxJmdRlyFqIy1osY IkKiPnhll2Z3O9XFKIEoWYH2g9R6ryJHmIe2xrpc7s4YDoyIITgyeDmWBOOVXoJ5uolwWFEHTu0G yJoZ891Ejd+Ti3/3fzl9EEDF6G5Qcn4FnIQ1aNHuFD/uirDdGBpDMAS+76zjf8Du+AP1TNWmUDYg KDMvyGxArv4T738AdiPavHBmse1IcZ80qwCRSXpRj2wOjAKhqAOHtFKcj4KSpkSRJaXK2XmNkmGF RHSl8aGWwXQZbj2V/Ch3zIeW29AfVc4CqgABGVnAMjSYWZIkhK309GcPynu8+OoXlZqyUrTbi6Os z56Zw9DcufeC66VgDFstbUSDr5DMR8HG+n4E93/pEoqtXkzbhb0waHyJ1BeQb+k0HXnzCLQF5JnS fdZ54qGOaefzwGsiczPJ1oEW39bbRQ8HH9a2T0aI+8fAGWdNWCfw7r4zpwWwbz0OJPrr5wXkIYhJ UI1QS/BlT+JsJ6Mn3IUm2LLkWSDhn5lVWLY6joJhKFWXZHJDFsOoEaI23jMzqaaX2bUPc2LaXhkh f9eqRQ3vk9AW4F6XDMSv9ouAQGNwNMb5REl2VPo6lDdb6Wqmm7sw+XDSBPYHSsLSJK52dJmjBKO/ O+v9tOgkDpX6jl075yeAaW3luvIF5J4b80/BYE+wQ3dNMvrI+GL7vCdm0xDyc4r6LHUPDzj/kaCL DmayVQQ40O76EyZX/QVXYc27mm6suaf7bH8yDaRA6o+QPDDHtLEKKUniyQr6d+1e4PxpoQ6CBy5y pN8kFpvlgPVwr6ocDK9UQ+t+U5Ma2edFPEAQN9yLW65eklXV0CequzY4mf/79HiIHetioiEWpDXq cpd6ti5tTcktJfFbtX/ZP6CTi1I9N6cgoXlzAOhk8zBnR9yHqSiji7wKtYZqorSsC+nXeT1Zy9b5 PQisjT8QP419tA7kjVjRILCnOEsqEf2AgIiuBcPCaYfWDNsP//VfwWl74WFUpvHFJoiSntrtQeAB rGPjrqID/loqLUaJe53Gl5Eq4hTjy1gQVfSlofV+/wCg/Xn8e9e3xd3iWeChKX7vZkJUCwkVzLEL 2LHgwsYgkFiMYFz08EnKBV6O2ivnrPm/bedAXcYWqzVqE2Z0nM6Odsbjp6pPAUUhl6rZS5HMDPjB q944Z95DIR6Kh4zmuRZrBcdMW9+5u2sepCkYZlpbU7v+J4m51xhCq+v3aB2mTy6y6CZAZ5abPkxx cF7uaN3h6aUQpt8+KW1EKgcHaMZ8qqDwmetu1T9yo2U0H1aGl06zVDCLbOBc2OoLsKKSeFZzGOAf b94hy4tMtMuUYx6jzMvLlL6tHXq0+P8KzJHAriIDHUntgiFpUVyg1A6wIT82EAW0ShNz88CvYKOA HSt9pmQBO3sKLWQjPAEPXGcA/92qe4D8XjoHHHL7QUdm/3mQtPyabVmxhZWSvyxOdKcju8Tcs5Rn yLpZ0rFPnsOqQhC31FkiDmu/10ocR1IP41eXnwBQwiir+b8/O0M8dNc5g+u2mTTrgKmJhM7/lmSi N1JQAlj94KiFjccEZR9bzpQANhHTQv7+cBaqZPYqhY9LZh2Ah1hbKT1XW6H5PJmBTQvBzfyhnEAg r5vv2MbucOXPbPBE1o6N0z71IM0XhbIktCl6A82ZPNpCtcPveck7kHQ1glfDzMWmlOy9nUAex5ZV PCyYUjxXvXQ6Vc7oSDbAYhg+dODvj+G32lHLjJr0eBzpFEBLqZrxacNmRjQKZBow+jxHT6gpPJuj /oII36+UTBxGo5I2Omfk6GrH5q6eqbFzVmK7deVZCfk5pIXY+3mTai/enFm/1sdLvHpMQlrF8AR9 a6ddmhLVl8LtnUMSsCE9OQkiSm+Lw726OTpZBd5fjugy9/qxvr42stsneYPty6K3FYMEHKLSdO1Q y/jlapJBRwvwTiF6tY6IotgtvjxvPNyANdFO79HJibOPVJRK8xSgyR5AG635Ha4bwbmIdhw+/r5V WWxXugA7HwkGyR+/2W6cVOcya+lxuNqx/HENN2qaViKPzMux7LOpo7VqdPqjnhPp57/0GpowKCwn Md+ZSTIO0a0cm83YbNNyZHosfAZmxKaY/3uNEI6wb4dAGMxVR75lgnXS9ybQtPTvkhDNIQvHlL4a sk3czrECWvDAjeoXnUgNVW4Cz7BM+S9w2H9Iupuzg9RtEr+apX0oQwrhTOJ+J8RMnHlIyL8Fd1Py 4mzmucu4vPemVdvrSxWaNspqyoccLsKx9yaF22DMAnRoewgfYQKpWeoDdnSIgKkJQcFmoF8fRuyj 9ON3uVXcVqLytgXEPf9YTyIjmNe1Ug2VtXjMuEojOsKzipwAEo9XC2S1vWxbem1ynQYmjkowAC3v BbB8vyCTdRd76uArtZRWRdyMslgLQIrG+3dMQspUIolcwt7ydQM2uSRUDYe62mW3ZPCg9c7ISBEt 39ypydn7ghp9FhqAo8iFH4Ti/DUXbkK5JgkVjPTbaftgHRY6bcvEM2iKeI/GHaiUoqnh4XFH6KXO WhBqz4wdp/AbJn2INdZS3lgqbV0AFGSJcWM9/k9pzmM4agMJ/wOPPfNu86WaSbF2CtwTxqy0dQ7U RzMiCxr6FCADdyD2WqeiMGW/RY32eeuHz9lY7aPM4GzcE2pr8uzKC0Iy6dqf+i/CfMI4gJ3S7bQs 8jpstepySWowSLgl/OnnsnCH8nL9J30MzkAkfwePeowKL1nqbfAA5dmWzV2cf/V5EtRdrZXigQZL u1B0MXdkn6SNK52WZt20grf1RG+s15LODAX+JPAZj2WdxBCNmJ2scbHdtvlIJvL1FPW6qi6bRNuu tfKYFTiznt9x/PqxFnwiaOWu5hOXvTfQDSWzaGl75/n44jAkx/nN/qw1tVhBQ2no5zse2rRnvQMW OmFIhmuCT5kH0jlrJ5lBIMGt2nDbpsL9lsufOhCYSNGkRNcYMvvm3X2QwOQQwhlKqadlYSR6aoRL K/rkVyXkD3ol7LiLY38IzTG5i1IDchbpzbURbmjXvuFmsV0f++bNHP6SXTpgZvRN/8OrSdBGT2VF lyX2FORjCSuHBjUraHyVba/XHRE4edLOJ5Oh6lcWk4vyMiUKtW6WiqNYkAW6ofYGiW+p1GFKtA8E 0z09XR9zpOY3rsUwIn/VjAUIWRmP4TNyTDwyVdTLEqJwvfaztnArQOjM6l6GeuslaDZjlu6gFj2d m68LXMUtkMBnWtqE9mA2PsfzI5UVyVtFBP9ekAKY2Oo4eRtI72C1IsH8vIuT4bbfSmA3UyyBpekB nDjPRnUQr9tKAJ4ZXOv3LPAKuaVjwMSubkBErfWi9QLEAcCosPPcYWVwMyh975wxBmQfghmM5Vbf d0FdCsjn6GJpaS4z2mgS9RY9TKTuzkpbv02PPu1WAHrdhpPzWPHM4KAT1t3hI+9bD2u84qwsbVQP nyxDdAr7jmXnq0PcAK4cfE+EKA6FauhDBDKhhtC/7/8RUPxqGkIjZgPT99YRbaSKHGW4r74+mJJO 9iOw45CAvPT8VbQ0+sr0vMPDkTXOPsu40DwiVJG9o0VcjpohOECQCbriHxqqL/iBaR85Z1OgoWLI nHmKy/EIA04RATY328dlWC8XhqALCScjFBdbHCRPOl2u/8RfOC6e8VWNWVdQnlmoaGmRL1DuOy8u gLmbMHnGnvRiWjWhGGfzTlknWGADY9+R+UAgvMVq75H1ExgWXX3okDKjoNlvDk08f1GKj1L9B3Ax kogRFGDP16Jy0MXKPSrJZ1K2KMJUIg7fw6s572nXFv/muIjLFnDBDoniCuTGEbF2FbO6HhQ2JLiO ZyEBXxrjoemqtxs6tOiaJy/YL5zLG2kJ3NgIipXJSMoe1hZNQAsThfawLhNcP59BogODrzFWL01M wFKkT4zr9psIyrYazstB2QHHqkDF4hMP/9fDYJjirqeI9SQbPuCT6n+cGlVat3F3nqq6TTO5p/Yz NGwTT37+JPlRRfkoHf888uPnQmIgftH/Nv/kQP6DDEfFCbTWyTSlk4J9pS3e5B+4J4CIdBhShtbh QgKYY1FbvdPfccEB8JGzAxTznCjcRUGBYl3+TDqS3qetQZSV5xmioxzWOAHXb+dZ8Tw1NoclsceN 5K9SloBiPYmQf8cnw0kw6NFrrC6e2Z8T+lJaniGN7Jn51Z+9hRJm7M6CnvzUeKef+27vdaqYOIbT Nwxmf6bCrHUuUX5DdHLPEU8Rts3VGSHkBYHXD5IMG3RNFkMD6l1zIJedb/ixYj5kAj9L4Kmxra1g ynI7Cf84Vm7jj+ncxn4pOIZmZnii1Vk+sos4Wm66MivM5LePqo8smMp51VKVUYsCBLHAtUGATncU 7qOxf2DkIhUQd+Kgkl0/tABnIopnI7foJowA3olcV5IpxKubQ8VueMaInA8RT8SFy+V1CFI0uS/s REzayzTyoM5/XmKzPTIWkYdYxKkrHQUk1vR7l+SoMHgKMz6tvKnPLtLRIRuuQ6OmxnpeUynDj0uM xtKJOj4w5ttYdhm7Hq7VtRpuCNnzTLZmCT64Gn+D5BrLbEZePJ7CdRemoHUrJM74lZVoHnVnSDrZ ieza+wuMgdHeIRA3GeBxezqp94LSSogtLBrg74ODPsiJnPAZRtOXJVx8KseoNTVDWLNE9MP4smvv 3uVfxSs7HtVznSoB9z3gE7paTM6TFK2jjGEjuAyPvzN9zuO/siwQnfQ8iXcyF6oR3gtJwwLqZxjr EAneQt+eovI6nwQQBPgR34w3qGgoFnCDAPDti9UmO5uXH+6isnyFZUGd7s5awo8hvMsICAGtgyl6 vSV6OApJl+sZUNC2ctJ8i3YZvYhB/+S6A5t73zxG9R4UUWyrQLdgWpZzGad1SjlJLtMqOGTr2/OL n0a5TZWAKqNSE+YzasBQzGL9sW+dooso29JcHRRdXlP7nEDy3eyYIRFvnyihEiAbMckBWd3ZaLJU gbRVcCXH4vloGJgUBnESdpmLO4KOsp5HYQNLwkUjFsDUcattNigobWS7Tt/8oz4MBc9vTFsH/STX 9O2uqjbz2+XDIthWy/AkD5kWItQ8cA/SBB8BrVJ4gvZV81YPi0/NObFSDR6meQjOxj3+x4zDUJ3K TbRoS2xvgsa5LdF1pi8XmYymEAym+8IkJbMDvjWBbs1ytOiaEcv4SW8pzsOfbbvWixKvPTy/pjq7 H2Ww35gMtxWREKDRgJSxW/Ds4vChveIpVlVaQzxruyLzZiyxI0lj5bvspHFKtBTIrOFfNlHY9N5K ZIk4eiTvO3lvYoOVQhoZ2Bam073t19fdsbBPfTjkUfGzIkuKM9H9QR+b+cL7TQt7EAOy7NR+dh6a HbTUv72atPn4ngafNOv3MK+ZAmIzIekr2/fyZRaj+lDidbIGX7LeyS54Ilh9O9ZRPYKTZ6NMK3xV 5CCE+zKtUM5m2bcb45pa3KKE3DUaHTrZTxRmB7xrjWB18E8TGeMHGzNN4heWnHvdd2O0lw8DEeLq mdUIFyjM8PgmU1GCaGjys2gBiYjDotnsTXCWlLsvR6Rl/Zu1bgemqXVqGNoUA48WZk9GLfokPi5e 9uEFu1YXp9qMkO1GA8hzSr8/8cw8wGsIRtqfexQTN8SaNLHPs/ImshC3gJaLTkCWpmr+ZNDiSlYW yeMJOxAkOs9/+Z9sHHXRNAsoo8kHML4HmwnjZgCYmcKDOh+lt64MkTY4l3e2+fz9B64LeeKw/sM6 7Tb3ecxkdWOxB1HXtKuqRoTCL5ulLeAXr7Cjf+Q6ieaC/93oyszStJD+1VjHbwnNh+881llzpWoB aLLdVDmHMZ82Im0XDYbvRkqvlB85ABMtJ5VryQmJGVzeYznqfqFwfNSo8D9Rm/WXhv5pdWTkkdXI WtZrg5IZYOUCTJXUpLAuEUUEXNQU4YAlUNCVmFOXGakAR4kDfJJUVj+mAsoDGfyqaR+aBwItUwFS GfyOrjztarVmooZ2DeUMBV0/aSMlinV0rJpOaQtdSPfqXgrKJ6RkpKhHwyoQJSik/xDrXmiEiuge gROSrLypY4vHvVJI114vVy75se4mNO83NskciiTvVZyiWvYzz7bz9/3CUXGQ5C++b5thn6L0BZCs JeYX6ptQGEbzX1ZUxPrWyq7BywwLL8J2dj6+myRo9tvgtPYnL3O1qMfYvAZ0wkEkHoM4iKb9uI+B PPMCsSy9aMm13fAAYLKaADXAa6DC2flMhWg2Xsz+NWBNWGkore1TErB4BBmuCt6PLh7qGYoAzzKQ HrQKxkpCR/4+W8exQK/5ktwUTTOvKPln1YTs6sG95wbEPkN9U5Ab6R0xCVxwdf+LXSA2eB2d1wCN D87me/sJf4yF5TskeDbt7XSMPxKmtBSfsXu5EKdofyp1+4msJBtTHRoRk5X4w983OZC+/2E6u9CW V3wcP/ByAv0t4NwJx3HqMNL9gb95a1kFL7ycN8iXj+6yHJPdl5TpGIOKBGtYInPLr99mrss4prny eBO2I8GwDq4YRivLvVViyHnMRfEC8+y2kwF/41axwR85n+h4OLNzxI0MnI4Vk1lObXteY5+jJwOT 77EMbU8t1KMekcL9EaTztCdid6Hdpjg1dWJjHMKHDQJ4V7A60r79q2qDrSIXRqITjRL5qRVcW9uj 77Xt3qVw6/LUSOKayBRzAptxJq6kx4pqQZwWRrPE+bn7Le4K2JWDYxyE72RODQNpNcpgYFBdMq0m nUhqgU1NumNIuR9vEbPUayqcPtVEiIq7vbOBcIG99kd4gi5gJ5/Sgvs0RRAYCCZ+FajNBkM2nq6T K2BQ1CjVMDCk1Z1jBdTjIJgfQsvBYTAeNPRCy9lifqXEfri5bpxAJci7VOUJZzQKdUr4xQdCyF+k bXlSny60ebHDw6K5i1ngOlrX+5u3Yw1uiWiDXhi7RWrOzyZ4qHMvYbsOR31R2dRnT8Vk/H3zev/O gZOrEbTdPfJSKzi1Sl9l5AHMQAp//A0ZF/hAaTkzHU0ET4Z4ZftPKsp4rC1g5sx01JXr1E8FEM/m E3g3SnJBQJj/O9FWVW9mklbDcfE1nJ8GrhizbhOkA8pZXNuwv9OfQcDHc5jZIDOEMFKham3JbdKY qcNyIW2SdDpDqIalj55cbdw6a/c0eaArLz5QWRfuwPxJjuX4hO2fFl2zAdwyuCAWaqfCegA75gTu mpuy8AAMon3L12Q9zeyFqmzSwloO/wdr+LEk3Y+y8sviyAJiFq2R3qUUgekgdX+ReARKQIFgL/RO +/90LpgPHllO3EpUdYyHv7onxESFycaRkk/0G6RizxO3Kg3IAJya1QY7I+KaNm2gWQiPH9WAf2wz mNpGi/f6UAjkya8AzLsU7c5adg+f6ZjBs9JQkMYpbIeXOPDpxqAT58oznt0esefMM8xhC/E76F0E DsF/ZE9wxRZzn0HUNl7LVRsrXz8vAyW34g5GjujxPRIo/duC/msz/fhnDs7fbXk0hMZg1zCsXpR5 4T5JKFBC83MIg9xOoBAdwl+bVWWQ5B5hYK2y7l0MMxHMTI1NRSlTshrRrBFAEE6FPmKLPwF5HE4Z rh5L6+YbFZfco6Nlk3BttVmE3oRzlHl4LvAAhKcAILk/EojnCnxGPOmJ0yUB0j34G6lE24E9u9m1 z1Bw6zY2pSgjugMhJCJ/I3ZTxFLFjkzrNyvbxj9bG0VV8e+JijlpNzrU6ulb/9OJ/0nmxUKggwOP ZRAGV4g+IMkjN/cVpfjwNurJqiEGRTpEeE5TG4t9PPNHZih3f24ishxXdXJhO9tTWCTlzeFv1IU4 jv2WHQF/DbHNAhO4RM6FU9AHGkgJfaO///u4Kdafkw2G79CGQWlImeaiz8QHQUzszD3dxewMxCKK XeKg3Qzni3jVIGgq3A1wvKz/9YFThz0lks9LxTfz4T/tFEm+bnZDe8MnqRY55WaBhl0DuB55E4ec 4y1J4b3LE6NMz4EwJ3iirVSPkDPJceXahfhPzt4Y7zOviXbrOt8IXYY8EUpY0AvQK+MmqaLMH69L 9AOd2MAWvbe8M3FV4i5eKFQIijbdWupiBt6f8x9YnextIUmqHLvyc7neak2gX8I1BkDEvDYKSQoM uy9IGdARvBsScFBgfxW/xSEFZUzWQXf3jbV3C0j5LzaiFiT6hBBoztCDaGx12upWce4VNMcu8Yto /evUqNGMuxjojdPu/n8OEeu6j+2NAI5e1W6SVm4DWpnHvYpx+mimW+IYX/yGSj0CtgCV2m3S0yVp 3l3gtQsMS4vyO02V5WIm2+N/V6+gcR1WIMlrb9vzh1YBSt8c5v3AFTnn8sU5nl/HCp7Z9gjxVzeU LAGULBsDez/YDwoSk79fKmlrg1J4IA6gLd3Yc2xteHdgoxvM4HQaRNP5YOqJOlLlS/95wye4mWHx 1qb9Cev+9rbvUsj8FmNx6NqzzSq40vmmADYZm3pTW70p4HGy6Hb/y2g/TSJ1aahuY+qdVR5wQlsq w3Sty25TYsOjge528FvdWhP/xXRqH0SOPQeAbK5HsjQb1bgmfZR0DBmqwTfe9ScU6L/GizK07fW3 7vAEWOn8gnpAHr4guZFeD4L3n5ecJPgDK1CuFKihlBgbTWjyX3uFh4wbodQXAdP2e4b9TPIGFW8Z t5fpA4IeijkQ3BgmtCu+rYnTmC1c4biGkJZJVe8P82BWer/bPTvQBMjGDO/vFqLE2hvF/Sh8yPle U7U3SYq1sCn6zSXEHjWuwt170og8aqJX2QsuUjb/CijTJcy7Ilbp+rFetVu/sId3aKeIgVgpDO2P aZKk+fKQuyG882Fw4X4sTxQTRwtXQX1SfH1mz9e49q8IjgI3hW+834LKoGOinIqayjlcpUGVjYs4 TiVhGUpNTtV4TsmvUpBuwxrZ8RHTl7y1Jk1/P9ev+cyS06Q68OphDJ8+AzeZNPjsMSDZtZdU9oxt G/4arbFdchYfbuOqnOelV7RTy7do0Q1CBPw6q1TEqZiBOnBEfeY4cjtqpWS9xkYvyOk8kz0qgqpR Vw20b/HfVGqduMmcOoT9MtqsAUoFHD9i/NF/dMZQF6qsSSA8eldu19xTIU9lG5p6GPVjeUUEbjJ4 v0+j6dnnMgIq1xMIenJ8KDQyEshGRQI9+024Ilsl6E21jlFF0J556qDatEAz16giaZ9AJWM3DHbk a8r3uakvRGBiSR4HrdFTPn7ZNoXs/mYlSnTqTmmKIK732rPV8qiiYnlYaXPhI9P+OoEORzBnxSU/ o6JAF3xagWOB6aHyRWZ5U+yKNLu7AqW6Y35377MLCkTKrxxUdn9EByvp/0qdWzWXQ5jjmdwHE/ME I4llMKL0QEpP2Wanmea8OoMf7+UAIV4UawPRWMf5OAa2fvSAXNOCxctMbd4F4Y/0G7R68vvfoJvj cyNWfM0yHPfuNuxp2ZyfPxy1lswh0R4tQ0nLDPlv9R9KNlBmLaUVlryhGrCJpszDjShqG/AcK5tt Ng2TAkt2ANdYdMjlpULeAi5DA+SAhiAv/+sw9GvDjOHOy01CV3wC+cDPpJ8ji7H6u617oPIdSyIL y7GDbQAZVNY2l7fL2en6EyG34euDVJZDos9XdCBlnDQVcUvnDmZs07KY6qvymMXtLPwisUlqNg6L 7up5ffxK2zeDTty8+y0uMEeZ12nd7haSThUNkC1kBejal2ZzYvcIzHHLXI8gkzWZlQkwYCBXO5LY LXfBJ0JITSawpH/wGJj/bYfPQ209vJKhmyXgL9btLqjPojBi2w0X1LyTDJ5Xa+u8cdcs26xg0cQm Iju0FwJhAmPz7yBeIcksK4IhRHTfqqvy/JIq9vaOKdz8dCdSRmMR6BwHD3wqi02m8lf0Pym52/Zl D07LKTbkyesy8AsyABenfJ0NbIb9niz0KYKmOfH5O1OZ4BEtXw4ymvW84ErSkAV4L06PCaoKLpHa AyG63gkpXbGaWPSe383Ou2Y4o3oI/cZ8/j8OQKTSBU1i40jzCHKh0eap5zzbeaLsq26id4o0bHMF 8B4mIggZXnf//1ZCoPV0uFi+wlcKW8zff9Y5pr34qsa9PIrouhUZpfDRjHohOnNvsnT/ZtWpGCPX ylb0dIR/Qzjqoq4ONtSvFefIGrj7BYovcPPjPcOovSPZhlzjraC5rTXxsdCCqfxxmmEgOFgMhLVq BP+6fCoVZYFbhNKsfe55XCzJLxCdnaV7e/LfqdvIMYqQUhAFu4hgXKhIQs0GXMbGJn7Rc/41iNov Gf2BwYaQ6XNvH+1jRsQ2wNbshTmenl+N2cIX3H4NDPtKhT0vqgSx221+tbKYAEHZzGyiEGL8LxZH 0rBrAOYNjJWtf0w15/O6TUCcN02x52iW+Gjca6uEOvmXrbeK93Pd3WZbu7B88TKK8RhIU1XKKCxd 7RIy3ty/MwWnbk7swVlPvC+hp1nnfBQIsbUA/KZugC1J5zkRqKZZ8Xkxk0pmmBKoWk0AJdOesZb0 4z+3X+eeotAcj82FnPxMRyHZ2bLPmushlohMti6fwEGtnt06BF5UessR6qHpIqkgwRZ/xm/4xu0F 674kLTlUseNM+1WHajxKsdObRFY0S2fDR7zbNv6N3gQyaokE2pxrIKUOVwBg4oN21Bz2nCldcLBB Gu3l/pcx+UQzqc/ryWS63PfKYNMi8lvc9x/CoFZM0oGUH3dBhKf65W/Mr3Q7L6Oy2wK0nIEQLWHC FGZvcKXkZmAoUImhZwcMiZQoBrHscYRvUFdkZqzRtbLnehOO9Nukr035zpTEPS/QsClL0jTEzYEW gu4FcYlOsB+HwgRNuUX/iGLe70otrBRW5jCa0P1hSfHiubspllKvkbnrsyYbTqsJwNaTaQICUQcB VX/53A5/blnpmsLYZ/RE6MlwF9sYiFhA2CvkvrsZkgJKySAyJSu1SK4yie3vfwKwIwE+OIBx+4If KNn2o0CkuvHlbDQbN539Sj4De+S32tWHsQgOmhbzaRFxzjLEk3T9KHOKNRmslcV7TDISn7HW3Piv uvtCGiUjHHb5gXDJl5Im+V9aBQ+OCasyfm8v1oAMsd5CFZ8pnjCjdKaAsx6PlOzg61HSf0kf/Nmn cKcQFzRkzwXkx9NWF/FROBPpIO6KP7IzvAyhPBGwzWEBV0icZ+mPcENEs2nWcKLoev/RiCou+ARi LFBiG+z1i8MnmSl2TlLA7sl5W1SSfPTaE6YDOdKMne1c1cgjysGc+G+Yqn8T2UPad3dK2ecJBYtl EdAbwXAiA2rwZ+1ICCSGHgpa5PD/eC31COZigqsRxPtbKfpSGKoBRtroXAYkRv0Az7cF35q8g9nV IilytclV4KaIs2POTpnZVvFKxJyCqY7Zt7OSJFszpJKRPeoqzz9o0ToNralzn7RKZXwWoe7Fmbvb m3rIsENFmhTWI+Vdec6ye5G7QkmBHo+tk0zaApNujyQuyz5p6hlmELpIm+/4mDEflOtPAPRdmpub UnkcXXE2dZyUJ8qUeV82XSRkoiF3ATWig24EboPAkVAf2hJorm67eUepvGmTg+6Tq26n43ZGa4AN mopSQEcA/uqxae7l2BH/6iI6JNr+5XZNw73O2IdGvEpxKiquPIHZw/nUdLRC9AzZzD1V2pn+mo4/ 7ZaO6/TOC5RRsmcyb+esh8JyVACA15su4id+HqWJhwEgsiyGwXxfbiHzonZ+POTNKJFG4A5MjWW8 RtvzlOsVVmP7v2qXYnkA0EnIzX1isZHmFUcI1KxQHniTSdR/7t6iDFuh969onwcU9sRt47Qky7+l TYhg26aFDIKohBoX0+Lj+RUPvUSJ8qlCtWA7KAMejW4EoaKXXFMakyxwu1sKqX2+0BOGtbE+yC+0 jg7Ym+/rFcOheDmUkdJzK5Q2Zxn7ml/xFuxcQtNXrqu6cc3y/xwnc2udsAOEoZa8rI6/pf/SEEMI XY828+vktg+bdyZLVizTCgfPbs286vIhjVRirI3+idtjfGc8KEIiNYOejaL3viX4ADRI41VLudTD vsPuNnWre3iwCBS9cye2ztt8SSqjzKTwu9MHscTZrd5LXpsj3U1ITzQR0NTZ+iotukzH1Fa1oBTe ASnF7qWSInBYe9rygLNS2NpuMa94IL3IYaNPdRyvBUn96DblZvFPjbY336SJmulrBD/qndfg7AjO x7XotgbppbAzlpUEpizYNUuz6PIVnaU2LCAYGCmiOKTVc06B4rbtrqFoq5nidgKlC3CsBDtY4lJn s+n/Q18Sztmgy8gdz9g18IJVUIj3dtoA37bY15hDjlSYV6XM1ELyxvY/vhbSlJqPCj7NtqYZSnxl gZ/0mbBiIV0oXs/iFB/1F4t0b0Jd6yAofI/CcKOeakyRnEpAfcoKmB2UnehDCHL1aa4o3f2K7x4L eOvfJRBfAheBx204UfmtnEpyycRKyJPm+Jr3gG1FNMkeb3jvxKMSmFQnfOEDo0QEZiCIxjG9/Cap ueAKBkSoLrN2mRj3dhbGI171b8egLW/4czsIDMTEEKP7msI/dZOFfNaBLIfW+WmoMSBEksU76GkN K0D0IzFXbZpkzthdEqpNgAyaEZ2Cq1eke+3NWCiTm0Z2AJdzekTESf50bqFe9l7woZ5HgzEFJziz 8i2kncPMkox7XHNOeij8RVdOBioKbXJdGJhy/3179yUUugV0+ASEwipbZR05idaHJjEgndP2E7tF qbrjiLFrNuy08ZhIu9U9LCQdltmQb5E7IWV+w0mUGDUhnGONWlONwd3ie6PwIVrqkQE/uUk4Tv62 lq2+kT5H7pmV+8XOqPAoI4C12mTrLlVc4+bJ17F23wtBFyIVYYDYIxm5ayTbTPf1/BObDfVwquII CTEWDXW0raa3/mEf6lJy1irJC9cIca1AOEHBwMeI96PYk/sEnnUyBNhoJu3MvKI32AlP1/OQknYi 8nmKkfIJeK/c93VHm9LRNWSZxuKdVkzSVJi9a96we/wp95brMZUdsokDsDtH/kPQ3A2LlNPJecxJ qKCbvU2AM/Fv/jDmk2wrjSVpuVtDSHHy7ktFX3Rxhz7dNHgi/ZPkw9D1byc2FLLJXU9zAzPrgNnm A+6AyOvwBdjMgOgFfmdTPeeuyEZC6UkQ54EkLzRJZ8IAR3ci6qrJyXa8swLHDnMhxX7q7TAAKDCi /MKvZbNtxuShycp3ghjNNyxfKJCoBO0LyRHyAkR59aJaKUrZCkUKNDstdoqLhcC8mcEj5q034xtv ZXP8BtHWRzCmHLLydkG2KTonmuMwS/Scr+iEaPVk2j5zHBT9ZjBDNhHoI3LJ+FJ2rNpslnEi4d3e 1HbNNj7+fJoS9bvJzDwdrMbIuXBf17UBe+Av1lYmwi16dQo5agcGUhvW2nW/vD8lYkcJhNfnvYGM da9A5AZiTmpZaClMWS+h480UIolK2gJ/8fDs27qaRZWpYcV9OOffR1dDJllRBKtXzxhWWPXq/MpT e+6w+AcsEzf0vWXJokqID7mzMZ8ukQvwAMIYV2hvUfInyAa6ZJwAVh9FGcSQXOyUxJ9CDYNYA94s HxbP8gigiAVGCw7LQ+ZirENtuIYLPnd/ImzPzy49sQFNwUHhO+wCO2kAtL+qALfBRmemHlRro35e YXMo5APRjwcVfnxlLX+SB4qHzWMRScbLrEHqrDCu3kUJTv7u+N1XlitbWKYVvM7dctBM9ewJM8/P I4/0Ao1iA6Xs/xa3aItw0gPih+iZiPUG9pEduVfyU6NJn43VNwEeGPdabvyh4XuZ6t92kNb/pELp zPGjYAH6ts8y/q6C1IXDPqHRfN+urK+2oYh2q3OGc7/gs/nX6ooocbCRaBDqf1OKocU8irKgLLdA s4tECpd0iwGu05nqDP4hWiYo5JENHd1XMVI2BG4HnWXWibrZeN7Y4quSr9DZG1aWICoNxq+7gBHT 0kNAyvgHcRq0PfM0wkGKmo4qmZCYUUgTKf6n165/wOYBDjr+Pupb0H1lHrsCSR8SIAlWv0l11G6D d8PJH50yqYMBB68O51X+I8jL3j+eh+N1NNB3d776BK1EjYPp662eyic8OYykrbkGz1U8MjoDA4lC asENOC6k+xBp3RFp9wFfmqH8XDedrj9m3u7dlGzaOUs5VRNCtzKIBXcK8MMPhmgSpboeY+Sx5UFO A0Ft5+qZiyCSNbBq/2O+e2eA/Q9JvwyzmenLKppd2p6JNlQiV8Ns8ObLljm4q+MhYtzeyGJOmKmv nQCWoZgAtT+ktnIT2xcYWmg8in/TaxOo4eNNjdlZ+kkGqRt0B1ciic9XOhcRXtvjB8aJQ0cr4pV5 5loWc2XkUG4/vOU7tiK8UGSo56++6jXOgsydXLO7/XBnt5G6KZKIAXXHbCt8rvP/yTvLrH+t80ad 0LLj5NmHwEuvhZkT05XiHuvAW6E3bqarEsotO9keAqVEa+lzXIiDqHchok1OdSeuKGX+KlXzNCyQ jIbO1jGOzve85jwdzqWuAvQ3iM1mnXsvp/MuYdmB0juTKXDCcrEx29sqY1aNiV6AgdH1eJrk1nUb 51S78BmxWM54zT5stl+QVhFq/3D1qUxpNWNWGU8DGusJyVbPERJW `protect end_protected
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `protect key_keyowner = "Cadence Design Systems.", key_keyname= "cds_rsa_key", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64) `protect key_block oWAiulLwHDglts6iqdMUT9Ori/ohV8QguIR1lM7voKoLaYFRvD2S50wWzfOXl1AqjV+esGm+neYh aXTGcZYAUA== `protect key_keyowner = "Mentor Graphics Corporation", key_keyname= "MGC-VERIF-SIM-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block pjORo1VUicxT3KNrha3dwkdkacMgeKv6htW6OBezSAYVQTqVECKGncr9yoRXcs7sGJoZX4VaS8ia lihJEHqdU7spww8qZeDL6kdfkf73A5GDuhlxghEKWXxnanBE4/mPjb3CdNex8j6f/V0iPwVP8zbO 9xb2L8Nnk6ScRPEyOXQ= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block Peg+7FfXjeQbiaOKxmimfzP1GEfA0xs/a9tFt2w9gwQHX8Ly/Cz5LlJtL5mdZ77ckvdNfJmQ+VHs rPs/ubGwZr9yQQllrZBHzCwiuRRZU72CLZZmGGqZLsgf8SrxIZGaIKgytX6pCleoLyzOesqXBNLU /Oyo3S9HGNPh2h+VRbnosGrZKDBWjyQlBWadWZ65Pd2QdVA0z+xxxUPO96CSw0l1/ExlNgleiwoA uaX2OxgEsUeESaj1JZGYIiMkHilJHZDTkcMK2s3YsyWOqXhwRild6TfejTa2Fzn7TH4K0pu++7Gt nmVIgHvzVhBs5sa5Fo6vXJKVBorZwCbjGDiu5g== `protect key_keyowner = "Synopsys", key_keyname= "SNPS-VCS-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block UCcotBKd24z3jkO3jgLbsxNWqi2O9+6jaXbotiZjtapozjfzg09PNDoEdTzj2B303WQ78dPXEphn GO4PzKGdZAdDgvtFX7h6cCngchutOPNE7wof2pbSw94kWUGoE8qSuK1sO4Z+0LubR7c0IIN9HAZ9 pEoqViQqlFMCXUzLkDk= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block PIHoiy6LOs6z9eo851mqeJ6D8UYzj3KAeJ9fm4AKfKKarhRamXK6B8lbD4E3RQ3pdDWQccWJcZpR NH3EOtpAZEu/MkvXzjnjlwMww2/YpZce8bPLwemJFMc39ZZJmCT3SWOlQphiINLNGDVxB/CMtcQ6 rY2up/+ygJWF9vC426YbgHTJvlEVzCe/eGFMA+8YiVMSVx1GFhZK0bm9zeFSEr4sYDaGEOTvCs0G hCIpAYk1atmrlyyugxDXn8+KvQNZnVl4HaRRFWZzU1oDVAww9Nzcqooh/njU693MwJ2PwWWVVfWl w4hty2wOg+59AQpZ0b86zzhH4IIXVJ9olmwhIw== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 29280) `protect data_block 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 `protect end_protected
--------------------------------------------------------------------------------------------------- -- divider_f2m.vhd --- ---------------------------------------------------------------------------------------------------- -- Author : Miguel Morales-Sandoval --- -- Project : "Hardware Arquitecture for ECC and Lossless Data Compression --- -- Organization : INAOE, Computer Science Department --- -- Date : July, 2004. --- ---------------------------------------------------------------------------------------------------- -- Inverter for F_2^m ---------------------------------------------------------------------------------------------------- -- Coments: This is an implementation of the division algorithm. Dirent to the other implemented inverter -- in this, the division is performed directly. ---------------------------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_unsigned.all; use IEEE.STD_LOGIC_arith.all; ---------------------------------------------------------------------------------------------------- entity f2m_divider_163 is generic( NUM_BITS : positive := 163 ); port( x : in STD_LOGIC_VECTOR(NUM_BITS-1 downto 0); y : in STD_LOGIC_VECTOR(NUM_BITS-1 downto 0); clk : in STD_LOGIC; rst : in STD_LOGIC; done : out STD_LOGIC; x_div_y : out STD_LOGIC_VECTOR(NUM_BITS-1 downto 0) -- U = x/y mod Fx, ); end; ---------------------------------------------------------------------------------------------------- architecture behave of f2m_divider_163 is ---------------------------------------------------------------------------------------------------- -- m = 163, the irreductible polynomial constant p : std_logic_vector(NUM_BITS downto 0) := "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011001001"; -- control signals signal en_VS, C_0, C_1, C_2, C_3, ISPos: std_logic; signal V, S,X2, Y2, u_pad, r_pad : STD_LOGIC_VECTOR(NUM_BITS downto 0); -- Internal registers signal U, R : STD_LOGIC_VECTOR(NUM_BITS-1 downto 0); -- Internal registers signal u_div_2, v_div_2, r_div_2, s_div_2, p_div_2: STD_LOGIC_VECTOR(NUM_BITS-1 downto 0); -- Internal registers signal D: STD_LOGIC_VECTOR(3 downto 0); -- Internal registers signal counter: STD_LOGIC_VECTOR(8 downto 0); -- Internal registers type CurrentState_type is (END_STATE, LOAD1, LOAD2, CYCLE); signal currentState: CurrentState_type; ---------------------------------------------------------------------------------------------------- begin ---------------------------------------------------------------------------------------------------- X2 <= x & '0'; Y2 <= y & '0'; u_pad <= '0' & U; R_pad <= '0' & R; U_div_2 <= '0' & U(NUM_BITS-1 downto 1); R_div_2 <= '0' & R(NUM_BITS-1 downto 1); P_div_2 <= p(NUM_BITS downto 1); S_div_2 <= S(NUM_BITS downto 1); V_div_2 <= V(NUM_BITS downto 1); --carga 2x, 2y --carga p, 0 carga U, R en_VS <= '1' when rst = '1' or CurrentState = LOAD1 or (U(0) = '1' and IsPos = '0') else '0'; c_0 <= '1' when CurrentState = LOAD1 or U(0) = '1' else '0'; c_2 <= '0' when rst = '1' else '1'; c_1 <= '0' when rst = '1' or currentState = LOAD1 else '1'; c_3 <= '0' when (CurrentState = LOAD1 or R(0) = '0') else '1'; celda_reg_u: entity work.celda_u(behave) port map( V_div_2,U_div_2,c_0,clk,rst,U); celda_reg_r: entity work.celda_r(behave) port map(R_div_2, P_div_2, S_div_2, c_3, c_0, clk, rst, R); celda_reg_v: entity work.celda_v(behave) port map(u_pad,P,Y2,c_1,c_2,en_VS,clk,V); celda_reg_s: entity work.celda_s(behave) port map(R_pad,X2,c_1,c_2,en_VS,clk,S); ---------------------------------------------------------------------------------------------------- -- Finite state machine ---------------------------------------------------------------------------------------------------- EEAL: process (clk) begin -- syncronous reset if CLK'event and CLK = '1' then if (rst = '1')then x_div_y <= (others => '0'); done <= '0'; counter <= "101001000"; --2*m - 2 IsPos <= '0'; D <= "0001"; currentState <= LOAD1; else case currentState is ----------------------------------------------------------------------------------- when LOAD1 => currentState <= Cycle; when CYCLE => counter <= counter - 1; if U(0) = '0' then if IsPos = '0' then D <= D + 1; elsif D = "0000" then D <= D + 1; IsPos <= '0'; else D <= D - 1; end if; elsif IsPos = '1' then if D = "0000" then D <= D + 1; IsPos <= '0'; else D <= D - 1; end if; else D <= D - 1; IsPos <= '1'; end if; if counter = "000000000" then done <= '1'; x_div_y <= S(NUM_BITS-1 downto 0); CurrentState <= END_STATE; end if; ----------------------------------------------------------------------------------- when END_STATE => -- Do nothing currentState <= END_STATE; ----------------------------------------------------------------------------------- when others => null; end case; end if; end if; end process; end behave;
------------------------------------------------------------------------------ -- This file is a part of the GRLIB VHDL IP LIBRARY -- Copyright (C) 2003, Gaisler Research -- -- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ---------------------------------------------------------------------------- -- Entity: phy -- File: phy.vhd -- Description: Simulation model of an Ethernet PHY -- Author: Marko Isomaki ------------------------------------------------------------------------------ -- pragma translate_off library ieee; library grlib; use ieee.std_logic_1164.all; use grlib.stdlib.all; entity phy is generic( address : integer range 0 to 31 := 0; extended_regs : integer range 0 to 1 := 1; aneg : integer range 0 to 1 := 1; base100_t4 : integer range 0 to 1 := 0; base100_x_fd : integer range 0 to 1 := 1; base100_x_hd : integer range 0 to 1 := 1; fd_10 : integer range 0 to 1 := 1; hd_10 : integer range 0 to 1 := 1; base100_t2_fd : integer range 0 to 1 := 1; base100_t2_hd : integer range 0 to 1 := 1; base1000_x_fd : integer range 0 to 1 := 0; base1000_x_hd : integer range 0 to 1 := 0; base1000_t_fd : integer range 0 to 1 := 1; base1000_t_hd : integer range 0 to 1 := 1 ); port( rstn : in std_logic; mdio : inout std_logic; tx_clk : out std_logic; rx_clk : out std_logic; rxd : out std_logic_vector(7 downto 0); rx_dv : out std_logic; rx_er : out std_logic; rx_col : out std_logic; rx_crs : out std_logic; txd : in std_logic_vector(7 downto 0); tx_en : in std_logic; tx_er : in std_logic; mdc : in std_logic; gtx_clk : in std_logic ); end; architecture behavioral of phy is type mdio_state_type is (idle, start_of_frame, start_of_frame2, op, phyad, regad, ta, rdata, wdata); type ctrl_reg_type is record reset : std_ulogic; loopback : std_ulogic; speedsel : std_logic_vector(1 downto 0); anegen : std_ulogic; powerdown : std_ulogic; isolate : std_ulogic; restartaneg : std_ulogic; duplexmode : std_ulogic; coltest : std_ulogic; end record; type status_reg_type is record base100_t4 : std_ulogic; base100_x_fd : std_ulogic; base100_x_hd : std_ulogic; fd_10 : std_ulogic; hd_10 : std_ulogic; base100_t2_fd : std_ulogic; base100_t2_hd : std_ulogic; extstat : std_ulogic; mfpreamblesup : std_ulogic; anegcmpt : std_ulogic; remfault : std_ulogic; anegability : std_ulogic; linkstat : std_ulogic; jabdetect : std_ulogic; extcap : std_ulogic; end record; type aneg_ab_type is record next_page : std_ulogic; remote_fault : std_ulogic; tech_ability : std_logic_vector(7 downto 0); selector : std_logic_vector(4 downto 0); end record; type aneg_exp_type is record par_detct_flt : std_ulogic; lp_np_able : std_ulogic; np_able : std_ulogic; page_rx : std_ulogic; lp_aneg_able : std_ulogic; end record; type aneg_nextpage_type is record next_page : std_ulogic; message_page : std_ulogic; ack2 : std_ulogic; toggle : std_ulogic; message : std_logic_vector(10 downto 0); end record; type mst_slv_ctrl_type is record tmode : std_logic_vector(2 downto 0); manualcfgen : std_ulogic; cfgval : std_ulogic; porttype : std_ulogic; base1000_t_fd : std_ulogic; base1000_t_hd : std_ulogic; end record; type mst_slv_status_type is record cfgfault : std_ulogic; cfgres : std_ulogic; locrxstate : std_ulogic; remrxstate : std_ulogic; lpbase1000_t_fd : std_ulogic; lpbase1000_t_hd : std_ulogic; idlerrcnt : std_logic_vector(7 downto 0); end record; type extended_status_reg_type is record base1000_x_fd : std_ulogic; base1000_x_hd : std_ulogic; base1000_t_fd : std_ulogic; base1000_t_hd : std_ulogic; end record; type reg_type is record state : mdio_state_type; cnt : integer; op : std_logic_vector(1 downto 0); phyad : std_logic_vector(4 downto 0); regad : std_logic_vector(4 downto 0); wr : std_ulogic; regtmp : std_logic_vector(15 downto 0); -- MII management registers ctrl : ctrl_reg_type; status : status_reg_type; anegadv : aneg_ab_type; aneglp : aneg_ab_type; anegexp : aneg_exp_type; anegnptx : aneg_nextpage_type; anegnplp : aneg_nextpage_type; mstslvctrl : mst_slv_ctrl_type; mstslvstat : mst_slv_status_type; extstatus : extended_status_reg_type; rstcnt : integer; anegcnt : integer; end record; signal r, rin : reg_type; signal int_clk : std_ulogic := '0'; signal clkslow : std_ulogic := '0'; signal rcnt : integer; signal anegact : std_ulogic; begin --mdio signal pull-up int_clk <= not int_clk after 8 ns when r.ctrl.speedsel = "01" else not int_clk after 40 ns when r.ctrl.speedsel = "10" else not int_clk after 400 ns when r.ctrl.speedsel = "00"; clkslow <= not clkslow after 40 ns when r.ctrl.speedsel = "10" else not clkslow after 400 ns; -- rstdelay : process -- begin -- loop -- rstd <= '0'; -- while r.ctrl.reset /= '1' loop -- wait on r.ctrl.reset; -- end loop; -- rstd <= '1'; -- while rstn = '0' loop -- wait on rstn; -- end loop; -- wait on rstn for 3 us; -- rstd <= '0'; -- wait on rstn until r.ctrl.reset = '0' for 5 us; -- end loop; -- end process; anegproc : process is begin loop anegact <= '0'; while rstn /= '1' loop wait on rstn; end loop; while rstn = '1' loop if r.ctrl.anegen = '0' then anegact <= '0'; wait on rstn, r.ctrl.anegen, r.ctrl.restartaneg; else if r.ctrl.restartaneg = '1' then anegact <= '1'; wait on rstn, r.ctrl.restartaneg, r.ctrl.anegen for 2 us; anegact <= '0'; wait on rstn, r.ctrl.anegen until r.ctrl.restartaneg = '0'; if (rstn and r.ctrl.anegen) = '1' then wait on rstn, r.ctrl.anegen, r.ctrl.restartaneg; end if; else anegact <= '0'; wait on rstn, r.ctrl.restartaneg, r.ctrl.anegen; end if; end if; end loop; end loop; end process; mdiocomb : process(rstn, r, anegact, mdio) is variable v : reg_type; begin v := r; if anegact = '0' then v.ctrl.restartaneg := '0'; end if; case r.state is when idle => mdio <= 'Z'; if to_X01(mdio) = '1' then v.cnt := v.cnt + 1; if v.cnt = 31 then v.state := start_of_frame; v.cnt := 0; end if; else v.cnt := 0; end if; when start_of_frame => if to_X01(mdio) = '0' then v.state := start_of_frame2; elsif to_X01(mdio) /= '1' then v.state := idle; end if; when start_of_frame2 => if to_X01(mdio) = '1' then v.state := op; else v.state := idle; end if; when op => v.cnt := v.cnt + 1; v.op := r.op(0) & to_X01(mdio); if r.cnt = 1 then if (v.op = "01") or (v.op = "10") then v.state := phyad; v.cnt := 0; else v.state := idle; v.cnt := 0; end if; end if; when phyad => v.phyad := r.phyad(3 downto 0) & to_X01(mdio); v.cnt := v.cnt + 1; if r.cnt = 4 then v.state := regad; v.cnt := 0; end if; when regad => v.regad := r.regad(3 downto 0) & to_X01(mdio); v.cnt := v.cnt + 1; if r.cnt = 4 then v.cnt := 0; if conv_integer(r.phyad) = address then v.state := ta; else v.state := idle; end if; end if; when ta => v.cnt := r.cnt + 1; if r.cnt = 0 then if (r.op = "01") and to_X01(mdio) /= '1' then v.cnt := 0; v.state := idle; end if; else if r.op = "10" then mdio <= '0'; v.cnt := 0; v.state := rdata; case r.regad is when "00000" => --ctrl (basic) v.regtmp := r.ctrl.reset & r.ctrl.loopback & r.ctrl.speedsel(1) & r.ctrl.anegen & r.ctrl.powerdown & r.ctrl.isolate & r.ctrl.restartaneg & r.ctrl.duplexmode & r.ctrl.coltest & r.ctrl.speedsel(0) & "000000"; when "00001" => --statuc (basic) v.regtmp := r.status.base100_t4 & r.status.base100_x_fd & r.status.base100_x_hd & r.status.fd_10 & r.status.hd_10 & r.status.base100_t2_fd & r.status.base100_t2_hd & r.status.extstat & '0' & r.status.mfpreamblesup & r.status.anegcmpt & r.status.remfault & r.status.anegability & r.status.linkstat & r.status.jabdetect & r.status.extcap; when "00010" => --PHY ID (extended) if extended_regs = 1 then v.regtmp := X"BBCD"; else v.cnt := 0; v.state := idle; end if; when "00011" => --PHY ID (extended) if extended_regs = 1 then v.regtmp := X"9C83"; else v.cnt := 0; v.state := idle; end if; when "00100" => --Auto-neg adv. (extended) if extended_regs = 1 then v.regtmp := r.anegadv.next_page & '0' & r.anegadv.remote_fault & r.anegadv.tech_ability & r.anegadv.selector; else v.cnt := 0; v.state := idle; end if; when "00101" => --Auto-neg link partner ability (extended) if extended_regs = 1 then v.regtmp := r.aneglp.next_page & '0' & r.aneglp.remote_fault & r.aneglp.tech_ability & r.aneglp.selector; else v.cnt := 0; v.state := idle; end if; when "00110" => --Auto-neg expansion (extended) if extended_regs = 1 then v.regtmp := "00000000000" & r.anegexp.par_detct_flt & r.anegexp.lp_np_able & r.anegexp.np_able & r.anegexp.page_rx & r.anegexp.lp_aneg_able; else v.cnt := 0; v.state := idle; end if; when "00111" => --Auto-neg next page (extended) if extended_regs = 1 then v.regtmp := r.anegnptx.next_page & '0' & r.anegnptx.message_page & r.anegnptx.ack2 & r.anegnptx.toggle & r.anegnptx.message; else v.cnt := 0; v.state := idle; end if; when "01000" => --Auto-neg link partner received next page (extended) if extended_regs = 1 then v.regtmp := r.anegnplp.next_page & '0' & r.anegnplp.message_page & r.anegnplp.ack2 & r.anegnplp.toggle & r.anegnplp.message; else v.cnt := 0; v.state := idle; end if; when "01001" => --Master-slave control (extended) if extended_regs = 1 then v.regtmp := r.mstslvctrl.tmode & r.mstslvctrl.manualcfgen & r.mstslvctrl.cfgval & r.mstslvctrl.porttype & r.mstslvctrl.base1000_t_fd & r.mstslvctrl.base1000_t_hd & "00000000"; else v.cnt := 0; v.state := idle; end if; when "01010" => --Master-slave status (extended) if extended_regs = 1 then v.regtmp := r.mstslvstat.cfgfault & r.mstslvstat.cfgres & r.mstslvstat.locrxstate & r.mstslvstat.remrxstate & r.mstslvstat.lpbase1000_t_fd & r.mstslvstat.lpbase1000_t_hd & "00" & r.mstslvstat.idlerrcnt; else v.cnt := 0; v.state := idle; end if; when "01111" => if (base1000_x_fd = 1) or (base1000_x_hd = 1) or (base1000_t_fd = 1) or (base1000_t_hd = 1) then v.regtmp := r.extstatus.base1000_x_fd & r.extstatus.base1000_x_hd & r.extstatus.base1000_t_fd & r.extstatus.base1000_t_hd & X"000"; else v.regtmp := (others => '0'); end if; when others => --PHY shall not drive MDIO when unimplemented registers --are accessed v.cnt := 0; v.state := idle; v.regtmp := (others => '0'); end case; if r.ctrl.reset = '1' then if r.regad = "00000" then v.regtmp := X"8000"; else v.regtmp := X"0000"; end if; end if; else if to_X01(mdio) /= '0'then v.cnt := 0; v.state := idle; else v.cnt := 0; v.state := wdata; end if; end if; end if; when rdata => v.cnt := r.cnt + 1; mdio <= r.regtmp(15-r.cnt); if r.cnt = 15 then v.state := idle; v.cnt := 0; end if; when wdata => v.cnt := r.cnt + 1; v.regtmp := r.regtmp(14 downto 0) & to_X01(mdio); if r.cnt = 15 then v.state := idle; v.cnt := 0; if r.ctrl.reset = '0' then case r.regad is when "00000" => v.ctrl.reset := v.regtmp(15); v.ctrl.loopback := v.regtmp(14); v.ctrl.speedsel(1) := v.regtmp(13); v.ctrl.anegen := v.regtmp(12); v.ctrl.powerdown := v.regtmp(11); v.ctrl.isolate := v.regtmp(10); v.ctrl.restartaneg := v.regtmp(9); v.ctrl.duplexmode := v.regtmp(8); v.ctrl.coltest := v.regtmp(7); v.ctrl.speedsel(0) := v.regtmp(6); when "00100" => if extended_regs = 1 then v.anegadv.remote_fault := r.regtmp(13); v.anegadv.tech_ability := r.regtmp(12 downto 5); v.anegadv.selector := r.regtmp(4 downto 0); end if; when "00111" => if extended_regs = 1 then v.anegnptx.next_page := r.regtmp(15); v.anegnptx.message_page := r.regtmp(13); v.anegnptx.ack2 := r.regtmp(12); v.anegnptx.message := r.regtmp(10 downto 0); end if; when "01001" => if extended_regs = 1 then v.mstslvctrl.tmode := r.regtmp(15 downto 13); v.mstslvctrl.manualcfgen := r.regtmp(12); v.mstslvctrl.cfgval := r.regtmp(11); v.mstslvctrl.porttype := r.regtmp(10); v.mstslvctrl.base1000_t_fd := r.regtmp(9); v.mstslvctrl.base1000_t_hd := r.regtmp(8); end if; when others => --no writable bits for other regs null; end case; end if; end if; when others => null; end case; if r.rstcnt > 19 then v.ctrl.reset := '0'; v.rstcnt := 0; else v.rstcnt := r.rstcnt + 1; end if; if (v.ctrl.reset and not r.ctrl.reset) = '1' then v.rstcnt := 0; end if; if r.ctrl.anegen = '1' then if r.anegcnt < 10 then v.anegcnt := r.anegcnt + 1; else v.status.anegcmpt := '1'; if (base1000_x_fd = 1) or (base1000_x_hd = 1) or (r.mstslvctrl.base1000_t_fd = '1') or (r.mstslvctrl.base1000_t_hd = '1') then v.ctrl.speedsel(1 downto 0) := "01"; elsif (r.anegadv.tech_ability(4) = '1') or (r.anegadv.tech_ability(3) = '1') or (r.anegadv.tech_ability(2) = '1') or (base100_t2_fd = 1) or (base100_t2_hd = 1) then v.ctrl.speedsel(1 downto 0) := "10"; else v.ctrl.speedsel(1 downto 0) := "00"; end if; if ((base1000_x_fd = 1) or (r.mstslvctrl.base1000_t_fd = '1')) or (((base100_t2_fd = 1) or (r.anegadv.tech_ability(3) = '1')) and (r.mstslvctrl.base1000_t_hd = '0') and (base1000_x_hd = 0)) or ((r.anegadv.tech_ability(1) = '1') and (base100_t2_hd = 0) and (r.anegadv.tech_ability(4) = '0') and (r.anegadv.tech_ability(2) = '0')) then v.ctrl.duplexmode := '1'; else v.ctrl.duplexmode := '0'; end if; end if; end if; if r.ctrl.restartaneg = '1' then v.anegcnt := 0; v.status.anegcmpt := '0'; v.ctrl.restartaneg := '0'; end if; rin <= v; end process; reg : process(rstn, mdc) is begin if rising_edge(mdc) then r <= rin; end if; -- -- RESET DELAY -- if rstd = '1' then -- r.ctrl.reset <= '1'; -- else -- r.ctrl.reset <= '0'; -- end if; -- RESET if (r.ctrl.reset or not rstn) = '1' then r.ctrl.loopback <= '0'; r.anegcnt <= 0; if (base1000_x_hd = 1) or (base1000_x_fd = 1) or (base1000_t_hd = 1) or (base1000_t_fd = 1) then r.ctrl.speedsel <= "01"; elsif (base100_x_hd = 1) or (base100_t2_hd = 1) or (base100_x_fd = 1) or (base100_t2_fd = 1) or (base100_t4 = 1) then r.ctrl.speedsel <= "10"; else r.ctrl.speedsel <= "00"; end if; r.ctrl.anegen <= conv_std_logic(aneg = 1); r.ctrl.powerdown <= '0'; r.ctrl.isolate <= '0'; r.ctrl.restartaneg <= '0'; if (base100_x_hd = 0) and (hd_10 = 0) and (base100_t2_hd = 0) and (base1000_x_hd = 0) and (base1000_t_hd = 0) then r.ctrl.duplexmode <= '1'; else r.ctrl.duplexmode <= '0'; end if; r.ctrl.coltest <= '0'; r.status.base100_t4 <= conv_std_logic(base100_t4 = 1); r.status.base100_x_fd <= conv_std_logic(base100_x_fd = 1); r.status.base100_x_hd <= conv_std_logic(base100_x_hd = 1); r.status.fd_10 <= conv_std_logic(fd_10 = 1); r.status.hd_10 <= conv_std_logic(hd_10 = 1); r.status.base100_t2_fd <= conv_std_logic(base100_t2_fd = 1); r.status.base100_t2_hd <= conv_std_logic(base100_t2_hd = 1); r.status.extstat <= conv_std_logic((base1000_x_fd = 1) or (base1000_x_hd = 1) or (base1000_t_fd = 1) or (base1000_t_hd = 1)); r.status.mfpreamblesup <= '0'; r.status.anegcmpt <= '0'; r.status.remfault <= '0'; r.status.anegability <= conv_std_logic(aneg = 1); r.status.linkstat <= '0'; r.status.jabdetect <= '0'; r.status.extcap <= conv_std_logic(extended_regs = 1); r.anegadv.next_page <= '0'; r.anegadv.remote_fault <= '0'; r.anegadv.tech_ability <= "000" & conv_std_logic(base100_t4 = 1) & conv_std_logic(base100_x_fd = 1) & conv_std_logic(base100_x_hd = 1) & conv_std_logic(fd_10 = 1) & conv_std_logic(hd_10 = 1); r.anegadv.selector <= "00001"; r.aneglp.next_page <= '0'; r.aneglp.remote_fault <= '0'; r.aneglp.tech_ability <= "000" & conv_std_logic(base100_t4 = 1) & conv_std_logic(base100_x_fd = 1) & conv_std_logic(base100_x_hd = 1) & conv_std_logic(fd_10 = 1) & conv_std_logic(hd_10 = 1); r.aneglp.selector <= "00001"; r.anegexp.par_detct_flt <= '0'; r.anegexp.lp_np_able <= '0'; r.anegexp.np_able <= '0'; r.anegexp.page_rx <= '0'; r.anegexp.lp_aneg_able <= '0'; r.anegnptx.next_page <= '0'; r.anegnptx.message_page <= '1'; r.anegnptx.ack2 <= '0'; r.anegnptx.toggle <= '0'; r.anegnptx.message <= "00000000001"; r.anegnplp.next_page <= '0'; r.anegnplp.message_page <= '1'; r.anegnplp.ack2 <= '0'; r.anegnplp.toggle <= '0'; r.anegnplp.message <= "00000000001"; r.mstslvctrl.tmode <= (others => '0'); r.mstslvctrl.manualcfgen <= '0'; r.mstslvctrl.cfgval <= '0'; r.mstslvctrl.porttype <= '0'; r.mstslvctrl.base1000_t_fd <= conv_std_logic(base1000_t_fd = 1); r.mstslvctrl.base1000_t_hd <= conv_std_logic(base1000_t_fd = 1); r.mstslvstat.cfgfault <= '0'; r.mstslvstat.cfgres <= '1'; r.mstslvstat.locrxstate <= '1'; r.mstslvstat.remrxstate <= '1'; r.mstslvstat.lpbase1000_t_fd <= conv_std_logic(base1000_t_fd = 1); r.mstslvstat.lpbase1000_t_hd <= conv_std_logic(base1000_t_fd = 1); r.mstslvstat.idlerrcnt <= (others => '0'); r.extstatus.base1000_x_fd <= conv_std_logic(base1000_x_fd = 1); r.extstatus.base1000_x_hd <= conv_std_logic(base1000_x_hd = 1); r.extstatus.base1000_t_fd <= conv_std_logic(base1000_t_fd = 1); r.extstatus.base1000_t_hd <= conv_std_logic(base1000_t_hd = 1); end if; if rstn = '0' then r.cnt <= 0; r.state <= idle; r.rstcnt <= 0; r.ctrl.reset <= '1'; end if; end process; loopback_sel : process(r.ctrl.loopback, int_clk, gtx_clk, r.ctrl.speedsel, txd, tx_en) is begin if r.ctrl.loopback = '1' then rx_col <= '0'; rx_crs <= tx_en; rx_dv <= tx_en; rx_er <= tx_er; rxd <= txd; if r.ctrl.speedsel /= "01" then rx_clk <= int_clk; tx_clk <= int_clk; else rx_clk <= gtx_clk; tx_clk <= clkslow; end if; else rx_col <= '0'; rx_crs <= '0'; rx_dv <= '0'; rxd <= (others => '0'); if r.ctrl.speedsel /= "01" then rx_clk <= int_clk; tx_clk <= int_clk after 3 ns; else rx_clk <= gtx_clk; tx_clk <= clkslow; end if; end if; end process; end; -- pragma translate_on
------------------------------------------------------------------------------ -- This file is a part of the GRLIB VHDL IP LIBRARY -- Copyright (C) 2003, Gaisler Research -- -- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ---------------------------------------------------------------------------- -- Entity: phy -- File: phy.vhd -- Description: Simulation model of an Ethernet PHY -- Author: Marko Isomaki ------------------------------------------------------------------------------ -- pragma translate_off library ieee; library grlib; use ieee.std_logic_1164.all; use grlib.stdlib.all; entity phy is generic( address : integer range 0 to 31 := 0; extended_regs : integer range 0 to 1 := 1; aneg : integer range 0 to 1 := 1; base100_t4 : integer range 0 to 1 := 0; base100_x_fd : integer range 0 to 1 := 1; base100_x_hd : integer range 0 to 1 := 1; fd_10 : integer range 0 to 1 := 1; hd_10 : integer range 0 to 1 := 1; base100_t2_fd : integer range 0 to 1 := 1; base100_t2_hd : integer range 0 to 1 := 1; base1000_x_fd : integer range 0 to 1 := 0; base1000_x_hd : integer range 0 to 1 := 0; base1000_t_fd : integer range 0 to 1 := 1; base1000_t_hd : integer range 0 to 1 := 1 ); port( rstn : in std_logic; mdio : inout std_logic; tx_clk : out std_logic; rx_clk : out std_logic; rxd : out std_logic_vector(7 downto 0); rx_dv : out std_logic; rx_er : out std_logic; rx_col : out std_logic; rx_crs : out std_logic; txd : in std_logic_vector(7 downto 0); tx_en : in std_logic; tx_er : in std_logic; mdc : in std_logic; gtx_clk : in std_logic ); end; architecture behavioral of phy is type mdio_state_type is (idle, start_of_frame, start_of_frame2, op, phyad, regad, ta, rdata, wdata); type ctrl_reg_type is record reset : std_ulogic; loopback : std_ulogic; speedsel : std_logic_vector(1 downto 0); anegen : std_ulogic; powerdown : std_ulogic; isolate : std_ulogic; restartaneg : std_ulogic; duplexmode : std_ulogic; coltest : std_ulogic; end record; type status_reg_type is record base100_t4 : std_ulogic; base100_x_fd : std_ulogic; base100_x_hd : std_ulogic; fd_10 : std_ulogic; hd_10 : std_ulogic; base100_t2_fd : std_ulogic; base100_t2_hd : std_ulogic; extstat : std_ulogic; mfpreamblesup : std_ulogic; anegcmpt : std_ulogic; remfault : std_ulogic; anegability : std_ulogic; linkstat : std_ulogic; jabdetect : std_ulogic; extcap : std_ulogic; end record; type aneg_ab_type is record next_page : std_ulogic; remote_fault : std_ulogic; tech_ability : std_logic_vector(7 downto 0); selector : std_logic_vector(4 downto 0); end record; type aneg_exp_type is record par_detct_flt : std_ulogic; lp_np_able : std_ulogic; np_able : std_ulogic; page_rx : std_ulogic; lp_aneg_able : std_ulogic; end record; type aneg_nextpage_type is record next_page : std_ulogic; message_page : std_ulogic; ack2 : std_ulogic; toggle : std_ulogic; message : std_logic_vector(10 downto 0); end record; type mst_slv_ctrl_type is record tmode : std_logic_vector(2 downto 0); manualcfgen : std_ulogic; cfgval : std_ulogic; porttype : std_ulogic; base1000_t_fd : std_ulogic; base1000_t_hd : std_ulogic; end record; type mst_slv_status_type is record cfgfault : std_ulogic; cfgres : std_ulogic; locrxstate : std_ulogic; remrxstate : std_ulogic; lpbase1000_t_fd : std_ulogic; lpbase1000_t_hd : std_ulogic; idlerrcnt : std_logic_vector(7 downto 0); end record; type extended_status_reg_type is record base1000_x_fd : std_ulogic; base1000_x_hd : std_ulogic; base1000_t_fd : std_ulogic; base1000_t_hd : std_ulogic; end record; type reg_type is record state : mdio_state_type; cnt : integer; op : std_logic_vector(1 downto 0); phyad : std_logic_vector(4 downto 0); regad : std_logic_vector(4 downto 0); wr : std_ulogic; regtmp : std_logic_vector(15 downto 0); -- MII management registers ctrl : ctrl_reg_type; status : status_reg_type; anegadv : aneg_ab_type; aneglp : aneg_ab_type; anegexp : aneg_exp_type; anegnptx : aneg_nextpage_type; anegnplp : aneg_nextpage_type; mstslvctrl : mst_slv_ctrl_type; mstslvstat : mst_slv_status_type; extstatus : extended_status_reg_type; rstcnt : integer; anegcnt : integer; end record; signal r, rin : reg_type; signal int_clk : std_ulogic := '0'; signal clkslow : std_ulogic := '0'; signal rcnt : integer; signal anegact : std_ulogic; begin --mdio signal pull-up int_clk <= not int_clk after 8 ns when r.ctrl.speedsel = "01" else not int_clk after 40 ns when r.ctrl.speedsel = "10" else not int_clk after 400 ns when r.ctrl.speedsel = "00"; clkslow <= not clkslow after 40 ns when r.ctrl.speedsel = "10" else not clkslow after 400 ns; -- rstdelay : process -- begin -- loop -- rstd <= '0'; -- while r.ctrl.reset /= '1' loop -- wait on r.ctrl.reset; -- end loop; -- rstd <= '1'; -- while rstn = '0' loop -- wait on rstn; -- end loop; -- wait on rstn for 3 us; -- rstd <= '0'; -- wait on rstn until r.ctrl.reset = '0' for 5 us; -- end loop; -- end process; anegproc : process is begin loop anegact <= '0'; while rstn /= '1' loop wait on rstn; end loop; while rstn = '1' loop if r.ctrl.anegen = '0' then anegact <= '0'; wait on rstn, r.ctrl.anegen, r.ctrl.restartaneg; else if r.ctrl.restartaneg = '1' then anegact <= '1'; wait on rstn, r.ctrl.restartaneg, r.ctrl.anegen for 2 us; anegact <= '0'; wait on rstn, r.ctrl.anegen until r.ctrl.restartaneg = '0'; if (rstn and r.ctrl.anegen) = '1' then wait on rstn, r.ctrl.anegen, r.ctrl.restartaneg; end if; else anegact <= '0'; wait on rstn, r.ctrl.restartaneg, r.ctrl.anegen; end if; end if; end loop; end loop; end process; mdiocomb : process(rstn, r, anegact, mdio) is variable v : reg_type; begin v := r; if anegact = '0' then v.ctrl.restartaneg := '0'; end if; case r.state is when idle => mdio <= 'Z'; if to_X01(mdio) = '1' then v.cnt := v.cnt + 1; if v.cnt = 31 then v.state := start_of_frame; v.cnt := 0; end if; else v.cnt := 0; end if; when start_of_frame => if to_X01(mdio) = '0' then v.state := start_of_frame2; elsif to_X01(mdio) /= '1' then v.state := idle; end if; when start_of_frame2 => if to_X01(mdio) = '1' then v.state := op; else v.state := idle; end if; when op => v.cnt := v.cnt + 1; v.op := r.op(0) & to_X01(mdio); if r.cnt = 1 then if (v.op = "01") or (v.op = "10") then v.state := phyad; v.cnt := 0; else v.state := idle; v.cnt := 0; end if; end if; when phyad => v.phyad := r.phyad(3 downto 0) & to_X01(mdio); v.cnt := v.cnt + 1; if r.cnt = 4 then v.state := regad; v.cnt := 0; end if; when regad => v.regad := r.regad(3 downto 0) & to_X01(mdio); v.cnt := v.cnt + 1; if r.cnt = 4 then v.cnt := 0; if conv_integer(r.phyad) = address then v.state := ta; else v.state := idle; end if; end if; when ta => v.cnt := r.cnt + 1; if r.cnt = 0 then if (r.op = "01") and to_X01(mdio) /= '1' then v.cnt := 0; v.state := idle; end if; else if r.op = "10" then mdio <= '0'; v.cnt := 0; v.state := rdata; case r.regad is when "00000" => --ctrl (basic) v.regtmp := r.ctrl.reset & r.ctrl.loopback & r.ctrl.speedsel(1) & r.ctrl.anegen & r.ctrl.powerdown & r.ctrl.isolate & r.ctrl.restartaneg & r.ctrl.duplexmode & r.ctrl.coltest & r.ctrl.speedsel(0) & "000000"; when "00001" => --statuc (basic) v.regtmp := r.status.base100_t4 & r.status.base100_x_fd & r.status.base100_x_hd & r.status.fd_10 & r.status.hd_10 & r.status.base100_t2_fd & r.status.base100_t2_hd & r.status.extstat & '0' & r.status.mfpreamblesup & r.status.anegcmpt & r.status.remfault & r.status.anegability & r.status.linkstat & r.status.jabdetect & r.status.extcap; when "00010" => --PHY ID (extended) if extended_regs = 1 then v.regtmp := X"BBCD"; else v.cnt := 0; v.state := idle; end if; when "00011" => --PHY ID (extended) if extended_regs = 1 then v.regtmp := X"9C83"; else v.cnt := 0; v.state := idle; end if; when "00100" => --Auto-neg adv. (extended) if extended_regs = 1 then v.regtmp := r.anegadv.next_page & '0' & r.anegadv.remote_fault & r.anegadv.tech_ability & r.anegadv.selector; else v.cnt := 0; v.state := idle; end if; when "00101" => --Auto-neg link partner ability (extended) if extended_regs = 1 then v.regtmp := r.aneglp.next_page & '0' & r.aneglp.remote_fault & r.aneglp.tech_ability & r.aneglp.selector; else v.cnt := 0; v.state := idle; end if; when "00110" => --Auto-neg expansion (extended) if extended_regs = 1 then v.regtmp := "00000000000" & r.anegexp.par_detct_flt & r.anegexp.lp_np_able & r.anegexp.np_able & r.anegexp.page_rx & r.anegexp.lp_aneg_able; else v.cnt := 0; v.state := idle; end if; when "00111" => --Auto-neg next page (extended) if extended_regs = 1 then v.regtmp := r.anegnptx.next_page & '0' & r.anegnptx.message_page & r.anegnptx.ack2 & r.anegnptx.toggle & r.anegnptx.message; else v.cnt := 0; v.state := idle; end if; when "01000" => --Auto-neg link partner received next page (extended) if extended_regs = 1 then v.regtmp := r.anegnplp.next_page & '0' & r.anegnplp.message_page & r.anegnplp.ack2 & r.anegnplp.toggle & r.anegnplp.message; else v.cnt := 0; v.state := idle; end if; when "01001" => --Master-slave control (extended) if extended_regs = 1 then v.regtmp := r.mstslvctrl.tmode & r.mstslvctrl.manualcfgen & r.mstslvctrl.cfgval & r.mstslvctrl.porttype & r.mstslvctrl.base1000_t_fd & r.mstslvctrl.base1000_t_hd & "00000000"; else v.cnt := 0; v.state := idle; end if; when "01010" => --Master-slave status (extended) if extended_regs = 1 then v.regtmp := r.mstslvstat.cfgfault & r.mstslvstat.cfgres & r.mstslvstat.locrxstate & r.mstslvstat.remrxstate & r.mstslvstat.lpbase1000_t_fd & r.mstslvstat.lpbase1000_t_hd & "00" & r.mstslvstat.idlerrcnt; else v.cnt := 0; v.state := idle; end if; when "01111" => if (base1000_x_fd = 1) or (base1000_x_hd = 1) or (base1000_t_fd = 1) or (base1000_t_hd = 1) then v.regtmp := r.extstatus.base1000_x_fd & r.extstatus.base1000_x_hd & r.extstatus.base1000_t_fd & r.extstatus.base1000_t_hd & X"000"; else v.regtmp := (others => '0'); end if; when others => --PHY shall not drive MDIO when unimplemented registers --are accessed v.cnt := 0; v.state := idle; v.regtmp := (others => '0'); end case; if r.ctrl.reset = '1' then if r.regad = "00000" then v.regtmp := X"8000"; else v.regtmp := X"0000"; end if; end if; else if to_X01(mdio) /= '0'then v.cnt := 0; v.state := idle; else v.cnt := 0; v.state := wdata; end if; end if; end if; when rdata => v.cnt := r.cnt + 1; mdio <= r.regtmp(15-r.cnt); if r.cnt = 15 then v.state := idle; v.cnt := 0; end if; when wdata => v.cnt := r.cnt + 1; v.regtmp := r.regtmp(14 downto 0) & to_X01(mdio); if r.cnt = 15 then v.state := idle; v.cnt := 0; if r.ctrl.reset = '0' then case r.regad is when "00000" => v.ctrl.reset := v.regtmp(15); v.ctrl.loopback := v.regtmp(14); v.ctrl.speedsel(1) := v.regtmp(13); v.ctrl.anegen := v.regtmp(12); v.ctrl.powerdown := v.regtmp(11); v.ctrl.isolate := v.regtmp(10); v.ctrl.restartaneg := v.regtmp(9); v.ctrl.duplexmode := v.regtmp(8); v.ctrl.coltest := v.regtmp(7); v.ctrl.speedsel(0) := v.regtmp(6); when "00100" => if extended_regs = 1 then v.anegadv.remote_fault := r.regtmp(13); v.anegadv.tech_ability := r.regtmp(12 downto 5); v.anegadv.selector := r.regtmp(4 downto 0); end if; when "00111" => if extended_regs = 1 then v.anegnptx.next_page := r.regtmp(15); v.anegnptx.message_page := r.regtmp(13); v.anegnptx.ack2 := r.regtmp(12); v.anegnptx.message := r.regtmp(10 downto 0); end if; when "01001" => if extended_regs = 1 then v.mstslvctrl.tmode := r.regtmp(15 downto 13); v.mstslvctrl.manualcfgen := r.regtmp(12); v.mstslvctrl.cfgval := r.regtmp(11); v.mstslvctrl.porttype := r.regtmp(10); v.mstslvctrl.base1000_t_fd := r.regtmp(9); v.mstslvctrl.base1000_t_hd := r.regtmp(8); end if; when others => --no writable bits for other regs null; end case; end if; end if; when others => null; end case; if r.rstcnt > 19 then v.ctrl.reset := '0'; v.rstcnt := 0; else v.rstcnt := r.rstcnt + 1; end if; if (v.ctrl.reset and not r.ctrl.reset) = '1' then v.rstcnt := 0; end if; if r.ctrl.anegen = '1' then if r.anegcnt < 10 then v.anegcnt := r.anegcnt + 1; else v.status.anegcmpt := '1'; if (base1000_x_fd = 1) or (base1000_x_hd = 1) or (r.mstslvctrl.base1000_t_fd = '1') or (r.mstslvctrl.base1000_t_hd = '1') then v.ctrl.speedsel(1 downto 0) := "01"; elsif (r.anegadv.tech_ability(4) = '1') or (r.anegadv.tech_ability(3) = '1') or (r.anegadv.tech_ability(2) = '1') or (base100_t2_fd = 1) or (base100_t2_hd = 1) then v.ctrl.speedsel(1 downto 0) := "10"; else v.ctrl.speedsel(1 downto 0) := "00"; end if; if ((base1000_x_fd = 1) or (r.mstslvctrl.base1000_t_fd = '1')) or (((base100_t2_fd = 1) or (r.anegadv.tech_ability(3) = '1')) and (r.mstslvctrl.base1000_t_hd = '0') and (base1000_x_hd = 0)) or ((r.anegadv.tech_ability(1) = '1') and (base100_t2_hd = 0) and (r.anegadv.tech_ability(4) = '0') and (r.anegadv.tech_ability(2) = '0')) then v.ctrl.duplexmode := '1'; else v.ctrl.duplexmode := '0'; end if; end if; end if; if r.ctrl.restartaneg = '1' then v.anegcnt := 0; v.status.anegcmpt := '0'; v.ctrl.restartaneg := '0'; end if; rin <= v; end process; reg : process(rstn, mdc) is begin if rising_edge(mdc) then r <= rin; end if; -- -- RESET DELAY -- if rstd = '1' then -- r.ctrl.reset <= '1'; -- else -- r.ctrl.reset <= '0'; -- end if; -- RESET if (r.ctrl.reset or not rstn) = '1' then r.ctrl.loopback <= '0'; r.anegcnt <= 0; if (base1000_x_hd = 1) or (base1000_x_fd = 1) or (base1000_t_hd = 1) or (base1000_t_fd = 1) then r.ctrl.speedsel <= "01"; elsif (base100_x_hd = 1) or (base100_t2_hd = 1) or (base100_x_fd = 1) or (base100_t2_fd = 1) or (base100_t4 = 1) then r.ctrl.speedsel <= "10"; else r.ctrl.speedsel <= "00"; end if; r.ctrl.anegen <= conv_std_logic(aneg = 1); r.ctrl.powerdown <= '0'; r.ctrl.isolate <= '0'; r.ctrl.restartaneg <= '0'; if (base100_x_hd = 0) and (hd_10 = 0) and (base100_t2_hd = 0) and (base1000_x_hd = 0) and (base1000_t_hd = 0) then r.ctrl.duplexmode <= '1'; else r.ctrl.duplexmode <= '0'; end if; r.ctrl.coltest <= '0'; r.status.base100_t4 <= conv_std_logic(base100_t4 = 1); r.status.base100_x_fd <= conv_std_logic(base100_x_fd = 1); r.status.base100_x_hd <= conv_std_logic(base100_x_hd = 1); r.status.fd_10 <= conv_std_logic(fd_10 = 1); r.status.hd_10 <= conv_std_logic(hd_10 = 1); r.status.base100_t2_fd <= conv_std_logic(base100_t2_fd = 1); r.status.base100_t2_hd <= conv_std_logic(base100_t2_hd = 1); r.status.extstat <= conv_std_logic((base1000_x_fd = 1) or (base1000_x_hd = 1) or (base1000_t_fd = 1) or (base1000_t_hd = 1)); r.status.mfpreamblesup <= '0'; r.status.anegcmpt <= '0'; r.status.remfault <= '0'; r.status.anegability <= conv_std_logic(aneg = 1); r.status.linkstat <= '0'; r.status.jabdetect <= '0'; r.status.extcap <= conv_std_logic(extended_regs = 1); r.anegadv.next_page <= '0'; r.anegadv.remote_fault <= '0'; r.anegadv.tech_ability <= "000" & conv_std_logic(base100_t4 = 1) & conv_std_logic(base100_x_fd = 1) & conv_std_logic(base100_x_hd = 1) & conv_std_logic(fd_10 = 1) & conv_std_logic(hd_10 = 1); r.anegadv.selector <= "00001"; r.aneglp.next_page <= '0'; r.aneglp.remote_fault <= '0'; r.aneglp.tech_ability <= "000" & conv_std_logic(base100_t4 = 1) & conv_std_logic(base100_x_fd = 1) & conv_std_logic(base100_x_hd = 1) & conv_std_logic(fd_10 = 1) & conv_std_logic(hd_10 = 1); r.aneglp.selector <= "00001"; r.anegexp.par_detct_flt <= '0'; r.anegexp.lp_np_able <= '0'; r.anegexp.np_able <= '0'; r.anegexp.page_rx <= '0'; r.anegexp.lp_aneg_able <= '0'; r.anegnptx.next_page <= '0'; r.anegnptx.message_page <= '1'; r.anegnptx.ack2 <= '0'; r.anegnptx.toggle <= '0'; r.anegnptx.message <= "00000000001"; r.anegnplp.next_page <= '0'; r.anegnplp.message_page <= '1'; r.anegnplp.ack2 <= '0'; r.anegnplp.toggle <= '0'; r.anegnplp.message <= "00000000001"; r.mstslvctrl.tmode <= (others => '0'); r.mstslvctrl.manualcfgen <= '0'; r.mstslvctrl.cfgval <= '0'; r.mstslvctrl.porttype <= '0'; r.mstslvctrl.base1000_t_fd <= conv_std_logic(base1000_t_fd = 1); r.mstslvctrl.base1000_t_hd <= conv_std_logic(base1000_t_fd = 1); r.mstslvstat.cfgfault <= '0'; r.mstslvstat.cfgres <= '1'; r.mstslvstat.locrxstate <= '1'; r.mstslvstat.remrxstate <= '1'; r.mstslvstat.lpbase1000_t_fd <= conv_std_logic(base1000_t_fd = 1); r.mstslvstat.lpbase1000_t_hd <= conv_std_logic(base1000_t_fd = 1); r.mstslvstat.idlerrcnt <= (others => '0'); r.extstatus.base1000_x_fd <= conv_std_logic(base1000_x_fd = 1); r.extstatus.base1000_x_hd <= conv_std_logic(base1000_x_hd = 1); r.extstatus.base1000_t_fd <= conv_std_logic(base1000_t_fd = 1); r.extstatus.base1000_t_hd <= conv_std_logic(base1000_t_hd = 1); end if; if rstn = '0' then r.cnt <= 0; r.state <= idle; r.rstcnt <= 0; r.ctrl.reset <= '1'; end if; end process; loopback_sel : process(r.ctrl.loopback, int_clk, gtx_clk, r.ctrl.speedsel, txd, tx_en) is begin if r.ctrl.loopback = '1' then rx_col <= '0'; rx_crs <= tx_en; rx_dv <= tx_en; rx_er <= tx_er; rxd <= txd; if r.ctrl.speedsel /= "01" then rx_clk <= int_clk; tx_clk <= int_clk; else rx_clk <= gtx_clk; tx_clk <= clkslow; end if; else rx_col <= '0'; rx_crs <= '0'; rx_dv <= '0'; rxd <= (others => '0'); if r.ctrl.speedsel /= "01" then rx_clk <= int_clk; tx_clk <= int_clk after 3 ns; else rx_clk <= gtx_clk; tx_clk <= clkslow; end if; end if; end process; end; -- pragma translate_on
library ieee; use ieee.std_logic_1164.all; entity func01 is port (a : std_logic_vector (7 downto 0); b : out std_logic_vector (7 downto 0)); end func01; architecture behav of func01 is function gen_and (v : std_logic_vector (7 downto 0); len : natural := 6) return std_logic_vector is variable res : std_logic_vector (7 downto 0); begin res := (others => '0'); res (len - 1 downto 0) := (others => '1'); return res and v; end gen_and; begin b <= gen_and (a); end behav;
-- Test File --
-------------------------------------------------------------------------------- -- Copyright (c) 2020 David Banks and Roland Leurs -- -- based on work by Alan Daly. Copyright(c) 2009. All rights reserved. -------------------------------------------------------------------------------- -- ____ ____ -- / /\/ / -- /___/ \ / -- \ \ \/ -- \ \ -- / / Filename : AtomFpga_Atom2K18.vhd -- /___/ /\ Timestamp : 13/06/2020 -- \ \ / \ -- \___\/\___\ -- --Design Name: AtomFpga_Atom2K18 --Device: Spartan6 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; library unisim; use unisim.vcomponents.all; entity AtomFpga_Atom2K18 is generic ( -- Design identifier, readable after configuration from #BFFB DESIGN_NUM : integer := 0; -- Set CImplCpu65c02 to true to use a 65C02 core rather than a 6502 CImplCpu65c02 : boolean := false; -- Set CImplAtoMMC to true to use an internal AtoMMC CImplAtoMMC2 : boolean := true; -- Set CImplDebugger to true to enable the ICE-6502 Debugger CImplDebugger : boolean := false; -- Set CImplDebugger to true to enable the ICE-6502 Debugger CImplSID : boolean := true -- NOTE: If CImplAtoMMC2 and CImplDebugger are both true, several -- smaller features are disabled to make space in the FPGA: -- GODIL: SID and Mouse -- -- If you are not happy with this, then you can experiment with -- enabling individual features in the constants section below. ); port ( -- Clock clk_50 : in std_logic; -- External Bus bus_a : out std_logic_vector(18 downto 0); bus_d : inout std_logic_vector(7 downto 0); bus_blk_b : out std_logic; bus_phi2 : out std_logic; bus_rnw : out std_logic; bus_nrds : out std_logic; bus_nwds : out std_logic; bus_sync : out std_logic; bus_nmi_n : in std_logic; bus_irq_n : in std_logic; bus_rst_n : inout std_logic; bus_rdy : in std_logic; bus_so : in std_logic; -- External device chip selects cs_ram_n : out std_logic; cs_rom_n : out std_logic; cs_via_n : out std_logic; cs_tube_n : out std_logic; cs_buf_n : out std_logic; buf_dir : out std_logic; -- Video vga_red1 : out std_logic; -- this is the MSB vga_red2 : out std_logic; vga_green1 : out std_logic; -- this is the MSB vga_green2 : out std_logic; vga_blue1 : out std_logic; -- this is the MSB vga_blue2 : out std_logic; vga_vsync : out std_logic; vga_hsync : out std_logic; -- Audio audio : out std_logic; dac_cs_n : out std_logic; dac_sdi : out std_logic; dac_ldac_n : out std_logic; dac_sck : out std_logic; -- Keyboard kbd_pa : out std_logic_vector(3 downto 0); kbd_pb : in std_logic_vector(7 downto 0); kbd_pc : in std_logic_vector(6 downto 6); -- Mouse ps2_mouse_clk : inout std_logic; ps2_mouse_data : inout std_logic; -- Cassette cas_in : in std_logic; cas_out : out std_logic; -- Serial serial_tx : out std_logic; serial_rx : in std_logic; -- SD Card mmc_led_red : out std_logic; mmc_led_green : out std_logic; mmc_clk : out std_logic; mmc_ss : out std_logic; mmc_mosi : out std_logic; mmc_miso : in std_logic; -- LEDs on FPGA Module led : out std_logic_vector(1 to 8); -- Switches on FPGA Module sw : in std_logic_vector(2 downto 1); -- USB Uart on FPGA Module avr_tx : out std_logic; avr_rx : in std_logic ); end AtomFpga_Atom2K18; architecture behavioral of AtomFpga_Atom2K18 is ------------------------------------------------------ -- Constants controlling single features ------------------------------------------------------ -- Approx resource usage -- -- (5,720) (32) -- LUTs RamB16 -- Baseline 1197 5.5 -- CImplCpu65C02 -47 1.5 -- CImplAtoMMC2 1325 11 -- CImplDebugger 2342 11 -- CImplVGA80x40 116 -- CImplSID 826 2 -- CImplHWScrolling 90 -- CImplMouse 250 1 -- CImplUart 167 -- CImplDoubleVideo -35 4 -- CImplVIA 254 -- CImplLEDs 131 -- CImplProfilingCounters 174 -- CImplRTC 173 -- CImplSAM 136 -- CImplPAM 28 -- CImplPalette 100 -- CImplConfig 104 -- When both AtoMMC2 and Debugger are included, we need to disable other -- features to make space constant CImplMakeSpace1 : boolean := CImplAtoMMC2 and CImplDebugger and CImplSID; constant CImplMakeSpace2 : boolean := CImplAtoMMC2 and CImplDebugger and not CImplSID; -- GODIL features constant CImplGraphicsExt : boolean := true; constant CImplSoftChar : boolean := true; constant CImplVGA80x40 : boolean := true; constant CImplHWScrolling : boolean := not CImplMakeSpace1; constant CImplMouse : boolean := not CImplMakeSpace1 and not CImplMakeSpace2; constant CImplUart : boolean := not CImplMakeSpace1; constant CImplDoubleVideo : boolean := not CImplMakeSpace1; -- Atom2K18 features constant CImplVIA : boolean := true; constant CImplLEDs : boolean := true; constant CImplProfilingCounters : boolean := not CImplMakeSpace1; constant CImplRTC : boolean := not CImplMakeSpace1; constant CImplSAM : boolean := true; constant CImplPAM : boolean := true; constant CImplPalette : boolean := true; constant CImplConfig : boolean := true; ------------------------------------------------ -- Signals ------------------------------------------------ -- Clock generation signal clk0 : std_logic; signal clk1 : std_logic; signal clk2 : std_logic; signal clkfb : std_logic; signal clkfb_buf : std_logic; signal clkin_buf : std_logic; signal clock_16 : std_logic; signal clock_25 : std_logic; signal clock_32 : std_logic; signal clock_debugger : std_logic; -- Reset generation signal reset_n : std_logic; signal int_reset_n : std_logic; signal ext_reset_n : std_logic; signal powerup_reset_n : std_logic; signal reset_counter : std_logic_vector(9 downto 0); -- External bus interface signal phi2 : std_logic; signal rnw : std_logic; signal sync : std_logic; -- 16 bit address generated by the CPU signal cpu_a : std_logic_vector(15 downto 0); -- 19 bit external address generated by the RamRom signal extern_a : std_logic_vector(18 downto 0); signal extern_din : std_logic_vector(7 downto 0); signal extern_dout : std_logic_vector(7 downto 0); signal extern_bus : std_logic; signal extern_ce : std_logic; signal extern_we : std_logic; -- Audio mixer and DAC constant dacwidth : integer := 16; -- this needs to match the MCP4822 frame size signal atom_audio : std_logic; signal sid_audio : std_logic_vector(17 downto 0); signal cycle : std_logic_vector(6 downto 0); signal audio_l : std_logic_vector(dacwidth - 1 downto 0); signal audio_r : std_logic_vector(dacwidth - 1 downto 0); signal dac_shift_reg_l : std_logic_vector(dacwidth - 1 downto 0); signal dac_shift_reg_r : std_logic_vector(dacwidth - 1 downto 0); -- Matrix Keyboard signal ps2_kbd_enable : std_logic; signal ps2_kbd_clk : std_logic; signal ps2_kbd_data : std_logic; signal int_kbd_pb : std_logic_vector(7 downto 0); signal int_kbd_pc : std_logic_vector(6 downto 6); -- External devices signal extern_rom : std_logic; signal extern_ram : std_logic; signal extern_tube : std_logic; signal extern_via : std_logic; signal extern_pam : std_logic; -- enable for #B1xx signal extern_sam_rd : std_logic; -- enable for #BFF0 signal extern_sam_wr : std_logic; -- enable for #BFF1 -- Internal devices signal intern_led : std_logic; signal intern_rtc : std_logic; signal intern_pam_reg0 : std_logic; -- enable for #BFF8 signal intern_pam_reg1 : std_logic; -- enable for #BFF9 signal intern_sam_reg : std_logic; -- enable for #BFF2 signal intern_palette : std_logic; -- enable for #BD0x signal intern_config : std_logic; -- enable for #BFFB -- Reconfiguration signal config_data : std_logic_vector(7 downto 0) := std_logic_vector(to_unsigned(DESIGN_NUM, 8)); -- Colour palette registers signal palette_data : std_logic_vector(7 downto 0); signal logical_colour : std_logic_vector(3 downto 0); signal physical_colour : std_logic_vector(5 downto 0); type palette_type is array (0 to 15) of std_logic_vector(5 downto 0); signal palette : palette_type := ( 0 => "000000", 1 => "000011", 2 => "000100", 3 => "000111", 4 => "001000", 5 => "001011", 6 => "001100", 7 => "001111", 8 => "110000", 9 => "110011", 10 => "110100", 11 => "110111", 12 => "111000", 13 => "111011", 14 => "111100", 15 => "111111" ); -- Video signal vga_blank : std_logic; signal hsync_vga : std_logic; signal vsync_vga : std_logic; signal red_vga : std_logic_vector(2 downto 0); signal green_vga : std_logic_vector(2 downto 0); signal blue_vga : std_logic_vector(2 downto 0); -- PAM relayed signals signal pam_page : std_logic_vector(8 downto 0); -- SAM related signals signal sam_rd_addr : std_logic_vector(17 downto 0); signal sam_rd_next : std_logic_vector(17 downto 0); signal sam_rd_inc : std_logic; signal sam_wr_addr : std_logic_vector(17 downto 0); signal sam_wr_next : std_logic_vector(17 downto 0); signal sam_wr_inc : std_logic; signal sam_empty : std_logic; signal sam_full : std_logic; signal sam_underflow : std_logic; signal sam_overflow : std_logic; signal sam_status : std_logic_vector(7 downto 0); -- Switch debouncing signal sw_pressed : std_logic_vector(2 downto 1); -- LED control/ Speedometer signal led_ctrl_reg : std_logic_vector(7 downto 0); signal led_data_reg : std_logic_vector(7 downto 0); signal last_sync : std_logic; signal instr_count : unsigned(15 downto 0); signal led_state : unsigned(3 downto 0); signal led_data : std_logic_vector(7 downto 0); -- RTC signal rtc_seconds : std_logic_vector(7 downto 0); signal rtc_minutes : std_logic_vector(7 downto 0); signal rtc_hours : std_logic_vector(7 downto 0); signal rtc_day : std_logic_vector(7 downto 0) := x"01"; signal rtc_month : std_logic_vector(7 downto 0) := x"01"; signal rtc_year : std_logic_vector(7 downto 0); signal rtc_irq_flags : std_logic_vector(7 downto 0); signal rtc_control : std_logic_vector(7 downto 0); signal rtc_10hz : std_logic_vector(3 downto 0); signal rtc_cnt : std_logic_vector(21 downto 0); signal rtc_irq_n : std_logic := '1'; signal rtc_data : std_logic_vector(7 downto 0); -- Interrupt logic signal irq_n : std_logic := '1'; -- Debug mode signal remote_access : std_logic; signal debug_mode : std_logic; begin ------------------------------------------------ -- Clock generation -- -- from the on-board 50MHz Oscillator -- using a PLL for the 16/32 MHz -- using a DCM for the 25.175 MHz (approx) ------------------------------------------------ inst_clkin_buf : IBUFG port map ( I => clk_50, O => clkin_buf ); inst_PLL : PLL_BASE generic map ( BANDWIDTH => "OPTIMIZED", CLK_FEEDBACK => "CLKFBOUT", COMPENSATION => "SYSTEM_SYNCHRONOUS", DIVCLK_DIVIDE => 1, CLKFBOUT_MULT => 16, -- 50 * 16 = 800 CLKFBOUT_PHASE => 0.000, CLKOUT0_DIVIDE => 50, -- 800 / 50 = 16MHz CLKOUT0_PHASE => 0.000, CLKOUT0_DUTY_CYCLE => 0.500, CLKOUT1_DIVIDE => 25, -- 800 / 25 = 32MHz CLKOUT1_PHASE => 0.000, CLKOUT1_DUTY_CYCLE => 0.500, CLKOUT2_DIVIDE => 31, -- 800 / 31 = 25.0864MHz CLKOUT2_PHASE => 0.000, CLKOUT2_DUTY_CYCLE => 0.500, CLKIN_PERIOD => 20.000, REF_JITTER => 0.010 ) port map ( -- Output clocks CLKFBOUT => clkfb, CLKOUT0 => clk0, CLKOUT1 => clk1, CLKOUT2 => clk2, RST => '0', -- Input clock control CLKFBIN => clkfb_buf, CLKIN => clkin_buf ); inst_clkfb_buf : BUFG port map ( I => clkfb, O => clkfb_buf ); inst_clk0_buf : BUFG port map ( I => clk0, O => clock_16 ); inst_clk1_buf : BUFG port map ( I => clk1, O => clock_32 ); inst_clk2_buf : BUFG port map ( I => clk2, O => clock_debugger ); inst_DCM : DCM generic map ( CLKFX_MULTIPLY => 11, CLKFX_DIVIDE => 14, CLKIN_PERIOD => 31.250, CLK_FEEDBACK => "NONE" ) port map ( CLKIN => clock_32, CLKFB => '0', RST => '0', DSSEN => '0', PSINCDEC => '0', PSEN => '0', PSCLK => '0', CLKFX => clock_25 ); -------------------------------------------------------- -- Reset generation -------------------------------------------------------- -- The external reset signal is not asserted on power up -- This internal counter forces power up reset to happen -- This is needed by AtomGodilVideo to initialize some of the registers process (clock_32) begin if rising_edge(clock_32) then if (reset_counter(reset_counter'high) = '0') then reset_counter <= reset_counter + 1; end if; powerup_reset_n <= reset_counter(reset_counter'high); -- logically or the internal and external resets, for use in this file -- this is now synchronised to the 32MHz clock reset_n <= ext_reset_n and int_reset_n; end if; end process; -- logically or the powerup and bus resets, to pass down to the core ext_reset_n <= powerup_reset_n and bus_rst_n; -- Drive the external reset low when there's a power up reset, or -- when int_reset_n (currently just F10 on the PS/2 keyboard). -- Otherwise, it becomes and input (there's a 3K3 external pullup) bus_rst_n <= '0' when powerup_reset_n = '0' or int_reset_n = '0' else 'Z'; ------------------------------------------------ -- Atom FPGA Core ------------------------------------------------ inst_AtomFpga_Core : entity work.AtomFpga_Core generic map ( CImplCpu65c02 => CImplCpu65c02, CImplDebugger => CImplDebugger, CImplSDDOS => false, CImplAtoMMC2 => CImplAtoMMC2, CImplGraphicsExt => CImplGraphicsExt, CImplSoftChar => CImplSoftChar, CImplSID => CImplSID, CImplVGA80x40 => CImplVGA80x40, CImplHWScrolling => CImplHWScrolling, CImplMouse => CImplMouse, CImplUart => CImplUart, CImplDoubleVideo => CImplDoubleVideo, CImplRamRomNone => false, CImplRamRomPhill => false, CImplRamRomAtom2015 => true, CImplRamRomSchakelKaart => false, CImplVIA => CImplVIA, CImplProfilingCounters => CImplProfilingCounters, MainClockSpeed => 32000000, DefaultBaud => 115200 ) port map( clk_vga => clock_25, clk_main => clock_32, clk_avr => clock_32, -- this is the AtoMMC AVR clock clk_avr_debug => clock_debugger, -- this is the ICE6502 AVR clock clk_dac => clock_32, clk_32M00 => clock_32, kbd_pa => kbd_pa, kbd_pb => int_kbd_pb, kbd_pc => int_kbd_pc, ps2_clk => ps2_kbd_clk, ps2_data => ps2_kbd_data, ps2_mouse_clk => ps2_mouse_clk, ps2_mouse_data => ps2_mouse_data, powerup_reset_n => powerup_reset_n, ext_reset_n => ext_reset_n, int_reset_n => int_reset_n, red => red_vga, green => green_vga, blue => blue_vga, vsync => vsync_vga, hsync => hsync_vga, blank => vga_blank, phi2 => phi2, sync => sync, rnw => rnw, rdy => bus_rdy, so => bus_so, irq_n => irq_n, nmi_n => bus_nmi_n, addr => cpu_a, ExternBus => extern_bus, -- active high external bus select ExternCE => extern_ce, -- active high Ram/Rom chip select ExternWE => extern_we, -- active high Ram/Rom write ExternA => extern_a, ExternDin => extern_din, ExternDout => extern_dout, sid_audio => open, sid_audio_d => sid_audio, atom_audio => atom_audio, SDMISO => mmc_miso, SDSS => mmc_ss, SDCLK => mmc_clk, SDMOSI => mmc_mosi, uart_RxD => serial_rx, uart_TxD => serial_tx, avr_RxD => avr_rx, avr_TxD => avr_tx, cas_in => cas_in, cas_out => cas_out, LED1 => mmc_led_green, LED2 => mmc_led_red, charSet => '1' ); ------------------------------------------------ -- External bus ------------------------------------------------ -- 22/4/2019 -- -- I'm not happy with the design of the external bus interface, for the -- following reasons: -- -- 1. extern_we and extern_ce are mediated by the pluggable RAMROM modules -- in AtomFpga_Core. This means they are not active when external devices -- in Bxxx are accessed. -- -- 2. As a work around, I've exposed the 6502 RNW (rnw) signal directly, -- which is probably the right thing to do, as Atom2K18 does have a full -- external bus. But it's now confusing as to when to use extern_we and -- when to use rnw. -- -- 3. It's not clear how addresses on extern_a correspond to what the CPU -- accessed, again because this signal is the output of a RAMROM module. -- -- 4. It seemed wrong to have to add ExternTube and ExternVIA signals to the -- AtomFpga_Core. It should have been possible to implement these externally -- in the FPGA target specific wrapper. But (3) made this difficult. -- -- 5. The NRDS and NWDS signals are currently generated from the RAMROM -- specific extern_ce and extern_we. It would be better if they uses -- rnw and ignored extern_ce. But this is more dangerous, so lets -- see how the current version works before breaking things more! -- -- What's in place currently will work (I think) for the VIA and Tube, but -- will not currently allow any devices to be added to the bus. Need to -- talk with Roland about how he thinks the external bus should be mapped -- into the Atom address space. -- -- 22/4/2019 -- -- Roland's reply: -- -- All addresses from #B000 - #BFFF should be external except for: -- #B000 - #B003 (8255) -- #B400 - #B403 (AtoMMC) -- #B800 - #B80F (6522) -- #BD00 - #BDFF (Godil + reserved address space) -- #BFF0 - #BFFF (control registers, some addresses are reserved) -- -- 23/4/2019 -- -- For consistency, I ended up using a minimum of 16-byte blocks. -- This is all implemented in AtomFpga_Core -- -- To answer my concerns above -- 1. This is resolved by adding a seperate ExternBus output from the core -- 2. I'm happy exposing RNW directly -- 3. The RamRom modules should just output the CPU address when not selected -- 4. ExternVia and ExternTube replaced with ExternBus -- 5. Use ExternCE/ExternWE (for RamRom) and ExternBus/rnw (for Bus) bus_phi2 <= phi2; bus_rnw <= rnw; bus_sync <= sync; -- Used on the bus to enable I/O devices in a safe manner bus_blk_b <= not extern_bus; bus_a <= "1" & sam_rd_addr when extern_sam_rd = '1' and rnw = '1' and CImplSAM else "1" & sam_wr_addr when extern_sam_wr = '1' and rnw = '0' and CImplSAM else "00" & pam_page & extern_a(7 downto 0) when extern_pam = '1' and CImplPAM else extern_a; -- Enable data out of the FPGA onto the 3.3V databus in the following cases: -- case 1. all writes from the "core" -- case 2. reads that are internal to the "core", when debug mode enables -- case 3. reads of the led registers, when debug mode enabled -- case 4. reads of the rtc registers, when debug mode enabled bus_d <= extern_din when phi2 = '1' and rnw = '0' else extern_din when phi2 = '1' and extern_ce = '0' and extern_bus = '0' and debug_mode = '1' else led_data when phi2 = '1' and intern_led = '1' and debug_mode = '1' and CImplLEDs else rtc_data when phi2 = '1' and intern_rtc = '1' and debug_mode = '1' and CImplRTC else palette_data when phi2 = '1' and intern_palette = '1' and debug_mode = '1' and CImplPalette else config_data when phi2 = '1' and intern_config = '1' and debug_mode = '1' and CImplConfig else sam_status when phi2 = '1' and intern_sam_reg = '1' and debug_mode = '1' and CImplSAM else pam_page(7 downto 0) when phi2 = '1' and intern_pam_reg0 = '1' and debug_mode = '1' and CImplPAM else "0000000" & pam_page(8) when phi2 = '1' and intern_pam_reg1 = '1' and debug_mode = '1' and CImplPAM else "ZZZZZZZZ"; bus_nrds <= '0' when extern_ce = '1' and extern_we = '0' and phi2 = '1' else -- RamRom '0' when extern_bus = '1' and rnw = '1' and phi2 = '1' else -- Bus '1'; bus_nwds <= '0' when extern_ce = '1' and extern_we = '1' and phi2 = '1' else -- RamRom '0' when extern_bus = '1' and rnw = '0' and phi2 = '1' else -- Bus '1'; -- data back into the Atom Core extern_dout <= led_data when intern_led = '1' and CImplLEDs else rtc_data when intern_rtc = '1' and CImplRTC else palette_data when intern_palette = '1' and CImplPalette else config_data when intern_config = '1' and CImplConfig else sam_status when intern_sam_reg = '1' and CImplSAM else pam_page(7 downto 0) when intern_pam_reg0 = '1' and CImplPAM else "0000000" & pam_page(8) when intern_pam_reg1 = '1' and CImplPAM else bus_d; ------------------------------------------------ -- Interrupt logic ------------------------------------------------ irq_n <= bus_irq_n and rtc_irq_n; ------------------------------------------------ -- Sequential Access Memory (SAM) ------------------------------------------------ sam_block: if CImplSAM generate process(clock_32) begin if rising_edge(clock_32) then if intern_sam_reg = '1' and rnw = '0' and phi2 = '1' then -- a write of '1' to SAM control register bit 0 clears the overflow error if extern_din(0) = '1' then sam_overflow <= '0'; end if; -- a write of '1' to SAM control register bit 1 clears the underflow error if extern_din(1) = '1' then sam_underflow <= '0'; end if; -- a write of '1' to SAM control register bit 2 resets everything if extern_din(2) = '1' then sam_rd_inc <= '0'; sam_wr_inc <= '0'; sam_rd_addr <= (others => '0'); sam_wr_addr <= (others => '0'); sam_underflow <= '0'; sam_overflow <= '0'; end if; elsif extern_sam_rd = '1' and rnw = '1' and phi2 = '1' then -- a read from the SAM data register if sam_empty = '0' then sam_rd_inc <= '1'; else sam_underflow <= '1'; end if; elsif extern_sam_wr = '1' and rnw = '0' and phi2 = '1' then -- a write to the SAM data register if sam_full = '0' then sam_wr_inc <= '1'; else sam_overflow <= '1'; end if; elsif phi2 = '0' then -- Handle the update of the SAM addresses as soon as Phi2 goes -- low at the start of the next bus cycle if sam_rd_inc = '1' then sam_rd_addr <= sam_rd_next; end if; if sam_wr_inc = '1' then sam_wr_addr <= sam_wr_next; end if; -- clear the inc flags, so we only increment by one sam_rd_inc <= '0'; sam_wr_inc <= '0'; end if; end if; end process; -- combinatorial logic for full,empty flags process(sam_rd_addr, sam_wr_addr) begin if sam_rd_addr = sam_wr_addr then sam_empty <= '1'; else sam_empty <= '0'; end if; if sam_wr_next = sam_rd_addr then sam_full <= '1'; else sam_full <= '0'; end if; end process; -- combinatorial logic for next rd address process(sam_rd_addr) begin sam_rd_next <= sam_rd_addr + 1; end process; -- combinatorial logic for next write address process(sam_wr_addr) begin sam_wr_next <= sam_wr_addr + 1; end process; -- Status byte sam_status <= sam_empty & sam_full & "0000" & sam_underflow & sam_overflow; end generate; ------------------------------------------------ -- Page Access Memory (PAM) ------------------------------------------------ pam_block: if CImplPAM generate process(clock_32) begin if rising_edge(clock_32) then if rnw = '0' and phi2 = '1' then if intern_pam_reg0 = '1' then pam_page(7 downto 0) <= extern_din; end if; if intern_pam_reg1 = '1' then pam_page(8) <= extern_din(0); end if; end if; end if; end process; end generate; ------------------------------------------------ -- Internal device chip selects ------------------------------------------------ intern_led <= '1' when extern_bus = '1' and extern_a(15 downto 4) = x"BFE" and CImplLEDs else '0'; intern_rtc <= '1' when extern_bus = '1' and extern_a(15 downto 4) = x"BFD" and CImplRTC else '0'; intern_sam_reg <= '1' when extern_bus = '1' and extern_a(15 downto 0) = x"BFF2" and CImplSAM else '0'; intern_pam_reg0 <= '1' when extern_bus = '1' and extern_a(15 downto 0) = x"BFF8" and CImplPAM else '0'; intern_pam_reg1 <= '1' when extern_bus = '1' and extern_a(15 downto 0) = x"BFF9" and CImplPAM else '0'; intern_palette <= '1' when extern_bus = '1' and extern_a(15 downto 4) = x"BD0" and CImplPalette else '0'; intern_config <= '1' when extern_bus = '1' and extern_a(15 downto 0) = x"BFFB" and CImplConfig else '0'; ------------------------------------------------ -- External device chip selects ------------------------------------------------ extern_rom <= '1' when extern_ce = '1' and extern_a(17) = '0' else '0'; extern_ram <= '1' when extern_ce = '1' and extern_a(17) = '1' else '1' when (extern_sam_rd = '1' or extern_sam_wr = '1') and CImplSAM else '1' when extern_pam = '1' and CImplPAM else '0'; extern_via <= '1' when extern_bus = '1' and extern_a(15 downto 4) = x"B81" else '0'; extern_tube <= '1' when extern_bus = '1' and extern_a(15 downto 4) = x"BEE" else '0'; extern_sam_rd <= '1' when extern_bus = '1' and extern_a(15 downto 0) = x"BFF0" and CImplSAM else '0'; extern_sam_wr <= '1' when extern_bus = '1' and extern_a(15 downto 0) = x"BFF1" and CImplSAM else '0'; extern_pam <= '1' when extern_bus = '1' and extern_a(15 downto 8) = x"B1" and CImplPAM else '0'; cs_rom_n <= not(extern_rom); cs_ram_n <= not(extern_ram); cs_via_n <= not(extern_via); cs_tube_n <= not(extern_tube); -- A remote access is to a device on the far side of the data buffers -- The tube is on the near side of the data buffers, so exclude -- The LED and RTC registers are internal to this module, so exclude remote_access <= '1' when extern_bus = '1' and extern_tube = '0' and extern_sam_rd = '0' and extern_sam_wr = '0' and extern_pam = '0' and intern_led = '0' and intern_rtc = '0' and intern_palette = '0' and intern_config = '0' and intern_sam_reg = '0' and intern_pam_reg0 = '0' and intern_pam_reg1 = '0' else '0'; -- In normal mode, enable the data buffers only for remote accesses. -- In debug mode, enable the data buffers all the time. cs_buf_n <= '0' when phi2 = '1' and debug_mode = '1' else '0' when phi2 = '1' and remote_access = '1' and debug_mode = '0' else '1'; -- In normal mode, the direction is inward for reads, outward for writes. -- In debug mode, the direction is inward for remote reads, outward for everything else. buf_dir <= '1' when remote_access = '1' and rnw = '1' and debug_mode = '1' else '0' when debug_mode = '1' else rnw; ------------------------------------------------ -- Audio mixer ------------------------------------------------ process(atom_audio, sid_audio) variable l : std_logic_vector(dacwidth - 1 downto 0); variable r : std_logic_vector(dacwidth - 1 downto 0); begin -- Atom Audio is a single bit if (atom_audio = '1') then l := x"1000"; r := x"1000"; else l := x"EFFF"; r := x"EFFF"; end if; -- SID output is 18-bit unsigned if CImplSID then l := l + sid_audio(17 downto 2); r := r + sid_audio(17 downto 2); else l := l + x"8000"; r := r + x"8000"; end if; -- Currently the left and right channels are identical audio_l <= l; audio_r <= r; end process; ------------------------------------------------ -- MCP4822 SPI 12-bit DAC -- -- note: this actually takes 16-bit samples ------------------------------------------------ process(clock_16) begin if rising_edge(clock_16) then cycle <= cycle + 1; if (unsigned(cycle(5 downto 0)) < 33) then dac_cs_n <= '0'; dac_sck <= cycle(0); else dac_cs_n <= '1'; dac_sck <= '0'; end if; if (cycle(0) = '0') then if (unsigned(cycle(5 downto 1)) = 0) then if (cycle(6) = '0') then dac_shift_reg_l <= audio_l; dac_shift_reg_r <= audio_r; end if; dac_sdi <= cycle(6); elsif (unsigned(cycle(5 downto 1)) < 4) then dac_sdi <= '1'; elsif (unsigned(cycle(5 downto 1)) < 16) then if (cycle(6) = '0') then dac_sdi <= dac_shift_reg_l(dacwidth - 1); dac_shift_reg_l <= dac_shift_reg_l(dacwidth - 2 downto 0) & '0'; else dac_sdi <= dac_shift_reg_r(dacwidth - 1); dac_shift_reg_r <= dac_shift_reg_r(dacwidth - 2 downto 0) & '0'; end if; else dac_sdi <= '0'; end if; if (unsigned(cycle(6 downto 1)) = 60) then dac_ldac_n <= '0'; else dac_ldac_n <= '1'; end if; end if; end if; end process; ------------------------------------------------ -- Atom Audio ------------------------------------------------ audio <= atom_audio; ------------------------------------------------ -- Keyboard ------------------------------------------------ process(clock_32) begin if rising_edge(clock_32) then if powerup_reset_n = '0' then -- PC(7) linked to ground indicates a PS/2 keyboard should be used ps2_kbd_enable <= not kbd_pc(6); end if; end if; end process; -- Enable/Disable the PS/2 keyboard ps2_kbd_clk <= kbd_pb(6) when ps2_kbd_enable = '1' else '1'; ps2_kbd_data <= kbd_pb(7) when ps2_kbd_enable = '1' else '1'; -- Enable/Disable the Matrix keyboard int_kbd_pb <= kbd_pb when ps2_kbd_enable = '0' else (others => '1'); int_kbd_pc <= kbd_pc when ps2_kbd_enable = '0' else (others => '1'); -------------------------------------------------------- -- LED control / speedometer -------------------------------------------------------- leds_block: if CImplLEDs generate inst_debounce1 : entity work.debounce generic map ( counter_size => 20 -- 32ms @ 32MHz ) port map ( clock => clock_32, button => sw(1), pressed => sw_pressed(1) ); inst_debounce2 : entity work.debounce generic map ( counter_size => 20 -- 32ms @ 32MHz ) port map ( clock => clock_32, button => sw(2), pressed => sw_pressed(2) ); process(clock_32) begin if rising_edge(clock_32) then -- SW1/2 manually increment/decrement bits 0/1 of the LED control register if sw_pressed(1) = '1' then led_ctrl_reg(1 downto 0) <= led_ctrl_reg(1 downto 0) - 1; elsif sw_pressed(2) = '1' then led_ctrl_reg(1 downto 0) <= led_ctrl_reg(1 downto 0) + 1; end if; -- LED control/data registers if intern_led = '1' and rnw = '0' and phi2 = '1' then if extern_a(0) = '1' then led_data_reg <= extern_din; else led_ctrl_reg <= extern_din; end if; end if; -- LED Speedometer last_sync <= sync; if last_sync = '0' and sync = '1' then instr_count <= instr_count + 1; if instr_count = 0 then if led_state = x"D" then led_state <= (others => '0'); else led_state <= led_state + 1; end if; end if; end if; -- LED driver logic case led_ctrl_reg(1 downto 0) is when "01" => case led_state is when x"0" => led <= "01000000"; when x"1" => led <= "10000000"; when x"2" => led <= "01000000"; when x"3" => led <= "00100000"; when x"4" => led <= "00010000"; when x"5" => led <= "00001000"; when x"6" => led <= "00000100"; when x"7" => led <= "00000010"; when x"8" => led <= "00000001"; when x"9" => led <= "00000010"; when x"A" => led <= "00000100"; when x"B" => led <= "00001000"; when x"C" => led <= "00010000"; when x"D" => led <= "00100000"; when others => led <= "00000000"; end case; when "10" => led <= cpu_a(15 downto 8); when "11" => led <= cpu_a(7 downto 0); when others => led <= led_data_reg; end case; end if; end process; led_data <= led_ctrl_reg when extern_a(0) = '0' else led_data_reg when extern_a(1) = '1' else x"00"; -- Enable debug mode (logic analyzer output to data bus)in address mode -- (when the LEDs are showing the low or high address bus) debug_mode <= led_ctrl_reg(1); end generate; not_leds_block: if not CImplLEDs generate led <= x"00"; debug_mode <= '0'; end generate; -------------------------------------------------------- -- RTC Real Time Clock -------------------------------------------------------- rtc_block: if CImplRTC generate process (clock_32) begin if rising_edge(clock_32) then if rtc_control(7) = '0' then if rtc_cnt = 3199999 then rtc_cnt <= (others => '0'); rtc_10hz <= rtc_10hz + 1; if rtc_control(0) = '1' then rtc_irq_flags(0) <= '1'; rtc_irq_flags(7) <= '1'; end if; else rtc_cnt <= rtc_cnt + 1; end if; if rtc_10hz = 10 then rtc_seconds <= rtc_seconds + 1; rtc_10hz <= x"0"; if rtc_control(1) = '1' then rtc_irq_flags(1) <= '1'; rtc_irq_flags(7) <= '1'; end if; end if; if rtc_seconds = 60 then rtc_minutes <= rtc_minutes + 1; rtc_seconds <= x"00"; if rtc_control(2) = '1' then rtc_irq_flags(2) <= '1'; rtc_irq_flags(7) <= '1'; end if; end if; if rtc_minutes = 60 then rtc_hours <= rtc_hours + 1; rtc_minutes <= x"00"; if rtc_control(3) = '1' then rtc_irq_flags(3) <= '1'; rtc_irq_flags(7) <= '1'; end if; end if; if rtc_hours = 24 then rtc_day <= rtc_day + 1; rtc_hours <= x"00"; if rtc_control(4) = '1' then rtc_irq_flags(4) <= '1'; rtc_irq_flags(7) <= '1'; end if; end if; if (rtc_day = 31 and (rtc_month = 4 or rtc_month = 6 or rtc_month = 9 or rtc_month = 11)) or (rtc_day = 30 and rtc_month = 2 and rtc_year(1 downto 0) = "00") or (rtc_day = 29 and rtc_month = 2 and (rtc_year(1) = '1' or rtc_year(0) = '1')) or (rtc_day = 32) then rtc_month <= rtc_month + 1; rtc_day <= x"01"; if rtc_control(5) = '1' then rtc_irq_flags(5) <= '1'; rtc_irq_flags(7) <= '1'; end if; end if; if rtc_month = 13 then rtc_year <= rtc_year + 1; rtc_month <= x"01"; if rtc_control(6) = '1' then rtc_irq_flags(6) <= '1'; rtc_irq_flags(7) <= '1'; end if; end if; end if; -- write RTC control/data registers if intern_rtc = '1' and rnw = '0' and phi2 = '1' then case extern_a(2 downto 0) is when "000" => rtc_year <= extern_din; when "001" => rtc_month <= extern_din; when "010" => rtc_day <= extern_din; when "011" => rtc_hours <= extern_din; when "100" => rtc_minutes <= extern_din; when "101" => rtc_seconds <= extern_din; when "110" => rtc_control <= extern_din; when others => rtc_irq_flags <= x"00"; end case; end if; if reset_n = '0' then rtc_control <= x"00"; rtc_irq_flags <= x"00"; end if; end if; end process; rtc_data <= rtc_year when extern_a(2 downto 0) = "000" else rtc_month when extern_a(2 downto 0) = "001" else rtc_day when extern_a(2 downto 0) = "010" else rtc_hours when extern_a(2 downto 0) = "011" else rtc_minutes when extern_a(2 downto 0) = "100" else rtc_seconds when extern_a(2 downto 0) = "101" else rtc_control when extern_a(2 downto 0) = "110" else rtc_irq_flags when extern_a(2 downto 0) = "111" else x"00"; rtc_irq_n <= not(rtc_irq_flags(7)); end generate; not_rtc_block: if not CImplRTC generate rtc_data <= x"00"; rtc_irq_n <= '1'; end generate; -------------------------------------------------------- -- Colour palette control -------------------------------------------------------- palette_block: if CImplPalette generate process (clock_32) begin if rising_edge(clock_32) then if reset_n = '0' then -- initializing like this mean the palette will be -- implemented with LUTs rather than as a block RAM palette(0) <= "000000"; palette(1) <= "000011"; palette(2) <= "000100"; palette(3) <= "000111"; palette(4) <= "001000"; palette(5) <= "001011"; palette(6) <= "001100"; palette(7) <= "001111"; palette(8) <= "110000"; palette(9) <= "110011"; palette(10) <= "110100"; palette(11) <= "110111"; palette(12) <= "111000"; palette(13) <= "111011"; palette(14) <= "111100"; palette(15) <= "111111"; else -- write colour palette registers if intern_palette = '1' and rnw = '0' and phi2 = '1' then palette(conv_integer(extern_a(3 downto 0))) <= extern_din(7 downto 2); end if; end if; end if; end process; logical_colour <= red_vga(2) & green_vga(2) & green_vga(1) & blue_vga(2); -- Making this a synchronous process should improve the timing -- and potentially make the pixels more defined process (clock_25) begin if rising_edge(clock_25) then if vga_blank = '1' then physical_colour <= (others => '0'); else physical_colour <= palette(conv_integer(logical_colour)); end if; -- Also register hsync/vsync so they are correctly -- aligned with the colour changes vga_hsync <= hsync_vga; vga_vsync <= vsync_vga; end if; end process; vga_red2 <= physical_colour(5); vga_red1 <= physical_colour(4); vga_green2 <= physical_colour(3); vga_green1 <= physical_colour(2); vga_blue2 <= physical_colour(1); vga_blue1 <= physical_colour(0); palette_data <= palette(conv_integer(extern_a(3 downto 0))) & "00"; end generate; not_palette_block: if not CImplPalette generate vga_hsync <= hsync_vga; vga_vsync <= vsync_vga; vga_red2 <= red_vga(2); vga_red1 <= red_vga(1); vga_green2 <= green_vga(2); vga_green1 <= green_vga(1); vga_blue2 <= blue_vga(2); vga_blue1 <= blue_vga(1); end generate; -------------------------------------------------------- -- Colour palette control -------------------------------------------------------- config_block: if CImplConfig generate process (clock_32) begin if rising_edge(clock_32) then -- write RTC control/data registers if intern_config = '1' and rnw = '0' and phi2 = '1' then -- Bit 7 triggers the reconfiguration -- Bits 2..0 specify the design (0..7) config_data <= extern_din; end if; end if; end process; Inst_ICAP_core: entity work.ICAP_core port map ( fastclk => clock_32, design_num => '0' & config_data(2 downto 0), reconfigure => config_data(7), powerup => '0', sw_in => x"0" ); end generate; end behavioral;
------------------------------------------------------------------------------ -- This file is a part of the GRLIB VHDL IP LIBRARY -- Copyright (C) 2003 - 2008, Gaisler Research -- Copyright (C) 2008 - 2014, Aeroflex Gaisler -- -- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ----------------------------------------------------------------------------- -- Entity: mmutlbcam -- File: mmutlbcam.vhd -- Author: Konrad Eisele, Jiri Gaisler, Gaisler Research -- Description: MMU TLB logic ------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; library grlib; use grlib.config_types.all; use grlib.config.all; use grlib.amba.all; use grlib.stdlib.all; library gaisler; use gaisler.mmuconfig.all; use gaisler.mmuiface.all; use gaisler.libmmu.all; entity mmutlbcam is generic ( tlb_type : integer range 0 to 3 := 1; mmupgsz : integer range 0 to 5 := 0 ); port ( rst : in std_logic; clk : in std_logic; tlbcami : in mmutlbcam_in_type; tlbcamo : out mmutlbcam_out_type ); end mmutlbcam; architecture rtl of mmutlbcam is constant M_TLB_FASTWRITE : integer range 0 to 3 := conv_integer(conv_std_logic_vector(tlb_type,2) and conv_std_logic_vector(2,2)); -- fast writebuffer type tlbcam_rtype is record btag : tlbcam_reg; end record; constant RESET_ALL : boolean := GRLIB_CONFIG_ARRAY(grlib_sync_reset_enable_all) = 1; constant RRES : tlbcam_rtype := (btag => tlbcam_reg_none); signal r,c : tlbcam_rtype; begin p0: process (rst, r, tlbcami) variable v : tlbcam_rtype; variable hm, hf : std_logic; variable h_i1, h_i2, h_i3, h_c : std_logic; variable h_l2, h_l3 : std_logic; variable h_su_cnt : std_logic; variable blvl : std_logic_vector(1 downto 0); variable bet : std_logic_vector(1 downto 0); variable bsu : std_logic; variable blvl_decode : std_logic_vector(3 downto 0); variable bet_decode : std_logic_vector(3 downto 0); variable ref, modified : std_logic; variable tlbcamo_pteout : std_logic_vector(31 downto 0); variable tlbcamo_LVL : std_logic_vector(1 downto 0); variable tlbcamo_NEEDSYNC : std_logic; variable tlbcamo_WBNEEDSYNC : std_logic; variable vaddr_r : std_logic_vector(31 downto 12); variable vaddr_i : std_logic_vector(31 downto 12); variable pagesize : integer range 0 to 3; begin v := r; --#init h_i1 := '0'; h_i2 := '0'; h_i3 := '0'; h_c := '0'; hm := '0'; pagesize := 0; hf := r.btag.VALID; blvl := r.btag.LVL; bet := r.btag.ET; bsu := r.btag.SU; bet_decode := decode(bet); blvl_decode := decode(blvl); ref := r.btag.R; modified := r.btag.M; tlbcamo_pteout := (others => '0'); tlbcamo_lvl := (others => '0'); vaddr_r := r.btag.I1 & r.btag.I2 & r.btag.I3; vaddr_i := tlbcami.tagin.I1 & tlbcami.tagin.I2 & tlbcami.tagin.I3; -- prepare tag comparision pagesize := MMU_getpagesize(mmupgsz,tlbcami.mmctrl); case pagesize is when 1 => -- 8k tag comparision [ 7 6 6 ] if (vaddr_r(P8K_VA_I1_U downto P8K_VA_I1_D) = vaddr_i(P8K_VA_I1_U downto P8K_VA_I1_D)) then h_i1 := '1'; else h_i1 := '0'; end if; if (vaddr_r(P8K_VA_I2_U downto P8K_VA_I2_D) = vaddr_i(P8K_VA_I2_U downto P8K_VA_I2_D)) then h_i2 := '1'; else h_i2 := '0'; end if; if (vaddr_r(P8K_VA_I3_U downto P8K_VA_I3_D) = vaddr_i(P8K_VA_I3_U downto P8K_VA_I3_D)) then h_i3 := '1'; else h_i3 := '0'; end if; if (r.btag.CTX = tlbcami.tagin.CTX) then h_c := '1'; else h_c := '0'; end if; when 2 => -- 16k tag comparision [ 6 6 6 ] if (vaddr_r(P16K_VA_I1_U downto P16K_VA_I1_D) = vaddr_i(P16K_VA_I1_U downto P16K_VA_I1_D)) then h_i1 := '1'; else h_i1 := '0'; end if; if (vaddr_r(P16K_VA_I2_U downto P16K_VA_I2_D) = vaddr_i(P16K_VA_I2_U downto P16K_VA_I2_D)) then h_i2 := '1'; else h_i2 := '0'; end if; if (vaddr_r(P16K_VA_I3_U downto P16K_VA_I3_D) = vaddr_i(P16K_VA_I3_U downto P16K_VA_I3_D)) then h_i3 := '1'; else h_i3 := '0'; end if; if (r.btag.CTX = tlbcami.tagin.CTX) then h_c := '1'; else h_c := '0'; end if; when 3 => -- 32k tag comparision [ 4 7 6 ] if (vaddr_r(P32K_VA_I1_U downto P32K_VA_I1_D) = vaddr_i(P32K_VA_I1_U downto P32K_VA_I1_D)) then h_i1 := '1'; else h_i1 := '0'; end if; if (vaddr_r(P32K_VA_I2_U downto P32K_VA_I2_D) = vaddr_i(P32K_VA_I2_U downto P32K_VA_I2_D)) then h_i2 := '1'; else h_i2 := '0'; end if; if (vaddr_r(P32K_VA_I3_U downto P32K_VA_I3_D) = vaddr_i(P32K_VA_I3_U downto P32K_VA_I3_D)) then h_i3 := '1'; else h_i3 := '0'; end if; if (r.btag.CTX = tlbcami.tagin.CTX) then h_c := '1'; else h_c := '0'; end if; when others => -- standard 4k tag comparision [ 8 6 6 ] if (r.btag.I1 = tlbcami.tagin.I1) then h_i1 := '1'; else h_i1 := '0'; end if; if (r.btag.I2 = tlbcami.tagin.I2) then h_i2 := '1'; else h_i2 := '0'; end if; if (r.btag.I3 = tlbcami.tagin.I3) then h_i3 := '1'; else h_i3 := '0'; end if; if (r.btag.CTX = tlbcami.tagin.CTX) then h_c := '1'; else h_c := '0'; end if; end case; -- #level 2 hit (segment) h_l2 := h_i1 and h_i2 ; -- #level 3 hit (page) h_l3 := h_i1 and h_i2 and h_i3; -- # context + su h_su_cnt := h_c or bsu; --# translation (match) op case blvl is when LVL_PAGE => hm := h_l3 and h_c and r.btag.VALID; when LVL_SEGMENT => hm := h_l2 and h_c and r.btag.VALID; when LVL_REGION => hm := h_i1 and h_c and r.btag.VALID; when LVL_CTX => hm := h_c and r.btag.VALID; when others => hm := 'X'; end case; --# translation: update ref/mod bit tlbcamo_NEEDSYNC := '0'; if (tlbcami.trans_op and hm ) = '1' then v.btag.R := '1'; v.btag.M := r.btag.M or tlbcami.tagin.M; tlbcamo_NEEDSYNC := (not r.btag.R) or (tlbcami.tagin.M and (not r.btag.M)); -- cam: ref/modified changed, write back synchronously end if; tlbcamo_WBNEEDSYNC := '0'; if ( hm ) = '1' then tlbcamo_WBNEEDSYNC := (not r.btag.R) or (tlbcami.tagin.M and (not r.btag.M)); -- cam: ref/modified changed, write back synchronously end if; --# flush operation -- tlbcam only stores PTEs, tlb does not store PTDs case tlbcami.tagin.TYP is when FPTY_PAGE => -- page hf := hf and h_su_cnt and h_l3 and (blvl_decode(0)); -- only level 3 (page) when FPTY_SEGMENT => -- segment hf := hf and h_su_cnt and h_l2 and (blvl_decode(0) or blvl_decode(1)); -- only level 2+3 (segment,page) when FPTY_REGION => -- region hf := hf and h_su_cnt and h_i1 and (not blvl_decode(3)); -- only level 1+2+3 (region,segment,page) when FPTY_CTX => -- context hf := hf and (h_c and (not bsu)); when FPTY_N => -- entire when others => hf := '0'; end case; --# flush: invalidate on flush hit --if (tlbcami.flush_op and hf ) = '1' then if (tlbcami.flush_op ) = '1' then v.btag.VALID := '0'; end if; --# write op if ( tlbcami.write_op = '1' ) then v.btag := tlbcami.tagwrite; end if; --# reset if ((not RESET_ALL) and (rst = '0')) or (tlbcami.mmuen = '0') then v.btag.VALID := RRES.btag.VALID; end if; tlbcamo_pteout(PTE_PPN_U downto PTE_PPN_D) := r.btag.PPN; tlbcamo_pteout(PTE_C) := r.btag.C; tlbcamo_pteout(PTE_M) := r.btag.M; tlbcamo_pteout(PTE_R) := r.btag.R; tlbcamo_pteout(PTE_ACC_U downto PTE_ACC_D) := r.btag.ACC; tlbcamo_pteout(PT_ET_U downto PT_ET_D) := r.btag.ET; tlbcamo_LVL(1 downto 0) := r.btag.LVL; --# drive signals tlbcamo.pteout <= tlbcamo_pteout; tlbcamo.LVL <= tlbcamo_LVL; --tlbcamo.hit <= (tlbcami.trans_op and hm) or (tlbcami.flush_op and hf); tlbcamo.hit <= (hm) or (tlbcami.flush_op and hf); tlbcamo.ctx <= r.btag.CTX; -- for diagnostic only tlbcamo.valid <= r.btag.VALID; -- for diagnostic only tlbcamo.vaddr <= r.btag.I1 & r.btag.I2 & r.btag.I3 & "000000000000"; -- for diagnostic only tlbcamo.NEEDSYNC <= tlbcamo_NEEDSYNC; tlbcamo.WBNEEDSYNC <= tlbcamo_WBNEEDSYNC; c <= v; end process p0; p1: process (clk) begin if rising_edge(clk) then r <= c; if RESET_ALL and (rst = '0') then r <= RRES; end if; end if; end process p1; end rtl;
------------------------------------------------------------------------------- -- ____ _____ __ __ ________ _______ -- | | \ \ | \ | | |__ __| | __ \ -- |____| \____\ | \| | | | | |__> ) -- ____ ____ | |\ \ | | | | __ < -- | | | | | | \ | | | | |__> ) -- |____| |____| |__| \__| |__| |_______/ -- -- NTB University of Applied Sciences in Technology -- -- Campus Buchs - Werdenbergstrasse 4 - 9471 Buchs - Switzerland -- Campus Waldau - Schoenauweg 4 - 9013 St. Gallen - Switzerland -- -- Web http://www.ntb.ch Tel. +41 81 755 33 11 -- ------------------------------------------------------------------------------- -- Copyright 2013 NTB University of Applied Sciences in Technology ------------------------------------------------------------------------------- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.std_logic_1164.ALL; USE IEEE.numeric_std.ALL; USE IEEE.math_real.ALL; USE work.fLink_definitions.ALL; USE work.eim_slave_to_avalon_master_pkg.ALL; ENTITY eim_slave_to_avalon_master_tb IS END ENTITY eim_slave_to_avalon_master_tb; ARCHITECTURE sim OF eim_slave_to_avalon_master_tb IS CONSTANT main_period : TIME := 8 ns; -- 125MHz CONSTANT BUS_WIDTH : INTEGER := 16; SIGNAL sl_clk : STD_LOGIC := '0'; SIGNAL sl_reset_n : STD_LOGIC := '1'; SIGNAL slv_address : STD_LOGIC_VECTOR (BUS_WIDTH-1 DOWNTO 0):= (OTHERS =>'0'); SIGNAL slv_data : STD_LOGIC_VECTOR (BUS_WIDTH-1 DOWNTO 0):= (OTHERS =>'0'); SIGNAL sl_cs_n : STD_LOGIC := '1'; SIGNAL sl_we_n : STD_LOGIC := '1'; SIGNAL sl_oe_n : STD_LOGIC := '1'; SIGNAL sl_data_ack : STD_LOGIC := '0'; SIGNAL slv_avalon_address : STD_LOGIC_VECTOR (BUS_WIDTH-1 DOWNTO 0):= (OTHERS =>'0'); SIGNAL slv_read : STD_LOGIC:= '0'; SIGNAL slv_write : STD_LOGIC:= '0'; SIGNAL slv_readdata : STD_LOGIC_VECTOR(BUS_WIDTH-1 DOWNTO 0):= (OTHERS =>'1'); SIGNAL slv_writedata : STD_LOGIC_VECTOR(BUS_WIDTH-1 DOWNTO 0):= (OTHERS =>'0'); SIGNAL slv_waitrequest : STD_LOGIC:= '0'; BEGIN --create component my_unit_under_test : eim_slave_to_avalon_master GENERIC MAP( TRANSFER_WIDTH => BUS_WIDTH ) PORT MAP( isl_clk => sl_clk, isl_reset_n => sl_reset_n, islv_address => slv_address, ioslv_data => slv_data, isl_cs_n => sl_cs_n, isl_we_n => sl_we_n, isl_oe_n => sl_oe_n, osl_data_ack => sl_data_ack, oslv_address => slv_avalon_address, oslv_read => slv_read, islv_readdata => slv_readdata, oslv_write => slv_write, oslv_writedata => slv_writedata, islv_waitrequest => slv_waitrequest ); sl_clk <= NOT sl_clk after main_period/2; tb_main_proc : PROCESS BEGIN sl_reset_n <= '1'; WAIT FOR 100*main_period; sl_reset_n <= '0'; WAIT FOR 100*main_period; sl_reset_n <= '1'; WAIT FOR 200*main_period; --read transfer sl_cs_n <= '0'; sl_we_n <= '1'; WAIT FOR 1 ns; sl_oe_n <= '0'; WAIT FOR 2*main_period; WHILE sl_data_ack = '1' LOOP WAIT FOR 1 ns; END LOOP; WAIT FOR 2 ns; sl_oe_n <= '1'; WAIT FOR 1 ns; sl_cs_n <= '1'; WAIT FOR 1000*main_period; --write transfer slv_data <= x"AFFE"; sl_cs_n <= '0'; sl_oe_n <= '1'; WAIT FOR 3 ns; sl_we_n <= '0'; WAIT FOR 44 ns; sl_we_n <= '1'; WAIT FOR 3 ns; slv_data <= (OTHERS => 'Z'); sl_cs_n <= '1'; WAIT FOR 100*main_period; WAIT FOR 1000*main_period; ASSERT false REPORT "End of simulation" SEVERITY FAILURE; END PROCESS tb_main_proc; END ARCHITECTURE sim;
--********************************************************************************** -- Copyright 2013, Ryan Henderson -- CMOS digital camera controller and frame capture device -- -- master_control_signal_generator.vhd aka MCSG -- -- Recv's commands from pport. Controls other components. Startup delay. -- --********************************************************************************** library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use WORK.common.all; use work.comp_pckgs.all; ENTITY master_control_signal_generator IS PORT ( clk_50Mhz: in std_logic; clk_12_5Mhz : in std_logic; clk_pp: in std_logic; rst: in std_logic; cmd: in std_logic_vector(5 downto 0); start_upload: out std_logic; abort_upload: out std_logic; start_addr: out std_logic_vector(22 downto 0); end_addr: out std_logic_vector(22 downto 0); init_cycle_complete: out std_logic; init_KAC : out std_logic; sync_KAC : out std_logic; -- out KAC sync pin start_KAC : out std_logic; done_KAC : in std_logic; r_w_KAC : out std_logic; -- 0=read 1=write Addr_KAC : out std_logic_vector(7 downto 0); Data_KAC_in : out std_logic_vector(7 downto 0); Data_KAC_out: in std_logic_vector(7 downto 0) ); END master_control_signal_generator; ARCHITECTURE MCSG_arch OF master_control_signal_generator IS --KAC Signals --States to control KAC via I2C subtype state_KAC is integer range 3 downto 0; signal current_state_KAC, next_state_KAC: state_KAC; signal init_cycle_complete_r : std_logic; signal delay_start : std_logic; signal delay_complete : std_logic; --PP signals -- States to read commands from pc subtype state is integer range 15 downto 0; signal current_state, next_state: state; signal start_addr_r, start_addr_next: std_logic_vector(22 downto 0); signal end_addr_r, end_addr_next: std_logic_vector(22 downto 0); signal start_upload_sig, abort_upload_sig: std_logic; --Names for Parallel port commands constant NOP: std_logic_vector(5 downto 0) := "000000"; constant STARTUPLOAD: std_logic_vector(5 downto 0) := "000001"; constant ABORTUPLOAD: std_logic_vector(5 downto 0) := "000010"; constant READ : std_logic := '0'; constant WRITE : std_logic := '1'; BEGIN init_cycle_complete <= init_cycle_complete_r; --KAC I2C stuff sync_KAC <= '0'; -- out KAC sync pin Start_KAC <= '1' when init_cycle_complete_r = '1' else '0'; r_w_KAC <= READ; Addr_KAC <= x"0F"; Data_KAC_in <= x"55"; --PP start_addr <= start_addr_r; end_addr <= end_addr_r; --signal oneshots. The commands are coming in off the parallel port so this state --machine is controlled with that clock. The problem is, the start_upload and abort_upload --signals to the memory controller will not match the 50MHz clock. If they are high --for one state here, then they would be high for thousands of 50Mhz clk cycles. The one --shot makes them just go high for 1 50MHz cycle. start_upload_oneshot: one_shot port map ( CLK => clk_50Mhz, RST => rst, sig_in => start_upload_sig, sig_out => start_upload ); abort_upload_oneshot: one_shot port map ( CLK => clk_50Mhz, RST => rst, sig_in => abort_upload_sig, sig_out => abort_upload ); wait_for_KAC_to_init: ms_delay PORT MAP ( clk => clk_12_5Mhz, rst => rst, start => delay_start, --also starts on reset delay_complete => delay_complete ); ------------------------------------------------------------------------------------ -- PC command reader -- this is a huge state machine that can easily be reduced down. -- States 1 - 9 could all be one state. The bit order for start and end addr look -- a little funny but it's a right shift that makes the host software a little -- easier. pc_command_reader: process(current_state, cmd, start_addr_r, end_addr_r) is begin --default actions next_state <= current_state; start_addr_next <= start_addr_r; end_addr_next <= end_addr_r; start_upload_sig <= '0'; abort_upload_sig <= '0'; case current_state is when 0 => --NOP if cmd = STARTUPLOAD then next_state <= 1; elsif cmd = ABORTUPLOAD then next_state <= 10; else next_state <= 0; end if; when 1 => --Start Upload start_addr_next(5 downto 0) <= cmd; next_state <= 2; when 2 => --Load start addr start_addr_next(11 downto 6) <= cmd; next_state <= 3; when 3 => start_addr_next(17 downto 12) <= cmd; next_state <= 4; when 4 => start_addr_next(22 downto 18) <= cmd(4 downto 0); next_state <= 5; when 5 => end_addr_next(5 downto 0) <= cmd; next_state <= 6; when 6 => end_addr_next(11 downto 6) <= cmd; next_state <= 7; when 7 => end_addr_next(17 downto 12) <= cmd; next_state <= 8; when 8 => end_addr_next(22 downto 18) <= cmd(4 downto 0); next_state <= 9; when 9 => -- Could also branch to any other action start_upload_sig <= '1'; if cmd = STARTUPLOAD then next_state <= 1; elsif cmd = ABORTUPLOAD then next_state <= 10; else next_state <= 0; end if; when 10 => abort_upload_sig <= '1'; start_addr_next <= (others=>'0'); end_addr_next <= (others=>'0'); next_state <= 0; when others => next_state <= 0; end case; end process pc_command_reader; --Change state on clock state_reg: process( clk_pp, rst ) is begin if rst = '0' then current_state <= 0; start_addr_r <= (others=>'0'); end_addr_r <= (others=>'0'); elsif clk_pp'event and clk_pp='1' then --Update state and registers current_state <= next_state; start_addr_r <= start_addr_next; end_addr_r <= end_addr_next; end if; end process state_reg; ------------------------------------------------------------------------------------ -- KAC control -- Cycle the init pulse on powerup. -- 0 then 1 then wait 1ms then 0 and init_cycle_complete -- is asserted until reset. -- Also, SDRAM needs 200us of delay for startup KAC_Control: process(current_state_KAC, delay_complete) is begin --default actions next_state_KAC <= current_state_KAC; delay_start <= '0'; init_cycle_complete_r <= '0'; init_KAC <= '0'; --'0' Active '1' standby mode case current_state_KAC is when 0 => next_state_KAC <= 1; init_KAC <= '1'; when 1 => delay_start <= '1'; init_KAC <= '1'; if delay_complete = '1' then next_state_KAC <= 2; end if; when 2 => delay_start <= '1'; if delay_complete = '1' then next_state_KAC <= 3; end if; when 3 => init_cycle_complete_r <= '1'; end case; end process KAC_Control; --Change state on clock KAC_state_update: process( clk_12_5Mhz, rst ) is begin if rst = '0' then current_state_KAC <= 0; elsif clk_12_5Mhz'event and clk_12_5Mhz='1' then current_state_KAC <= next_state_KAC; end if; end process KAC_state_update; END MCSG_arch;
-- -- TEXTIO package as defined by IEEE 1076-1993 -- package textio is type line is access string; type text is file of string; type side is (RIGHT, LEFT); subtype width is natural; file input : text open READ_MODE is "STD_INPUT"; file output : text open WRITE_MODE is "STD_OUTPUT"; procedure readline (file f: text; l: inout line); procedure read (l : inout line; value : out bit; good : out boolean ); procedure read (l : inout line; value : out bit ); procedure read (l : inout line; value : out bit_vector; good : out boolean ); procedure read (l : inout line; value : out bit_vector ); procedure read (l : inout line; value : out boolean; good : out boolean ); procedure read (l : inout line; value : out boolean ); procedure read (l : inout line; value : out character; good : out boolean ); procedure read (l : inout line; value : out character ); procedure read (l : inout line; value : out integer; good : out boolean ); procedure read (l : inout line; value : out integer ); procedure read (l : inout line; value : out real; good : out boolean ); procedure read (l : inout line; value : out real ); procedure read (l : inout line; value : out string; good : out boolean ); procedure read (l : inout line; value : out string ); procedure read (l : inout line; value : out time; good : out boolean ); procedure read (l : inout line; value : out time ); procedure writeline (file f : text; l : inout line); procedure write (l : inout line; value : in bit; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in bit_vector; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in boolean; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in character; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in integer; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in real; justified : in side:= right; field : in width := 0; digits : in natural:= 0 ); procedure write (l : inout line; value : in string; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in time; justified : in side := right; field : in width := 0; unit : in time := ns ); end package; package body textio is procedure grow (l : inout line; extra : in natural; old_size : out natural ) is variable tmp : line; begin if l = null then l := new string(1 to extra); old_size := 0; elsif extra > 0 then old_size := l'length; tmp := new string(1 to l'length + extra); tmp(1 to l'length) := l.all; deallocate(l); l := tmp; end if; end procedure; procedure shrink (l : inout line; size : in natural) is variable tmp : line; begin assert l /= null; assert size < l'length; tmp := new string(1 to size); tmp.all := l.all(1 to size); deallocate(l); l := tmp; end procedure; procedure consume (l : inout line; nchars : in natural) is variable tmp : line; begin assert l /= null; if nchars = l'length then tmp := new string'(""); else assert nchars <= l'length; tmp := new string(1 to l'length - nchars); tmp.all := l.all(1 + nchars to l'length); end if; deallocate(l); l := tmp; end procedure; function max (a, b : integer) return integer is begin if a > b then return a; else return b; end if; end function; procedure read (l : inout line; value : out bit; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out bit ) is variable good : boolean; begin read(l, value, good); assert good report "bit read failed"; end procedure; procedure read (l : inout line; value : out bit_vector; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out bit_vector ) is variable good : boolean; begin read(l, value, good); assert good report "bit_vector read failed"; end procedure; procedure read (l : inout line; value : out boolean; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out boolean ) is variable good : boolean; begin read(l, value, good); assert good report "boolean read failed"; end procedure; procedure read (l : inout line; value : out character; good : out boolean ) is begin if l'length > 0 then value := l.all(1); consume(l, 1); good := true; else good := false; end if; end procedure; procedure read (l : inout line; value : out character ) is variable good : boolean; begin read(l, value, good); assert good report "character read failed"; end procedure; procedure read (l : inout line; value : out integer; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out integer ) is variable good : boolean; begin read(l, value, good); assert good report "integer read failed"; end procedure; procedure read (l : inout line; value : out real; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out real ) is variable good : boolean; begin read(l, value, good); assert good report "real read failed"; end procedure; procedure read (l : inout line; value : out string; good : out boolean ) is begin if value'length <= l'length then value := l.all(1 to value'length); consume(l, value'length); good := true; else good := false; end if; end procedure; procedure read (l : inout line; value : out string ) is variable good : boolean; begin read(l, value, good); assert good report "string read failed"; end procedure; procedure read (l : inout line; value : out time; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out time ) is variable good : boolean; begin read(l, value, good); assert good report "time read failed"; end procedure; procedure readline (file f: text; l: inout line) is variable tmp : line; variable ch : string(1 to 1); variable used : natural; variable got : integer; begin if l /= null then deallocate(l); end if; tmp := new string(1 to 128); loop exit when endfile(f); read(f, ch, got); exit when got /= 1; next when ch(1) = CR; if ch(1) = LF then exit; else if used = tmp'length then grow(tmp, 128, used); end if; used := used + 1; tmp(used) := ch(1); end if; end loop; if used = 0 then l := new string'(""); else shrink(tmp, used); l := tmp; end if; end procedure; procedure writeline (file f : text; l : inout line) is begin if l /= null then write(f, l.all); deallocate(l); end if; write(f, (1 => LF)); -- Prepend CR on Windows? l := new string'(""); end procedure; procedure write (l : inout line; value : in string; justified : in side := right; field : in width := 0 ) is variable orig : natural; variable width : natural; begin width := max(value'length, field); grow(l, width, orig); if justified = left then l(orig + 1 to orig + value'length) := value; for i in orig + value'length + 1 to orig + width loop l(i) := ' '; end loop; else for i in orig + 1 to orig + width - value'length loop l(i) := ' '; end loop; l(orig + 1 + width - value'length to orig + width) := value; end if; end procedure; procedure write (l : inout line; value : in character; justified : in side := right; field : in width := 0 ) is begin write(l, string'(1 => value), justified, field); end procedure; function bit_to_char (b : bit) return character is type table_t is array (bit) of character; constant table : table_t := ( '0' => '0', '1' => '1' ); begin return table(b); end function; procedure write (l : inout line; value : in bit; justified : in side := right; field : in width := 0 ) is begin write(l, bit_to_char(value), justified, field); end procedure; procedure write (l : inout line; value : in bit_vector; justified : in side := right; field : in width := 0 ) is variable s : string(1 to value'length); alias v : bit_vector(1 to value'length) is value; begin for i in s'range loop s(i) := bit_to_char(v(i)); end loop; write(l, s, justified, field); end procedure; procedure write (l : inout line; value : in boolean; justified : in side := right; field : in width := 0 ) is begin write(l, boolean'image(value), justified, field); end procedure; function unit_string (unit : time) return string is begin -- Standard requires unit in lower case if unit = fs then return " fs"; elsif unit = ps then return " ps"; elsif unit = ns then return " ns"; elsif unit = us then return " us"; elsif unit = ms then return " ms"; elsif unit = sec then return " sec"; elsif unit = min then return " min"; elsif unit = hr then return " hr"; else report "invalid unit " & time'image(unit); end if; end function; procedure write (l : inout line; value : in time; justified : in side := right; field : in width := 0; unit : in time := ns ) is -- TODO: this overflows for large unit or value constant value_fs : integer := value / fs; constant unit_fs : integer := unit / fs; begin if (value_fs rem unit_fs) = 0 then write(l, integer'image(value_fs / unit_fs) & unit_string(unit), justified, field); else write(l, real'image(real(value_fs) / real(unit_fs)) & unit_string(unit), justified, field); end if; end procedure; procedure write (l : inout line; value : in real; justified : in side:= right; field : in width := 0; digits : in natural:= 0 ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure write (l : inout line; value : in integer; justified : in side := right; field : in width := 0 ) is begin write(l, integer'image(value), justified, field); end procedure; end package body;
-- -- TEXTIO package as defined by IEEE 1076-1993 -- package textio is type line is access string; type text is file of string; type side is (RIGHT, LEFT); subtype width is natural; file input : text open READ_MODE is "STD_INPUT"; file output : text open WRITE_MODE is "STD_OUTPUT"; procedure readline (file f: text; l: inout line); procedure read (l : inout line; value : out bit; good : out boolean ); procedure read (l : inout line; value : out bit ); procedure read (l : inout line; value : out bit_vector; good : out boolean ); procedure read (l : inout line; value : out bit_vector ); procedure read (l : inout line; value : out boolean; good : out boolean ); procedure read (l : inout line; value : out boolean ); procedure read (l : inout line; value : out character; good : out boolean ); procedure read (l : inout line; value : out character ); procedure read (l : inout line; value : out integer; good : out boolean ); procedure read (l : inout line; value : out integer ); procedure read (l : inout line; value : out real; good : out boolean ); procedure read (l : inout line; value : out real ); procedure read (l : inout line; value : out string; good : out boolean ); procedure read (l : inout line; value : out string ); procedure read (l : inout line; value : out time; good : out boolean ); procedure read (l : inout line; value : out time ); procedure writeline (file f : text; l : inout line); procedure write (l : inout line; value : in bit; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in bit_vector; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in boolean; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in character; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in integer; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in real; justified : in side:= right; field : in width := 0; digits : in natural:= 0 ); procedure write (l : inout line; value : in string; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in time; justified : in side := right; field : in width := 0; unit : in time := ns ); end package; package body textio is procedure grow (l : inout line; extra : in natural; old_size : out natural ) is variable tmp : line; begin if l = null then l := new string(1 to extra); old_size := 0; elsif extra > 0 then old_size := l'length; tmp := new string(1 to l'length + extra); tmp(1 to l'length) := l.all; deallocate(l); l := tmp; end if; end procedure; procedure shrink (l : inout line; size : in natural) is variable tmp : line; begin assert l /= null; assert size < l'length; tmp := new string(1 to size); tmp.all := l.all(1 to size); deallocate(l); l := tmp; end procedure; procedure consume (l : inout line; nchars : in natural) is variable tmp : line; begin assert l /= null; if nchars = l'length then tmp := new string'(""); else assert nchars <= l'length; tmp := new string(1 to l'length - nchars); tmp.all := l.all(1 + nchars to l'length); end if; deallocate(l); l := tmp; end procedure; function max (a, b : integer) return integer is begin if a > b then return a; else return b; end if; end function; procedure read (l : inout line; value : out bit; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out bit ) is variable good : boolean; begin read(l, value, good); assert good report "bit read failed"; end procedure; procedure read (l : inout line; value : out bit_vector; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out bit_vector ) is variable good : boolean; begin read(l, value, good); assert good report "bit_vector read failed"; end procedure; procedure read (l : inout line; value : out boolean; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out boolean ) is variable good : boolean; begin read(l, value, good); assert good report "boolean read failed"; end procedure; procedure read (l : inout line; value : out character; good : out boolean ) is begin if l'length > 0 then value := l.all(1); consume(l, 1); good := true; else good := false; end if; end procedure; procedure read (l : inout line; value : out character ) is variable good : boolean; begin read(l, value, good); assert good report "character read failed"; end procedure; procedure read (l : inout line; value : out integer; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out integer ) is variable good : boolean; begin read(l, value, good); assert good report "integer read failed"; end procedure; procedure read (l : inout line; value : out real; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out real ) is variable good : boolean; begin read(l, value, good); assert good report "real read failed"; end procedure; procedure read (l : inout line; value : out string; good : out boolean ) is begin if value'length <= l'length then value := l.all(1 to value'length); consume(l, value'length); good := true; else good := false; end if; end procedure; procedure read (l : inout line; value : out string ) is variable good : boolean; begin read(l, value, good); assert good report "string read failed"; end procedure; procedure read (l : inout line; value : out time; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out time ) is variable good : boolean; begin read(l, value, good); assert good report "time read failed"; end procedure; procedure readline (file f: text; l: inout line) is variable tmp : line; variable ch : string(1 to 1); variable used : natural; variable got : integer; begin if l /= null then deallocate(l); end if; tmp := new string(1 to 128); loop exit when endfile(f); read(f, ch, got); exit when got /= 1; next when ch(1) = CR; if ch(1) = LF then exit; else if used = tmp'length then grow(tmp, 128, used); end if; used := used + 1; tmp(used) := ch(1); end if; end loop; if used = 0 then l := new string'(""); else shrink(tmp, used); l := tmp; end if; end procedure; procedure writeline (file f : text; l : inout line) is begin if l /= null then write(f, l.all); deallocate(l); end if; write(f, (1 => LF)); -- Prepend CR on Windows? l := new string'(""); end procedure; procedure write (l : inout line; value : in string; justified : in side := right; field : in width := 0 ) is variable orig : natural; variable width : natural; begin width := max(value'length, field); grow(l, width, orig); if justified = left then l(orig + 1 to orig + value'length) := value; for i in orig + value'length + 1 to orig + width loop l(i) := ' '; end loop; else for i in orig + 1 to orig + width - value'length loop l(i) := ' '; end loop; l(orig + 1 + width - value'length to orig + width) := value; end if; end procedure; procedure write (l : inout line; value : in character; justified : in side := right; field : in width := 0 ) is begin write(l, string'(1 => value), justified, field); end procedure; function bit_to_char (b : bit) return character is type table_t is array (bit) of character; constant table : table_t := ( '0' => '0', '1' => '1' ); begin return table(b); end function; procedure write (l : inout line; value : in bit; justified : in side := right; field : in width := 0 ) is begin write(l, bit_to_char(value), justified, field); end procedure; procedure write (l : inout line; value : in bit_vector; justified : in side := right; field : in width := 0 ) is variable s : string(1 to value'length); alias v : bit_vector(1 to value'length) is value; begin for i in s'range loop s(i) := bit_to_char(v(i)); end loop; write(l, s, justified, field); end procedure; procedure write (l : inout line; value : in boolean; justified : in side := right; field : in width := 0 ) is begin write(l, boolean'image(value), justified, field); end procedure; function unit_string (unit : time) return string is begin -- Standard requires unit in lower case if unit = fs then return " fs"; elsif unit = ps then return " ps"; elsif unit = ns then return " ns"; elsif unit = us then return " us"; elsif unit = ms then return " ms"; elsif unit = sec then return " sec"; elsif unit = min then return " min"; elsif unit = hr then return " hr"; else report "invalid unit " & time'image(unit); end if; end function; procedure write (l : inout line; value : in time; justified : in side := right; field : in width := 0; unit : in time := ns ) is -- TODO: this overflows for large unit or value constant value_fs : integer := value / fs; constant unit_fs : integer := unit / fs; begin if (value_fs rem unit_fs) = 0 then write(l, integer'image(value_fs / unit_fs) & unit_string(unit), justified, field); else write(l, real'image(real(value_fs) / real(unit_fs)) & unit_string(unit), justified, field); end if; end procedure; procedure write (l : inout line; value : in real; justified : in side:= right; field : in width := 0; digits : in natural:= 0 ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure write (l : inout line; value : in integer; justified : in side := right; field : in width := 0 ) is begin write(l, integer'image(value), justified, field); end procedure; end package body;
-- -- TEXTIO package as defined by IEEE 1076-1993 -- package textio is type line is access string; type text is file of string; type side is (RIGHT, LEFT); subtype width is natural; file input : text open READ_MODE is "STD_INPUT"; file output : text open WRITE_MODE is "STD_OUTPUT"; procedure readline (file f: text; l: inout line); procedure read (l : inout line; value : out bit; good : out boolean ); procedure read (l : inout line; value : out bit ); procedure read (l : inout line; value : out bit_vector; good : out boolean ); procedure read (l : inout line; value : out bit_vector ); procedure read (l : inout line; value : out boolean; good : out boolean ); procedure read (l : inout line; value : out boolean ); procedure read (l : inout line; value : out character; good : out boolean ); procedure read (l : inout line; value : out character ); procedure read (l : inout line; value : out integer; good : out boolean ); procedure read (l : inout line; value : out integer ); procedure read (l : inout line; value : out real; good : out boolean ); procedure read (l : inout line; value : out real ); procedure read (l : inout line; value : out string; good : out boolean ); procedure read (l : inout line; value : out string ); procedure read (l : inout line; value : out time; good : out boolean ); procedure read (l : inout line; value : out time ); procedure writeline (file f : text; l : inout line); procedure write (l : inout line; value : in bit; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in bit_vector; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in boolean; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in character; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in integer; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in real; justified : in side:= right; field : in width := 0; digits : in natural:= 0 ); procedure write (l : inout line; value : in string; justified : in side := right; field : in width := 0 ); procedure write (l : inout line; value : in time; justified : in side := right; field : in width := 0; unit : in time := ns ); end package; package body textio is procedure grow (l : inout line; extra : in natural; old_size : out natural ) is variable tmp : line; begin if l = null then l := new string(1 to extra); old_size := 0; elsif extra > 0 then old_size := l'length; tmp := new string(1 to l'length + extra); tmp(1 to l'length) := l.all; deallocate(l); l := tmp; end if; end procedure; procedure shrink (l : inout line; size : in natural) is variable tmp : line; begin assert l /= null; assert size < l'length; tmp := new string(1 to size); tmp.all := l.all(1 to size); deallocate(l); l := tmp; end procedure; procedure consume (l : inout line; nchars : in natural) is variable tmp : line; begin assert l /= null; if nchars = l'length then tmp := new string'(""); else assert nchars <= l'length; tmp := new string(1 to l'length - nchars); tmp.all := l.all(1 + nchars to l'length); end if; deallocate(l); l := tmp; end procedure; function max (a, b : integer) return integer is begin if a > b then return a; else return b; end if; end function; procedure read (l : inout line; value : out bit; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out bit ) is variable good : boolean; begin read(l, value, good); assert good report "bit read failed"; end procedure; procedure read (l : inout line; value : out bit_vector; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out bit_vector ) is variable good : boolean; begin read(l, value, good); assert good report "bit_vector read failed"; end procedure; procedure read (l : inout line; value : out boolean; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out boolean ) is variable good : boolean; begin read(l, value, good); assert good report "boolean read failed"; end procedure; procedure read (l : inout line; value : out character; good : out boolean ) is begin if l'length > 0 then value := l.all(1); consume(l, 1); good := true; else good := false; end if; end procedure; procedure read (l : inout line; value : out character ) is variable good : boolean; begin read(l, value, good); assert good report "character read failed"; end procedure; procedure read (l : inout line; value : out integer; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out integer ) is variable good : boolean; begin read(l, value, good); assert good report "integer read failed"; end procedure; procedure read (l : inout line; value : out real; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out real ) is variable good : boolean; begin read(l, value, good); assert good report "real read failed"; end procedure; procedure read (l : inout line; value : out string; good : out boolean ) is begin if value'length <= l'length then value := l.all(1 to value'length); consume(l, value'length); good := true; else good := false; end if; end procedure; procedure read (l : inout line; value : out string ) is variable good : boolean; begin read(l, value, good); assert good report "string read failed"; end procedure; procedure read (l : inout line; value : out time; good : out boolean ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure read (l : inout line; value : out time ) is variable good : boolean; begin read(l, value, good); assert good report "time read failed"; end procedure; procedure readline (file f: text; l: inout line) is variable tmp : line; variable ch : string(1 to 1); variable used : natural; variable got : integer; begin if l /= null then deallocate(l); end if; tmp := new string(1 to 128); loop exit when endfile(f); read(f, ch, got); exit when got /= 1; next when ch(1) = CR; if ch(1) = LF then exit; else if used = tmp'length then grow(tmp, 128, used); end if; used := used + 1; tmp(used) := ch(1); end if; end loop; if used = 0 then l := new string'(""); else shrink(tmp, used); l := tmp; end if; end procedure; procedure writeline (file f : text; l : inout line) is begin if l /= null then write(f, l.all); deallocate(l); end if; write(f, (1 => LF)); -- Prepend CR on Windows? l := new string'(""); end procedure; procedure write (l : inout line; value : in string; justified : in side := right; field : in width := 0 ) is variable orig : natural; variable width : natural; begin width := max(value'length, field); grow(l, width, orig); if justified = left then l(orig + 1 to orig + value'length) := value; for i in orig + value'length + 1 to orig + width loop l(i) := ' '; end loop; else for i in orig + 1 to orig + width - value'length loop l(i) := ' '; end loop; l(orig + 1 + width - value'length to orig + width) := value; end if; end procedure; procedure write (l : inout line; value : in character; justified : in side := right; field : in width := 0 ) is begin write(l, string'(1 => value), justified, field); end procedure; function bit_to_char (b : bit) return character is type table_t is array (bit) of character; constant table : table_t := ( '0' => '0', '1' => '1' ); begin return table(b); end function; procedure write (l : inout line; value : in bit; justified : in side := right; field : in width := 0 ) is begin write(l, bit_to_char(value), justified, field); end procedure; procedure write (l : inout line; value : in bit_vector; justified : in side := right; field : in width := 0 ) is variable s : string(1 to value'length); alias v : bit_vector(1 to value'length) is value; begin for i in s'range loop s(i) := bit_to_char(v(i)); end loop; write(l, s, justified, field); end procedure; procedure write (l : inout line; value : in boolean; justified : in side := right; field : in width := 0 ) is begin write(l, boolean'image(value), justified, field); end procedure; function unit_string (unit : time) return string is begin -- Standard requires unit in lower case if unit = fs then return " fs"; elsif unit = ps then return " ps"; elsif unit = ns then return " ns"; elsif unit = us then return " us"; elsif unit = ms then return " ms"; elsif unit = sec then return " sec"; elsif unit = min then return " min"; elsif unit = hr then return " hr"; else report "invalid unit " & time'image(unit); end if; end function; procedure write (l : inout line; value : in time; justified : in side := right; field : in width := 0; unit : in time := ns ) is -- TODO: this overflows for large unit or value constant value_fs : integer := value / fs; constant unit_fs : integer := unit / fs; begin if (value_fs rem unit_fs) = 0 then write(l, integer'image(value_fs / unit_fs) & unit_string(unit), justified, field); else write(l, real'image(real(value_fs) / real(unit_fs)) & unit_string(unit), justified, field); end if; end procedure; procedure write (l : inout line; value : in real; justified : in side:= right; field : in width := 0; digits : in natural:= 0 ) is begin -- TODO report "unimplemented" severity failure; end procedure; procedure write (l : inout line; value : in integer; justified : in side := right; field : in width := 0 ) is begin write(l, integer'image(value), justified, field); end procedure; end package body;
-- This file is part of easyFPGA. -- Copyright 2013-2015 os-cillation GmbH -- -- easyFPGA 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 3 of the License, or -- (at your option) any later version. -- -- easyFPGA 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 easyFPGA. If not, see <http://www.gnu.org/licenses/>. ------------------------------------------------------------------------------- -- 16-bit PWM using two-process design pattern -- -- @author Simon Gansen ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; ------------------------------------------------------------------------------- -- Type and component definition package ------------------------------------------------------------------------------- package pwm16_comp is type pwm16_in_type is record duty_cycle : std_logic_vector(15 downto 0); end record; component pwm16 port ( clk : in std_logic; rst : in std_logic; d : in pwm16_in_type; pwm : out std_logic ); end component; end package; ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.pwm16_comp.all; ------------------------------------------------------------------------------- ENTITY pwm16 is ------------------------------------------------------------------------------- port ( clk : in std_logic; rst : in std_logic; d : in pwm16_in_type; pwm : out std_logic ); end pwm16; ------------------------------------------------------------------------------- ARCHITECTURE two_proc of pwm16 is ------------------------------------------------------------------------------- type reg_type is record pwm_cnt : unsigned(15 downto 0); -- pwm counter end record; signal reg_out, reg_in : reg_type; begin ------------------------------------------------------------------------------- COMBINATIONAL : process(d, reg_out) ------------------------------------------------------------------------------- variable tmp_var : reg_type; begin tmp_var := reg_out; -- default assignments ---algorithm------------------------------------------------------------- -- PWM: reset on overflow, increment otherwise if (tmp_var.pwm_cnt = 2**16-1) then tmp_var.pwm_cnt := (others => '0'); else tmp_var.pwm_cnt := reg_out.pwm_cnt + 1; end if; -- compare and drive output if (tmp_var.pwm_cnt >= unsigned(d.duty_cycle)) then pwm <= '0'; else pwm <= '1'; end if; ------------------------------------------------------------------------- reg_in <= tmp_var; -- drive register inputs end process COMBINATIONAL; ------------------------------------------------------------------------------- REGISTERS : process(clk,rst) ------------------------------------------------------------------------------- begin if rising_edge(clk) then if (rst = '1') then reg_out.pwm_cnt <= (others => '0'); else reg_out <= reg_in; end if; end if; end process REGISTERS; end two_proc;
-- (c) Copyright 1995-2016 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- DO NOT MODIFY THIS FILE. -- IP VLNV: xilinx.com:ip:blk_mem_gen:8.3 -- IP Revision: 1 LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; LIBRARY blk_mem_gen_v8_3_1; USE blk_mem_gen_v8_3_1.blk_mem_gen_v8_3_1; ENTITY blk_mem_gen_1 IS PORT ( clka : IN STD_LOGIC; ena : IN STD_LOGIC; wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0); addra : IN STD_LOGIC_VECTOR(11 DOWNTO 0); dina : IN STD_LOGIC_VECTOR(7 DOWNTO 0); clkb : IN STD_LOGIC; enb : IN STD_LOGIC; addrb : IN STD_LOGIC_VECTOR(11 DOWNTO 0); doutb : OUT STD_LOGIC_VECTOR(7 DOWNTO 0) ); END blk_mem_gen_1; ARCHITECTURE blk_mem_gen_1_arch OF blk_mem_gen_1 IS ATTRIBUTE DowngradeIPIdentifiedWarnings : string; ATTRIBUTE DowngradeIPIdentifiedWarnings OF blk_mem_gen_1_arch: ARCHITECTURE IS "yes"; COMPONENT blk_mem_gen_v8_3_1 IS GENERIC ( C_FAMILY : STRING; C_XDEVICEFAMILY : STRING; C_ELABORATION_DIR : STRING; C_INTERFACE_TYPE : INTEGER; C_AXI_TYPE : INTEGER; C_AXI_SLAVE_TYPE : INTEGER; C_USE_BRAM_BLOCK : INTEGER; C_ENABLE_32BIT_ADDRESS : INTEGER; C_CTRL_ECC_ALGO : STRING; C_HAS_AXI_ID : INTEGER; C_AXI_ID_WIDTH : INTEGER; C_MEM_TYPE : INTEGER; C_BYTE_SIZE : INTEGER; C_ALGORITHM : INTEGER; C_PRIM_TYPE : INTEGER; C_LOAD_INIT_FILE : INTEGER; C_INIT_FILE_NAME : STRING; C_INIT_FILE : STRING; C_USE_DEFAULT_DATA : INTEGER; C_DEFAULT_DATA : STRING; C_HAS_RSTA : INTEGER; C_RST_PRIORITY_A : STRING; C_RSTRAM_A : INTEGER; C_INITA_VAL : STRING; C_HAS_ENA : INTEGER; C_HAS_REGCEA : INTEGER; C_USE_BYTE_WEA : INTEGER; C_WEA_WIDTH : INTEGER; C_WRITE_MODE_A : STRING; C_WRITE_WIDTH_A : INTEGER; C_READ_WIDTH_A : INTEGER; C_WRITE_DEPTH_A : INTEGER; C_READ_DEPTH_A : INTEGER; C_ADDRA_WIDTH : INTEGER; C_HAS_RSTB : INTEGER; C_RST_PRIORITY_B : STRING; C_RSTRAM_B : INTEGER; C_INITB_VAL : STRING; C_HAS_ENB : INTEGER; C_HAS_REGCEB : INTEGER; C_USE_BYTE_WEB : INTEGER; C_WEB_WIDTH : INTEGER; C_WRITE_MODE_B : STRING; C_WRITE_WIDTH_B : INTEGER; C_READ_WIDTH_B : INTEGER; C_WRITE_DEPTH_B : INTEGER; C_READ_DEPTH_B : INTEGER; C_ADDRB_WIDTH : INTEGER; C_HAS_MEM_OUTPUT_REGS_A : INTEGER; C_HAS_MEM_OUTPUT_REGS_B : INTEGER; C_HAS_MUX_OUTPUT_REGS_A : INTEGER; C_HAS_MUX_OUTPUT_REGS_B : INTEGER; C_MUX_PIPELINE_STAGES : INTEGER; C_HAS_SOFTECC_INPUT_REGS_A : INTEGER; C_HAS_SOFTECC_OUTPUT_REGS_B : INTEGER; C_USE_SOFTECC : INTEGER; C_USE_ECC : INTEGER; C_EN_ECC_PIPE : INTEGER; C_HAS_INJECTERR : INTEGER; C_SIM_COLLISION_CHECK : STRING; C_COMMON_CLK : INTEGER; C_DISABLE_WARN_BHV_COLL : INTEGER; C_EN_SLEEP_PIN : INTEGER; C_USE_URAM : INTEGER; C_EN_RDADDRA_CHG : INTEGER; C_EN_RDADDRB_CHG : INTEGER; C_EN_DEEPSLEEP_PIN : INTEGER; C_EN_SHUTDOWN_PIN : INTEGER; C_EN_SAFETY_CKT : INTEGER; C_DISABLE_WARN_BHV_RANGE : INTEGER; C_COUNT_36K_BRAM : STRING; C_COUNT_18K_BRAM : STRING; C_EST_POWER_SUMMARY : STRING ); PORT ( clka : IN STD_LOGIC; rsta : IN STD_LOGIC; ena : IN STD_LOGIC; regcea : IN STD_LOGIC; wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0); addra : IN STD_LOGIC_VECTOR(11 DOWNTO 0); dina : IN STD_LOGIC_VECTOR(7 DOWNTO 0); douta : OUT STD_LOGIC_VECTOR(7 DOWNTO 0); clkb : IN STD_LOGIC; rstb : IN STD_LOGIC; enb : IN STD_LOGIC; regceb : IN STD_LOGIC; web : IN STD_LOGIC_VECTOR(0 DOWNTO 0); addrb : IN STD_LOGIC_VECTOR(11 DOWNTO 0); dinb : IN STD_LOGIC_VECTOR(7 DOWNTO 0); doutb : OUT STD_LOGIC_VECTOR(7 DOWNTO 0); injectsbiterr : IN STD_LOGIC; injectdbiterr : IN STD_LOGIC; eccpipece : IN STD_LOGIC; sbiterr : OUT STD_LOGIC; dbiterr : OUT STD_LOGIC; rdaddrecc : OUT STD_LOGIC_VECTOR(11 DOWNTO 0); sleep : IN STD_LOGIC; deepsleep : IN STD_LOGIC; shutdown : IN STD_LOGIC; rsta_busy : OUT STD_LOGIC; rstb_busy : OUT STD_LOGIC; s_aclk : IN STD_LOGIC; s_aresetn : IN STD_LOGIC; s_axi_awid : IN STD_LOGIC_VECTOR(3 DOWNTO 0); s_axi_awaddr : IN STD_LOGIC_VECTOR(31 DOWNTO 0); s_axi_awlen : IN STD_LOGIC_VECTOR(7 DOWNTO 0); s_axi_awsize : IN STD_LOGIC_VECTOR(2 DOWNTO 0); s_axi_awburst : IN STD_LOGIC_VECTOR(1 DOWNTO 0); s_axi_awvalid : IN STD_LOGIC; s_axi_awready : OUT STD_LOGIC; s_axi_wdata : IN STD_LOGIC_VECTOR(7 DOWNTO 0); s_axi_wstrb : IN STD_LOGIC_VECTOR(0 DOWNTO 0); s_axi_wlast : IN STD_LOGIC; s_axi_wvalid : IN STD_LOGIC; s_axi_wready : OUT STD_LOGIC; s_axi_bid : OUT STD_LOGIC_VECTOR(3 DOWNTO 0); s_axi_bresp : OUT STD_LOGIC_VECTOR(1 DOWNTO 0); s_axi_bvalid : OUT STD_LOGIC; s_axi_bready : IN STD_LOGIC; s_axi_arid : IN STD_LOGIC_VECTOR(3 DOWNTO 0); s_axi_araddr : IN STD_LOGIC_VECTOR(31 DOWNTO 0); s_axi_arlen : IN STD_LOGIC_VECTOR(7 DOWNTO 0); s_axi_arsize : IN STD_LOGIC_VECTOR(2 DOWNTO 0); s_axi_arburst : IN STD_LOGIC_VECTOR(1 DOWNTO 0); s_axi_arvalid : IN STD_LOGIC; s_axi_arready : OUT STD_LOGIC; s_axi_rid : OUT STD_LOGIC_VECTOR(3 DOWNTO 0); s_axi_rdata : OUT STD_LOGIC_VECTOR(7 DOWNTO 0); s_axi_rresp : OUT STD_LOGIC_VECTOR(1 DOWNTO 0); s_axi_rlast : OUT STD_LOGIC; s_axi_rvalid : OUT STD_LOGIC; s_axi_rready : IN STD_LOGIC; s_axi_injectsbiterr : IN STD_LOGIC; s_axi_injectdbiterr : IN STD_LOGIC; s_axi_sbiterr : OUT STD_LOGIC; s_axi_dbiterr : OUT STD_LOGIC; s_axi_rdaddrecc : OUT STD_LOGIC_VECTOR(11 DOWNTO 0) ); END COMPONENT blk_mem_gen_v8_3_1; ATTRIBUTE X_INTERFACE_INFO : STRING; ATTRIBUTE X_INTERFACE_INFO OF clka: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTA CLK"; ATTRIBUTE X_INTERFACE_INFO OF ena: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTA EN"; ATTRIBUTE X_INTERFACE_INFO OF wea: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTA WE"; ATTRIBUTE X_INTERFACE_INFO OF addra: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTA ADDR"; ATTRIBUTE X_INTERFACE_INFO OF dina: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTA DIN"; ATTRIBUTE X_INTERFACE_INFO OF clkb: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTB CLK"; ATTRIBUTE X_INTERFACE_INFO OF enb: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTB EN"; ATTRIBUTE X_INTERFACE_INFO OF addrb: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTB ADDR"; ATTRIBUTE X_INTERFACE_INFO OF doutb: SIGNAL IS "xilinx.com:interface:bram:1.0 BRAM_PORTB DOUT"; BEGIN U0 : blk_mem_gen_v8_3_1 GENERIC MAP ( C_FAMILY => "kintex7", C_XDEVICEFAMILY => "kintex7", C_ELABORATION_DIR => "./", C_INTERFACE_TYPE => 0, C_AXI_TYPE => 1, C_AXI_SLAVE_TYPE => 0, C_USE_BRAM_BLOCK => 0, C_ENABLE_32BIT_ADDRESS => 0, C_CTRL_ECC_ALGO => "NONE", C_HAS_AXI_ID => 0, C_AXI_ID_WIDTH => 4, C_MEM_TYPE => 1, C_BYTE_SIZE => 9, C_ALGORITHM => 1, C_PRIM_TYPE => 1, C_LOAD_INIT_FILE => 0, C_INIT_FILE_NAME => "no_coe_file_loaded", C_INIT_FILE => "blk_mem_gen_1.mem", C_USE_DEFAULT_DATA => 0, C_DEFAULT_DATA => "0", C_HAS_RSTA => 0, C_RST_PRIORITY_A => "CE", C_RSTRAM_A => 0, C_INITA_VAL => "0", C_HAS_ENA => 1, C_HAS_REGCEA => 0, C_USE_BYTE_WEA => 0, C_WEA_WIDTH => 1, C_WRITE_MODE_A => "NO_CHANGE", C_WRITE_WIDTH_A => 8, C_READ_WIDTH_A => 8, C_WRITE_DEPTH_A => 4096, C_READ_DEPTH_A => 4096, C_ADDRA_WIDTH => 12, C_HAS_RSTB => 0, C_RST_PRIORITY_B => "CE", C_RSTRAM_B => 0, C_INITB_VAL => "0", C_HAS_ENB => 1, C_HAS_REGCEB => 0, C_USE_BYTE_WEB => 0, C_WEB_WIDTH => 1, C_WRITE_MODE_B => "WRITE_FIRST", C_WRITE_WIDTH_B => 8, C_READ_WIDTH_B => 8, C_WRITE_DEPTH_B => 4096, C_READ_DEPTH_B => 4096, C_ADDRB_WIDTH => 12, C_HAS_MEM_OUTPUT_REGS_A => 0, C_HAS_MEM_OUTPUT_REGS_B => 0, C_HAS_MUX_OUTPUT_REGS_A => 0, C_HAS_MUX_OUTPUT_REGS_B => 0, C_MUX_PIPELINE_STAGES => 0, C_HAS_SOFTECC_INPUT_REGS_A => 0, C_HAS_SOFTECC_OUTPUT_REGS_B => 0, C_USE_SOFTECC => 0, C_USE_ECC => 0, C_EN_ECC_PIPE => 0, C_HAS_INJECTERR => 0, C_SIM_COLLISION_CHECK => "ALL", C_COMMON_CLK => 0, C_DISABLE_WARN_BHV_COLL => 0, C_EN_SLEEP_PIN => 0, C_USE_URAM => 0, C_EN_RDADDRA_CHG => 0, C_EN_RDADDRB_CHG => 0, C_EN_DEEPSLEEP_PIN => 0, C_EN_SHUTDOWN_PIN => 0, C_EN_SAFETY_CKT => 0, C_DISABLE_WARN_BHV_RANGE => 0, C_COUNT_36K_BRAM => "1", C_COUNT_18K_BRAM => "0", C_EST_POWER_SUMMARY => "Estimated Power for IP : 4.53475 mW" ) PORT MAP ( clka => clka, rsta => '0', ena => ena, regcea => '0', wea => wea, addra => addra, dina => dina, clkb => clkb, rstb => '0', enb => enb, regceb => '0', web => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)), addrb => addrb, dinb => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 8)), doutb => doutb, injectsbiterr => '0', injectdbiterr => '0', eccpipece => '0', sleep => '0', deepsleep => '0', shutdown => '0', s_aclk => '0', s_aresetn => '0', s_axi_awid => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)), s_axi_awaddr => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 32)), s_axi_awlen => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 8)), s_axi_awsize => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 3)), s_axi_awburst => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 2)), s_axi_awvalid => '0', s_axi_wdata => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 8)), s_axi_wstrb => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)), s_axi_wlast => '0', s_axi_wvalid => '0', s_axi_bready => '0', s_axi_arid => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)), s_axi_araddr => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 32)), s_axi_arlen => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 8)), s_axi_arsize => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 3)), s_axi_arburst => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 2)), s_axi_arvalid => '0', s_axi_rready => '0', s_axi_injectsbiterr => '0', s_axi_injectdbiterr => '0' ); END blk_mem_gen_1_arch;
------------------------------------------------------------------------------- --! @file fifoWrite-rtl-ea.vhd -- --! @brief FIFO write controller -- --! @details This is a FIFO write controller. -- ------------------------------------------------------------------------------- -- -- (c) B&R, 2014 -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- 3. Neither the name of B&R nor the names of its -- contributors may be used to endorse or promote products derived -- from this software without prior written permission. For written -- permission, please contact office@br-automation.com -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; --! Common library library libcommon; --! Use common library global package use libcommon.global.all; entity fifoWrite is generic ( gAddrWidth : natural := 4 ); port ( iClk : in std_logic; iRst : in std_logic; iWrite : in std_logic; iRdPointer : in std_logic_vector(gAddrWidth downto 0); oFull : out std_logic; oEmpty : out std_logic; oPointer : out std_logic_vector(gAddrWidth downto 0); oAddress : out std_logic_vector(gAddrWidth-1 downto 0); oUsedWord : out std_logic_vector(gAddrWidth-1 downto 0) ); end fifoWrite; architecture rtl of fifoWrite is signal w_ptr_reg : std_logic_vector(gAddrWidth downto 0); signal w_ptr_next : std_logic_vector(gAddrWidth downto 0); signal gray1 : std_logic_vector(gAddrWidth downto 0); signal bin : std_logic_vector(gAddrWidth downto 0); signal bin1 : std_logic_vector(gAddrWidth downto 0); signal waddr_all : std_logic_vector(gAddrWidth-1 downto 0); signal waddr_msb : std_logic; signal raddr_msb : std_logic; signal full_flag : std_logic; signal empty_flag : std_logic; signal w_elements_wr : std_logic_vector(gAddrWidth downto 0); signal w_elements_rd : std_logic_vector(gAddrWidth downto 0); signal w_elements_diff : std_logic_vector(gAddrWidth downto 0); signal w_elements_reg : std_logic_vector(gAddrWidth-1 downto 0); signal w_elements_next : std_logic_vector(gAddrWidth-1 downto 0); begin --! Clock process for registers. regProc : process(iClk, iRst) begin if iRst = cActivated then w_ptr_reg <= (others => cInactivated); w_elements_reg <= (others => cInactivated); elsif rising_edge(iClk) then w_ptr_reg <= w_ptr_next; w_elements_reg <= w_elements_next; end if; end process; -- (gAddrWidth+1)-bit Gray counter bin <= w_ptr_reg xor (cInactivated & bin(gAddrWidth downto 1)); bin1 <= std_logic_vector(unsigned(bin) + 1); gray1 <= bin1 xor (cInactivated & bin1(gAddrWidth downto 1)); -- update write pointer w_ptr_next <= gray1 when iWrite = cActivated and full_flag = cInactivated else w_ptr_reg; -- gAddrWidth-bit Gray counter waddr_msb <= w_ptr_reg(gAddrWidth) xor w_ptr_reg(gAddrWidth-1); waddr_all <= waddr_msb & w_ptr_reg(gAddrWidth-2 downto 0); raddr_msb <= iRdPointer(gAddrWidth) xor iRdPointer(gAddrWidth-1); -- check for FIFO write empty empty_flag <= cActivated when iRdPointer(gAddrWidth) = w_ptr_reg(gAddrWidth) and iRdPointer(gAddrWidth-2 downto 0) = w_ptr_reg(gAddrWidth-2 downto 0) and raddr_msb = waddr_msb else cInactivated; -- check for FIFO write full full_flag <= cActivated when iRdPointer(gAddrWidth) /= w_ptr_reg(gAddrWidth) and iRdPointer(gAddrWidth-2 downto 0) = w_ptr_reg(gAddrWidth-2 downto 0) and raddr_msb = waddr_msb else cInactivated; -- convert gray value to bin and obtain difference w_elements_wr <= bin; w_elements_rd <= iRdPointer xor (cInactivated & w_elements_rd(gAddrWidth downto 1)); w_elements_diff <= std_logic_vector(unsigned(w_elements_wr) - unsigned(w_elements_rd)); w_elements_next <= w_elements_diff(w_elements_next'range); -- output oAddress <= waddr_all; oPointer <= w_ptr_reg; oUsedWord <= w_elements_reg; oEmpty <= empty_flag; oFull <= full_flag; end rtl;
--LIBRARY xtek; -- USE xtek.XHDL_std_logic.all; LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_unsigned.all; USE ieee.numeric_std.all; LIBRARY unisim; USE unisim.VCOMPONENTS.all; --***************************************************************************** -- (c) Copyright 2008-2009 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- --***************************************************************************** -- ____ ____ -- / /\/ / -- /___/ \ / Vendor : Xilinx -- \ \ \/ Version : 3.92 -- \ \ Application : MIG -- / / Filename : ui_wr_data.v -- /___/ /\ Date Last Modified : $date$ -- \ \ / \ Date Created : Tue Jun 30 2009 -- \___\/\___\ -- --Device : Virtex-6 --Design Name : DDR3 SDRAM --Purpose : --Reference : --Revision History : --***************************************************************************** -- User interface write data buffer. Consists of four counters, -- a pointer RAM and the write data storage RAM. -- -- All RAMs are implemented with distributed RAM. -- -- Whe ordering is set to STRICT or NORM, data moves through -- the write data buffer in strictly FIFO order. In RELAXED -- mode, data may be retired from the write data RAM in any -- order relative to the input order. This implementation -- supports all ordering modes. -- -- The pointer RAM stores a list of pointers to the write data storage RAM. -- This is a list of vacant entries. As data is written into the RAM, a -- pointer is pulled from the pointer RAM and used to index the write -- operation. In a semi autonomously manner, pointers are also pulled, in -- the same order, and provided to the command port as the data_buf_addr. -- -- When the MC reads data from the write data buffer, it uses the -- data_buf_addr provided with the command to extract the data from the -- write data buffer. It also writes this pointer into the end -- of the pointer RAM. -- -- The occupancy counter keeps track of how many entries are valid -- in the write data storage RAM. app_wdf_rdy and app_rdy will be -- de-asserted when there is no more storage in the write data buffer. -- -- Three sequentially incrementing counters/indexes are used to maintain -- and use the contents of the pointer RAM. -- -- The write buffer write data address index generates the pointer -- used to extract the write data address from the pointer RAM. It -- is incremented with each buffer write. The counter is actually one -- ahead of the current write address so that the actual data buffer -- write address can be registered to give a full state to propagate to -- the write data distributed RAMs. -- -- The data_buf_addr counter is used to extract the data_buf_addr for -- the command port. It is incremented as each command is written -- into the MC. -- -- The read data index points to the end of the list of free -- buffers. When the MC fetches data from the write data buffer, it -- provides the buffer address. The buffer address is used to fetch -- the data, but is also written into the pointer at the location indicated -- by the read data index. -- -- Enter and exiting a buffer full condition generates corner cases. Upon -- entering a full condition, incrementing the write buffer write data -- address index must be inhibited. When exiting the full condition, -- the just arrived pointer must propagate through the pointer RAM, then -- indexed by the current value of the write buffer write data -- address counter, the value is registered in the write buffer write -- data address register, then the counter can be advanced. -- -- The pointer RAM must be initialized with valid data after reset. This is -- accomplished by stepping through each pointer RAM entry and writing -- the locations address into the pointer RAM. For the FIFO modes, this means -- that buffer address will always proceed in a sequential order. In the -- RELAXED mode, the original write traversal will be in sequential -- order, but once the MC begins to retire out of order, the entries in -- the pointer RAM will become randomized. The ui_rd_data module provides -- the control information for the initialization process. ENTITY ui_wr_data IS GENERIC ( TCQ : INTEGER := 100; APP_DATA_WIDTH : INTEGER := 256; APP_MASK_WIDTH : INTEGER := 32; ECC : STRING := "OFF"; ECC_TEST : STRING := "OFF"; CWL : INTEGER := 5 ); PORT ( -- Outputs -- Inputs -- Be explicit about the latch enable on these registers. -- The signals wr_data_addr and wr_data_offset come at different -- times depending on ECC and the value of CWL. The data portion -- always needs to look a the raw wires, the control portion needs -- to look at a delayed version when ECC is on and CWL != 8. -- rd_data_cnt is the pointer RAM index for data read from the write data -- buffer. Ie, its the data on its way out to the DRAM. -- data_buf_addr_cnt generates the pointer for the pointer RAM on behalf -- of data buf address that comes with the wr_data_en. -- The data buf address is written into the memory -- controller along with the command and address. -- Control writing data into the write data buffer. -- For pointer RAM. Initialize to one since this is one ahead of -- what's being registered in wb_wr_data_addr. Assumes pointer RAM -- has been initialized such that address equals contents. -- Take pointer from pointer RAM and set into the write data address. -- Needs to be split into zeroth bit and everything else because synthesis -- tools don't always allow assigning bit vectors seperately. Bit zero of the -- address is computed via an entirely different algorithm. -- If we see the first getting accepted, then -- second half is unconditionally accepted. -- Keep track of how many entries in the queue hold data. app_wdf_rdy : OUT STD_LOGIC; -- case ({wr_data_end, rd_data_upd_indx_r}) -- block: occupied_counter -- Keep track of how many write requests are in the memory controller. We -- must limit this to 16 because we only have that many data_buf_addrs to -- hand out. Since the memory controller queue and the write data buffer -- queue are distinct, the number of valid entries can be different. -- Throttle request acceptance once there are sixteen write requests in -- the memory controller. Note that there is still a requirement -- for a write reqeusts corresponding write data to be written into the -- write data queue with two states of the request. wr_req_16 : OUT STD_LOGIC; -- case ({wr_accepted, rd_data_upd_indx_r}) -- block: wr_req_counter -- Instantiate pointer RAM. Made up of RAM32M in single write, two read -- port mode, 2 bit wide mode. wr_data_buf_addr : OUT STD_LOGIC_VECTOR(3 DOWNTO 0); -- block : rams -- block: pointer_ram -- Instantiate write data buffer. Depending on width of DQ bus and -- DRAM CK to fabric ratio, number of RAM32Ms is variable. RAM32Ms are -- used in single write, single read, 6 bit wide mode. -- block: wr_buffer_ram wr_data : OUT STD_LOGIC_VECTOR(APP_DATA_WIDTH - 1 DOWNTO 0); wr_data_mask : OUT STD_LOGIC_VECTOR(APP_MASK_WIDTH - 1 DOWNTO 0); raw_not_ecc : OUT STD_LOGIC_VECTOR(3 DOWNTO 0); rst : IN STD_LOGIC; clk : IN STD_LOGIC; app_wdf_data : IN STD_LOGIC_VECTOR(APP_DATA_WIDTH - 1 DOWNTO 0); app_wdf_mask : IN STD_LOGIC_VECTOR(APP_MASK_WIDTH - 1 DOWNTO 0); app_raw_not_ecc : IN STD_LOGIC_VECTOR(3 DOWNTO 0); app_wdf_wren : IN STD_LOGIC; app_wdf_end : IN STD_LOGIC; wr_data_offset : IN STD_LOGIC; wr_data_addr : IN STD_LOGIC_VECTOR(3 DOWNTO 0); wr_data_en : IN STD_LOGIC; wr_accepted : IN STD_LOGIC; ram_init_done_r : IN STD_LOGIC; ram_init_addr : IN STD_LOGIC_VECTOR(3 DOWNTO 0) ); END ENTITY ui_wr_data; ARCHITECTURE trans OF ui_wr_data IS SIGNAL app_wdf_data_r1 : STD_LOGIC_VECTOR(APP_DATA_WIDTH - 1 DOWNTO 0); SIGNAL app_wdf_mask_r1 : STD_LOGIC_VECTOR(APP_MASK_WIDTH - 1 DOWNTO 0); SIGNAL app_raw_not_ecc_r1 : STD_LOGIC_VECTOR(3 DOWNTO 0) := "0000"; SIGNAL app_wdf_wren_r1 : STD_LOGIC; SIGNAL app_wdf_end_r1 : STD_LOGIC; SIGNAL app_wdf_rdy_r : STD_LOGIC; SIGNAL app_wdf_data_ns1 : STD_LOGIC_VECTOR(APP_DATA_WIDTH - 1 DOWNTO 0); SIGNAL app_wdf_mask_ns1 : STD_LOGIC_VECTOR(APP_MASK_WIDTH - 1 DOWNTO 0); SIGNAL app_wdf_wren_ns1 : STD_LOGIC; SIGNAL app_wdf_end_ns1 : STD_LOGIC; SIGNAL wr_data_offset_r : STD_LOGIC; SIGNAL wr_data_addr_r : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL new_rd_data : STD_LOGIC; SIGNAL rd_data_indx_r : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL rd_data_upd_indx_r : STD_LOGIC; SIGNAL data_buf_addr_cnt_r : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL wdf_rdy_ns : STD_LOGIC; SIGNAL wr_data_end : STD_LOGIC; SIGNAL wr_data_pntr : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL wb_wr_data_addr : STD_LOGIC_VECTOR(4 DOWNTO 0); SIGNAL wr_data_indx_r : STD_LOGIC_VECTOR(3 DOWNTO 0); CONSTANT PNTR_RAM_CNT : INTEGER := 2; FUNCTION CALC_WR_BUF_WIDTH (APP_DATA_WIDTH,APP_MASK_WIDTH: INTEGER; ECC_TEST: STRING) RETURN INTEGER is BEGIN IF ( ECC_TEST = "OFF" ) THEN RETURN APP_DATA_WIDTH + APP_MASK_WIDTH; ELSE RETURN APP_DATA_WIDTH + APP_MASK_WIDTH + 4; END IF; END FUNCTION CALC_WR_BUF_WIDTH; FUNCTION CALC_RAM_CNT ( FULL_RAM_CNT,REMAINDER: integer) RETURN integer is BEGIN IF ( REMAINDER = 0 ) THEN RETURN FULL_RAM_CNT; ELSE RETURN FULL_RAM_CNT + 1; END IF; END FUNCTION CALC_RAM_CNT; CONSTANT WR_BUF_WIDTH : INTEGER := CALC_WR_BUF_WIDTH(APP_DATA_WIDTH,APP_MASK_WIDTH,ECC_TEST); CONSTANT FULL_RAM_CNT : INTEGER := (WR_BUF_WIDTH / 6); CONSTANT REMAINDER : INTEGER := WR_BUF_WIDTH MOD 6; CONSTANT RAM_CNT : INTEGER := CALC_RAM_CNT(FULL_RAM_CNT,REMAINDER); CONSTANT RAM_WIDTH : INTEGER := (RAM_CNT * 6); SIGNAL wr_buf_out_data : STD_LOGIC_VECTOR(RAM_WIDTH - 1 DOWNTO 0); -- X-HDL generated signals SIGNAL xhdl6 : STD_LOGIC_VECTOR(1 DOWNTO 0); SIGNAL xhdl7 : STD_LOGIC_VECTOR(1 DOWNTO 0); SIGNAL xhdl8 : STD_LOGIC_VECTOR(4 DOWNTO 0); SIGNAL xhdl9 : STD_LOGIC_VECTOR(4 DOWNTO 0); SIGNAL xhdl10 : STD_LOGIC_VECTOR(4 DOWNTO 0); -- Declare intermediate signals for referenced outputs SIGNAL wr_data_buf_addr_xhdl1 : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL wr_data_xhdl0 : STD_LOGIC_VECTOR(APP_DATA_WIDTH - 1 DOWNTO 0); SIGNAL wr_data_mask_xhdl2 : STD_LOGIC_VECTOR(APP_MASK_WIDTH - 1 DOWNTO 0); SIGNAL rd_data_indx_ns : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL data_buf_addr_cnt_ns : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL wr_data_addr_le : STD_LOGIC; SIGNAL wr_data_indx_ns : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL wb_wr_data_addr_r : STD_LOGIC_VECTOR(4 DOWNTO 1); SIGNAL wb_wr_data_addr_ns : STD_LOGIC_VECTOR(4 DOWNTO 1); SIGNAL occ_cnt_r : STD_LOGIC_VECTOR(4 DOWNTO 0); SIGNAL occ_cnt : STD_LOGIC_VECTOR(15 DOWNTO 0); SIGNAL occ_cnt_ns : STD_LOGIC_VECTOR(4 DOWNTO 0); SIGNAL wb_wr_data_addr0_ns : STD_LOGIC; SIGNAL wb_wr_data_addr0_r : STD_LOGIC; SIGNAL wr_req_cnt_r : STD_LOGIC_VECTOR(4 DOWNTO 0); SIGNAL wr_req_cnt_ns : STD_LOGIC_VECTOR(4 DOWNTO 0); SIGNAL pointer_wr_data : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL pointer_we : STD_LOGIC; SIGNAL pointer_wr_addr : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL wr_buf_in_data : STD_LOGIC_VECTOR(RAM_WIDTH-1 DOWNTO 0); SIGNAL rd_addr_r : STD_LOGIC_VECTOR(4 DOWNTO 0); --Adding few copies of the app_wdf_rdy_r signal in order to meet --timing. This is signal has a very high fanout. So grouped into --few functional groups and alloted one copy per group. SIGNAL app_wdf_rdy_r_copy1 : STD_LOGIC; SIGNAL app_wdf_rdy_r_copy2 : STD_LOGIC; SIGNAL app_wdf_rdy_r_copy3 : STD_LOGIC; SIGNAL app_wdf_rdy_r_copy4 : STD_LOGIC; ATTRIBUTE equivalent_register_removal : string; ATTRIBUTE equivalent_register_removal of app_wdf_rdy_r_copy1 : SIGNAL IS "no"; ATTRIBUTE equivalent_register_removal of app_wdf_rdy_r_copy2 : SIGNAL IS "no"; ATTRIBUTE equivalent_register_removal of app_wdf_rdy_r_copy3 : SIGNAL IS "no"; ATTRIBUTE equivalent_register_removal of app_wdf_rdy_r_copy4 : SIGNAL IS "no"; BEGIN -- Drive referenced outputs wr_data_buf_addr <= wr_data_buf_addr_xhdl1; wr_data <= wr_data_xhdl0; wr_data_mask <= wr_data_mask_xhdl2; app_wdf_data_ns1 <= app_wdf_data_r1 WHEN ((NOT(app_wdf_rdy_r_copy2)) = '1') ELSE app_wdf_data; app_wdf_mask_ns1 <= app_wdf_mask_r1 WHEN ((NOT(app_wdf_rdy_r_copy2)) = '1') ELSE app_wdf_mask; app_wdf_wren_ns1 <= NOT(rst) AND app_wdf_wren_r1 WHEN ((NOT(app_wdf_rdy_r_copy2)) = '1') ELSE NOT(rst) AND app_wdf_wren; app_wdf_end_ns1 <= NOT(rst) AND app_wdf_end_r1 WHEN ((NOT(app_wdf_rdy_r_copy2)) = '1') ELSE NOT(rst) AND app_wdf_end; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN app_wdf_rdy_r_copy1 <= wdf_rdy_ns AFTER (TCQ)*1 ps; app_wdf_rdy_r_copy2 <= wdf_rdy_ns AFTER (TCQ)*1 ps; app_wdf_rdy_r_copy3 <= wdf_rdy_ns AFTER (TCQ)*1 ps; app_wdf_rdy_r_copy4 <= wdf_rdy_ns AFTER (TCQ)*1 ps; END IF; END PROCESS; xhdl3 : IF (not(ECC_TEST = "OFF")) GENERATE PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN app_raw_not_ecc_r1 <= app_raw_not_ecc AFTER (TCQ)*1 ps; END IF; END PROCESS; END GENERATE; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN app_wdf_data_r1 <= app_wdf_data_ns1 AFTER (TCQ)*1 ps; app_wdf_mask_r1 <= app_wdf_mask_ns1 AFTER (TCQ)*1 ps; app_wdf_wren_r1 <= app_wdf_wren_ns1 AFTER (TCQ)*1 ps; app_wdf_end_r1 <= app_wdf_end_ns1 AFTER (TCQ)*1 ps; END IF; END PROCESS; xhdl4 : IF ((ECC = "OFF") OR CWL >= 7) GENERATE PROCESS (wr_data_offset) BEGIN wr_data_offset_r <= wr_data_offset; END PROCESS; PROCESS (wr_data_addr) BEGIN wr_data_addr_r <= wr_data_addr; END PROCESS; END GENERATE; xhdl5 : IF (NOT((ECC = "OFF") OR CWL >= 7)) GENERATE PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN wr_data_offset_r <= wr_data_offset AFTER (TCQ)*1 ps; END IF; END PROCESS; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN wr_data_addr_r <= wr_data_addr AFTER (TCQ)*1 ps; END IF; END PROCESS; END GENERATE; new_rd_data <= wr_data_en AND NOT(wr_data_offset_r); PROCESS (new_rd_data, rd_data_indx_r, rst) BEGIN rd_data_indx_ns <= rd_data_indx_r; IF (rst = '1') THEN rd_data_indx_ns <= "0000"; ELSIF (new_rd_data = '1') THEN rd_data_indx_ns <= rd_data_indx_r + "0001"; END IF; END PROCESS; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN rd_data_indx_r <= rd_data_indx_ns AFTER (TCQ)*1 ps; END IF; END PROCESS; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN rd_data_upd_indx_r <= new_rd_data AFTER (TCQ)*1 ps; END IF; END PROCESS; PROCESS (data_buf_addr_cnt_r, rst, wr_accepted) BEGIN data_buf_addr_cnt_ns <= data_buf_addr_cnt_r; IF (rst = '1') THEN data_buf_addr_cnt_ns <= "0000"; ELSIF (wr_accepted = '1') THEN data_buf_addr_cnt_ns <= data_buf_addr_cnt_r + "0001"; END IF; END PROCESS; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN data_buf_addr_cnt_r <= data_buf_addr_cnt_ns AFTER (TCQ)*1 ps; END IF; END PROCESS; wr_data_end <= app_wdf_end_r1 AND app_wdf_rdy_r_copy1 AND app_wdf_wren_r1; wr_data_addr_le <= (wr_data_end AND wdf_rdy_ns) OR (rd_data_upd_indx_r AND NOT(app_wdf_rdy_r_copy1)); PROCESS (rst, wr_data_addr_le, wr_data_indx_r) BEGIN wr_data_indx_ns <= wr_data_indx_r; IF (rst = '1') THEN wr_data_indx_ns <= "0001"; ELSIF (wr_data_addr_le = '1') THEN wr_data_indx_ns <= wr_data_indx_r + "0001"; END IF; END PROCESS; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN wr_data_indx_r <= wr_data_indx_ns AFTER (TCQ)*1 ps; END IF; END PROCESS; PROCESS (rst, wb_wr_data_addr_r, wr_data_addr_le, wr_data_pntr) BEGIN wb_wr_data_addr_ns <= wb_wr_data_addr_r; IF (rst = '1') THEN wb_wr_data_addr_ns <= "0000"; ELSIF (wr_data_addr_le = '1') THEN wb_wr_data_addr_ns <= wr_data_pntr; END IF; END PROCESS; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN wb_wr_data_addr_r <= wb_wr_data_addr_ns AFTER (TCQ)*1 ps; END IF; END PROCESS; wb_wr_data_addr0_ns <= NOT(rst) AND ((app_wdf_rdy_r_copy3 AND app_wdf_wren_r1 AND NOT(app_wdf_end_r1)) OR (wb_wr_data_addr0_r AND NOT(app_wdf_wren_r1))); PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN wb_wr_data_addr0_r <= wb_wr_data_addr0_ns AFTER (TCQ)*1 ps; END IF; END PROCESS; wb_wr_data_addr <= (wb_wr_data_addr_r & wb_wr_data_addr0_r); --xhdl6 <= wr_data_end & rd_data_upd_indx_r; --PROCESS (occ_cnt_r, rd_data_upd_indx_r, rst, wr_data_end,xhdl6) --BEGIN -- occ_cnt_ns <= occ_cnt_r; -- IF (rst = '1') THEN -- occ_cnt_ns <= "00000"; -- ELSE -- CASE xhdl6 IS -- WHEN "01" => -- occ_cnt_ns <= occ_cnt_r - "00001"; -- WHEN "10" => -- occ_cnt_ns <= occ_cnt_r + "00001"; -- WHEN OTHERS => -- occ_cnt_ns <= occ_cnt_r; -- END CASE; -- END IF; --END PROCESS; -- --PROCESS (clk) --BEGIN -- IF (clk'EVENT AND clk = '1') THEN -- occ_cnt_r <= occ_cnt_ns AFTER (TCQ)*1 ps; -- END IF; --END PROCESS; -- --wdf_rdy_ns <= NOT((rst OR NOT(ram_init_done_r) OR occ_cnt_ns(4))); xhdl6 <= wr_data_end & rd_data_upd_indx_r; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN IF ( rst = '1' ) THEN occ_cnt <= X"0001" AFTER (TCQ)*1 ps; ELSE CASE xhdl6 IS WHEN "01" => occ_cnt <= ('0' & occ_cnt(15 downto 1)) AFTER (TCQ)*1 ps; WHEN "10" => occ_cnt <= (occ_cnt(14 downto 0) & '1') AFTER (TCQ)*1 ps; WHEN OTHERS => null; END CASE; END IF; END IF; END PROCESS; wdf_rdy_ns <= NOT ( rst OR NOT(ram_init_done_r) OR (occ_cnt(14) AND wr_data_end AND NOT(rd_data_upd_indx_r)) OR (occ_cnt(15) AND NOT(rd_data_upd_indx_r)) ); PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN app_wdf_rdy_r <= wdf_rdy_ns AFTER (TCQ)*1 ps; END IF; END PROCESS; app_wdf_rdy <= app_wdf_rdy_r; xhdl7 <= wr_accepted & rd_data_upd_indx_r; PROCESS (rd_data_upd_indx_r, rst, wr_accepted, wr_req_cnt_r,xhdl7) BEGIN wr_req_cnt_ns <= wr_req_cnt_r; IF (rst = '1') THEN wr_req_cnt_ns <= "00000"; ELSE CASE xhdl7 IS WHEN "01" => wr_req_cnt_ns <= wr_req_cnt_r - "00001"; WHEN "10" => wr_req_cnt_ns <= wr_req_cnt_r + "00001"; WHEN OTHERS => wr_req_cnt_ns <= wr_req_cnt_r; END CASE; END IF; END PROCESS; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN wr_req_cnt_r <= wr_req_cnt_ns AFTER (TCQ)*1 ps; END IF; END PROCESS; wr_req_16 <= '1' when ((wr_req_cnt_ns = "10000")) else '0'; pointer_we <= new_rd_data OR NOT(ram_init_done_r); pointer_wr_data <= wr_data_addr_r WHEN (ram_init_done_r = '1') ELSE ram_init_addr; pointer_wr_addr <= rd_data_indx_r WHEN (ram_init_done_r = '1') ELSE ram_init_addr; rams : FOR i IN 0 TO PNTR_RAM_CNT - 1 GENERATE xhdl8 <= ('0' & data_buf_addr_cnt_r); xhdl9 <= ('0' & wr_data_indx_r); xhdl10 <= ('0' & pointer_wr_addr); RAM32M0 : RAM32M GENERIC MAP ( init_a => "0000000000000000000000000000000000000000000000000000000000000000", init_b => "0000000000000000000000000000000000000000000000000000000000000000", init_c => "0000000000000000000000000000000000000000000000000000000000000000", init_d => "0000000000000000000000000000000000000000000000000000000000000000" ) PORT MAP ( doa => open, dob => wr_data_buf_addr_xhdl1(i * 2 + 1 DOWNTO i * 2), doc => wr_data_pntr(i * 2 + 1 DOWNTO i * 2), dod => open, dia => "00", dib => pointer_wr_data(i * 2 + 1 DOWNTO i * 2), dic => pointer_wr_data(i * 2 + 1 DOWNTO i * 2), did => "00", addra => "00000", addrb => xhdl8, addrc => xhdl9, addrd => xhdl10, we => pointer_we, wclk => clk ); END GENERATE; xhdl11 : IF (REMAINDER = 0) GENERATE xhdl12 : IF (ECC_TEST = "OFF") GENERATE wr_buf_in_data <= (app_wdf_mask_r1 & app_wdf_data_r1); END GENERATE; xhdl13 : IF (NOT(ECC_TEST = "OFF")) GENERATE SIGNAL sig_concat :STD_LOGIC_VECTOR ( APP_MASK_WIDTH + APP_DATA_WIDTH + 3 DOWNTO 0 ); BEGIN sig_concat <= (app_raw_not_ecc_r1 & app_wdf_mask_r1 & app_wdf_data_r1); wr_buf_in_data <= sig_concat(RAM_WIDTH - 1 DOWNTO 0); END GENERATE; END GENERATE; xhdl14 : IF (NOT(REMAINDER = 0)) GENERATE xhdl15 : IF (ECC_TEST = "OFF") GENERATE SIGNAL sig_concat : STD_LOGIC_VECTOR (6-REMAINDER+APP_DATA_WIDTH+APP_MASK_WIDTH-1 DOWNTO 0); BEGIN sig_concat <= (std_logic_vector(to_unsigned(0,6-REMAINDER)) & app_wdf_mask_r1 & app_wdf_data_r1); wr_buf_in_data <= sig_concat(RAM_WIDTH - 1 DOWNTO 0); END GENERATE; xhdl16 : IF (NOT(ECC_TEST = "OFF")) GENERATE SIGNAL sig_concat : STD_LOGIC_VECTOR (6-REMAINDER+APP_DATA_WIDTH+APP_MASK_WIDTH+3 DOWNTO 0); BEGIN sig_concat <= (std_logic_vector(to_unsigned(0,6-REMAINDER)) & app_raw_not_ecc_r1 & app_wdf_mask_r1 & app_wdf_data_r1); wr_buf_in_data <= sig_concat(RAM_WIDTH - 1 DOWNTO 0); END GENERATE; END GENERATE; PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN rd_addr_r <= (wr_data_addr & wr_data_offset) AFTER (TCQ)*1 ps; END IF; END PROCESS; wr_buffer_ram : FOR i IN 0 TO RAM_CNT - 1 GENERATE RAM32M0 : RAM32M GENERIC MAP ( init_a => "0000000000000000000000000000000000000000000000000000000000000000", init_b => "0000000000000000000000000000000000000000000000000000000000000000", init_c => "0000000000000000000000000000000000000000000000000000000000000000", init_d => "0000000000000000000000000000000000000000000000000000000000000000" ) PORT MAP ( doa => wr_buf_out_data(((i * 6) + 4) + 1 DOWNTO ((i * 6) + 4)), dob => wr_buf_out_data(((i * 6) + 2) + 1 DOWNTO ((i * 6) + 2)), doc => wr_buf_out_data(((i * 6) + 0) + 1 DOWNTO ((i * 6) + 0)), dod => open, dia => wr_buf_in_data(((i * 6) + 4) + 1 DOWNTO ((i * 6) + 4)), dib => wr_buf_in_data(((i * 6) + 2) + 1 DOWNTO ((i * 6) + 2)), dic => wr_buf_in_data(((i * 6) + 0) + 1 DOWNTO ((i * 6) + 0)), did => "00", addra => rd_addr_r, addrb => rd_addr_r, addrc => rd_addr_r, addrd => wb_wr_data_addr, we => app_wdf_rdy_r_copy4, wclk => clk ); END GENERATE; wr_data_xhdl0 <= wr_buf_out_data(APP_DATA_WIDTH - 1 DOWNTO 0); wr_data_mask_xhdl2 <= wr_buf_out_data(APP_DATA_WIDTH + APP_MASK_WIDTH - 1 DOWNTO APP_DATA_WIDTH); xhdl17 : IF (ECC_TEST = "OFF") GENERATE raw_not_ecc <= "0000"; END GENERATE; xhdl18 : IF (NOT(ECC_TEST = "OFF")) GENERATE raw_not_ecc <= wr_buf_out_data(WR_BUF_WIDTH - 1 DOWNTO WR_BUF_WIDTH-4); END GENERATE; -- ui_wr_data END ARCHITECTURE trans;
entity testcase3 is port(clk: in bit); begin end entity testcase3; -- Keep the compiler happy architecture empty of testcase3 is begin check: assert clk'delayed'last_event >= 10 ns; end architecture empty;
entity testcase3 is port(clk: in bit); begin end entity testcase3; -- Keep the compiler happy architecture empty of testcase3 is begin check: assert clk'delayed'last_event >= 10 ns; end architecture empty;
-- VHDL Entity r65c02_tc.r65c02_tc.symbol -- -- Created: -- by - remoteghost.UNKNOWN (ENTW-7HPZ200) -- at - 10:24:26 07/21/13 -- -- Generated by Mentor Graphics' HDL Designer(TM) 2016.2 (Build 5) -- LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; entity r65c02_tc is port( clk_clk_i : in std_logic; d_i : in std_logic_vector (7 downto 0); irq_n_i : in std_logic; nmi_n_i : in std_logic; rdy_i : in std_logic; rst_rst_n_i : in std_logic; so_n_i : in std_logic; a_o : out std_logic_vector (15 downto 0); d_o : out std_logic_vector (7 downto 0); rd_o : out std_logic; sync_o : out std_logic; wr_n_o : out std_logic; wr_o : out std_logic ); -- Declarations end r65c02_tc ; -- (C) 2008 - 2018 Jens Gutschmidt -- (email: opencores@vivare-services.com) -- -- Versions: -- Revision 1.52 2018/09/09 17:48:00 jens -- - RESET generates SYNC now -- Revision 1.52 RC 2018/09/09 03:00:00 jens -- - ADC / SBC flags and A like R65C02 now -- Revision 1.52 BETA 2018/09/05 19:35:00 jens -- - BBRx/BBSx internal cycles like real 65C02 now -- - Bug Fix ADC and SBC in decimal mode (all op codes - -- 1 cycle is missing -- - Bug Fix ADC and SBC in decimal mode (all op codes - -- "Overflow" flag was computed wrong) -- Revision 1.52 BETA 2018/09/02 18:49:00 jens -- - Interrupt NMI and IRQ processing via FETCH stage now -- Revision 1.52 BETA 2018/08/30 15:39:00 jens -- - Interrupt priority order is now: BRQ - NMI - IRQ -- - Performance improvements on-going (Mealy -> Moore) -- Revision 1.52 BETA 2018/08/23 20:27:00 jens -- - Bug Fixes All Branch Instructions -- (BCC, BCS, BEQ, BNE, BPL, BMI, BVC, BVS, BRA) -- 3 cycles now if branch forward occur and the branch -- instruction lies on a xxFEh location. -- (BBR, BBS) 6 cycles now if branch forward occur and the -- branch instruction lies on a xxFDh location. -- - Bug Fix Hardware Interrupts NMI & IRQ - 7 cycles & "SYNC" now -- - Bug Fix Now all cycles are delayable (WR and internal) -- -- Revision 1.51 RC 2014/04/19 14:44:00 jens -- (never submitted to opencores) -- - Bug Fix JMP ABS - produced a 6502 like JMP (IND) PCH. -- When the ABS address data bytes cross the page -- boundary (e.g. $02FE JMP hhll reads hh from -- $02FF and ll from $0200, instead $02FF and $0300) -- -- Revision 1.5 RC 2013/08/01 11:00:00 jens -- - Change Block name to lower case -- - Bug Fix CMP (IND) - wrongly decoded as function AND -- - Bug Fix BRK should clear decimal flag in P Reg -- - Bug Fix JMP (ABS,X) - Low Address outputted twice - no High Address -- - Bug Fix Unknown Ops - Used always 1b2c NOP ($EA) - new NOPs created -- - Bug Fix DECIMAL ADC and SBC (all op codes - "C" flag was computed wrong) -- - Bug Fix INC/DEC ABS,X - N/Z flag wrongly computed -- - Bug Fix RTI - should increment stack pointer -- - Bug Fix "E" & "B" flags (Bits 5 & 4) - should be always "1" in P Reg. Change "RES", "RTI", "IRQ" & "NMI" substates. -- - Bug Fix ADC and SBC (all sub codes - "Overflow" flag was computed wrong) -- - Bug Fix RMB, SMB Bug - Bit position decoded wrong -- -- Revision 1.4 2013/07/21 11:11:00 jens -- - Changing the title block and internal revision history -- - Bug Fix STA [(IND)] op$92 ($92 was missed in the connection list at state FETCH) -- -- Revision 1.3 2009/01/04 10:20:50 eda -- Changes for cosmetic issues only -- -- Revision 1.2 2009/01/04 09:23:12 eda -- - Delete unused nets and blocks (same as R6502_TC) -- - Rename blocks -- - Re-arrage FSM symbols in block FSM_Execution_Unit -- -- Revision 1.1 2009/01/03 16:36:48 eda -- -- no description -- -- -- -- -- VHDL Architecture r65c02_tc.r65c02_tc.struct -- -- Created: -- by - eda.UNKNOWN (ENTW-7HPZ200) -- at - 18:23:09 09.09.2018 -- -- Generated by Mentor Graphics' HDL Designer(TM) 2016.2 (Build 5) -- -- COPYRIGHT (C) 2008 - 2018 by Jens Gutschmidt -- -- 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 3 of the License, or 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, see <http://www.gnu.org/licenses/>. -- -- LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; --library r65c02_tc; architecture struct of r65c02_tc is -- Architecture declarations -- Internal signal declarations -- Component Declarations component core port ( clk_clk_i : in std_logic ; d_i : in std_logic_vector (7 downto 0); irq_n_i : in std_logic ; nmi_n_i : in std_logic ; rdy_i : in std_logic ; rst_rst_n_i : in std_logic ; so_n_i : in std_logic ; a_o : out std_logic_vector (15 downto 0); d_o : out std_logic_vector (7 downto 0); rd_o : out std_logic ; sync_o : out std_logic ; wr_n_o : out std_logic ; wr_o : out std_logic ); end component; -- Optional embedded configurations -- pragma synthesis_off for all : core use entity r65c02_tc.core; -- pragma synthesis_on begin -- Instance port mappings. U_0 : core port map ( clk_clk_i => clk_clk_i, d_i => d_i, irq_n_i => irq_n_i, nmi_n_i => nmi_n_i, rdy_i => rdy_i, rst_rst_n_i => rst_rst_n_i, so_n_i => so_n_i, a_o => a_o, d_o => d_o, rd_o => rd_o, sync_o => sync_o, wr_n_o => wr_n_o, wr_o => wr_o ); end struct;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
------------------------------------------------------------------------------- -- axi_datamover_wr_demux.vhd ------------------------------------------------------------------------------- -- -- ************************************************************************* -- -- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- ************************************************************************* -- ------------------------------------------------------------------------------- -- Filename: axi_datamover_wr_demux.vhd -- -- Description: -- This file implements the DataMover Master Write Strobe De-Multiplexer. -- This is needed when the native data width of the DataMover is narrower -- than the AXI4 Write Data Channel. -- -- -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; ------------------------------------------------------------------------------- entity axi_datamover_wr_demux is generic ( C_SEL_ADDR_WIDTH : Integer range 1 to 8 := 5; -- Sets the width of the select control bus C_MMAP_DWIDTH : Integer range 32 to 1024 := 32; -- Indicates the width of the AXI4 Write Data Channel C_STREAM_DWIDTH : Integer range 8 to 1024 := 32 -- Indicates the native data width of the DataMover S2MM. If -- S2MM Store and Forward with upsizer is enabled, the width is -- the AXi4 Write Data Channel, else it is the S2MM Stream data width. ); port ( -- AXI MMap Data Channel Input -------------------------------------------- -- wstrb_in : In std_logic_vector((C_STREAM_DWIDTH/8)-1 downto 0); -- -- data input -- ---------------------------------------------------------------------------- -- AXI Master Stream ------------------------------------------------------ -- demux_wstrb_out : Out std_logic_vector((C_MMAP_DWIDTH/8)-1 downto 0); -- --De-Mux strb output -- ---------------------------------------------------------------------------- -- Command Calculator Interface -------------------------------------------- -- debeat_saddr_lsb : In std_logic_vector(C_SEL_ADDR_WIDTH-1 downto 0) -- -- The next command start address LSbs to use for the read data -- -- mux (only used if Stream data width is less than the MMap Data -- -- Width). -- ---------------------------------------------------------------------------- ); end entity axi_datamover_wr_demux; architecture implementation of axi_datamover_wr_demux is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; -- Function Decalarations ------------------------------------------------- ------------------------------------------------------------------- -- Function -- -- Function Name: func_mux_sel_width -- -- Function Description: -- Calculates the number of needed bits for the Mux Select control -- based on the number of input channels to the mux. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_mux_sel_width (num_channels : integer) return integer is Variable var_sel_width : integer := 0; begin case num_channels is --when 2 => -- var_sel_width := 1; when 4 => var_sel_width := 2; when 8 => var_sel_width := 3; when 16 => var_sel_width := 4; when 32 => var_sel_width := 5; when 64 => var_sel_width := 6; when 128 => var_sel_width := 7; when others => var_sel_width := 1; end case; Return (var_sel_width); end function func_mux_sel_width; ------------------------------------------------------------------- -- Function -- -- Function Name: func_sel_ls_index -- -- Function Description: -- Calculates the LS index of the select field to rip from the -- input select bus. -- -- Note that the number of input mux channels are always a -- power of 2. -- ------------------------------------------------------------------- function func_sel_ls_index (stream_width : integer) return integer is Variable var_sel_ls_index : integer := 0; begin case stream_width is when 8 => var_sel_ls_index := 0; when 16 => var_sel_ls_index := 1; when 32 => var_sel_ls_index := 2; when 64 => var_sel_ls_index := 3; when 128 => var_sel_ls_index := 4; when 256 => var_sel_ls_index := 5; when 512 => var_sel_ls_index := 6; when others => -- assume 1024 bit width var_sel_ls_index := 7; end case; Return (var_sel_ls_index); end function func_sel_ls_index; -- Constant Decalarations ------------------------------------------------- Constant OMIT_DEMUX : boolean := (C_STREAM_DWIDTH = C_MMAP_DWIDTH); Constant INCLUDE_DEMUX : boolean := not(OMIT_DEMUX); Constant STREAM_WSTB_WIDTH : integer := C_STREAM_DWIDTH/8; Constant MMAP_WSTB_WIDTH : integer := C_MMAP_DWIDTH/8; Constant NUM_MUX_CHANNELS : integer := MMAP_WSTB_WIDTH/STREAM_WSTB_WIDTH; Constant MUX_SEL_WIDTH : integer := func_mux_sel_width(NUM_MUX_CHANNELS); Constant MUX_SEL_LS_INDEX : integer := func_sel_ls_index(C_STREAM_DWIDTH); -- Signal Declarations -------------------------------------------- signal sig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin --(architecture implementation) -- Assign the Output data port demux_wstrb_out <= sig_demux_wstrb_out; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_STRM_EQ_MMAP -- -- If Generate Description: -- This IfGen implements the case where the Stream Data Width is -- the same as the Memeory Map read Data width. -- -- ------------------------------------------------------------ GEN_STRM_EQ_MMAP : if (OMIT_DEMUX) generate begin sig_demux_wstrb_out <= wstrb_in; end generate GEN_STRM_EQ_MMAP; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_2XN -- -- If Generate Description: -- 2 channel demux case -- -- ------------------------------------------------------------ GEN_2XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 2) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_2XN_DEMUX -- -- Process Description: -- Implement the 2XN DeMux -- ------------------------------------------------------------- DO_2XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when others => -- 1 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; end case; end process DO_2XN_DEMUX; end generate GEN_2XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_4XN -- -- If Generate Description: -- 4 channel demux case -- -- ------------------------------------------------------------ GEN_4XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 4) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_4XN_DEMUX -- -- Process Description: -- Implement the 4XN DeMux -- ------------------------------------------------------------- DO_4XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when others => -- 3 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; end case; end process DO_4XN_DEMUX; end generate GEN_4XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_8XN -- -- If Generate Description: -- 8 channel demux case -- -- ------------------------------------------------------------ GEN_8XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 8) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_8XN_DEMUX -- -- Process Description: -- Implement the 8XN DeMux -- ------------------------------------------------------------- DO_8XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when others => -- 7 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; end case; end process DO_8XN_DEMUX; end generate GEN_8XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_16XN -- -- If Generate Description: -- 16 channel demux case -- -- ------------------------------------------------------------ GEN_16XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 16) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_16XN_DEMUX -- -- Process Description: -- Implement the 16XN DeMux -- ------------------------------------------------------------- DO_16XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when others => -- 15 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; end case; end process DO_16XN_DEMUX; end generate GEN_16XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_32XN -- -- If Generate Description: -- 32 channel demux case -- -- ------------------------------------------------------------ GEN_32XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 32) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_32XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_32XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when others => -- 31 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; end case; end process DO_32XN_DEMUX; end generate GEN_32XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_64XN -- -- If Generate Description: -- 64 channel demux case -- -- ------------------------------------------------------------ GEN_64XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 64) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_64XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_64XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when others => -- 63 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; end case; end process DO_64XN_DEMUX; end generate GEN_64XN; ------------------------------------------------------------ -- If Generate -- -- Label: GEN_128XN -- -- If Generate Description: -- 128 channel demux case -- -- ------------------------------------------------------------ GEN_128XN : if (INCLUDE_DEMUX and NUM_MUX_CHANNELS = 128) generate -- local signals signal sig_demux_sel_slice : std_logic_vector(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_unsgnd : unsigned(MUX_SEL_WIDTH-1 downto 0) := (others => '0'); signal sig_demux_sel_int : integer := 0; signal lsig_demux_sel_int_local : integer := 0; signal lsig_demux_wstrb_out : std_logic_vector(MMAP_WSTB_WIDTH-1 downto 0) := (others => '0'); begin -- Rip the Mux Select bits needed for the Mux case from the input select bus sig_demux_sel_slice <= debeat_saddr_lsb((MUX_SEL_LS_INDEX + MUX_SEL_WIDTH)-1 downto MUX_SEL_LS_INDEX); sig_demux_sel_unsgnd <= UNSIGNED(sig_demux_sel_slice); -- convert to unsigned sig_demux_sel_int <= TO_INTEGER(sig_demux_sel_unsgnd); -- convert to integer for MTI compile issue -- with locally static subtype error in each of the -- Mux IfGens lsig_demux_sel_int_local <= sig_demux_sel_int; sig_demux_wstrb_out <= lsig_demux_wstrb_out; ------------------------------------------------------------- -- Combinational Process -- -- Label: DO_128XN_DEMUX -- -- Process Description: -- Implement the 32XN DeMux -- ------------------------------------------------------------- DO_128XN_DEMUX : process (lsig_demux_sel_int_local, wstrb_in) begin -- Set default value lsig_demux_wstrb_out <= (others => '0'); case lsig_demux_sel_int_local is when 0 => lsig_demux_wstrb_out(STREAM_WSTB_WIDTH-1 downto 0) <= wstrb_in; when 1 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*2)-1 downto STREAM_WSTB_WIDTH*1) <= wstrb_in; when 2 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*3)-1 downto STREAM_WSTB_WIDTH*2) <= wstrb_in; when 3 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*4)-1 downto STREAM_WSTB_WIDTH*3) <= wstrb_in; when 4 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*5)-1 downto STREAM_WSTB_WIDTH*4) <= wstrb_in; when 5 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*6)-1 downto STREAM_WSTB_WIDTH*5) <= wstrb_in; when 6 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*7)-1 downto STREAM_WSTB_WIDTH*6) <= wstrb_in; when 7 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*8)-1 downto STREAM_WSTB_WIDTH*7) <= wstrb_in; when 8 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*9)-1 downto STREAM_WSTB_WIDTH*8) <= wstrb_in; when 9 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*10)-1 downto STREAM_WSTB_WIDTH*9) <= wstrb_in; when 10 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*11)-1 downto STREAM_WSTB_WIDTH*10) <= wstrb_in; when 11 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*12)-1 downto STREAM_WSTB_WIDTH*11) <= wstrb_in; when 12 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*13)-1 downto STREAM_WSTB_WIDTH*12) <= wstrb_in; when 13 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*14)-1 downto STREAM_WSTB_WIDTH*13) <= wstrb_in; when 14 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*15)-1 downto STREAM_WSTB_WIDTH*14) <= wstrb_in; when 15 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*16)-1 downto STREAM_WSTB_WIDTH*15) <= wstrb_in; when 16 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*17)-1 downto STREAM_WSTB_WIDTH*16) <= wstrb_in; when 17 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*18)-1 downto STREAM_WSTB_WIDTH*17) <= wstrb_in; when 18 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*19)-1 downto STREAM_WSTB_WIDTH*18) <= wstrb_in; when 19 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*20)-1 downto STREAM_WSTB_WIDTH*19) <= wstrb_in; when 20 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*21)-1 downto STREAM_WSTB_WIDTH*20) <= wstrb_in; when 21 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*22)-1 downto STREAM_WSTB_WIDTH*21) <= wstrb_in; when 22 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*23)-1 downto STREAM_WSTB_WIDTH*22) <= wstrb_in; when 23 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*24)-1 downto STREAM_WSTB_WIDTH*23) <= wstrb_in; when 24 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*25)-1 downto STREAM_WSTB_WIDTH*24) <= wstrb_in; when 25 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*26)-1 downto STREAM_WSTB_WIDTH*25) <= wstrb_in; when 26 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*27)-1 downto STREAM_WSTB_WIDTH*26) <= wstrb_in; when 27 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*28)-1 downto STREAM_WSTB_WIDTH*27) <= wstrb_in; when 28 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*29)-1 downto STREAM_WSTB_WIDTH*28) <= wstrb_in; when 29 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*30)-1 downto STREAM_WSTB_WIDTH*29) <= wstrb_in; when 30 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*31)-1 downto STREAM_WSTB_WIDTH*30) <= wstrb_in; when 31 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*32)-1 downto STREAM_WSTB_WIDTH*31) <= wstrb_in; when 32 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*33)-1 downto STREAM_WSTB_WIDTH*32) <= wstrb_in; when 33 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*34)-1 downto STREAM_WSTB_WIDTH*33) <= wstrb_in; when 34 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*35)-1 downto STREAM_WSTB_WIDTH*34) <= wstrb_in; when 35 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*36)-1 downto STREAM_WSTB_WIDTH*35) <= wstrb_in; when 36 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*37)-1 downto STREAM_WSTB_WIDTH*36) <= wstrb_in; when 37 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*38)-1 downto STREAM_WSTB_WIDTH*37) <= wstrb_in; when 38 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*39)-1 downto STREAM_WSTB_WIDTH*38) <= wstrb_in; when 39 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*40)-1 downto STREAM_WSTB_WIDTH*39) <= wstrb_in; when 40 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*41)-1 downto STREAM_WSTB_WIDTH*40) <= wstrb_in; when 41 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*42)-1 downto STREAM_WSTB_WIDTH*41) <= wstrb_in; when 42 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*43)-1 downto STREAM_WSTB_WIDTH*42) <= wstrb_in; when 43 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*44)-1 downto STREAM_WSTB_WIDTH*43) <= wstrb_in; when 44 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*45)-1 downto STREAM_WSTB_WIDTH*44) <= wstrb_in; when 45 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*46)-1 downto STREAM_WSTB_WIDTH*45) <= wstrb_in; when 46 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*47)-1 downto STREAM_WSTB_WIDTH*46) <= wstrb_in; when 47 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*48)-1 downto STREAM_WSTB_WIDTH*47) <= wstrb_in; when 48 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*49)-1 downto STREAM_WSTB_WIDTH*48) <= wstrb_in; when 49 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*50)-1 downto STREAM_WSTB_WIDTH*49) <= wstrb_in; when 50 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*51)-1 downto STREAM_WSTB_WIDTH*50) <= wstrb_in; when 51 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*52)-1 downto STREAM_WSTB_WIDTH*51) <= wstrb_in; when 52 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*53)-1 downto STREAM_WSTB_WIDTH*52) <= wstrb_in; when 53 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*54)-1 downto STREAM_WSTB_WIDTH*53) <= wstrb_in; when 54 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*55)-1 downto STREAM_WSTB_WIDTH*54) <= wstrb_in; when 55 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*56)-1 downto STREAM_WSTB_WIDTH*55) <= wstrb_in; when 56 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*57)-1 downto STREAM_WSTB_WIDTH*56) <= wstrb_in; when 57 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*58)-1 downto STREAM_WSTB_WIDTH*57) <= wstrb_in; when 58 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*59)-1 downto STREAM_WSTB_WIDTH*58) <= wstrb_in; when 59 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*60)-1 downto STREAM_WSTB_WIDTH*59) <= wstrb_in; when 60 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*61)-1 downto STREAM_WSTB_WIDTH*60) <= wstrb_in; when 61 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*62)-1 downto STREAM_WSTB_WIDTH*61) <= wstrb_in; when 62 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*63)-1 downto STREAM_WSTB_WIDTH*62) <= wstrb_in; when 63 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*64)-1 downto STREAM_WSTB_WIDTH*63) <= wstrb_in; when 64 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*65)-1 downto STREAM_WSTB_WIDTH*64) <= wstrb_in; when 65 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*66)-1 downto STREAM_WSTB_WIDTH*65) <= wstrb_in; when 66 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*67)-1 downto STREAM_WSTB_WIDTH*66) <= wstrb_in; when 67 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*68)-1 downto STREAM_WSTB_WIDTH*67) <= wstrb_in; when 68 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*69)-1 downto STREAM_WSTB_WIDTH*68) <= wstrb_in; when 69 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*70)-1 downto STREAM_WSTB_WIDTH*69) <= wstrb_in; when 70 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*71)-1 downto STREAM_WSTB_WIDTH*70) <= wstrb_in; when 71 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*72)-1 downto STREAM_WSTB_WIDTH*71) <= wstrb_in; when 72 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*73)-1 downto STREAM_WSTB_WIDTH*72) <= wstrb_in; when 73 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*74)-1 downto STREAM_WSTB_WIDTH*73) <= wstrb_in; when 74 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*75)-1 downto STREAM_WSTB_WIDTH*74) <= wstrb_in; when 75 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*76)-1 downto STREAM_WSTB_WIDTH*75) <= wstrb_in; when 76 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*77)-1 downto STREAM_WSTB_WIDTH*76) <= wstrb_in; when 77 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*78)-1 downto STREAM_WSTB_WIDTH*77) <= wstrb_in; when 78 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*79)-1 downto STREAM_WSTB_WIDTH*78) <= wstrb_in; when 79 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*80)-1 downto STREAM_WSTB_WIDTH*79) <= wstrb_in; when 80 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*81)-1 downto STREAM_WSTB_WIDTH*80) <= wstrb_in; when 81 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*82)-1 downto STREAM_WSTB_WIDTH*81) <= wstrb_in; when 82 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*83)-1 downto STREAM_WSTB_WIDTH*82) <= wstrb_in; when 83 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*84)-1 downto STREAM_WSTB_WIDTH*83) <= wstrb_in; when 84 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*85)-1 downto STREAM_WSTB_WIDTH*84) <= wstrb_in; when 85 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*86)-1 downto STREAM_WSTB_WIDTH*85) <= wstrb_in; when 86 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*87)-1 downto STREAM_WSTB_WIDTH*86) <= wstrb_in; when 87 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*88)-1 downto STREAM_WSTB_WIDTH*87) <= wstrb_in; when 88 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*89)-1 downto STREAM_WSTB_WIDTH*88) <= wstrb_in; when 89 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*90)-1 downto STREAM_WSTB_WIDTH*89) <= wstrb_in; when 90 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*91)-1 downto STREAM_WSTB_WIDTH*90) <= wstrb_in; when 91 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*92)-1 downto STREAM_WSTB_WIDTH*91) <= wstrb_in; when 92 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*93)-1 downto STREAM_WSTB_WIDTH*92) <= wstrb_in; when 93 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*94)-1 downto STREAM_WSTB_WIDTH*93) <= wstrb_in; when 94 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*95)-1 downto STREAM_WSTB_WIDTH*94) <= wstrb_in; when 95 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*96)-1 downto STREAM_WSTB_WIDTH*95) <= wstrb_in; when 96 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*97 )-1 downto STREAM_WSTB_WIDTH*96 ) <= wstrb_in; when 97 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*98 )-1 downto STREAM_WSTB_WIDTH*97 ) <= wstrb_in; when 98 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*99 )-1 downto STREAM_WSTB_WIDTH*98 ) <= wstrb_in; when 99 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*100)-1 downto STREAM_WSTB_WIDTH*99 ) <= wstrb_in; when 100 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*101)-1 downto STREAM_WSTB_WIDTH*100) <= wstrb_in; when 101 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*102)-1 downto STREAM_WSTB_WIDTH*101) <= wstrb_in; when 102 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*103)-1 downto STREAM_WSTB_WIDTH*102) <= wstrb_in; when 103 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*104)-1 downto STREAM_WSTB_WIDTH*103) <= wstrb_in; when 104 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*105)-1 downto STREAM_WSTB_WIDTH*104) <= wstrb_in; when 105 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*106)-1 downto STREAM_WSTB_WIDTH*105) <= wstrb_in; when 106 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*107)-1 downto STREAM_WSTB_WIDTH*106) <= wstrb_in; when 107 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*108)-1 downto STREAM_WSTB_WIDTH*107) <= wstrb_in; when 108 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*109)-1 downto STREAM_WSTB_WIDTH*108) <= wstrb_in; when 109 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*110)-1 downto STREAM_WSTB_WIDTH*109) <= wstrb_in; when 110 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*111)-1 downto STREAM_WSTB_WIDTH*110) <= wstrb_in; when 111 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*112)-1 downto STREAM_WSTB_WIDTH*111) <= wstrb_in; when 112 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*113)-1 downto STREAM_WSTB_WIDTH*112) <= wstrb_in; when 113 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*114)-1 downto STREAM_WSTB_WIDTH*113) <= wstrb_in; when 114 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*115)-1 downto STREAM_WSTB_WIDTH*114) <= wstrb_in; when 115 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*116)-1 downto STREAM_WSTB_WIDTH*115) <= wstrb_in; when 116 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*117)-1 downto STREAM_WSTB_WIDTH*116) <= wstrb_in; when 117 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*118)-1 downto STREAM_WSTB_WIDTH*117) <= wstrb_in; when 118 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*119)-1 downto STREAM_WSTB_WIDTH*118) <= wstrb_in; when 119 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*120)-1 downto STREAM_WSTB_WIDTH*119) <= wstrb_in; when 120 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*121)-1 downto STREAM_WSTB_WIDTH*120) <= wstrb_in; when 121 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*122)-1 downto STREAM_WSTB_WIDTH*121) <= wstrb_in; when 122 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*123)-1 downto STREAM_WSTB_WIDTH*122) <= wstrb_in; when 123 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*124)-1 downto STREAM_WSTB_WIDTH*123) <= wstrb_in; when 124 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*125)-1 downto STREAM_WSTB_WIDTH*124) <= wstrb_in; when 125 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*126)-1 downto STREAM_WSTB_WIDTH*125) <= wstrb_in; when 126 => lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*127)-1 downto STREAM_WSTB_WIDTH*126) <= wstrb_in; when others => -- 127 case lsig_demux_wstrb_out((STREAM_WSTB_WIDTH*128)-1 downto STREAM_WSTB_WIDTH*127) <= wstrb_in; end case; end process DO_128XN_DEMUX; end generate GEN_128XN; end implementation;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2435.vhd,v 1.2 2001-10-26 16:29:47 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s03b02x02p01n02i02435ent IS END c07s03b02x02p01n02i02435ent; ARCHITECTURE c07s03b02x02p01n02i02435arch OF c07s03b02x02p01n02i02435ent IS type m1 is array (1 to 3) of integer; type m2 is array (1 to 2) of m1; constant c: m2 := ((1, 1, 2), (1, 2, 3)); -- No_failure_here BEGIN TESTING: PROCESS BEGIN assert NOT(c(1)=(1,1,2) and c(2)=(1,2,3)) report "***PASSED TEST: c07s03b02x02p01n02i02435" severity NOTE; assert (c(1)=(1,1,2) and c(2)=(1,2,3)) report "***FAILED TEST: c07s03b02x02p01n02i02435 - Multidimensional aggregates are allowed." severity ERROR; wait; END PROCESS TESTING; END c07s03b02x02p01n02i02435arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2435.vhd,v 1.2 2001-10-26 16:29:47 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s03b02x02p01n02i02435ent IS END c07s03b02x02p01n02i02435ent; ARCHITECTURE c07s03b02x02p01n02i02435arch OF c07s03b02x02p01n02i02435ent IS type m1 is array (1 to 3) of integer; type m2 is array (1 to 2) of m1; constant c: m2 := ((1, 1, 2), (1, 2, 3)); -- No_failure_here BEGIN TESTING: PROCESS BEGIN assert NOT(c(1)=(1,1,2) and c(2)=(1,2,3)) report "***PASSED TEST: c07s03b02x02p01n02i02435" severity NOTE; assert (c(1)=(1,1,2) and c(2)=(1,2,3)) report "***FAILED TEST: c07s03b02x02p01n02i02435 - Multidimensional aggregates are allowed." severity ERROR; wait; END PROCESS TESTING; END c07s03b02x02p01n02i02435arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs 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. -- VESTs 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 VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2435.vhd,v 1.2 2001-10-26 16:29:47 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s03b02x02p01n02i02435ent IS END c07s03b02x02p01n02i02435ent; ARCHITECTURE c07s03b02x02p01n02i02435arch OF c07s03b02x02p01n02i02435ent IS type m1 is array (1 to 3) of integer; type m2 is array (1 to 2) of m1; constant c: m2 := ((1, 1, 2), (1, 2, 3)); -- No_failure_here BEGIN TESTING: PROCESS BEGIN assert NOT(c(1)=(1,1,2) and c(2)=(1,2,3)) report "***PASSED TEST: c07s03b02x02p01n02i02435" severity NOTE; assert (c(1)=(1,1,2) and c(2)=(1,2,3)) report "***FAILED TEST: c07s03b02x02p01n02i02435 - Multidimensional aggregates are allowed." severity ERROR; wait; END PROCESS TESTING; END c07s03b02x02p01n02i02435arch;
---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 11:26:52 05/21/2017 -- Design Name: -- Module Name: mux_pc1 - 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; -- 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 mux_wb is Port( regsrc : in STD_LOGIC_VECTOR(1 downto 0); input1 : in STD_LOGIC_VECTOR (15 downto 0); input2 : in STD_LOGIC_VECTOR (15 downto 0); output : out STD_LOGIC_VECTOR (15 downto 0) ); end mux_wb; architecture Behavioral of mux_wb is begin process(regsrc) begin case regsrc is when "00"=>output<=input1; when "01"=>output<=input2; when others => null; end case; end process; end Behavioral;
entity foo is end entity; architecture fum of foo is signal a: bit_vector (1 to 1); signal b: bit_vector (1 to 1); begin a(1 to 1) <= b(1); end architecture;
entity foo is end entity; architecture fum of foo is signal a: bit_vector (1 to 1); signal b: bit_vector (1 to 1); begin a(1 to 1) <= b(1); end architecture;
------------------------------------------------------------------------------ -- This file is a part of the GRLIB VHDL IP LIBRARY -- Copyright (C) 2003 - 2008, Gaisler Research -- Copyright (C) 2008 - 2014, Aeroflex Gaisler -- Copyright (C) 2015 - 2016, Cobham Gaisler -- -- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ----------------------------------------------------------------------------- -- Entity: div32 -- File: div32.vhd -- Author: Jiri Gaisler - Gaisler Research -- Description: This unit implemets a divide unit to execute 64-bit by 32-bit -- division. The divider leaves no remainder. -- Overflow detection is performed according to the -- SPARC V8 manual, method B (page 116) -- Division is made using the non-restoring algorithm, -- and takes 36 clocks. The operands must be stable during -- the calculations. The result is available one clock after -- the ready signal is asserted. ------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; library grlib; use grlib.config_types.all; use grlib.config.all; use grlib.stdlib.all; library gaisler; use gaisler.arith.all; entity div32 is generic (scantest : integer := 0); port ( rst : in std_ulogic; clk : in std_ulogic; holdn : in std_ulogic; divi : in div32_in_type; divo : out div32_out_type; testen : in std_ulogic := '0'; testrst : in std_ulogic := '1' ); end; architecture rtl of div32 is type div_regtype is record x : std_logic_vector(64 downto 0); state : std_logic_vector(2 downto 0); zero : std_logic; zero2 : std_logic; qcorr : std_logic; zcorr : std_logic; qzero : std_logic; qmsb : std_logic; ovf : std_logic; neg : std_logic; cnt : std_logic_vector(4 downto 0); end record; constant RESET_ALL : boolean := GRLIB_CONFIG_ARRAY(grlib_sync_reset_enable_all) = 1; constant ASYNC_RESET : boolean := GRLIB_CONFIG_ARRAY(grlib_async_reset_enable) = 1; constant RRES : div_regtype := ( x => (others => '0'), state => (others => '0'), zero => '0', zero2 => '0', qcorr => '0', zcorr => '0', qzero => '0', qmsb => '0', ovf => '0', neg => '0', cnt => (others => '0')); signal arst : std_ulogic; signal r, rin : div_regtype; signal addin1, addin2, addout: std_logic_vector(32 downto 0); signal addsub : std_logic; begin arst <= testrst when (ASYNC_RESET and scantest/=0 and testen/='0') else rst when ASYNC_RESET else '1'; divcomb : process (r, rst, divi, addout) variable v : div_regtype; variable vready, vnready : std_logic; variable vaddin1, vaddin2 : std_logic_vector(32 downto 0); variable vaddsub, ymsb : std_logic; constant zero33: std_logic_vector(32 downto 0) := "000000000000000000000000000000000"; begin vready := '0'; vnready := '0'; v := r; if addout = zero33 then v.zero := '1'; else v.zero := '0'; end if; vaddin1 := r.x(63 downto 31); vaddin2 := divi.op2; vaddsub := not (divi.op2(32) xor r.x(64)); v.zero2 := r.zero; case r.state is when "000" => v.cnt := "00000"; if (divi.start = '1') then v.x(64) := divi.y(32); v.state := "001"; end if; when "001" => v.x := divi.y & divi.op1(31 downto 0); v.neg := divi.op2(32) xor divi.y(32); if divi.signed = '1' then vaddin1 := divi.y(31 downto 0) & divi.op1(31); v.ovf := not (addout(32) xor divi.y(32)); else vaddin1 := divi.y; vaddsub := '1'; v.ovf := not addout(32); end if; v.state := "010"; when "010" => if ((divi.signed and r.neg and r.zero) = '1') and (divi.op1 = zero33) then v.ovf := '0'; end if; v.qmsb := vaddsub; v.qzero := '1'; v.x(64 downto 32) := addout; v.x(31 downto 0) := r.x(30 downto 0) & vaddsub; v.state := "011"; v.zcorr := v.zero; v.cnt := r.cnt + 1; when "011" => v.qzero := r.qzero and (vaddsub xor r.qmsb); v.zcorr := r.zcorr or v.zero; v.x(64 downto 32) := addout; v.x(31 downto 0) := r.x(30 downto 0) & vaddsub; if (r.cnt = "11111") then v.state := "100"; vnready := '1'; else v.cnt := r.cnt + 1; end if; v.qcorr := v.x(64) xor divi.y(32); when "100" => vaddin1 := r.x(64 downto 32); v.state := "101"; when others => vaddin1 := ((not r.x(31)) & r.x(30 downto 0) & '1'); vaddin2 := (others => '0'); vaddin2(0) := '1'; vaddsub := (not r.neg);-- or (r.zcorr and not r.qcorr); if ((r.qcorr = '1') or (r.zero = '1')) and (r.zero2 = '0') then if (r.zero = '1') and ((r.qcorr = '0') and (r.zcorr = '1')) then vaddsub := r.neg; v.qzero := '0'; end if; v.x(64 downto 32) := addout; else v.x(64 downto 32) := vaddin1; v.qzero := '0'; end if; if (r.ovf = '1') then v.qzero := '0'; v.x(63 downto 32) := (others => '1'); if divi.signed = '1' then if r.neg = '1' then v.x(62 downto 32) := (others => '0'); else v.x(63) := '0'; end if; end if; end if; vready := '1'; v.state := "000"; end case; divo.icc <= r.x(63) & r.qzero & r.ovf & '0'; if (divi.flush = '1') then v.state := "000"; end if; if (not ASYNC_RESET) and (not RESET_ALL) and (rst = '0') then v.state := RRES.state; v.cnt := RRES.cnt; end if; rin <= v; divo.ready <= vready; divo.nready <= vnready; divo.result(31 downto 0) <= r.x(63 downto 32); addin1 <= vaddin1; addin2 <= vaddin2; addsub <= vaddsub; end process; divadd : process(addin1, addin2, addsub) variable b : std_logic_vector(32 downto 0); begin if addsub = '1' then b := not addin2; else b := addin2; end if; addout <= addin1 + b + addsub; end process; syncrregs : if not ASYNC_RESET generate reg : process(clk) begin if rising_edge(clk) then if (holdn = '1') then r <= rin; end if; if (rst = '0') then if RESET_ALL then r <= RRES; else r.state <= RRES.state; r.cnt <= RRES.cnt; end if; end if; end if; end process; end generate syncrregs; asyncrregs : if ASYNC_RESET generate reg : process(clk, arst) begin if (arst = '0') then r <= RRES; elsif rising_edge(clk) then if (holdn = '1') then r <= rin; end if; end if; end process; end generate asyncrregs; end;
altaccumulate1_inst : altaccumulate1 PORT MAP ( aclr => aclr_sig, clken => clken_sig, clock => clock_sig, data => data_sig, overflow => overflow_sig, result => result_sig );
-- This file is part of easyFPGA. -- Copyright 2013-2015 os-cillation GmbH -- -- easyFPGA 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 3 of the License, or -- (at your option) any later version. -- -- easyFPGA 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 easyFPGA. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------------- -- W I S H B O N E S Y S C O N -- (syscon.vhd) -- -- Structural -------------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; library UNISIM; use UNISIM.vcomponents.all; -------------------------------------------------------------------------------- ENTITY syscon is -------------------------------------------------------------------------------- generic ( -- multiply clock to 80 MHz MULTIPLY : natural := 10 ); port ( clk_in : in std_logic; clk_out : out std_logic; rst_out : out std_logic ); end syscon; -------------------------------------------------------------------------------- ARCHITECTURE structural of syscon is -------------------------------------------------------------------------------- signal dcm_status_s : std_logic_vector(7 downto 0); signal reset_dcm : std_logic; signal clk_feedback1x_s : std_logic; -------------------------------------------------------------------------------- begin -- architecture structural -------------------------------------------------------------------------------- -- tie rst_out to zero rst_out <= '0'; -- reset if status(1) is asserted (clk_in is not toggling) reset_dcm <= dcm_status_s(1); -------------------------------------------------------------------------------- Clock_Manager : DCM_SP -------------------------------------------------------------------------------- generic map ( CLKDV_DIVIDE => 2.0, -- CLKDV divide value CLKFX_DIVIDE => 1, -- Divide value on CLKFX outputs - D - (1-32) CLKFX_MULTIPLY => MULTIPLY, -- Multiply value on CLKFX outputs - M - (2-32) CLKIN_DIVIDE_BY_2 => FALSE, -- CLKIN divide by two (TRUE/FALSE) CLKIN_PERIOD => 125.0, -- Input clock period specified in nS CLKOUT_PHASE_SHIFT => "NONE", -- Output phase shift (NONE, FIXED, VARIABLE) CLK_FEEDBACK => "1X", -- Feedback source (NONE, 1X, 2X) DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS", -- SYSTEM_SYNCHRNOUS or SOURCE_SYNCHRONOUS PHASE_SHIFT => 0, -- Amount of fixed phase shift (-255 to 255) STARTUP_WAIT => FALSE -- Delay config DONE until DCM_SP LOCKED (TRUE/FALSE) ) port map ( CLKIN => clk_in, CLKFX => clk_out, CLK0 => clk_feedback1x_s, CLKFB => clk_feedback1x_s, STATUS => dcm_status_s, RST => reset_dcm ); end structural;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity rotate is generic(width : integer:=8); port( inpt: in std_logic_vector(width-1 downto 0); ctrl: in std_logic; outp: out std_logic_vector(width-1 downto 0) ); end entity; architecture rotacionar of rotate is signal deslocamento: std_logic_vector(width-1 downto 0); begin deslocamento <= inpt(0) & inpt(width-1 downto 1) when ctrl = '1' else inpt(width-2 downto 0) & inpt(width-1); outp <= deslocamento; end architecture;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity delay is generic ( depth : integer; bit_width : integer ); port ( clk_i , rst_i : in std_logic; d_i : in std_logic_vector ( bit_width-1 downto 0 ); q_o : out std_logic_vector ( bit_width-1 downto 0 ) ); end entity; architecture rtl of delay is -- calculate the number of words from -- the depth (which is like the address width) constant number_of_words : integer := 2**depth; -- define data type of the storage array type fifo_data_array is array ( 0 to number_of_words-1) of std_logic_vector ( bit_width-1 downto 0); -- define the storage array signal fifo_data : fifo_data_array; -- read and write index pointers -- give them one bit more then needed to quickly check for overflow -- by looking at the most significant bit (tip from Matthias Kreider) signal w_idx : std_logic_vector ( depth downto 0 ); signal r_idx : std_logic_vector ( depth downto 0 ); begin main: process (clk_i) begin if rising_edge(clk_i) then if rst_i = '1' then -- force reset state w_idx <= (others => '0'); r_idx <= (others => '0'); q_o <= (others => '0'); else -- writing fifo_data(to_integer(unsigned(w_idx(depth-1 downto 0)))) <= d_i; w_idx <= std_logic_vector(unsigned(w_idx) + 1); -- reading r_idx <= r_idx; q_o <= (others => '0'); if (r_idx(depth) xor w_idx(depth)) = '1' then q_o <= fifo_data(to_integer(unsigned(r_idx(depth-1 downto 0)))); r_idx <= std_logic_vector(unsigned(r_idx) + 1); end if; end if; end if; end process; end architecture;
-- (c) Copyright 1995-2017 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- DO NOT MODIFY THIS FILE. -- IP VLNV: xilinx.com:user:clock_splitter:1.0 -- IP Revision: 5 LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; ENTITY system_clock_splitter_1_0 IS PORT ( clk_in : IN STD_LOGIC; latch_edge : IN STD_LOGIC; clk_out : OUT STD_LOGIC ); END system_clock_splitter_1_0; ARCHITECTURE system_clock_splitter_1_0_arch OF system_clock_splitter_1_0 IS ATTRIBUTE DowngradeIPIdentifiedWarnings : STRING; ATTRIBUTE DowngradeIPIdentifiedWarnings OF system_clock_splitter_1_0_arch: ARCHITECTURE IS "yes"; COMPONENT clock_splitter IS PORT ( clk_in : IN STD_LOGIC; latch_edge : IN STD_LOGIC; clk_out : OUT STD_LOGIC ); END COMPONENT clock_splitter; BEGIN U0 : clock_splitter PORT MAP ( clk_in => clk_in, latch_edge => latch_edge, clk_out => clk_out ); END system_clock_splitter_1_0_arch;
-- (c) Copyright 1995-2017 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. -- -- DO NOT MODIFY THIS FILE. -- IP VLNV: xilinx.com:user:clock_splitter:1.0 -- IP Revision: 5 LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; ENTITY system_clock_splitter_1_0 IS PORT ( clk_in : IN STD_LOGIC; latch_edge : IN STD_LOGIC; clk_out : OUT STD_LOGIC ); END system_clock_splitter_1_0; ARCHITECTURE system_clock_splitter_1_0_arch OF system_clock_splitter_1_0 IS ATTRIBUTE DowngradeIPIdentifiedWarnings : STRING; ATTRIBUTE DowngradeIPIdentifiedWarnings OF system_clock_splitter_1_0_arch: ARCHITECTURE IS "yes"; COMPONENT clock_splitter IS PORT ( clk_in : IN STD_LOGIC; latch_edge : IN STD_LOGIC; clk_out : OUT STD_LOGIC ); END COMPONENT clock_splitter; BEGIN U0 : clock_splitter PORT MAP ( clk_in => clk_in, latch_edge => latch_edge, clk_out => clk_out ); END system_clock_splitter_1_0_arch;
------------------------------------------------------------------------------ -- The MIT License (MIT) -- -- Copyright (c) <2013> <Shimafuji Electric Inc., Osaka University, JAXA> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS 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 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- THE SOFTWARE. ------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_ARITH.all; use IEEE.STD_LOGIC_UNSIGNED.all; entity SpaceWireCODECIPFIFO9x64 is port ( writeDataIn : in std_logic_vector(8 downto 0); readClock : in std_logic; readEnable : in std_logic; reset : in std_logic; writeClock : in std_logic; writeEnable : in std_logic; readDataOut : out std_logic_vector(8 downto 0); empty : out std_logic; full : out std_logic; readDataCount : out std_logic_vector(5 downto 0); writeDataCount : out std_logic_vector(5 downto 0) ); end SpaceWireCODECIPFIFO9x64; architecture RTL of SpaceWireCODECIPFIFO9x64 is type turnMemory is array(0 to 63) of std_logic_vector(8 downto 0); signal dpram : turnMemory; type turnTable is array(0 to 63) of std_logic_vector(5 downto 0); constant binaryToGray : turnTable := ( "000000", "000001", "000011", "000010", "000110", "000111", "000101", "000100", "001100", "001101", "001111", "001110", "001010", "001011", "001001", "001000", "011000", "011001", "011011", "011010", "011110", "011111", "011101", "011100", "010100", "010101", "010111", "010110", "010010", "010011", "010001", "010000", "110000", "110001", "110011", "110010", "110110", "110111", "110101", "110100", "111100", "111101", "111111", "111110", "111010", "111011", "111001", "111000", "101000", "101001", "101011", "101010", "101110", "101111", "101101", "101100", "100100", "100101", "100111", "100110", "100010", "100011", "100001", "100000"); constant grayToBinary : turnTable := ( "000000", "000001", "000011", "000010", "000111", "000110", "000100", "000101", "001111", "001110", "001100", "001101", "001000", "001001", "001011", "001010", "011111", "011110", "011100", "011101", "011000", "011001", "011011", "011010", "010000", "010001", "010011", "010010", "010111", "010110", "010100", "010101", "111111", "111110", "111100", "111101", "111000", "111001", "111011", "111010", "110000", "110001", "110011", "110010", "110111", "110110", "110100", "110101", "100000", "100001", "100011", "100010", "100111", "100110", "100100", "100101", "101111", "101110", "101100", "101101", "101000", "101001", "101011", "101010"); signal iWriteReset : std_logic; signal iReadReset : std_logic; signal iWriteResetTime : std_logic_vector(1 downto 0); signal iReadResetTime : std_logic_vector(1 downto 0); signal iWritePointer : std_logic_vector(5 downto 0); signal iGrayWritePointer : std_logic_vector(5 downto 0); signal iGrayWritePointer1 : std_logic_vector(5 downto 0); signal iGrayWritePointer2 : std_logic_vector(5 downto 0); signal iGrayWritePointer3 : std_logic_vector(5 downto 0); signal iWritePointer4 : std_logic_vector(5 downto 0); signal iReadPointer : std_logic_vector(5 downto 0); signal iGrayReadPointer : std_logic_vector(5 downto 0); signal iGrayReadPointer1 : std_logic_vector(5 downto 0); signal iGrayReadPointer2 : std_logic_vector(5 downto 0); signal iReadPointer3 : std_logic_vector(5 downto 0); signal iWriteDataCount : std_logic_vector(5 downto 0); signal iFull : std_logic; signal iReadDataOut : std_logic_vector(8 downto 0); signal iReadDataCount : std_logic_vector(5 downto 0); signal iEmpty : std_logic; begin writeDataCount <= iWriteDataCount; full <= iFull; empty <= iEmpty; readDataCount <= iReadDataCount; readDataOut <= iReadDataOut; ---------------------------------------------------------------------- -- synchronized Reset. ---------------------------------------------------------------------- process(reset, writeClock) begin if (reset = '1') then iWriteResetTime <= "11"; iWriteReset <= '1'; elsif (writeClock'event and writeClock = '1') then iWriteResetTime <= iWriteResetTime(0) & reset; iWriteReset <= iWriteResetTime(1); end if; end process; ---------------------------------------------------------------------- -- Write pointer of the buffer. ---------------------------------------------------------------------- process(iWriteReset, writeClock) begin if (writeClock'event and writeClock = '1') then if (iWriteReset = '1') then iWritePointer <= "000000"; elsif (writeEnable = '1') then iWritePointer <= iWritePointer + '1'; end if; end if; end process; iWriteDataCount <= iWritePointer - iReadPointer3; ---------------------------------------------------------------------- -- Writing to buffer. ---------------------------------------------------------------------- process(writeClock) begin if (writeClock'event and writeClock = '1') then if (writeEnable = '1') then dpram(conv_integer(iWritePointer)) <= writeDataIn; end if; end if; end process; ---------------------------------------------------------------------- -- Change to Gray code. ---------------------------------------------------------------------- process(iWriteReset, writeClock) begin if (writeClock'event and writeClock = '1') then if (iWriteReset = '1') then iGrayWritePointer <= "000000"; else iGrayWritePointer <= binaryToGray(conv_integer(iWritePointer)); end if; end if; end process; iFull <= '1' when ((iWritePointer - iReadPointer3) > "111000") or iWriteReset = '1' else '0'; ---------------------------------------------------------------------- -- Convert gray code Readpointer to binary Readpointer to calculate writeDataCount and full. ---------------------------------------------------------------------- process(iWriteReset, writeClock) begin if (writeClock'event and writeClock = '1') then if (iWriteReset = '1') then iGrayReadPointer1 <= "000000"; iGrayReadPointer2 <= "000000"; iReadPointer3 <= "000000"; else iGrayReadPointer1 <= iGrayReadPointer; iGrayReadPointer2 <= iGrayReadPointer1; iReadPointer3 <= grayToBinary(conv_integer(iGrayReadPointer2)); end if; end if; end process; ---------------------------------------------------------------------- -- Convert gray code Writepointer to binary Writepointer to calculate readDataCount and empty. ---------------------------------------------------------------------- process(iReadReset, readClock) begin if (readClock'event and readClock = '1') then if (iReadReset = '1') then iGrayWritePointer1 <= "000000"; iGrayWritePointer2 <= "000000"; iGrayWritePointer3 <= "000000"; iWritePointer4 <= "000000"; else iGrayWritePointer1 <= iGrayWritePointer; iGrayWritePointer2 <= iGrayWritePointer1; iGrayWritePointer3 <= iGrayWritePointer2; iWritePointer4 <= grayToBinary(conv_integer(iGrayWritePointer3)); end if; end if; end process; ---------------------------------------------------------------------- -- Read from buffer. ---------------------------------------------------------------------- process(readClock) begin if (readClock'event and readClock = '1') then if(iEmpty = '0')then if (readEnable = '1') then iReadDataOut <= dpram(conv_integer(iReadPointer)); end if; end if; end if; end process; iReadDataCount <= iWritePointer4 - iReadPointer; ---------------------------------------------------------------------- -- Read pointer of the buffer. ---------------------------------------------------------------------- process(iReadReset, readClock) begin if (readClock'event and readClock = '1') then if (iReadReset = '1') then iReadPointer <= "000000"; elsif(iEmpty = '0')then if readEnable = '1' then iReadPointer <= iReadPointer + '1'; end if; end if; end if; end process; ---------------------------------------------------------------------- -- Change to Gray code. ---------------------------------------------------------------------- process(iReadReset, readClock) begin if (readClock'event and readClock = '1') then if (iReadReset = '1') then iGrayReadPointer <= "000000"; else iGrayReadPointer <= binaryToGray(conv_integer(iReadPointer)); end if; end if; end process; ---------------------------------------------------------------------- -- Generate the EMPTY signal. ---------------------------------------------------------------------- iEmpty <= '1' when iWritePointer4 = iReadPointer or iReadReset = '1' else '0'; ---------------------------------------------------------------------- -- synchronized Reset. ---------------------------------------------------------------------- process(reset, readClock) begin if (reset = '1') then iReadResetTime <= "11"; iReadReset <= '1'; elsif (readClock'event and readClock = '1') then iReadResetTime <= iReadResetTime(0) & reset; iReadReset <= iReadResetTime(1); end if; end process; end RTL;
--============================================================================= -- This file is part of FPGA_NEURAL-Network. -- -- FPGA_NEURAL-Network 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 3 of the License, or -- (at your option) any later version. -- -- FPGA_NEURAL-Network 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 FPGA_NEURAL-Network. -- If not, see <http://www.gnu.org/licenses/>. --============================================================================= -- FILE NAME : input_rom_pkg.vhd -- PROJECT : FPGA_NEURAL-Network -- PACKAGE : INPUT_ROM_pkg --============================================================================= -- AUTORS(s) : Agostini, N -- DEPARTMENT : Electrical Engineering (UFRGS) -- DATE : Dec 14, 2014 --============================================================================= -- Description: -- --============================================================================= library ieee; use work.fixed_pkg.all; -- ieee_proposed for compatibility version use work.NN_TYPES_pkg.all; --============================================================================= -- Package declaration for INPUT_ROM_pkg --============================================================================= package INPUT_ROM_pkg is constant SAMPLE_SIZE : natural := 178; subtype INPUT_SFIXED is sfixed(1 downto L_SIZE); type INPUT_ARRAY is array (natural range <>) of INPUT_SFIXED; subtype INPUT_LOOKUP_ARRAY is INPUT_ARRAY(0 to (PERCEPTRONS_INPUT-1+PERCEPTRONS_OUTPUT)); type INPUT_TABLE is array (natural range <>) of INPUT_ARRAY; subtype INPUT_CONSTRAINED_SFIXED_ARRAY is ARRAY_OF_SFIXED(0 to (PERCEPTRONS_INPUT-1+PERCEPTRONS_OUTPUT)); end; --============================================================================= -- package body declaration --============================================================================= package body INPUT_ROM_pkg is end package body;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; library work; use work.io_bus_pkg.all; use work.mem_bus_pkg.all; entity mm_drive is generic ( g_big_endian : boolean; g_audio_tag : std_logic_vector(7 downto 0) := X"01"; g_floppy_tag : std_logic_vector(7 downto 0) := X"02"; g_disk_tag : std_logic_vector(7 downto 0) := X"03"; g_cpu_tag : std_logic_vector(7 downto 0) := X"04"; g_audio : boolean := true; g_audio_base : unsigned(27 downto 0) := X"0030000"; g_ram_base : unsigned(27 downto 0) := X"0060000" ); port ( clock : in std_logic; reset : in std_logic; drive_stop : in std_logic := '0'; -- timing tick_16MHz : in std_logic; tick_4MHz : in std_logic; tick_1kHz : in std_logic; -- slave port on io bus io_req : in t_io_req; io_resp : out t_io_resp; io_irq : out std_logic; -- master port on memory bus mem_req : out t_mem_req_32; mem_resp : in t_mem_resp_32; -- serial bus pins atn_o : out std_logic; -- open drain atn_i : in std_logic; clk_o : out std_logic; -- open drain clk_i : in std_logic; data_o : out std_logic; -- open drain data_i : in std_logic; fast_clk_o : out std_logic; -- open drain fast_clk_i : in std_logic; iec_reset_n : in std_logic := '1'; c64_reset_n : in std_logic := '1'; -- parallel bus pins via1_port_a_o : out std_logic_vector(7 downto 0); via1_port_a_i : in std_logic_vector(7 downto 0) := X"55"; via1_port_a_t : out std_logic_vector(7 downto 0); via1_ca2_o : out std_logic; via1_ca2_i : in std_logic := '1'; via1_ca2_t : out std_logic; via1_cb1_o : out std_logic; via1_cb1_i : in std_logic := '1'; via1_cb1_t : out std_logic; -- Debug port debug_data : out std_logic_vector(31 downto 0); debug_valid : out std_logic; -- LED act_led_n : out std_logic; motor_led_n : out std_logic; dirty_led_n : out std_logic; -- audio out audio_sample : out signed(12 downto 0) ); end entity; architecture structural of mm_drive is signal tick_16M_i : std_logic; signal cia_rising : std_logic; signal cpu_clock_en : std_logic; signal iec_reset_o : std_logic; signal do_track_out : std_logic; signal do_track_in : std_logic; signal do_head_bang : std_logic; signal do_snd_insert : std_logic; signal do_snd_remove : std_logic; signal en_hum : std_logic; signal en_slip : std_logic; signal use_c64_reset : std_logic; signal floppy_inserted : std_logic := '0'; signal force_ready : std_logic; signal bank_is_ram : std_logic_vector(7 downto 1); signal two_MHz : std_logic; signal power : std_logic; signal motor_sound_on : std_logic; signal motor_on : std_logic; signal mode : std_logic; signal side : std_logic; signal stepper_en : std_logic; signal step : std_logic_vector(1 downto 0) := "00"; signal rate_ctrl : std_logic_vector(1 downto 0); signal byte_ready : std_logic; signal sync : std_logic; signal track : unsigned(6 downto 0); signal drive_address : std_logic_vector(1 downto 0) := "00"; signal write_prot_n : std_logic := '1'; signal disk_change_n : std_logic := '1'; signal rdy_n : std_logic := '1'; signal track_0 : std_logic := '0'; signal drv_reset : std_logic := '1'; signal disk_rdata : std_logic_vector(7 downto 0); signal disk_wdata : std_logic_vector(7 downto 0); signal drive_stop_i : std_logic; signal stop_on_freeze : std_logic; signal drive_type : natural range 0 to 2; signal io_req_regs : t_io_req; signal io_resp_regs : t_io_resp; signal io_req_param : t_io_req; signal io_resp_param : t_io_resp; signal io_req_dirty : t_io_req; signal io_resp_dirty : t_io_resp; signal io_req_wd : t_io_req; signal io_resp_wd : t_io_resp; signal mem_req_cpu : t_mem_req; signal mem_resp_cpu : t_mem_resp; signal mem_req_flop : t_mem_req; signal mem_resp_flop : t_mem_resp; signal mem_req_snd : t_mem_req := c_mem_req_init; signal mem_resp_snd : t_mem_resp; signal mem_req_disk : t_mem_req; signal mem_resp_disk : t_mem_resp; signal mem_req_8 : t_mem_req := c_mem_req_init; signal mem_resp_8 : t_mem_resp; signal mem_busy : std_logic; signal count : unsigned(7 downto 0) := X"00"; signal led_intensity : unsigned(1 downto 0); begin i_splitter: entity work.io_bus_splitter generic map ( g_range_lo => 11, g_range_hi => 12, g_ports => 4 ) port map( clock => clock, req => io_req, resp => io_resp, reqs(0) => io_req_regs, reqs(1) => io_req_dirty, reqs(2) => io_req_param, reqs(3) => io_req_wd, resps(0) => io_resp_regs, resps(1) => io_resp_dirty, resps(2) => io_resp_param, resps(3) => io_resp_wd ); i_timing: entity work.c1541_timing port map ( clock => clock, reset => reset, tick_4MHz => tick_4MHz, two_MHz_mode => two_MHz, mem_busy => mem_busy, use_c64_reset=> use_c64_reset, c64_reset_n => c64_reset_n, iec_reset_n => iec_reset_n, iec_reset_o => iec_reset_o, power => power, drive_stop => drive_stop_i, cia_rising => cia_rising, cpu_clock_en => cpu_clock_en ); -- 1 MHz or 2 MHz drive_stop_i <= drive_stop and stop_on_freeze; tick_16M_i <= tick_16MHz and not drive_stop_i; i_cpu: entity work.mm_drive_cpu generic map ( g_cpu_tag => g_cpu_tag, g_disk_tag => g_disk_tag, g_ram_base => g_ram_base ) port map ( clock => clock, falling => cpu_clock_en, rising => cia_rising, reset => drv_reset, tick_1kHz => tick_1kHz, tick_4MHz => tick_4MHz, -- Drive type!! drive_type => drive_type, -- serial bus pins atn_o => atn_o, -- open drain atn_i => atn_i, clk_o => clk_o, -- open drain clk_i => clk_i, data_o => data_o, -- open drain data_i => data_i, fast_clk_o => fast_clk_o, -- open drain fast_clk_i => fast_clk_i, -- parallel bus pins par_data_o => via1_port_a_o, par_data_i => via1_port_a_i, par_data_t => via1_port_a_t, par_hsout_o => via1_ca2_o, par_hsout_i => via1_ca2_i, par_hsout_t => via1_ca2_t, par_hsin_o => via1_cb1_o, par_hsin_i => via1_cb1_i, par_hsin_t => via1_cb1_t, -- trace data debug_data => debug_data, debug_valid => debug_valid, -- configuration extra_ram => bank_is_ram(7), -- FIXME: signal name -- memory interface mem_req_cpu => mem_req_cpu, mem_resp_cpu => mem_resp_cpu, mem_req_disk => mem_req_disk, mem_resp_disk => mem_resp_disk, mem_busy => mem_busy, -- i/o interface to wd177x io_req => io_req_wd, io_resp => io_resp_wd, io_irq => io_irq, -- drive pins power => power, drive_address => drive_address, write_prot_n => write_prot_n, motor_sound_on => motor_sound_on, motor_on => motor_on, stepper_en => stepper_en, mode => mode, step => step, side => side, rate_ctrl => rate_ctrl, byte_ready => byte_ready, sync => sync, two_MHz => two_MHz, rdy_n => rdy_n, disk_change_n => disk_change_n, track_0 => track_0, track => track, drv_rdata => disk_rdata, drv_wdata => disk_wdata, -- other power_led => open, -- FIXME act_led => act_led_n ); -- This may look odd; but 'motor on' is always 0 for the 1581, to shut off the GCR module -- MotorSound, however, is enabled for 1581, and has the same function as motor_on. rdy_n <= not (motor_sound_on and floppy_inserted) and not force_ready; -- should have a delay i_flop: entity work.floppy generic map ( g_big_endian => g_big_endian, g_tag => g_floppy_tag ) port map ( clock => clock, reset => drv_reset, tick_16MHz => tick_16M_i, -- signals from MOS 6522 VIA stepper_en => stepper_en, motor_on => motor_on, mode => mode, write_prot_n => write_prot_n, step => step, side => side, rate_ctrl => rate_ctrl, byte_ready => byte_ready, sync => sync, read_data => disk_rdata, write_data => disk_wdata, track => track, track_is_0 => track_0, --- io_req_param => io_req_param, io_resp_param => io_resp_param, io_req_dirty => io_req_dirty, io_resp_dirty => io_resp_dirty, --- floppy_inserted => floppy_inserted, do_track_out => do_track_out, do_track_in => do_track_in, do_head_bang => do_head_bang, dirty_led_n => dirty_led_n, --- mem_req => mem_req_flop, mem_resp => mem_resp_flop ); en_hum <= motor_sound_on and not floppy_inserted; en_slip <= motor_sound_on and floppy_inserted; r_snd: if g_audio generate i_snd: entity work.floppy_sound generic map ( g_tag => g_audio_tag, sound_base => g_audio_base(27 downto 16), motor_hum_addr => X"0000", flop_slip_addr => X"1200", track_in_addr => X"2400", track_out_addr => X"2C00", head_bang_addr => X"3480", insert_addr => X"3D00", remove_addr => X"7D00", motor_len => 4410, track_in_len => X"0800", -- ~100 ms track_out_len => X"0880", -- ~100 ms head_bang_len => X"0880", -- ~100 ms insert_len => X"3F80", -- ~740 ms remove_len => X"3800" ) -- ~650 ms port map ( clock => clock, reset => drv_reset, tick_4MHz => tick_4MHz, do_trk_out => do_track_out, do_trk_in => do_track_in, do_head_bang => do_head_bang, do_insert => do_snd_insert, do_remove => do_snd_remove, en_hum => en_hum, en_slip => en_slip, -- memory interface mem_req => mem_req_snd, mem_resp => mem_resp_snd, -- audio sample_out => audio_sample ); end generate; i_regs: entity work.drive_registers generic map ( g_multi_mode => true ) port map ( clock => clock, reset => reset, tick_1kHz => tick_1kHz, io_req => io_req_regs, io_resp => io_resp_regs, iec_reset_o => iec_reset_o, use_c64_reset => use_c64_reset, power => power, drv_reset => drv_reset, drive_address => drive_address, floppy_inserted => floppy_inserted, disk_change_n => disk_change_n, force_ready => force_ready, write_prot_n => write_prot_n, bank_is_ram => bank_is_ram, stop_on_freeze => stop_on_freeze, drive_type => drive_type, do_snd_insert => do_snd_insert, do_snd_remove => do_snd_remove, track => track, side => side, mode => mode, motor_on => motor_sound_on ); -- memory arbitration i_arb: entity work.mem_bus_arbiter_pri generic map ( g_ports => 4, g_registered => false ) port map ( clock => clock, reset => reset, reqs(0) => mem_req_flop, reqs(1) => mem_req_cpu, reqs(2) => mem_req_snd, reqs(3) => mem_req_disk, resps(0) => mem_resp_flop, resps(1) => mem_resp_cpu, resps(2) => mem_resp_snd, resps(3) => mem_resp_disk, req => mem_req_8, resp => mem_resp_8 ); i_conv32: entity work.mem_to_mem32(route_through) generic map ( g_big_endian => g_big_endian ) port map( clock => clock, reset => reset, mem_req_8 => mem_req_8, mem_resp_8 => mem_resp_8, mem_req_32 => mem_req, mem_resp_32 => mem_resp ); process(clock) variable led_int : unsigned(7 downto 0); begin if rising_edge(clock) then count <= count + 1; if count=X"00" then motor_led_n <= '0'; -- on end if; led_int := led_intensity & led_intensity & led_intensity & led_intensity; if count=led_int then motor_led_n <= '1'; -- off end if; end if; end process; led_intensity <= "00" when power='0' else "01" when floppy_inserted='0' else "10" when motor_on='0' else "11"; end architecture;
LIBRARY IEEE; LIBRARY ALTERA_MF; LIBRARY LPM; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; USE ALTERA_MF.ALTERA_MF_COMPONENTS.ALL; USE LPM.LPM_COMPONENTS.ALL; use ieee.numeric_std.all; ENTITY SCOMP IS PORT( CLOCK : IN STD_LOGIC; RESETN : IN STD_LOGIC; PCINT : IN STD_LOGIC_VECTOR( 3 DOWNTO 0); IO_WRITE : OUT STD_LOGIC; IO_CYCLE : OUT STD_LOGIC; IO_ADDR : OUT STD_LOGIC_VECTOR( 7 DOWNTO 0); IO_DATA : INOUT STD_LOGIC_VECTOR(15 DOWNTO 0) ); END SCOMP; ARCHITECTURE a OF SCOMP IS TYPE STATE_TYPE IS ( RESET_PC, FETCH, DECODE, EX_LOAD, EX_STORE, EX_STORE2, EX_ADD, EX_SUB, EX_JUMP, EX_JNEG, EX_JPOS, EX_JZERO, EX_AND, EX_OR, EX_XOR, EX_SHIFT, EX_ADDI, EX_ILOAD, EX_ISTORE, EX_CALL, EX_RETURN, EX_IN, EX_OUT, EX_OUT2, EX_LOADI, EX_RETI, EX_MOVR, EX_ADDR, EX_SUBR, EX_ANDR, EX_ORR, EX_CMP, EX_STORER, EX_STORER2, EX_LOADR, EX_LOADR2 ); TYPE STACK_TYPE IS ARRAY (0 TO 9) OF STD_LOGIC_VECTOR(10 DOWNTO 0); type HSREGISTER_FILE is array (0 to 31) of std_logic_vector(15 downto 0); SIGNAL regFile : HSREGISTER_FILE; SIGNAL STATE : STATE_TYPE; SIGNAL PC_STACK : STACK_TYPE; SIGNAL IO_IN : STD_LOGIC_VECTOR(15 DOWNTO 0); SIGNAL AC : STD_LOGIC_VECTOR(15 DOWNTO 0); SIGNAL AC_SAVED : STD_LOGIC_VECTOR(15 DOWNTO 0); SIGNAL AC_SHIFTED : STD_LOGIC_VECTOR(15 DOWNTO 0); SIGNAL IR : STD_LOGIC_VECTOR(15 DOWNTO 0); SIGNAL MDR : STD_LOGIC_VECTOR(15 DOWNTO 0); SIGNAL PC : STD_LOGIC_VECTOR(10 DOWNTO 0); SIGNAL PC_SAVED : STD_LOGIC_VECTOR(10 DOWNTO 0); SIGNAL MEM_ADDR : STD_LOGIC_VECTOR(10 DOWNTO 0); SIGNAL MW : STD_LOGIC; SIGNAL IO_WRITE_INT : STD_LOGIC; SIGNAL GIE : STD_LOGIC; SIGNAL IIE : STD_LOGIC_VECTOR( 3 DOWNTO 0); SIGNAL INT_REQ : STD_LOGIC_VECTOR( 3 DOWNTO 0); SIGNAL INT_REQ_SYNC : STD_LOGIC_VECTOR( 3 DOWNTO 0); -- registered version of INT_REQ SIGNAL INT_ACK : STD_LOGIC_VECTOR( 3 DOWNTO 0); SIGNAL IN_HOLD : STD_LOGIC; BEGIN -- Use altsyncram component for unified program and data memory MEMORY : altsyncram GENERIC MAP ( intended_device_family => "Cyclone", width_a => 16, widthad_a => 11, numwords_a => 2048, operation_mode => "SINGLE_PORT", outdata_reg_a => "UNREGISTERED", indata_aclr_a => "NONE", wrcontrol_aclr_a => "NONE", address_aclr_a => "NONE", outdata_aclr_a => "NONE", init_file => "misctest.mif", lpm_hint => "ENABLE_RUNTIME_MOD=NO", lpm_type => "altsyncram" ) PORT MAP ( wren_a => MW, clock0 => NOT(CLOCK), address_a => MEM_ADDR, data_a => AC, q_a => MDR ); -- Use LPM function to shift AC using the SHIFT instruction SHIFTER: LPM_CLSHIFT GENERIC MAP ( lpm_width => 16, lpm_widthdist => 4, lpm_shifttype => "ARITHMETIC" ) PORT MAP ( data => AC, distance => IR(3 DOWNTO 0), direction => IR(4), result => AC_SHIFTED ); -- Use LPM function to drive I/O bus IO_BUS: LPM_BUSTRI GENERIC MAP ( lpm_width => 16 ) PORT MAP ( data => AC, enabledt => IO_WRITE_INT, tridata => IO_DATA ); IO_ADDR <= IR(7 DOWNTO 0); WITH STATE SELECT MEM_ADDR <= PC WHEN FETCH, IR(10 DOWNTO 0) WHEN OTHERS; WITH STATE SELECT IO_CYCLE <= '1' WHEN EX_IN, '1' WHEN EX_OUT2, '0' WHEN OTHERS; IO_WRITE <= IO_WRITE_INT; PROCESS (CLOCK, RESETN) variable regFileDest : integer range 0 to 31; variable regFileSource : integer range 0 to 31; BEGIN IF (RESETN = '0') THEN -- Active low, asynchronous reset STATE <= RESET_PC; ELSIF (RISING_EDGE(CLOCK)) THEN CASE STATE IS WHEN RESET_PC => MW <= '0'; -- Clear memory write flag PC <= "00000000000"; -- Reset PC to the beginning of memory, address 0x000 AC <= x"0000"; -- Clear AC register IO_WRITE_INT <= '0'; GIE <= '1'; -- Enable interrupts IIE <= "0000"; -- Mask all interrupts STATE <= FETCH; IN_HOLD <= '0'; INT_REQ_SYNC <= "0000"; WHEN FETCH => MW <= '0'; -- Clear memory write flag IR <= MDR; -- Latch instruction into the IR IO_WRITE_INT <= '0'; -- Lower IO_WRITE after an OUT -- Interrupt Control IF (GIE = '1') AND -- If Global Interrupt Enable set and... (INT_REQ_SYNC /= "0000") THEN -- ...an interrupt is pending IF INT_REQ_SYNC(0) = '1' THEN -- Got interrupt on PCINT0 INT_ACK <= "0001"; -- Acknowledge the interrupt PC <= "00000000001"; -- Redirect execution ELSIF INT_REQ_SYNC(1) = '1' THEN INT_ACK <= "0010"; -- repeat for other pins PC <= "00000000010"; ELSIF INT_REQ_SYNC(2) = '1' THEN INT_ACK <= "0100"; PC <= "00000000011"; ELSIF INT_REQ_SYNC(3) = '1' THEN INT_ACK <= "1000"; PC <= "00000000100"; END IF; GIE <= '0'; -- Disable interrupts while in ISR AC_SAVED <= AC; -- Save AC PC_SAVED <= PC; -- Save PC STATE <= FETCH; -- Repeat FETCH with new PC ELSE -- either no interrupt or interrupts disabled PC <= PC + 1; -- Increment PC to next instruction address STATE <= DECODE; INT_ACK <= "0000"; -- Clear any interrupt acknowledge END IF; WHEN DECODE => -- Write to the register variables. regFileDest := ieee.numeric_std.to_integer(ieee.numeric_std.unsigned(IR(9 downto 5))); regFileSource := ieee.numeric_std.to_integer(ieee.numeric_std.unsigned(IR(4 downto 0))); CASE IR(15 downto 11) IS WHEN "00000" => STATE <= FETCH; WHEN "00001" => STATE <= EX_LOAD; WHEN "00010" => STATE <= EX_STORE; WHEN "00011" => STATE <= EX_ADD; WHEN "00100" => STATE <= EX_SUB; WHEN "00101" => STATE <= EX_JUMP; WHEN "00110" => STATE <= EX_JNEG; WHEN "00111" => STATE <= EX_JPOS; WHEN "01000" => STATE <= EX_JZERO; WHEN "01001" => STATE <= EX_AND; WHEN "01010" => STATE <= EX_OR; WHEN "01011" => STATE <= EX_XOR; WHEN "01100" => STATE <= EX_SHIFT; WHEN "01101" => STATE <= EX_ADDI; WHEN "01110" => STATE <= EX_ILOAD; WHEN "01111" => STATE <= EX_ISTORE; WHEN "10000" => STATE <= EX_CALL; WHEN "10001" => STATE <= EX_RETURN; WHEN "10010" => STATE <= EX_IN; WHEN "10011" => -- OUT STATE <= EX_OUT; IO_WRITE_INT <= '1'; -- raise IO_WRITE WHEN "10100" => -- CLI IIE <= IIE AND NOT(IR(3 DOWNTO 0)); -- disable indicated interrupts STATE <= FETCH; WHEN "10101" => -- SEI IIE <= IIE OR IR(3 DOWNTO 0); -- enable indicated interrupts STATE <= FETCH; WHEN "10110" => STATE <= EX_RETI; WHEN "10111" => STATE <= EX_LOADI; -- -- Register-to-Register Operations -- -- Harrison WHEN "11000" => STATE <= EX_MOVR; WHEN "11001" => STATE <= EX_ADDR; WHEN "11010" => STATE <= EX_SUBR; WHEN "11011" => STATE <= EX_ANDR; WHEN "11100" => STATE <= EX_ORR; WHEN "11101" => STATE <= EX_CMP; WHEN "11110" => STATE <= EX_STORER; WHEN "11111" => STATE <= EX_LOADR; WHEN OTHERS => STATE <= FETCH; -- Invalid opcodes default to NOP END CASE; -- -- Fetch States -- -- WHEN EX_LOAD => AC <= MDR; -- Latch data from MDR (memory contents) to AC STATE <= FETCH; WHEN EX_STORE => MW <= '1'; -- Raise MW to write AC to MEM STATE <= EX_STORE2; WHEN EX_STORE2 => MW <= '0'; -- Drop MW to end write cycle STATE <= FETCH; WHEN EX_ADD => AC <= AC + MDR; STATE <= FETCH; WHEN EX_SUB => AC <= AC - MDR; STATE <= FETCH; WHEN EX_JUMP => PC <= IR(10 DOWNTO 0); STATE <= FETCH; WHEN EX_JNEG => IF (AC(15) = '1') THEN PC <= IR(10 DOWNTO 0); END IF; STATE <= FETCH; WHEN EX_JPOS => IF ((AC(15) = '0') AND (AC /= x"0000")) THEN PC <= IR(10 DOWNTO 0); END IF; STATE <= FETCH; WHEN EX_JZERO => IF (AC = x"0000") THEN PC <= IR(10 DOWNTO 0); END IF; STATE <= FETCH; WHEN EX_AND => AC <= AC AND MDR; STATE <= FETCH; WHEN EX_OR => AC <= AC OR MDR; STATE <= FETCH; WHEN EX_XOR => AC <= AC XOR MDR; STATE <= FETCH; WHEN EX_SHIFT => AC <= AC_SHIFTED; STATE <= FETCH; WHEN EX_ADDI => AC <= AC + (IR(10) & IR(10) & IR(10) & IR(10) & IR(10) & IR(10 DOWNTO 0)); STATE <= FETCH; WHEN EX_ILOAD => IR(10 DOWNTO 0) <= MDR(10 DOWNTO 0); STATE <= EX_LOAD; WHEN EX_ISTORE => IR(10 DOWNTO 0) <= MDR(10 DOWNTO 0); STATE <= EX_STORE; WHEN EX_CALL => FOR i IN 0 TO 8 LOOP PC_STACK(i + 1) <= PC_STACK(i); END LOOP; PC_STACK(0) <= PC; PC <= IR(10 DOWNTO 0); STATE <= FETCH; WHEN EX_RETURN => FOR i IN 0 TO 8 LOOP PC_STACK(i) <= PC_STACK(i + 1); END LOOP; PC <= PC_STACK(0); STATE <= FETCH; WHEN EX_IN => IF IN_HOLD = '0' THEN AC <= IO_DATA; IN_HOLD <= '1'; ELSE STATE <= FETCH; IN_HOLD <= '0'; END IF; WHEN EX_OUT => STATE <= EX_OUT2; WHEN EX_OUT2 => STATE <= FETCH; WHEN EX_LOADI => AC <= (IR(10) & IR(10) & IR(10) & IR(10) & IR(10) & IR(10 DOWNTO 0)); STATE <= FETCH; WHEN EX_RETI => GIE <= '1'; -- re-enable interrupts PC <= PC_SAVED; -- restore saved registers AC <= AC_SAVED; STATE <= FETCH; -- -- Register-to-Register Operations -- WHEN EX_MOVR => if( regFileDest = 0 ) then -- If regFileSource is 0, then we dont want to overwrite AC with register_file(0) -- We just skip. if( regFileSource /= 0 ) then AC <= regFile(regFileSource); end if; else if( regFileSource = 0) then regFile(regFileDest) <= AC; else regFile(regFileDest) <= regFile(regFileSource); end if; end if; STATE <= FETCH; WHEN EX_ADDR => if( regFileDest = 0 ) then if(regFileSource = 0) then -- Effectively doing AC*2. AC <= AC + AC; else AC <= AC + regFile(regFileSource); end if; else if(regFileSource = 0) then AC <= regFile(regFileDest) + AC; else AC <= regFile(regFileDest) + regFile(regFileSource); end if; end if; STATE <= FETCH; -- -- SUBR -- -- Subtract two registers together. -- -- Format: subr <regA>, <regB> -- -- AC = <regA> - <regB> -- -- NOTE: The following pseudo-instructions could be implemented in the assembler: -- -- 1) subr <regA>, <regB>, <regC> becomes -- -- subr <regB>, <regC> -- movr <regA>, AC -- -- -- WHEN EX_SUBR => if( regFileDest = 0 ) then if(regFileSource = 0) then -- Anything minus itself is just zero. AC <= x"0000"; else AC <= AC - regFile(regFileSource); end if; else if(regFileSource = 0) then AC <= regFile(regFileDest) - AC; else AC <= regFile(regFileDest) - regFile(regFileSource); end if; end if; STATE <= FETCH; -- -- ANDR -- -- Logical AND two registers together. -- -- Format: ANDR <regA>, <regB> -- -- AC = <regA> & <regB> -- -- NOTE: The following pseudo-instructions could be implemented in the assembler: -- -- 1) andr <regA>, <regB>, <regC> becomes -- -- andr <regB>, <regC> -- movr <regA>, AC -- -- -- WHEN EX_ANDR => if( regFileDest = 0 ) then if(regFileSource /= 0) then AC <= AC and regFile(regFileSource); end if; -- AC <= AC and AC is just AC... IE do nothing. else if(regFileSource /= 0) then AC <= regFile(regFileDest) and regFile(regFileSource); else AC <= regFile(regFileDest) and AC; end if; end if; STATE <= FETCH; -- -- ORR -- -- Logical OR two registers together. -- -- Format: ORR <regA>, <regB> -- -- AC = <regA> | <regB> -- -- NOTE: The following pseudo-instructions could be implemented in the assembler: -- -- 1) orr <regA>, <regB>, <regC> becomes -- -- orr <regB>, <regC> -- movr <regA>, AC -- -- -- WHEN EX_ORR => if( regFileDest = 0 ) then if( regFileSource /= 0) then AC <= AC or regFile(regFileSource); end if; -- AC <= AC or AC is just AC. else if( regFileSource = 0) then AC <= regFile(regFileDest) or AC; else AC <= regFile(regFileDest) or regFile(regFileSource); end if; end if; STATE <= FETCH; -- -- CMP -- -- Compare two registers together. -- -- Format: CMP <regA>, <regB> -- -- AC = -1 when <regA> is less than <regB> -- AC = 0 when <regA> equals <regB> -- AC = 1 when <regA> is greater than <regB> -- -- Then the programmer uses jneg, jzero, jpos to jump accordingly. -- -- NOTE: The following pseudo-instructions could be implemented in the assembler: -- -- 1) gt <regA>, <regB>, <labelToJumpToIfTrue> becomes -- -- cmp <regA>, <regB> -- jpos <labelToJumpToIfTrue> -- -- 2) lt <regA>, <regB>, <labelToJumpToIfTrue> becomes -- -- cmp <regA>, <regB> -- jneg <labelToJumpToIfTrue> -- -- 3) eq <regA>, <regB>, <labelToJumpToIfTrue> becomes -- -- cmp <regA>, <regB> -- jzero <labelToJumpToIfTrue> -- -- 4) lte <regA>, <regB>, <labelToJumpToIfTrue> becomes -- -- cmp <regA>, <regB> -- jneg <labelToJumpToIfTrue> -- jzero <labelToJumpToIfTrue> -- -- 5) gte <regA>, <regB>, <labelToJumpToIfTrue> becomes -- -- cmp <regA>, <regB> -- jzero <labelToJumpToIfTrue> -- jpos <labelToJumpToIfTrue> -- -- -- -- WHEN EX_CMP => if( regFileDest = 0 ) then -- If we are comparing the AC to the AC then of course it is equal. if(regFileSource = 0) then AC <= x"0000"; else -- If the AC and the source register are equal then we set the AC = 0. if(AC = regFile(regFileSource)) then AC <= "0000000000000000"; -- If the AC is less than the register source, then we set AC = -1. elsif(ieee.numeric_std.signed(AC) < ieee.numeric_std.signed(regFile(regFileSource))) then AC <= "1111111111111111"; -- If the AC is greater than the register source, then we set AC = 1. else AC <= "0000000000000001"; end if; end if; else if(regFileSource = 0) then if(regFile(regFileDest) = AC) then AC <= "0000000000000000"; elsif(ieee.numeric_std.signed(regFile(regFileDest)) < ieee.numeric_std.signed(AC)) then AC <= "1111111111111111"; else AC <= "0000000000000001"; end if; else if(regFile(regFileDest) = regFile(regFileSource)) then AC <= "0000000000000000"; elsif(ieee.numeric_std.signed(regFile(regFileDest)) < ieee.numeric_std.signed(regFile(regFileSource))) then AC <= "1111111111111111"; else AC <= "0000000000000001"; end if; end if; end if; STATE <= FETCH; -- -- STORER -- -- Store data to an address in the supplied register. -- Oh yeah, you MUST BE CAREFUL when using this... -- -- On the other hand, you can now write self modifying -- code, just in case you want to have some fun... -- -- -- Format: STORER <register> -- -- Memory[register] := AC -- -- -- WHEN EX_STORER => -- Modify the instruction register to our new -- address which is stored in the register that is -- provided as part of the instruction. if(regFileDest = 0) then IR(10 downto 0) <= AC(10 downto 0); else IR(10 downto 0) <= regFile(regFileDest)(10 downto 0); end if; -- Now we write the MW signal high. -- On the next clock, MEM_ADDR will be loaded with our -- new "modified" IR values :) MW <= '1'; STATE <= EX_STORER2; WHEN EX_STORER2 => MW <= '0'; STATE <= FETCH; -- -- LOADR -- -- Load data stored in memory at the address specified by in -- in the register to the AC. -- -- NOTE: Be careful!! There is no telling what will happen -- if you specify an address that is out of bounds!! -- -- Have fun! -- -- Format: LOADR <register> -- -- AC := Memory[register] -- -- WHEN EX_LOADR => -- Modify the IR(10 downto 0) value to the value stored in -- the register. if(regFileDest = 0) then IR(10 downto 0) <= AC(10 downto 0); else IR(10 downto 0) <= regFile(regFileDest)(10 downto 0); end if; STATE <= EX_LOADR2; WHEN EX_LOADR2 => -- At this point, the memory has been read, and the value -- returned to the MDR. We can now grab that data like normal. AC <= MDR; STATE <= FETCH; -- Just for reference. --WHEN EX_STORE => -- MW <= '1'; -- Raise MW to write AC to MEM -- STATE <= EX_STORE2; -- WHEN EX_STORE2 => -- MW <= '0'; -- Drop MW to end write cycle -- STATE <= FETCH; -- Dont need this... WHEN EX_GT => STATE <= FETCH; WHEN OTHERS => STATE <= FETCH; -- If an invalid state is reached, return to FETCH END CASE; INT_REQ_SYNC <= INT_REQ; -- register interrupt requests to SCOMP's clock. END IF; END PROCESS; -- This process monitors the external interrupt pins, setting -- some flags if a rising edge is detected, and clearing flags -- once the interrupt is acknowledged. PROCESS(RESETN, PCINT, INT_ACK, IIE) BEGIN IF (RESETN = '0') THEN INT_REQ <= "0000"; -- clear all interrupts on reset ELSE FOR i IN 0 TO 3 LOOP -- for each of the 4 interrupt pins IF (INT_ACK(i) = '1') OR (IIE(i) = '0') THEN INT_REQ(i) <= '0'; -- if acknowledged or masked, clear interrupt ELSIF RISING_EDGE(PCINT(i)) THEN INT_REQ(i) <= '1'; -- if rising edge on PCINT, request interrupt END IF; END LOOP; END IF; END PROCESS; END a;
------------------------------------------------------------------------------- -- ____ _____ __ __ ________ _______ -- | | \ \ | \ | | |__ __| | __ \ -- |____| \____\ | \| | | | | |__> ) -- ____ ____ | |\ \ | | | | __ < -- | | | | | | \ | | | | |__> ) -- |____| |____| |__| \__| |__| |_______/ -- -- NTB University of Applied Sciences in Technology -- -- Campus Buchs - Werdenbergstrasse 4 - 9471 Buchs - Switzerland -- Campus Waldau - Schoenauweg 4 - 9013 St. Gallen - Switzerland -- -- Web http://www.ntb.ch Tel. +41 81 755 33 11 -- ------------------------------------------------------------------------------- -- Copyright 2013 NTB University of Applied Sciences in Technology ------------------------------------------------------------------------------- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ------------------------------------------------------------------------------- LIBRARY IEEE; USE IEEE.std_logic_1164.ALL; USE IEEE.numeric_std.ALL; USE work.mpu9250_pkg.ALL; ENTITY mpu9250_rtl_tb IS END ENTITY mpu9250_rtl_tb; ARCHITECTURE sim OF mpu9250_rtl_tb IS --Sumulation Parameter: CONSTANT main_period : TIME := 30.3 ns; CONSTANT spi_period : TIME := 10 us; SIGNAL sl_clk : STD_LOGIC := '0'; SIGNAL sl_reset_n : STD_LOGIC := '0'; SIGNAL sl_sclk : STD_LOGIC := '0'; SIGNAL slv_cs_n : STD_LOGIC := '0'; SIGNAL sl_sdo : STD_LOGIC := '1'; SIGNAL sl_sdi : STD_LOGIC := '0'; SIGNAL data : t_data_regs; SIGNAL out_conf : t_config; SIGNAL in_conf : t_config; SIGNAL sl_configuring : STD_LOGIC := '0'; SIGNAL sl_update_config : STD_LOGIC := '0'; SIGNAL sl_update_done : STD_LOGIC := '0'; BEGIN --create component my_unit_under_test : mpu9250 GENERIC MAP( BASE_CLK => 33000000, SCLK_FREQUENCY => 100000 ) PORT MAP( isl_clk => sl_clk, isl_reset_n => sl_reset_n, osl_sclk => sl_sclk, oslv_cs_n => slv_cs_n, isl_sdo => sl_sdo, osl_sdi => sl_sdi, ot_data => data, it_conf => in_conf, ot_conf => out_conf, osl_configuring => sl_configuring, isl_update_config => sl_update_config, osl_update_done => sl_update_done ); sl_clk <= NOT sl_clk after main_period/2; tb_main_proc : PROCESS BEGIN in_conf.acceleration_offset_x <= (OTHERS => '0'); in_conf.acceleration_offset_y <= (OTHERS => '0'); in_conf.acceleration_offset_z <= (OTHERS => '0'); in_conf.gyro_offset_x <= (OTHERS => '0'); in_conf.gyro_offset_y <= (OTHERS => '0'); in_conf.gyro_offset_z <= (OTHERS => '0'); in_conf.samplerate_divider <= (OTHERS => '0'); in_conf.DLPF_CFG <= (OTHERS => '0'); in_conf.EXT_SYNC_SET <= (OTHERS => '0'); in_conf.FIFO_MODE <= '0'; in_conf.FCHOICE_B <= (OTHERS => '0'); in_conf.GYRO_FS_SEL <= (OTHERS => '0'); in_conf.ZGYRO_Cten <= '0'; in_conf.YGYRO_Cten <= '0'; in_conf.XGYRO_Cten <= '0'; in_conf.ACCEL_FS_SEL <= (OTHERS => '0'); in_conf.az_st_en <= '0'; in_conf.ay_st_en <= '0'; in_conf.ax_st_en <= '0'; in_conf.A_DLPF_CFG <= '0'; in_conf.ACCEL_FCHOICE_B <= '0'; in_conf.Lposc_clksel <= (OTHERS => '0'); sl_reset_n <= '0'; WAIT FOR 2*main_period; sl_reset_n <= '1'; WAIT FOR 2000*spi_period; ASSERT false REPORT "End of simulation" SEVERITY FAILURE; END PROCESS tb_main_proc; END ARCHITECTURE sim;