uvm uvm_tlm_fifo的使用
2014-11-11 15:35
239 查看
1,在env里边定义一个uvm_tlm_fifo接口,用于ref和qlen之间的通信接口
1), uvm_tlm_fifo #(date_structure) ref_qlen_fifo;
2), new();
ref_qlen_fifo = new("ref_qlen_fifo",this,0);
3), build_phase();
ref.put_fifo.connect(ref_qlen_fifo.put_export);
qlen.get_fifo.connect(ref_qlen_fifo.get_export);
2,在ref中定义一个uvm_blocking_put_port接口,用于put
1), uvm_blocking_put_port #(data_structure) put_fifo;
data_structure data_structure_inst;
2), new();
put_fifo = new("put_fifo",this,0);
3), main_phase();
put_fifo.put(data_structure_inst);
3,在qlen中定义一个uvm_blocking_get_port接口,用于get
1), uvm_blocking_get_port #(data_structure) get_fifo;
data_structure data_structure_inst;
data_structure data_structure_inst_local;
2), new();
get_fifo = new("get_fifo",this,0);
3), main_phase();
get_fifo.put(data_structure_inst);
data_structure_inst_local.copy(data_structure_inst); // 这一点很重要,取到值后,马上copy到本地,以防源端改变了该值。
data_structure_inst_local.qlen ..... //就可以用了
1), uvm_tlm_fifo #(date_structure) ref_qlen_fifo;
2), new();
ref_qlen_fifo = new("ref_qlen_fifo",this,0);
3), build_phase();
ref.put_fifo.connect(ref_qlen_fifo.put_export);
qlen.get_fifo.connect(ref_qlen_fifo.get_export);
2,在ref中定义一个uvm_blocking_put_port接口,用于put
1), uvm_blocking_put_port #(data_structure) put_fifo;
data_structure data_structure_inst;
2), new();
put_fifo = new("put_fifo",this,0);
3), main_phase();
put_fifo.put(data_structure_inst);
3,在qlen中定义一个uvm_blocking_get_port接口,用于get
1), uvm_blocking_get_port #(data_structure) get_fifo;
data_structure data_structure_inst;
data_structure data_structure_inst_local;
2), new();
get_fifo = new("get_fifo",this,0);
3), main_phase();
get_fifo.put(data_structure_inst);
data_structure_inst_local.copy(data_structure_inst); // 这一点很重要,取到值后,马上copy到本地,以防源端改变了该值。
data_structure_inst_local.qlen ..... //就可以用了
相关文章推荐
- 【引用】关于ALTERA提供的FIFO核使用原理
- Linux下C语言实现的简单使用线程向FIFO里写入与读取数据的例子
- linux FIFO的使用
- 【引用】关于ALTERA提供的FIFO核使用原理
- java中使用FIFO队列:java.util.Queue实现多台服务器发邮件的代码
- 工程中FIFO空,满,将空,将满标志使用
- FIFO 有名管道的使用
- 使用FIFO实现POSIX有名信号量
- dsp--28335的使用fifo的串口中断实验(一)
- 44b0 uart 启用FIFO 使用小体会
- 分支界定法:最大装载问题(使用FIFO)
- 使用open打开FIFO文件
- 使用FIFO策略缓存对象
- 分支界定法:最大装载问题,改进版(使用FIFO)
- 在Bash脚本中使用命名管道(FIFO)
- [Linux网络编程学习笔记]FIFO的创建和使用
- altera FIFO IP的使用
- IPC--------fifo的进阶使用
- Altera FIFO使用注意事项
- xilinx fifo核使用时注意的问题