init
This commit is contained in:
40
code/Vezba 13 - prateci materijal/i2c_uvc/sv/i2c_if.sv
Normal file
40
code/Vezba 13 - prateci materijal/i2c_uvc/sv/i2c_if.sv
Normal file
@@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+
|
||||
|F|u|n|c|t|i|o|n|a|l| |V|e|r|i|f|i|c|a|t|i|o|n| |o|f| |H|a|r|d|w|a|r|e|
|
||||
+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+
|
||||
|
||||
FILE i2c_if.sv
|
||||
|
||||
DESCRIPTION i2c interface
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
`ifndef I2C_IF_SV
|
||||
`define I2C_IF_SV
|
||||
|
||||
/*
|
||||
* Interface: i2c_if
|
||||
*/
|
||||
interface i2c_if(input logic clk, input logic rst);
|
||||
|
||||
// connected to DUT
|
||||
wire sda_wire;
|
||||
wire scl_wire;
|
||||
|
||||
// driven by uvc
|
||||
logic sda;
|
||||
logic scl;
|
||||
|
||||
assign sda_wire = sda;
|
||||
assign scl_wire = scl;
|
||||
|
||||
// control
|
||||
bit has_checks = 1;
|
||||
bit has_coverage = 1;
|
||||
|
||||
// TODO : coverage and assertions go here...
|
||||
|
||||
endinterface : i2c_if
|
||||
|
||||
`endif
|
||||
|
||||
Reference in New Issue
Block a user