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

Subversion Repositories axi_master

[/] [axi_master/] [trunk/] [src/] [gen/] [prgen_rand.v] - Diff between revs 12 and 16

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 12 Rev 16
Line 64... Line 64...
 
 
function integer align;
function integer align;
      input [31:0]  num;
      input [31:0]  num;
      input [31:0]  align_size;
      input [31:0]  align_size;
 
 
      integer       align;
 
      begin
      begin
         align = num - (num % align_size);
         align = num - (num % align_size);
      end
      end
endfunction
endfunction
 
 
 
 
function integer rand_align;
function integer rand_align;
      input [31:0] min;
      input [31:0] min;
      input [31:0] max;
      input [31:0] max;
      input [31:0] align;
      input [31:0] align_val;
 
 
      integer      rand_align;
 
      begin
      begin
         rand_align = rand(min, max);
         rand_align = rand(min, max);
 
 
         if (rand_align > align)
         if (rand_align > align_val)
           rand_align = align(rand_align, align);
           rand_align = align(rand_align, align_val);
      end
      end
endfunction
endfunction
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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