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

don't care値を使う

pp.184-186 don't care値を利用するとブール式が簡単化されるためハードウェアが少なくて済む。 下のコードはLEを1個消費した。 library ieee; use ieee.std_logic_1164.all; entity circuit_with_dontcare is port( a : in std_logic_vector(2 downto 0); b…

トライステートバッファー

p.184 4ビット幅のトライステートバッファーを合成する。 library ieee; use ieee.std_logic_1164.all; entity tri_state_buffer is generic( /* naturalは自然数型(0~2^31-1)。 ほかにinteger、positiveなども。 stdライブラリーのstandardパッケージに含…