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

Error : fail to find 'glbl' in hierarchical name?

时间:10-02 整理:3721RD 点击:
如题。谢谢

Are you running behavioral simulation with Xilnx verilog models? If so, you have to compile the "glbl.v" file in $Xilinx/verilog/src directory before running the simulation.



    i compiled all the Xilinx lib files,special the glbl.v

To my memory, you have to load all top module(s) for some old simulators. If the top module name of your testbench is called "testbench" and you have compiled both "testbench.v" and "glbl.v", then you should run
  vsim testbench glbl
rather than
  vsim testbench



    en,u are right,thanks.
i have another question.
code : reg [4:0]data;
...
          if (data[4] == 1'b1)
          begin
                 tmp <= a;
          end
          else if (data[3] == 1'b1)
          begin  
                 tmp <= b;
          end
          ...
          else if (data[0] == 1'b1)
          begin
                 tmp <= e;
          end
          ...
i think this is not a good coding and when data == 5'b11111,the DC's result may be different.
what about your idea?

That is a priority encoder. I think it is OK if you want it to be that way.



    thanks.
but i think it's better to use case clause for it.

It would be easier to read the casez or casex statements. For a priority encoder, the resultant synthesized netlist will be the same.

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

网站地图

Top