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

Subversion Repositories axi4_tlm_bfm

[/] [axi4_tlm_bfm/] [trunk/] [rtl/] [axi4-stream-bfm-master.vhdl] - Diff between revs 11 and 12

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

Rev 11 Rev 12
Line 34... Line 34...
        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;
library ieee; use ieee.std_logic_1164.all, ieee.numeric_std.all;
library tauhop; use tauhop.transactor.all, tauhop.axiTransactor.all;
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;
 
 
entity axiBfmMaster is --generic(constant maxTransactions:positive);
entity axiBfmMaster is --generic(constant maxTransactions:positive);
        port(aclk,n_areset:in std_ulogic;
        port(aclk,n_areset:in std_ulogic;
                /* BFM signalling. */
                /* BFM signalling. */
                readRequest,writeRequest:in t_bfm:=((others=>'X'),(others=>'X'),false);         -- this is tauhop.transactor.t_bfm.
                /* FIXME Generic package defect. ModelSim currently can't make tauhop.axiTransactor.i_transactor visible. */
                readResponse,writeResponse:buffer t_bfm;                                                                        -- use buffer until synthesis tools support reading from out ports.
                readRequest,writeRequest:in i_transactor.t_bfm:=((others=>'X'),(others=>'X'),false);
 
                --readRequest,writeRequest:in i_transactor.t_bfm:=((others=>'X'),(others=>'X'),false);
 
                readResponse,writeResponse:buffer i_transactor.t_bfm;                                                                   -- use buffer until synthesis tools support reading from out ports.
 
 
                /* AXI Master interface */
                /* AXI Master interface */
                axiMaster_in:in t_axi4StreamTransactor_s2m;
                axiMaster_in:in t_axi4StreamTransactor_s2m;
                axiMaster_out:buffer t_axi4StreamTransactor_m2s;
                axiMaster_out:buffer t_axi4StreamTransactor_m2s;
 
 
--              /* AXI Slave interface */
--              /* AXI Slave interface */
--              axiSlave_in:in tAxi4Transactor_m2s;
--              axiSlave_in:in tAxi4Transactor_m2s;
--              axiSlave_out:buffer tAxi4Transactor_s2m;
--              axiSlave_out:buffer tAxi4Transactor_s2m;
 
 
                symbolsPerTransfer:in t_cnt;
                symbolsPerTransfer:in i_transactor.t_cnt;
                outstandingTransactions:buffer t_cnt
                outstandingTransactions:buffer i_transactor.t_cnt
 
 
                /* Debug ports. */
                /* Debug ports. */
--              dbg_cnt:out unsigned(9 downto 0);
--              dbg_cnt:out unsigned(9 downto 0);
--              dbg_axiRxFsm:out axiBfmStatesRx:=idle;
--              dbg_axiRxFsm:out axiBfmStatesRx:=idle;
--              dbg_axiTxFsm:out axiBfmStatesTx:=idle
--              dbg_axiTxFsm:out axiBfmStatesTx:=idle
Line 68... Line 70...
architecture rtl of axiBfmMaster is
architecture rtl of axiBfmMaster is
        /* Finite-state Machines. */
        /* Finite-state Machines. */
        signal axiTxState,next_axiTxState:axiBfmStatesTx:=idle;
        signal axiTxState,next_axiTxState:axiBfmStatesTx:=idle;
 
 
        /* BFM signalling. */
        /* BFM signalling. */
        signal i_readRequest:t_bfm:=((others=>'0'),(others=>'0'),false);
        signal i_readRequest:i_transactor.t_bfm:=((others=>'0'),(others=>'0'),false);
        signal i_writeRequest:t_bfm:=((others=>'0'),(others=>'0'),false);
        signal i_writeRequest:i_transactor.t_bfm:=((others=>'0'),(others=>'0'),false);
 
 
        signal i_readResponse,i_writeResponse:t_bfm;
        signal i_readResponse,i_writeResponse:i_transactor.t_bfm;
 
 
begin
begin
        /* Transaction counter. */
        /* Transaction counter. */
        process(n_areset,symbolsPerTransfer,aclk) is begin
        process(n_areset,symbolsPerTransfer,aclk) is begin
                if not n_areset then outstandingTransactions<=symbolsPerTransfer;
                if not n_areset then outstandingTransactions<=symbolsPerTransfer;

powered by: WebSVN 2.1.0

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