【问题标题】:System Verilog Model inside VHDL TestBench, Real port issueVHDL TestBench 中的系统 Verilog 模型,真实端口问题
【发布时间】:2014-09-22 13:15:22
【问题描述】:

我有一个带有真实输入的 SV 子块:

`include "Components.sv"

    module EPO_REG #(parameter bit ExtIso = 1, real th_high = 5.5 , real th_low = 4.2)(input bit EPO_SETPOINT, NVC_PMOS_ON, NVC_NMOS_ON ,**input var real IVcc5, Viso, Vcc5_ext** ,output real EpoPower, Vcc5, IEPO);

     real Iin;
     real Vout;
     real Vcap;
     real Ids_nmos;
    ...........
    ...........

例如,我以这种方式将此块放在 VHDL 顶层(或 Testbench)中:

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
USE IEEE.MATH_REAL.ALL;

entity EPO_REG_WRAP is

    GENERIC (
      ExtIso     : bit := '1';   
      th_high    : REAL := 5.5;   
      th_low     : REAL := 4.2   
      );
    PORT (
      NVC_PMOS_ON  : IN  STD_LOGIC;
      NVC_NMOS_ON  : IN  STD_LOGIC;
      EPO_SETPOINT : IN  STD_LOGIC; 
      Vcc5_ext     : IN  REAL;
      IVcc5        : IN  REAL;
      Viso         : IN  REAL;
      Vcc5         : OUT REAL;  
      EpoPower     : OUT REAL;  
      IEPO         : OUT REAL 
      );
end;

architecture beh of EPO_REG_WRAP is

COMPONENT EPO_REG  
    GENERIC (
      ExtIso     : bit := '1';   
      th_high    : REAL := 5.5;   
      th_low     : REAL := 4.2   
      );
    PORT (
      NVC_PMOS_ON  : IN  STD_LOGIC;
      NVC_NMOS_ON  : IN  STD_LOGIC;
      EPO_SETPOINT : IN  STD_LOGIC; 
      Vcc5_ext     : IN  REAL;
      IVcc5        : IN  REAL;
      Viso         : IN  REAL;
      Vcc5         : OUT REAL;  
      EpoPower     : OUT REAL;  
      IEPO         : OUT REAL  
      );
end component;

begin

UEPO_REG: EPO_REG 
        GENERIC MAP(
          ExtIso     => '1',   
          th_high    => 5.5,  
          th_low    => 4.2 
        )
        PORT MAP(
            NVC_PMOS_ON  => NVC_PMOS_ON,
            NVC_NMOS_ON  => NVC_NMOS_ON,
            EPO_SETPOINT => EPO_SETPOINT,
            Vcc5_ext         => Vcc5_ext,
            IVcc5 => IVCC5,
            Viso => Viso,
            EpoPower => EpoPower,
            Vcc5 => Vcc5,
            IEPO => IEPO
        );

end;

但我在阐述过程中遇到以下错误:

ncelab: *E,MAINVR: Mapping of Verilog var port of mode IN with VHDL port/signal of entity/component 'VCC5_EXT' (File : EPO_REG_WRAP.vhd, line: 42, position: 13) is not supported.
ncelab: *E,MAINVR: Mapping of Verilog var port of mode IN with VHDL port/signal of entity/component 'IVCC5' (File : EPO_REG_WRAP.vhd, line: 43, position: 10) is not supported.
ncelab: *E,MAINVR: Mapping of Verilog var port of mode IN with VHDL port/signal of entity/component 'VISO' (File :EPO_REG_WRAP.vhd, line: 44, position: 9) is not supported.

据我所知,SV 支持端口上的实际值。我做错了什么?

【问题讨论】:

    标签: vhdl system-verilog


    【解决方案1】:

    当文件设置为 SystemVerilog 时,我可以使用 Cadence (irun) Incisive 13.01 解析以下内容,方法是为文件提供 .sv 扩展名。

    module EPO_REG #(
      parameter bit ExtIso = 1, 
      real th_high = 5.5 ,
      real th_low = 4.2
    )(
      input bit EPO_SETPOINT, NVC_PMOS_ON, NVC_NMOS_ON ,
      input var real IVcc5, Viso, Vcc5_ext,
      output real EpoPower, Vcc5, IEPO);
    endmodule
    

    【讨论】:

    • 好的,但是你有 VHDL 顶部吗?一旦文件从 VHDL 顶部获得真实信号,问题就会出现。
    • 您是否发布了我可以尝试的有效代码(我不使用 VHDL)? Verilog 示例有部分意味着必须对其进行修改,以便我可以检查它。我只是在验证 SystemVerilog 可以具有真实端口,并且您编写它的方式是有效的。因为我通常在每个参数之前定义参数或在每个端口之前定义输入/输出。
    • 是的 VHDL 完整且有效。我遇到的问题是在 SV 和 VHDL 之间的边界
    【解决方案2】:

    我通过从 SV-2008 切换到 SV-2012 解决了问题。

    SV-2008 不允许从真实网络驱动,但它只管理变量。 SV-2012 允许管理信号。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多