OpenCores
URL https://opencores.org/ocsvn/rio/rio/trunk

Subversion Repositories rio

[/] [rio/] [branches/] [parallelSymbols/] [rtl/] [vhdl/] [RioCommon.vhd] - Diff between revs 10 and 26

Show entire file | Details | Blame | View Log

Rev 10 Rev 26
Line 422... Line 422...
    variable int_rand: integer;
    variable int_rand: integer;
    variable stim: std_logic_vector(7 downto 0);
    variable stim: std_logic_vector(7 downto 0);
  begin
  begin
    for i in payload'range loop
    for i in payload'range loop
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(7 downto 0) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(7 downto 0) := std_logic_vector(to_unsigned(int_rand, 8));
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(15 downto 8) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(15 downto 8) := std_logic_vector(to_unsigned(int_rand, 8));
    end loop;
    end loop;
  end procedure;
  end procedure;
 
 
  procedure CreateRandomPayload(
  procedure CreateRandomPayload(
Line 440... Line 440...
    variable int_rand: integer;
    variable int_rand: integer;
    variable stim: std_logic_vector(7 downto 0);
    variable stim: std_logic_vector(7 downto 0);
  begin
  begin
    for i in payload'range loop
    for i in payload'range loop
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(7 downto 0) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(7 downto 0) := std_logic_vector(to_unsigned(int_rand, 8));
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(15 downto 8) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(15 downto 8) := std_logic_vector(to_unsigned(int_rand, 8));
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(23 downto 16) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(23 downto 16) := std_logic_vector(to_unsigned(int_rand, 8));
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(31 downto 24) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(31 downto 24) := std_logic_vector(to_unsigned(int_rand, 8));
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(39 downto 32) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(39 downto 32) := std_logic_vector(to_unsigned(int_rand, 8));
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(47 downto 40) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(47 downto 40) := std_logic_vector(to_unsigned(int_rand, 8));
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(55 downto 48) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(55 downto 48) := std_logic_vector(to_unsigned(int_rand, 8));
      uniform(seed1, seed2, rand);
      uniform(seed1, seed2, rand);
      int_rand := integer(trunc(rand*256.0));
      int_rand := integer(round(rand*256.0));
      payload(i)(63 downto 56) := std_logic_vector(to_unsigned(int_rand, 8));
      payload(i)(63 downto 56) := std_logic_vector(to_unsigned(int_rand, 8));
    end loop;
    end loop;
  end procedure;
  end procedure;
  ---------------------------------------------------------------------------
  ---------------------------------------------------------------------------
  -- Create a generic RapidIO frame.
  -- Create a generic RapidIO frame.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.