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

Subversion Repositories pit

[/] [pit/] [trunk/] [bench/] [verilog/] [wb_master_model.v] - Diff between revs 11 and 16

Show entire file | Details | Blame | View Log

Rev 11 Rev 16
Line 49... Line 49...
//
//
`include "timescale.v"
`include "timescale.v"
 
 
module wb_master_model  #(parameter dwidth = 32,
module wb_master_model  #(parameter dwidth = 32,
                          parameter awidth = 32)
                          parameter awidth = 32)
(clk, rst, adr, din, dout, cyc, stb, we, sel, ack, err, rty);
(
 
output reg                 cyc,
 
output reg                 stb,
input                  clk, rst;
output reg                 we,
output [awidth   -1:0]  adr;
output reg [dwidth/8 -1:0] sel,
input  [dwidth   -1:0]  din;
output reg [awidth   -1:0] adr,
output [dwidth   -1:0]  dout;
output reg [dwidth   -1:0] dout,
output                 cyc, stb;
input      [dwidth   -1:0] din,
output                          we;
input                      clk,
output [dwidth/8 -1:0] sel;
input                      ack,
input                           ack, err, rty;
input                      rst,  // No Connect
 
input                      err,  // No Connect
 
input                      rty   // No Connect
 
);
 
 
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
//
//
// Local Wires
// Local Wires
//
//
 
 
reg     [awidth   -1:0] adr;
 
reg     [dwidth   -1:0] dout;
 
reg                            cyc, stb;
 
reg                            we;
 
reg [dwidth/8 -1:0] sel;
 
 
 
reg [dwidth   -1:0] q;
reg [dwidth   -1:0] q;
 
 
 
event cmp_error_detect;
 
 
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
//
//
// Memory Logic
// Memory Logic
//
//
 
 
Line 195... Line 195...
 
 
        begin
        begin
                wb_read (delay, a, q);
                wb_read (delay, a, q);
 
 
                if (d_exp !== q)
                if (d_exp !== q)
 
            begin
 
              -> cmp_error_detect;
                        $display("Data compare error at address %h. Received %h, expected %h at time %t", a, q, d_exp, $time);
                        $display("Data compare error at address %h. Received %h, expected %h at time %t", a, q, d_exp, $time);
        end
        end
 
        end
endtask
endtask
 
 
endmodule
endmodule
 
 
 
 

powered by: WebSVN 2.1.0

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