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 11 and 12

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

Rev 11 Rev 12
Line 33... Line 33...
        You should have received a copy of the GNU Lesser General
        You should have received a copy of the GNU Lesser General
        Public License along with this source; if not, download it
        Public License along with this source; if not, download it
        from http://www.opencores.org/lgpl.shtml.
        from http://www.opencores.org/lgpl.shtml.
*/
*/
library ieee; use ieee.std_logic_1164.all, ieee.numeric_std.all; use ieee.math_real.all;
library ieee; use ieee.std_logic_1164.all, ieee.numeric_std.all; use ieee.math_real.all;
library tauhop; use tauhop.transactor.all, tauhop.axiTransactor.all;            --TODO just use axiTransactor here as transactor should already be wrapped up.
library tauhop; use tauhop.axiTransactor.all;
 
 
/* TODO remove once generic packages are supported. */
/* TODO remove once generic packages are supported. */
--library tauhop; use tauhop.tlm.all, tauhop.axiTLM.all;
--library tauhop; use tauhop.tlm.all, tauhop.axiTLM.all;
 
 
/* synthesis translate_off */
/* synthesis translate_off */
Line 57... Line 57...
end entity user;
end entity user;
 
 
architecture rtl of user is
architecture rtl of user is
        /* Global counters. */
        /* Global counters. */
        constant maxSymbols:positive:=2048;             --maximum number of symbols allowed to be transmitted in a frame. Each symbol's width equals tData's width. 
        constant maxSymbols:positive:=2048;             --maximum number of symbols allowed to be transmitted in a frame. Each symbol's width equals tData's width. 
        signal symbolsPerTransfer:t_cnt;
        signal symbolsPerTransfer:i_transactor.t_cnt;
        signal outstandingTransactions:t_cnt;
        signal outstandingTransactions:i_transactor.t_cnt;
 
 
        /* BFM signalling. */
        /* BFM signalling. */
        signal readRequest:t_bfm:=((others=>'0'),(others=>'0'),false);
        signal readRequest:i_transactor.t_bfm:=((others=>'0'),(others=>'0'),false);
        signal writeRequest:t_bfm:=((others=>'0'),(others=>'0'),false);
        signal writeRequest:i_transactor.t_bfm:=((others=>'0'),(others=>'0'),false);
        signal readResponse:t_bfm;
        signal readResponse:i_transactor.t_bfm;
        signal writeResponse:t_bfm;
        signal writeResponse:i_transactor.t_bfm;
 
 
        type txStates is (idle,transmitting);
        type txStates is (idle,transmitting);
        signal txFSM,i_txFSM:txStates;
        signal txFSM,i_txFSM:txStates;
 
 
        /* Tester signals. */
        /* Tester signals. */
Line 164... Line 164...
 
 
 
 
        /* Data transmitter. */
        /* Data transmitter. */
        sequencer: process(nReset,irq_write) is
        sequencer: process(nReset,irq_write) is
                /* Local procedures to map BFM signals with the package procedure. */
                /* Local procedures to map BFM signals with the package procedure. */
                procedure read(address:in t_addr) is begin
                procedure read(address:in i_transactor.t_addr) is begin
                        read(readRequest,address);
                        i_transactor.read(readRequest,address);
                end procedure read;
                end procedure read;
 
 
                procedure write(data:in t_msg) is begin
                procedure write(data:in i_transactor.t_msg) is begin
                        write(request=>writeRequest, address=>(others=>'-'), data=>data);
                        i_transactor.write(request=>writeRequest, address=>(others=>'-'), data=>data);
                end procedure write;
                end procedure write;
 
 
                variable isPktError:boolean;
                variable isPktError:boolean;
 
 
                /* Tester variables. */
                /* Tester variables. */

powered by: WebSVN 2.1.0

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