ISE で VHDL モジュールを作成し、対応する回路図シンボルを生成しました。回路図レイアウト エディタの属性を使用して指定された、シンボル内のバスを可変幅にしたいと考えています。プロジェクト全体の DRC は問題ありませんが、最上位の回路図を合成しようとすると、「変数」として指定した各ポートでエラーがスローされます。こことここにリストされている常識と例からこれを構築しました。
モジュールの VHDL:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity BUS_SWITCHER is
generic (
WIDTH : integer := 1 -- Structure
);
port (
A : in STD_LOGIC_VECTOR (WIDTH - 1 downto 0);
B : in STD_LOGIC_VECTOR (WIDTH - 1 downto 0);
X : out STD_LOGIC_VECTOR (WIDTH - 1 downto 0);
Y : out STD_LOGIC_VECTOR (WIDTH - 1 downto 0);
S : in STD_LOGIC
);
end BUS_SWITCHER;
architecture Behavioral of BUS_SWITCHER is
begin
process (A, B, S)
begin
if S = '1' then
X <= B;
Y <= A;
else
X <= A;
Y <= B;
end if;
end process;
end Behavioral;
モジュールのシンボル (4 x 256 幅のバスに接続された回路図):
プロパティ ウィンドウ:
エラーログ:
ERROR:DesignEntry:20 - Pin "A(0:0)" is connected to a bus of a different width.
ERROR:DesignEntry:20 - Pin "B(0:0)" is connected to a bus of a different width.
ERROR:DesignEntry:20 - Pin "Y(0:0)" is connected to a bus of a different width.
ERROR:DesignEntry:20 - Pin "X(0:0)" is connected to a bus of a different width.