等效于 VHDL 中的#ifdef 用于模拟/综合分离? [英] Equivalent of #ifdef in VHDL for simulation/synthesis separation?

查看:42
本文介绍了等效于 VHDL 中的#ifdef 用于模拟/综合分离?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了简化模拟波的视觉阅读,我想将一些信号分配给XXXX",但仅限于模拟时,因此我希望逻辑综合工具(在我的情况下为 ISE)跳过这些指令.

In order to ease the visual reading of simulation waves, I would like to assign some signals to "XXXX", but only at simulation time, and thus I want the logical synthesis tool (ISE in my case) to skip those instructions.

这里有两个问题:

  1. 是否有与#ifdef SIMULATION_TIME 等效的技术,例如在 C 中?
  2. 分配给XXXX"是否会对逻辑综合产生任何影响(重置为 0?警告?没有?).如果它根本没有影响,那么我的问题就得到了回答.如果没有,我仍然需要分配给XXXX"...

谢谢.

推荐答案

(1) 您正在寻找

--pragma synthesis_off
  -- your simulation-only code
--pragma synthesis_on

(2) 您可能会从 ISE 收到一些警告,尤其是当这些信号驱动逻辑时.在使用信号之前,请确保信号具有定义的值.这个方法应该也能用.

(2) You might get some warnings from ISE, especially when these signals drive logic. Just make sure, that the signals have a defined value before you use them. This method should work then, as well.

这篇关于等效于 VHDL 中的#ifdef 用于模拟/综合分离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆