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

Subversion Repositories axi4_tlm_bfm

[/] [axi4_tlm_bfm/] [trunk/] [rtl/] [user.vhdl] - Diff between revs 5 and 6

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

Rev 5 Rev 6
Line 145... Line 145...
 
 
                variable isPktError:boolean;
                variable isPktError:boolean;
 
 
                /* Simulation-only randomisation. */
                /* Simulation-only randomisation. */
                variable seed0,seed1:positive:=1;
                variable seed0,seed1:positive:=1;
                variable rand0,rand1:real;
                variable rand0:real;
 
 
        begin
        begin
                if reset then
                if reset then
                        seed0:=1; seed1:=1;
                        seed0:=1; seed1:=1;
 
 
                        uniform(seed0,seed1,rand0);
                        uniform(seed0,seed1,rand0);
                        symbolsPerTransfer<=120x"0" & to_unsigned(integer(rand0*4096.0),8);
                        symbolsPerTransfer<=120x"0" & to_unsigned(integer(rand0 * 2.0**8),8);
                elsif falling_edge(irq_write) then
                elsif falling_edge(irq_write) then
                        if outstandingTransactions>0 then
                        if outstandingTransactions>0 then
                                uniform(seed0,seed1,rand0);
                                uniform(seed0,seed1,rand0);
                                writeStream(to_unsigned(integer(rand0*4096.0),64));
                                writeStream(to_unsigned(integer(rand0 * 2.0**31),64));
 
 
                        else
                        else
                                /* Testcase 1: number of symbols per transfer becomes 0 after first stream transfer. */
                                /* Testcase 1: number of symbols per transfer becomes 0 after first stream transfer. */
                                --symbolsPerTransfer<=(others=>'0');
                                --symbolsPerTransfer<=(others=>'0');
 
 
                                /* Testcase 2: number of symbols per transfer is randomised. */
                                /* Testcase 2: number of symbols per transfer is randomised. */
                                uniform(seed0,seed1,rand0);
                                uniform(seed0,seed1,rand0);
                                symbolsPerTransfer<=120x"0" & to_unsigned(integer(rand0*4096.0),8);      --symbolsPerTransfer'length
                                symbolsPerTransfer<=120x"0" & to_unsigned(integer(rand0 * 2.0**8),8);    --symbolsPerTransfer'length
                                report "symbols per transfer = " & ieee.numeric_std.to_hstring(to_unsigned(integer(rand0*4096.0),8));   --axiMaster_out.tData'length));
                                report "symbols per transfer = " & ieee.numeric_std.to_hstring(to_unsigned(integer(rand0 * 2.0**8),8)); --axiMaster_out.tData'length));
                        end if;
                        end if;
                end if;
                end if;
        end process sequencer;
        end process sequencer;
end architecture rtl;
end architecture rtl;
 
 
 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.