- 1. 为了实现A component和B component之间的通信,提出TLM机制,TLM可以实现A component和B component在特定的通道传输,且支持阻塞和非阻塞传输
- 2. port和export是以控制流为区分点,而不是数据流,比如,数据流为B>A,但是控制命令是A>B,port端口是A,export端口是B
- 3. import和port export声明的区别是多一个component参数
![]()
![]()
![]()
- 4. 使用方法为:
①在A component中声明port端口,build phase例化,main phase调用import所在组件声明的put/get/transport等task/function
②在B component中声明export import端口,build phase例化,声明put/get/transport等task/function,connect phase中连接export import
③在A component和B component的上一级component的connect phase连接pot export
④如果是阻塞,B component中可以声明task/function;如果是非阻塞,B component中仅可以声明function
⑤connect函数的是由port端口调用的,参数为export端口
⑥A component中如果声明的是blocking类型的port,B component也应该对应声明为blocking类型的export/import,即A和B中的端口类型应该匹配
⑦port和export相连时,export需要连接import,否则会报错
- 5. analysis port有广播的作用,可以连接多个analysis import,因为其广播特性,不用等待与其相连端口的响应,所以不存在阻塞或者非阻塞。analysis import中仅需要定义一个write函数
- 6. scb中既要接收monitor的数据,又要接收reference model的数据,所以需要在scb中定义两个import,但是scb中调用write函数时,怎么确定是调用的monitor还是reference model的函数?为此,引入uvm_analysis_imp_decl声明后缀,且scb 中write函数加入uvm_analysis_imp_decl声明的后缀。然后当与monitor_imp相连的analysis_port执行write函数时,会自动调用write_monitor函数,与model_imp相连的analysis_port执行write函数时,会自动调用write_model函数。

- 7. scb和monitor所在的agent是同一层次的,所以scb和monitor不在同一层次,使用TLM通信,存在跨层次传输的问题。建议使用的方法是,在agent中声明一个ap,但是不实例化它,让其指向monitor的ap,然后在env中将agent ap和scb imp连接。

2568



被折叠的 条评论
为什么被折叠?



