Reply To: GENERATION OF RANDOM BYTES USING RANDOM PACKAGE ONLY

Why OSVVM™? Forums OSVVM GENERATION OF RANDOM BYTES USING RANDOM PACKAGE ONLY Reply To: GENERATION OF RANDOM BYTES USING RANDOM PACKAGE ONLY

#2014
Jim Lewis
Member

Hi Nagella,
I typically use an active low reset (ie: 0 when active). Did I guess wrong in your case?
Let me be a little more abstract. Lets assume the constant ACTIVE has the value that
reset has when it is active.

process
  variable RV:RandomPType;
  variable b:std_logic_vector( 7 downto 0);
begin
  RV.Initseed(RV’instance_name);
  -- if reset not started, wait until it starts
  if reset /= ACTIVE then
    wait until reset = ACTIVE ;
  end if ; 
  -- wait until reset cycle is done
  wait until reset /= ACTIVE ;
  loop
    wait until rising_edge(clk);
    b:=RV.RandSlv(0,255,8);
    uat_data<=b;
  end loop ;
end process;

Best Regards,
Jim