VHDL顶层调用Verilog模块(转)

VHDL调用Verilog模块的时候,要在实例化模块前,加上“verilogmodelGM: ”
VHDL调用verlog:

verilog module:     //Verilog 底层文件里的端口声明
module m(a,b,c);
input a,b;
output c;
...
endmodule
 
                                                   
调用如下:           
compoent m          --VHDL 顶层文件里的原件例化
port(
                        a: in std_logic;
                        b: in  std_logic;
                        c: out std_logic
                      );
end compoent


begin
                                 --VHDL顶层文件里的映射
verilogmodelGE: m          
                          //(我自己实验的不用也可以,用了反而有错误,估计是软件变聪明了~)--对这句话保留意见 zjw       
port map
(...
)
...
end

在VHDL里调用Verilog的话:例化+映射
在Verilog里调用VHDL的话:只要映射

你可能感兴趣的:(FPGA)