Interfaces - Virtual Interfaces
Virtual interfaces provide a mechanism for separating abstract models and test programs from the actual signals that make up the design. A virtual interface allows the same subprogram to operate on different portions of a design, and to dynamically control the set of signals associated with the subprogram. Instead of referring to the actual set of signals directly, users are able to manipulate a set of virtual signals. Changes to the underlying design do not require the code using virtual interfaces to be re-written. By abstracting the connectivity and functionality of a set of blocks, virtual interfaces promote code-reuse.
interface SBus;
logic req, grant;
logic [7:0] addr, data;
endinterface
class SBusTransctor;
virtual SBus bus;
function new( virtual Bus s );
bus = s;
endfunction
task request();
bus.req <= 1’b1;
endtask
task wait_for_bus();
@(posedge bus.grant);
endtask
endclass
endinterface
Parameterized Interfaces
Interface definitions can take advantage of parameters and parameter redefinition, in the same manner as module definitions.
Access to Interface Objects
Access to all objects declared in an interface is always available by hierarchical reference, regardless of whether or not the interface is connected through a port. When an interface is connected with a modport in either the module header or port connection, access by port reference is limited to only those objects listed in the modport, for only those types of objects legal to be listed in modports (nets, variables, tasks, and functions) All objects are still visible by hierarchical reference.
This blog contains all the information, latest technologies in VLSI and interview questions for freshers
Subscribe to:
Post Comments (Atom)
Popular Posts
-
http://www.mediafire.com/?n77dan3ovdwyoy3 http://www.mediafire.com/?8ncruxr37o1dbqb http://www.mediafire.com/?jqhvobf6j4gbp6e ...
-
Verilog code for an 8-bit shift-left register with a positive-edge clock, serial in and serial out. module shift (clk, si, so);...
-
Verilog code for a 4-bit unsigned up counter with asynchronous clear. module counter (clk, clr, q); input ...
-
seminar topics with ppts if u need any topics below mail me: bsnspkumar_484@yahoo.co.in Analysis of the Performance of DOA Algorithms in sma...
-
ECE Seminar topics These are the seminar topics based on Electronics and Communications. If u need abstracts of the below seminar topics u c...
-
// memory module `timescale 1ns/1ns module ram(wr_ad,rd_ad,wr_en,rd_en,clk,wr_dat,rd_dat); //parameter addr_width=4; //parameter depth=16; /...
-
Verilog code for single-port RAM in read-first mode. module raminfr (clk, en, we, addr, di, do); input clk; input ...
-
If inverted output of D flip-flop is connected to its input how the flip-flop behaves? Design a circuit to divide input frequency by 2...
-
Synthesizeable constructs and VHDL templates VHDL is frequently used for two different goals: simulation of electronic designs and synthesis...
-
http://www.mediafire.com/?h1bj9w1bx8kja69 http://www.mediafire.com/?yot1d4b0u344lmc http://www.mediafire.com/?hzqj1m6j91mg9td http://ww...
No comments:
Post a Comment