Demo entry 6683038

no

   

Submitted by anonymous on Dec 12, 2017 at 04:14
Language: C++. Code size: 816 Bytes.

module test_for_Ctr;

	// Inputs
	reg [5:0] opCode;

	// Outputs
	wire regDst;
	wire aluSrc;
	wire memToReg;
	wire regWrite;
	wire memRead;
	wire memWrite;
	wire branch;
	wire [1:0] aluOp;
	wire jump;

	// Instantiate the Unit Under Test (UUT)
	Ctr uut (
		.opCode(opCode), 
		.regDst(regDst), 
		.aluSrc(aluSrc), 
		.memToReg(memToReg), 
		.regWrite(regWrite), 
		.memRead(memRead), 
		.memWrite(memWrite), 
		.branch(branch), 
		.aluOp(aluOp), 
		.jump(jump)
	);

	initial begin
		// Initialize Inputs
		opCode = 0;

		// Wait 100 ns for global reset to finish
		#200;
      
		#100 opCode = 6'b100011;  
		#100 opCode = 6'b101011;  
		#100 opCode = 6'b000100;  
		#100 opCode = 6'b000010;
      #100 opCode = 6'b010101; 	
		// Add stimulus here

	end
      
endmodule

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).