シフト演算子の例 - 2023.2 日本語

Vivado Design Suite ユーザー ガイド: 合成 (UG901)

Document ID
UG901
Release Date
2023-11-01
Version
2023.2 日本語
表 1. シフト演算子の例
演算子 論理上同一のコード
SLL (Shift Left Logic) sig1 <= A(4 downto 0) sll 2 sig1 <= A(2 downto 0) & "00";
SRL (Shift Right Logic) sig1 <= A(4 downto 0) srl 2 sig1 <= "00" & A(4 downto 2);
SLA (Shift Left Arithmetic) sig1 <= A(4 downto 0) sla 2 sig1 <= A(2 downto 0) & A(0) & A(0);
SRA (Shift Right Arithmetic) sig1 <= A(4 downto 0) sra 2 sig1 <= <= A(4) & A(4) & A(4 downto 2);
ROL (Rotate Left) sig1 <= A(4 downto 0) rol 2 sig1 <= A(2 downto 0) & A(4 downto 3);
ROR (Rotate Right) A(4 downto 0) ror 2 sig1 <= A(1 downto 0) & A(4 downto 2);