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

Subversion Repositories i2c_to_wb

[/] [i2c_to_wb/] [trunk/] [src/] [i2c_to_wb_config.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2009 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
 
29
`include "timescale.v"
30
 
31
 
32
module
33
  i2c_to_wb_config
34
  (
35
    input   [7:0]       i2c_byte_in,
36
    input               tip_addr_ack,
37
    output              i2c_ack_out,
38
 
39
    input               wb_clk_i,
40
    input               wb_rst_i
41
  );
42
 
43
 
44
  // --------------------------------------------------------------------
45
  //  address decoder  
46
  reg i2c_addr_ack_out_r;
47
 
48
  always @(*)
49
    casez( i2c_byte_in )
50
      8'b1111_000?: i2c_addr_ack_out_r = 1'b0;
51
      default:      i2c_addr_ack_out_r = 1'b1;
52
    endcase
53
 
54
 
55
  // --------------------------------------------------------------------
56
  //  outputs  
57
  assign i2c_ack_out = tip_addr_ack ? i2c_addr_ack_out_r : 1'b0;
58
//   assign i2c_ack_out = 1'b0;
59
 
60
 
61
endmodule
62
 

powered by: WebSVN 2.1.0

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