Source

mini-mips / nextPCLogic_mips.v

Full commit

module nextPCLogic_mips 
	(
	input wire zero, input wire writeCond, 
	input wire write, output wire out
	);

	assign out = ((zero & writeCond) | write);

endmodule

/*
module nextPCLogic_mips_test;

	reg zero, writeCond, write;
	wire out;

	nextPCLogic_mips dut (.zero(zero), .writeCond(writeCond), .write(write), .out(out));

	initial
	begin
		$dumpfile("nextPCLogic_mips_test.vcd");
		$dumpvars;
	end

	initial
	begin
		zero = 1'b1;
		writeCond = 1'b1;
		write = 1'b1;
		#10;
		if ( out == ((zero & writeCond) | write))
			$display("nextPCLogic_mips funciona correctamente.");
		else
			$display("ERROR: nextPCLogic_mips.");

		write = 1'b0;
	end

endmodule
*/