Kosyas41
Member level 3
Hello,
Could you pls give me some hints about PRBS code.My code is working fine.but I would like to modify it. I want that output value will change at leasr after 100ps.
Could you pls give me some hints about PRBS code.My code is working fine.but I would like to modify it. I want that output value will change at leasr after 100ps.
Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity random is
generic ( width : integer := 5000 );
port (
clock : in std_logic;
random_num : out std_logic --output vector
);
end random;
architecture random_arch of random is
begin
process(clock)
variable rand_temp : std_logic_vector(width-1 downto 0):=(width-1 => '1',others => '0');
variable temp : std_logic := '0';
begin
if clock'event and clock = '0' then
temp := rand_temp(width-1) xor rand_temp(width-2);
rand_temp(width-1 downto 1) := rand_temp(width-2 downto 0);
rand_temp(120) := temp;
end if;
random_num <= rand_temp(960);
end process;
end;
Last edited: