Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4928

VHDL N-Bit Interleave explanation?

$
0
0
Hey guys,
So I've got a simple component that manipulates two std_logic_vector inputs into one.
Code (Text):
  1. entity interleave is
  2.  
  3. generic (
  4.  
  5. N : natural := 4
  6.  
  7. );
  8.  
  9. port(
  10.  
  11. A : in std_logic_vector((N-1) downto 0);
  12.  
  13. B : in std_logic_vector((N-1) downto 0);
  14.  
  15. Y : out std_logic_vector((2*N-1) downto 0)
  16.  
  17. );
  18.  
  19. end entity;
The behaviour of this component should be that where N=4. The output Y is constructed by interleaving the bits of A and B together as shown in the table below....

VHDL N-Bit Interleave explanation?

Viewing all articles
Browse latest Browse all 4928

Trending Articles