2021-03-29から1日間の記事一覧

和と比較と / 出力をDFFに通す

pp.149-151 6.1 設計単位とコード構造と / 和と比較と -と同じ回路の出力を、今度はDFFに通す。 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity add_compare_registered is generic( NUM_BITS: natural := 8 ); port( clk: i…

非同期リセットDフリップフロップ

関連: プロセス文でポジティブエッジトリガー型Dフリップフロップを作る - pp.147-148 library ieee; use ieee.std_logic_1164.all; entity flip_flop is port( d, clk, arst: in std_logic; q : out std_logic ); end entity; architecture flip_flop of fl…

パリティディテクター / チェーンタイプ

ただしチェーンタイプにコンパイルされるとは限らない。 p.146 library ieee; use ieee.std_logic_1164.all; entity parity_detector_2 is port( byte: in std_logic_vector(7 downto 0); parity: out std_logic ); end entity; architecture chain_type of …

genericリストに定数を列挙する / それに意味のないとき

pp.135-137 genericリストを使って前回のコードを少し書き換える。 -- これがパッケージリスト library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; -- これがエンティティ宣言 entity add_compare_cell is generic( IN_WIDTH : natural …

6.1 設計単位とコード構造と / 和と比較と

p.131 a (0b000~0b111)とb (0b000~0b111)との和(0b0000~0b1110)を求める。 さらにa > bのときにcompフラグを立てる。 まだところどころわからない。 -- これがパッケージリスト library ieee; use ieee.std_logic_1164.all; -- ieeeがライブラリー名。std…

defer

/ディふァー/ p.130 If it contains a declaration of subprogram or deferred constant (a constant with unspecified value), the package body is required. 非公式訳: サブプログラムの宣言またはdeferred constant (値の指定されていない定数)をそこ(訳…