微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > FPGA,CPLD和ASIC > Failed to find 'count10' in hierarchical name /count10.

Failed to find 'count10' in hierarchical name /count10.

时间:10-02 整理:3721RD 点击:
Failed to find 'count10' in hierarchical name /count10.
是这样的,想做一个时钟,count10.v,count6.v,count24.v是计数的
大概是这样的
module count6(count,out,clk,rst);
input clk,rst;//6?
output[2:0] count;//?
output out;//out?
reg out;
reg[2:0] count;
always@(posedge clk,posedge rst)
begin
    if(rst)
    begin
        count<=0;
        out<=0;
    end
    else if(count==5)
    begin
        count<=0;
        out<=1;
    end
    else
    begin
        count<=count+1;
        out<=0;
    end
end
endmodule
在clock.v里面用到了上面三个东西
这么用的
always@(posedge clk or posedge rst)
begin
count6(count,out,clk,rst);

end

自己写了测试代码,
用modelsim做simulate的时候,就出现Failed to find 'count10' in hierarchical name /count10. 这类错误
用了·include “count6.v”这些也没有用
请问这这么解决?初学者实在弄不明白了
另外上面提到的东西全放在一个文件夹下

你需要认真读书,看看怎么例化module.


是这么写吧 count10 a(.......);
还有一个错误,clock里面不应该用always
现在没问题了,多谢

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top