OpenCores
URL https://opencores.org/ocsvn/bustap-jtag/bustap-jtag/trunk

Subversion Repositories bustap-jtag

[/] [bustap-jtag/] [trunk/] [sim/] [reg_bfm_sv.v] - Blame information for rev 9

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 ash_riple
//**************************************************************
2
// Module             : reg_bfm_sv.v
3
// Platform           : Windows xp sp2
4
// Simulator          : Modelsim 6.5b
5
// Synthesizer        : 
6
// Place and Route    : 
7
// Targets device     : 
8
// Author             : Bibo Yang  (ash_riple@hotmail.com)
9
// Organization       : www.opencores.org
10
// Revision           : 2.1 
11
// Date               : 2012/03/19
12
// Description        : Register BFM
13
//**************************************************************
14
 
15
`timescale 1ns/1ns
16
 
17
module reg_bfm_sv (
18
  input        up_clk,
19
  input        up_wbe,up_csn,  // negative logic
20
  input [15:0] up_addr,
21
  inout [31:0] up_data_io
22
);
23
 
24
wire [31:0] up_data_i;
25
reg  [31:0] up_data_o;
26
 
27
assign #10 up_data_io = (up_wbe&&!up_csn)? up_data_o : 32'bzzzzzzzz;
28
assign up_data_i  = up_data_io;
29
 
30
reg [31:0] RAM [0:3];
31
always @(posedge up_clk) begin
32
  if (!up_wbe && !up_csn)
33
          RAM[up_addr[3:2]] <= up_data_i;
34
 
35
  up_data_o <= RAM[up_addr[3:2]];
36
end
37
 
38
endmodule

powered by: WebSVN 2.1.0

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