简体   繁体   English

如何同步来自不同UVM代理的两个不相关的UVM序列项?

[英]How to synchronize two unrelated UVM sequence items from different UVM agents?

UVM Testbench方案

This is my scenario for verifying a Parity Encoder-Decoder DUT. 这是我用于验证奇偶校验编码器-DUT的方案。 Decoder Input agent here is the re-active agent and injects error into the data stream captured from Passive monitor in Encoder Output agent. 解码器输入代理在这里是反应性代理,它将错误注入到从编码器输出代理中的被动监视器捕获的数据流中。

Now I have sequence and sequence items separately for both encoder and decoder input agents. 现在,我分别为编码器和解码器输入代理提供了序列和序列项。 But how do I synchronize both the agents such that decoder re-active agent adds error and creates a new packet for every data in order. 但是如何同步两个代理,以使解码器反应性代理增加错误并按顺序为每个数据创建一个新数据包。

eg suppose encoder sends data in the order - 1000, 1010, 0100, 1011 and decoder re-active agent creates error packets in the order (one hot bit) - 0010, 1000, 0001, 0100. Now both create data packets unrelated to each other. 例如,假设编码器按-1000、1010、0100、1011的顺序发送数据,并且解码器响应代理按以下顺序(一个热比特)创建错误数据包-0010、1000、0001、0100。现在两者都创建与每个数据无关的数据包其他。 However the re-active agent should xor 1st data with its 1st packet like 1000 ^ 0010 even if it receives two data ie 1000 and 1010 together from the passive agent monitor. 但是,即使被动代理从被动代理监视器一起接收到两个数据(即1000和1010),也应将第一数据与其第一个数据包(例如1000 ^ 0010)进行异或。 Also since both agents are generating items, decoder should not send an item before it receives data from encoder agent (via passive encoder agent monitor). 同样,由于两个代理都在生成项目,因此解码器在从编码器代理接收数据之前(通过无源编码器代理监视器)不应发送项目。

One options is to use config_db to put the endcoder transaction there and get it from decoder re-active agent. 一种选择是使用config_db将内编码器事务放在此处,并从解码器反应性代理获取它。 Which I think is not nice way. 我认为这不是好方法。 Another option is to have virtual sequence, which includes the encoder and decoder sequences, gets the encoder packet and provides to decoder sequence. 另一个选择是具有虚拟序列,其中包括编码器和解码器序列,获取编码器数据包并提供给解码器序列。

I think, you want to use the lockign mechanism between different objects. 我认为,您想在不同对象之间使用lockign机制。

You can use the IPC (Interprocess Communication) methods to control that, like events, mailboxes, semaphores. 您可以使用IPC(进程间通信)方法来控制它,例如事件,邮箱,信号灯。

In UVM, the advanced methods are available, like uvm_event , TLM FIFOs , which can be used in your purpose. 在UVM中,可以使用高级方法,例如uvm_eventTLM FIFOs ,它们可以用于您的目的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM