Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Multiple instance Intatiation

Status
Not open for further replies.

Mukesh10

Junior Member level 2
Joined
Jun 22, 2012
Messages
24
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Bangalore
Activity points
1,432
Hello Everyone.

Can anyone help me in Multiple interface instantiation in the module and how to drive these interfaces.

here is the code :
// Interface File
interface intf_i(input clock);
logic[3:0]a ;
logic[3:0] b;
logic[5:0] c;

clocking cb @(posedge clock);
input a;
input b;
output c;
endclocking

modport MP (clocking cb, input clock);

endinterface

// DESIGN FILE

module abc (intf_i in[0:8], input clock);

genvar i;
generate
for(i =0; i <8; i++)
begin
always @(posedge clock)
begin
in.c = in.a + in.b;
end
end
endgenerate
endmodule

// Testbench File

`include "intf.sv"
`include "mod.sv"
module top;

bit clock =0;

always
begin
clock = #5 ~clock;
end

genvar i;
for(i =1; i<8; i++)
begin
intf_i in(clock);
abc ab(in, clock);
end

endmodule



but this code is showing some errors !!

Thanks
 

used wrap code to your code.
and share with us your errors.
thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top