网络实例化问题

发布于 2024-09-29 18:47:52 字数 2564 浏览 6 评论 0原文

我有一个非常简单的状态机,它设置一些控制信号来与第三方 IP 交互。代码大致如下:

entity testip is
  port (
  ...
    fifo_dataout        : in  std_logic_vector(0 to 31);
    ip_dataout          : in  std_logic_vector(0 to 31);
    ip_ce                 : out std_logic;
    ip_we                : out std_logic;
    ip_datain            : out std_logic_vector(0 to 31);
  );
end entity testip;

architecture imp of testip is

  signal ip_ce_ns     : std_logic;
  signal ip_we_ns     : std_logic;
  signal ip_ce_cs     : std_logic;
  signal ip_we_cs     : std_logic;
  signal ip_dataout_i : std_logic_vector(0 to 31);
  ...

  attribute keep: string;
  attribute keep of ip_ce    : signal is "True";
  attribute keep of ip_we    : signal is "True";

  begin

  COMB : process (...)
      begin
        ip_ce_ns          <= ip_ce_cs;
        ip_we_ns          <= ip_we_cs;

     case ip_nstate_cs is
        when IDLE      =>
        ...

     end case;
 end process COMB;

 REG: process (Clk) is
   begin
      if (Clk'event and Clk = '1') then
         if (Rst = '1') then
              ip_ce_cs                <= '1';
              ip_we_cs                <= '1';
              ...
         else          
              ip_ce_cs                <= ip_ce_ns;
              ip_we_cs                <= ip_we_ns;
              ...
         end if;
    end if;
 end process REG;

S0:     ip_ce                 <= ip_ce_cs;
S1:     ip_we                <= ip_we_cs;
S2:     ip_datain           <= fifo_dataout;
S3:     ip_dataout_i       <= Ip_dataout;

end architecture imp;

Sythesis 工作正常,但是,当应用以下约束文件时,我收到 ERROR:ConstraintSystem:59 - NET“testip/ip_we”未找到。 testip/ip_datain 和 testip/ip_ce 也会发生同样的情况。

 Net testip/ip_datain<*> MAXDELAY = 2 ns;
 Net testip/ip_ce MAXDELAY = 2 ns;
 Net testip/ip_we MAXDELAY = 2 ns;

我检查了网表,确实没有 testip/ip_we、testip/ip_ce 和 testip/ip_datain 网络。任何人都知道为什么其他网络不在网表中,这一切都非常令人困惑。

非常感谢您的任何反馈!

编辑:请参阅顶部模块文件中附加的详细实例化:

icap0 : entity icap.hwicap
    generic map (pindex => 2, paddr => 2, pmask => 16#FFE#, C_SIMULATION => 2,
           C_FAMILY => "virtex5")
    port map (rst => rstn, clk => clkm, apbi => apbi, apbo => apbo(2));


Net icap0/icap_statemachine_I1/Icap_datain<*> MAXDELAY = 2 ns;
Net icap0/icap_statemachine_I1/Icap_ce MAXDELAY = 2 ns;
Net icap0/icap_statemachine_I1/Icap_we MAXDELAY = 2 ns;

这应该可以完成工作,但是在查看网表并查找信号 Icap_ce 时 或 Icap_we 它们根本就不存在。我只是认为这些网不存在或已被重命名,因此我无法再找到它们。谢谢

I have a very simple statemachine that sets some control signals to interact with a third party IP. The code looks roughly as follows:

entity testip is
  port (
  ...
    fifo_dataout        : in  std_logic_vector(0 to 31);
    ip_dataout          : in  std_logic_vector(0 to 31);
    ip_ce                 : out std_logic;
    ip_we                : out std_logic;
    ip_datain            : out std_logic_vector(0 to 31);
  );
end entity testip;

architecture imp of testip is

  signal ip_ce_ns     : std_logic;
  signal ip_we_ns     : std_logic;
  signal ip_ce_cs     : std_logic;
  signal ip_we_cs     : std_logic;
  signal ip_dataout_i : std_logic_vector(0 to 31);
  ...

  attribute keep: string;
  attribute keep of ip_ce    : signal is "True";
  attribute keep of ip_we    : signal is "True";

  begin

  COMB : process (...)
      begin
        ip_ce_ns          <= ip_ce_cs;
        ip_we_ns          <= ip_we_cs;

     case ip_nstate_cs is
        when IDLE      =>
        ...

     end case;
 end process COMB;

 REG: process (Clk) is
   begin
      if (Clk'event and Clk = '1') then
         if (Rst = '1') then
              ip_ce_cs                <= '1';
              ip_we_cs                <= '1';
              ...
         else          
              ip_ce_cs                <= ip_ce_ns;
              ip_we_cs                <= ip_we_ns;
              ...
         end if;
    end if;
 end process REG;

S0:     ip_ce                 <= ip_ce_cs;
S1:     ip_we                <= ip_we_cs;
S2:     ip_datain           <= fifo_dataout;
S3:     ip_dataout_i       <= Ip_dataout;

end architecture imp;

Sythesis works fine, however, when applying the following constraint file I get ERROR:ConstraintSystem:59 - NET "testip/ip_we" not found. The same occurs for testip/ip_datain and testip/ip_ce.

 Net testip/ip_datain<*> MAXDELAY = 2 ns;
 Net testip/ip_ce MAXDELAY = 2 ns;
 Net testip/ip_we MAXDELAY = 2 ns;

I checked the netlist, and indeed there is neither a testip/ip_we, a testip/ip_ce nor a testip/ip_datain net. Anyone an idea why the other nets are not in the netlist, all very confusing.

Many thanks for any feedback!

EDIT: Please see attached the detailed instantiation in the top module file:

icap0 : entity icap.hwicap
    generic map (pindex => 2, paddr => 2, pmask => 16#FFE#, C_SIMULATION => 2,
           C_FAMILY => "virtex5")
    port map (rst => rstn, clk => clkm, apbi => apbi, apbo => apbo(2));


Net icap0/icap_statemachine_I1/Icap_datain<*> MAXDELAY = 2 ns;
Net icap0/icap_statemachine_I1/Icap_ce MAXDELAY = 2 ns;
Net icap0/icap_statemachine_I1/Icap_we MAXDELAY = 2 ns;

This should do the job, but when looking at the netlist and looking for signals Icap_ce
or Icap_we they are just non-existent. I just think these nets are not there or have been renamed so that I cant find them anymore. Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

瀟灑尐姊 2024-10-06 18:47:52

信号可能已被优化掉......看起来您有一个生成 ip_ce 的线环,并且您正在使用不存在的 fifo_dataout 驱动 ip_datain 。您没有表明您的目标是什么,但现代 FPGA 综合默认情况下非常积极地删除未使用/未驱动的逻辑,通常在日志中只显示信息或警告消息。爬行您的综合日志并查找与您正在寻找的信号相关的任何奇怪内容。

The signals were probably optimized away...it looks like you have a wire loop generating ip_ce and you're driving ip_datain with the non-existant fifo_dataout. You don't indicate what you're targeting, but modern FPGA synthesis are by default very aggressive at removing unused/undriven logic, typically with nothing more than an info or warning message in the log. Crawl through your syntheses logs and look for anything odd related to the signals you're looking for.

走野 2024-10-06 18:47:52

正如查尔斯所说,你的信号可能正在被优化掉。

如果您将综合属性设置为保留层次结构,那么您的端口将得到维护(但您会错过一些优化)。

我猜你对信号的关注并不像对时间的关注那么重要。在这种情况下,请在约束中使用起点和终点,而不是网络名称。

或者,您可以在源代码中的信号上设置 keep 属性。这当然会降低源代码的可移植性。我的建议是使用起点和终点。

testip是你的顶级水平吗?如果没有尝试

Net "*/testip/ip_ce" MAXDELAY = 2 ns;

是否检测到该网络?

Net "*/testip/ip_ce_cs" MAXDELAY = 2 ns;

实际上,我错过了一些更明显的东西,testip 实例的名称是什么?在您的约束中使用它而不是测试提示。即

u_test_ip : testip

然后

Net "*/u_test_ip/ip_ce" MAXDELAY = 2 ns;

As Charles says, your signals are probably being optimized away.

If you set the synthesis attribute to preserve hierarchy, then your ports will be maintained (but you miss out on some optimizations).

I guess you aren't really as bothered about the signals as your are about the timing. In which case, use a start and end point, rather than a net name in your constraints.

Alternatively, you can set the keep attribute on the signals in the source code. That can of course make your source code less portable. My recommendation would be to use start and end points.

Is testip your top level? If not try

Net "*/testip/ip_ce" MAXDELAY = 2 ns;

is this net detected?

Net "*/testip/ip_ce_cs" MAXDELAY = 2 ns;

Actually, I've missed something more obvious, what is the name of the instance of testip? Use that instead of testip in your constraint. i.e.

u_test_ip : testip

then

Net "*/u_test_ip/ip_ce" MAXDELAY = 2 ns;
生生漫 2024-10-06 18:47:52

我认为 keep 属性区分大小写,您是否尝试过 "true" 而不是 "True"

I think the keep attribute is case-sensitive, have you tried "true" rather than "True"?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文