-
Notifications
You must be signed in to change notification settings - Fork 0
/
BIU.v
39 lines (26 loc) · 923 Bytes
/
BIU.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// file: BIU.v
// author: @ayaelakhras
/*******************************************************************
*
* Module: BIU.v
* Project: i2cMaster
* Author: Aya ElAkhras, [email protected]
* Description: This module
*
* Change history: 02/11/18 – Started Working
* 10/29/17 – Did something else
*
**********************************************************************/
`timescale 1ns/1ns
module BIU(inbar_out, iSCL, oSDA, SDA, iSDA, SCL);
input inbar_out;
input iSCL;
input oSDA; // data to be outputted to the slave arrive here and shall be passed to SDA
inout SDA;
output iSDA; // data inputted from the slave will be put here
output SCL;
// Tristate buffer logic to control the behavior of inout port
assign iSDA = SDA;
assign SDA = (inbar_out) ? oSDA: 1'bz;
assign SCL = iSCL;
endmodule