HierarchyFilesModulesSignalsTasksFunctionsHelp
module KeyPadEncoder_TBIndex;

reg	[9:0] iD$KeyPad;
wire	oS$KeyIsPressed;

wire	[3:0]	oD$KeyValue;

integer k;

parameter MaxChars = 22;
reg [8*MaxChars-1 : 0] TestMode;

KeyPadEncoder DUT (
	.iD$KeyPad ( iD$KeyPad ),
	.oS$KeyIsPressed ( oS$KeyIsPressed ),
	.oD$KeyValue ( oD$KeyValue )
);

initial begin
	iD$KeyPad = 0;

	// Individual keypresses from Key 0 to Key 9
	TestMode = "Individual keypresses";
	for (k=0; k<=9; k=k+1) begin
		#10 iD$KeyPad = 1 << k;
		#10 iD$KeyPad = 0;
	end

	// Multiple keypress (Key 4 and Key 7)
	TestMode = "Multiple keypresses";
	#10 iD$KeyPad = (1 << 4) | (1 << 7);

	#50 $finish;
end

endmodule		







HierarchyFilesModulesSignalsTasksFunctionsHelp

This page: Created:Thu Jan 16 14:38:01 2003
From: keypad_encoder_TB.v

Verilog converted to html by v2html 7.30 (written by Costas Calamvokis).Help