[Suzaku:01106] Re: UserIPの取り込みについて(Verilog と VHDL の混合)
mio
email@hidden
2007年 12月 25日 (火) 19:12:18 JST
中島です。
> 渡部@名古屋市工業研究所 と申します。
>
> Suzaku Starter Kit FPGA開発編の11章の内容を参考にVerilogモジュールをOPBバスにつなげて制御しようと試みております。
> [Suzaku:00751] にて中嶋様から問題ないとのコメントがありますが
> ペリフェラルをインポートする際に
> ERROR:HDLParsers:820 - "C:/ipif2/pcores/serial/hdl/vhdl/serial.vhd" Line
> 425. Type of actual ports is not compatible with type of ports of
> user_logic.
> ERROR:MDT - Parse Errors encountered in HDL source
> となりインポートができません。
>
> serial.vhd がトップでuser_logic.v をインスタンシエーションしているのですが
> user_logic.v のインターフェースは
>
> module user_logic
> (
> xcs, // 追加した箇所
> sin, // 追加した箇所
>
> Bus2IP_Clk, // Bus to IP clock
> Bus2IP_Reset, // Bus to IP reset
> Bus2IP_Data, // Bus to IP data bus for user logic
> Bus2IP_BE, // Bus to IP byte enables for user logic
> Bus2IP_RdCE, // Bus to IP read chip enable for user
> logic
> Bus2IP_WrCE, // Bus to IP write chip enable for user
> logic
> IP2Bus_Data, // IP to Bus data bus for user logic
> IP2Bus_Ack, // IP to Bus acknowledgement
> IP2Bus_Retry, // IP to Bus retry response
> IP2Bus_Error, // IP to Bus error response
> IP2Bus_ToutSup // IP to Bus timeout suppress
> ); // user_logic
>
> output xcs;
> output sin;
> // 以下略
>
> で、serial.vhd で
>
> USER_LOGIC_I : component user_logic.v
> generic map
> (
> -- 省略
> )
> port map
> (
> xcs => xcs, -- ここで上記エラーが生ずる
> sin => sin,
>
> -- 以下省略
>
> どこかでVHDLファイルにおいてVerilogモジュールをインスタンスかする必要が出てくると
> 思うのですが、どのように行えばよいかお教えいただけると幸いです。
>
位置はそのままでよさそうです。
若干書き方が違うかも?
以下のような書き方ではいかがでしょうか。
architecture IMP of XXX is
component user_logic is
port (
xcs : in std_logic;
sin : in std_logic
);
end component;
begin
user_logic_0 : user_logic
port map (
xcs => xcs,
sin => sin
);
end IMP;
色々な書き方があるので私の書き方も正確ではないかもしれませんが。。
他にエラーになりうる、思い当たるの点は以下の通りです。
verilogファイルは
C:/ipif2/pcores/serial/hdl/verilog/
以下に保存する
mpdファイルで以下のように記載
OPTION HDL = MIXED
以上よろしくお願いします。
suzaku メーリングリストの案内