0

我在我的项目中使用 e (specman)。我为uart构建了验证环境。我有一个类似于any_sequence_item命名的结构uart_frame_s.

我想为 uart 中的 tx 添加记分牌。我在以下实例中uart_tx_agent

uart_monitor: uart_tx_monitor_u is instance;

记分牌的定义:

unit uart_tx_scoreboard_u like uvm_scoreboard{
scbd_port frame_add : add uart_frame_s;
scbd_port frame_match : match uart_frame_s;
};

我尝试通过以下方式连接:

connect_ports() is also {
      uart_monitor.uart_frame_s_started.connect(tx_scb.uart_frame_s_add);
      uart_monitor.uart_frame_s_ended.connect(tx_scb.uart_frame_s_match);
};

其中: uart_scb(记分板)是 uart_tx_agent 中的实例

监视器中 TLM 端口的定义:

uart_frame_s_started : out iterface_port of tlm_analysis of uart_frame_s is instance;
uart_frame_s_ended : out iterface_port of tlm_analysis of uart_frame_s is instance;

我收到以下错误:错误:'uart_monitor'('uart_tx_monitor_u')没有'uart_frame_S_started'字段...。错误:'uart_monitor'('uart_tx_monitor_u')没有'uart_frame_S_ended'字段

4

1 回答 1

0

根据您上面提供的信息,我可以得出以下结论:

1.e记分板带有预定义的TLM实现端口,您需要将监视器TLM输出端口连接到。您似乎没有在监视器中定义TLM端口。请在连接到记分牌时根据需要定义这些 TLM 端口(记分牌文档中有相关示例)。我的建议是,一旦你完成从总线收集帧,发出一个通知帧已完成的事件(我猜你可以称之为“uart_frame_s_endded”),然后在该事件发出时,将收集到的帧发送到计分板通过监视器的 TLM 输出端口进行添加/匹配。(我猜“添加”适用于 UART tx)。

  1. 如果定义了端口,请确保在解析器将在端口定义之后读取的代码中使用 connect_portS() 函数。

仅供参考:

  1. 似乎您从代理中定义了记分牌。(似乎 tx_scbd 和 uart_monitor 在同一层次结构下。将系统级组件(记分板)放入 uVC(在本例中是 UART 接口组件)被认为是“不好的做法”。

希望这有帮助

于 2017-12-28T03:23:58.627 回答