ハブ君の寝言

日記のような何か

QuartusII

verilogって言ったらアルテラ、アルテラでシミュっていったらQuartusってことで、DLインスコ

早速、起動カキカキ

最初はやっぱ、簡単な加算からだよね〜ってことで

module add( a, b, cin, s, cout);

	input a, b, cin;
	output s, cout;
	reg s, cout;

	always @(a or b or cin)
	begin
		s = a ^ b ^ cin;
		cout = (a & b) | (b & cin) | (cin & a);
	end

endmodule

module addSim;
	
	wire	s, co;
	reg	x, y, ci;
	add	f1(x,y,ci,s,co);
	initial
		begin
			$monitor("%d %d %d %d",x,y,s,$stime);
			$display("x y s time");
			
				x=0; y=0; ci=0;
			#50	y=1;
			#50	x=1; y=0;
			#50	y=1;
			#50	$finish;
		end
endmodule

こんなの書いたけどエラー出たよ!

もうわけわかんないから今日は諦めるよ!