0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

概要

順序回路を理解する。
リレー回路が、良いと閃いた。
リレー回路で説明してみた。
規模が大きくなると、リレー回路では、説明が難しい。
タイミングチャートが、有効と感じる。
gtkwaveがある、iverilogで説明してみる。

8bitシフトレジスタ

入力パルスを記憶して8クロック後に、取り出します。

image.png

サンプルコード 

_inが入力でclkがクロックです。
レジスタを8個、用意して、クロックの立ち上がりで、入力を記憶して
後ろから順にバケツリレーをしています。


module sr8(input _in, clk, output _out);
	reg b1;
	reg b2;
	reg b3;
	reg b4;
	reg b5;
	reg b6;
	reg b7;
	reg b8;
	assign _out = b8;
	always @(posedge clk)
	begin
		b8 <= b7;
		b7 <= b6;
		b6 <= b5;
		b5 <= b4;
		b4 <= b3;
		b3 <= b2;
		b2 <= b1;
		b1 <= _in;
	end
endmodule


以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?