URL
https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk
Subversion Repositories qaz_libs
[/] [qaz_libs/] [trunk/] [avalon_lib/] [sim/] [src/] [amm_bfm/] [amm_master_bfm_if.sv] - Rev 31
Compare with Previous | Blame | View Log
////////////////////////////////////////////////////////////////////////// //////// Copyright (C) 2015 Authors and OPENCORES.ORG //////// //////// This source file may be used and distributed without //////// restriction provided that this copyright statement is not //////// removed from the file and that any derivative work contains //////// the original copyright notice and the associated disclaimer. //////// //////// This source file is free software; you can redistribute it //////// and/or modify it under the terms of the GNU Lesser General //////// Public License as published by the Free Software Foundation; //////// either version 2.1 of the License, or (at your option) any //////// later version. //////// //////// This source is distributed in the hope that it will be //////// useful, but WITHOUT ANY WARRANTY; without even the implied //////// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //////// PURPOSE. See the GNU Lesser General Public License for more //////// details. //////// //////// You should have received a copy of the GNU Lesser General //////// Public License along with this source; if not, download it //////// from http://www.opencores.org/lgpl.shtml //////// //////////////////////////////////////////////////////////////////////////interfaceamm_master_bfm_if#(A = 32, // address bus widthN = 8 // data bus width in bytes)(amm_if amm_s,input reset,input clk);logic [(A-1):0] address;logic read;logic [(8*N)-1:0] readdata;logic write;logic [(8*N)-1:0] writedata;logic [N-1:0] byteenable;logic waitrequest;logic arbiterlock;logic readdatavalid;logic [6:0] burstcount;logic resetrequest;// --------------------------------------------------------------------//default clocking cb @(posedge clk);output address;output read;input readdata;output write;output writedata;output byteenable;input waitrequest;output arbiterlock;input readdatavalid;output burstcount;output resetrequest;input reset;input clk;endclocking// --------------------------------------------------------------------//assign amm_s.address = address;assign amm_s.read = read;assign readdata = amm_s.readdata;assign amm_s.write = write;assign amm_s.writedata = writedata;assign amm_s.byteenable = byteenable;assign waitrequest = amm_s.waitrequest;assign amm_s.arbiterlock = arbiterlock;assign readdatavalid = amm_s.readdatavalid;assign amm_s.burstcount = burstcount;assign amm_s.resetrequest = resetrequest;// --------------------------------------------------------------------//function voidamm_default;address = 'bx;arbiterlock = 0;burstcount = 'bx;byteenable = 'bx;read = 0;resetrequest = 0;write = 0;writedata = 'bx;endfunction: amm_default// --------------------------------------------------------------------//function voidinit;amm_default();endfunction: init// --------------------------------------------------------------------//taskzero_cycle_delay;##0;endtask: zero_cycle_delay// --------------------------------------------------------------------//initialbegininit();end// --------------------------------------------------------------------//endinterface
