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

Subversion Repositories axi_slave

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /axi_slave/trunk/src/base
    from Rev 4 to Rev 5
    Reverse comparison

Rev 4 → Rev 5

/axi_slave_trace.v
1,31 → 1,3
/////////////////////////////////////////////////////////////////////
//// ////
//// Author: Eyal Hochberg ////
//// eyal@provartec.com ////
//// ////
//// Downloaded from: http://www.opencores.org ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2010 Provartec LTD ////
//// www.provartec.com ////
//// info@provartec.com ////
//// ////
//// 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.////
//// ////
//// 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. http://www.gnu.org/licenses/lgpl.html ////
//// ////
/////////////////////////////////////////////////////////////////////
 
OUTFILE PREFIX_trace.v
 
32,11 → 4,8
INCLUDE def_axi_slave.txt
module PREFIX_trace(PORTS);
parameter SLAVE_NUM = 0;
parameter SLAVE_NUM = 0;
parameter FILE_NAME = "PREFIX.trc";
input clk;
input reset;
 
48,12 → 17,18
 
wire [31:0] ADDR_WR_disp = ADDR_WR;
wire [31:0] ADDR_RD_disp = ADDR_RD_d;
 
reg [64*8-1:0] filename;
integer file_ptr;
initial
file_ptr = $fopen(FILE_NAME, "w");
 
begin
//erase trace
file_ptr = $fopen({"PREFIX.trc"}, "w");
$fwrite(file_ptr, "\n");
$fclose(file_ptr);
end
always @(posedge clk or posedge reset)
if (reset)
69,12 → 44,19
always @(posedge clk)
if (WR)
$fwrite(file_ptr, "%16d: %0s WR: Addr: 0x%8h, Data: 0x%8h, Bsel: 0x%2h\n", $time, FILE_NAME, ADDR_WR_disp, DIN, BSEL);
begin
file_ptr = $fopen({"PREFIX.trc"}, "a");
$fwrite(file_ptr, "%16d: PREFIX%0d WR: Addr: 0x%EXPR(ADDR_BITS/4)h, Data: 0x%EXPR(DATA_BITS/4)h, Bsel: 0x%EXPR(DATA_BITS/32)h\n", $time, SLAVE_NUM, ADDR_WR_disp, DIN, BSEL);
$fclose(file_ptr);
end
always @(posedge clk)
if (RD_d)
$fwrite(file_ptr, "%16d: %0s RD: Addr: 0x%8h, Data: 0x%8h\n", $time, FILE_NAME, ADDR_RD_disp, DOUT);
 
begin
file_ptr = $fopen({"PREFIX.trc"}, "a");
$fwrite(file_ptr, "%16d: PREFIX%0d RD: Addr: 0x%EXPR(ADDR_BITS/4)h, Data: 0x%EXPR(DATA_BITS/4)h\n", $time, SLAVE_NUM, ADDR_RD_disp, DOUT);
$fclose(file_ptr);
end
endmodule
 

powered by: WebSVN 2.1.0

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