i have written a code in system verilog for interface. but it it giving me the error at clk. the error is Undefined variable clk.... code is error at always(posedge clk)
interface simple_bus(input logic clk);
// Define the interface
logic req, gnt;
logic [7:0] addr, data;
logic [1:0] mode;
logic start, rdy;
endinterface: simple_bus
module memMod(simple_bus a);
// simple_bus interface port logic avail;
//logic clk;
always @(posedge clk)
a.gnt <= a.req & avail;
endmodule
when using clock in always block it is giving the error "Undefined variable: clk"