EDA Interfaces

Example of Creating a "Black Box" for a Verilog HDL Custom Variation of a Megafunction in the LeonardoSpectrum Software



To specify that the LeonardoSpectrum software should treat the cam_wrapper_v.v file, which you created in Example of Creating a Custom Variation of the altcam Function, as a "black box," refer to the following code sample from the top-level design file. In this example, the top-level design file is camsource.v. To modify the source code for the camsource.v file to define the module name and port type and to specify that the module is a black box, you can use the cam_wrapper_bb.v empty module declaration and add it to the camsource.v top-level design file as shown in the following code sample:

Camsource.v



module camsource (
	pattern,
	wraddress,
	wren,
	wrx,
	wrxused,
	wrdelete,
	inclock,
	inclocken,
	inaclr,
	maddress,
	mfound,
	mcount,
	rdbusy,
	wrbusy);
);

input [31:0] pattern;
input [4:0]  wraddress;
input        wren;
input [31:0] wrx;
input        wrxused;
input        wrdelete;
input        inclock;
input        inclocken;
input        inaclr;
output [4:0] maddress;
output       mfound;
output [4:0] mcount;
output       rdbusy;
output       wrbusy;


cam_wrapper_v U1 (.pattern(pattern), .wraddress(wraddress), .wren(wren), .wrx(wrx),
			.wrxused(wrxused), .wrdelete(wrdelete), .inclock(inclock),
			.inclock(inclock), .inclocken(inclocken), .inaclr(inaclr),
			.maddress(maddress), .mfound(mfound), .mcount(mcount),
			.rdbusy(rdbusy), .wrbusy(wrbusy));


endmodule

module cam_wrapper_v (
	pattern,
	wraddress,
	wren,
	wrx,
	wrxused,
	wrdelete,
	inclock,
	inclocken,
	inaclr,
	maddress,
	mfound,
	mcount,
	rdbusy,
	wrbusy);

input [31:0] pattern;
input [4:0]  wraddress;
input        wren;
input [31:0] wrx;
input        wrxused;
input        wrdelete;
input        inclock;
input        inclocken;
input        inaclr;
output [4:0] maddress;
output       mfound;
output [4:0] mcount;
output       rdbusy;
output       wrbusy;

endmodule


Back to Top

- PLDWorld -

 

Created by chm2web html help conversion utility.