shaiko
Advanced Member level 5

Hello,
I want to write a textio tesbench for this simple VHDL code:
In my TB, I want to feed the above component with a file that looks like this:
I want the TB to read a new line from the above file with every clock edge and print the output in a different file.
Please help me write the TB.
I want to write a textio tesbench for this simple VHDL code:
Code:
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.numeric_std.all ;
entity parity_generator is
port
(
CLK : in std_logic ;
RST : in std_logic ;
INPUT : in std_logic_vector ( 1 downto 0 ) ;
OUTPUT : out std_logic
) ;
end entity parity_generator ;
architecture synthesizable_parity_generator of parity_generator is
begin
process ( CLK , RST ) is
begin
if RST = '1' then
OUTPUT <= 'Z' ;
elsif rising_edge ( CLK ) then
OUTPUT <= INPUT ( 0 ) xor INPUT ( 1 ) ;
end if ;
end process ;
end architecture synthesizable_parity_generator ;
In my TB, I want to feed the above component with a file that looks like this:
Code:
00
01
10
11
Please help me write the TB.
Last edited: