AUTOBIND anyone?
Added by Leith Johnson about 1 year ago
Systemverilog supports a bind file feature whereby a module (of usually assertions and coverage) can be bound to another Verilog module.
The default port list for this bound module typically starts out as all ports of the bind target as inputs.
Very similar to AUTOINOUTCOMP, except all signals are inputs in the bind module.
Perhaps there is already a way to to do this? If not, it seems like a near trivial modification of the existing AUTOINPUTCOMP.
Leith Johnson
Replies (4)
RE: AUTOBIND anyone? - Added by Wilson Snyder about 1 year ago
Seems reasonable; it's not trivial though because bind needs to act in the context of the module getting the instantiated added to, not the context with the AUTOBIND. But that's just whining, it's not too hard. Would you use it?
RE: AUTOBIND anyone? - Added by Wilson Snyder about 1 year ago
Oh, I see I misinterpreted the question. You're looking for an AUTOINOUT_WITH_EVERYTHING_AS_INPUT. Yes, that's trivial.
What I thought at first you wanted was this:
module ExampInst (o,i);
output logic [31:0] o;
input i;
InstModule instName
(// Outputs
.so (o[31:0]),
// Inputs
.si (i)
/*AUTOINST*/);
//bind InstModule Prog instProg
// (.si(si));
// Note is based on context of caller
bind InstModule Prog instProg
(/*AUTOBIND*/
.si (si));
endmodule
module t;
wire [31:0] o;
ExampInst i
(// Outputs
.o (o[31:0]),
// Inputs
.i (1'b0)
/*AUTOINST*/);
Prog p (/*AUTOINST*/);
endmodule
RE: AUTOBIND anyone? - Added by Wilson Snyder about 1 year ago
Maybe not the best name, but I just uploaded AUTOINOUTIN:
program autoinoutin (
/*AUTOINOUTIN("inst")*/
// Beginning of automatic in/out/inouts (from specific module)
input lower_inb,
input lower_ina,
input lower_out,
// End of automatics
endprogram
RE: AUTOBIND anyone? - Added by Leith Johnson about 1 year ago
Implemented within hours! Wow.
That's great. Thanks a lot.
Leith
(1-4/4)
![[logo]](/img/veripool_small.png)