96SEO 2026-02-20 01:54 10
#xff08;1#xff09;有两个transactio…前言

这里以UVM实战张强第二章为基础修改原有的DUT将DUT修改为加法器从而修改代码以使得更加深入的了解各个组件的类型和使用。
1有两个transaction一个为transaction_i一个为transaction_o由于DUT的输入输出值并不相同输入为a,b,cin输出为sum,cout。
所以这里使用两个transaction尤为注意my_model的输出需要使用transaction_o来运输。
2使用了两个monitor一个为monitor_i一个为monitor_o
3使用了两个agent一个为agent_i一个为agent_o这样写is_active就不需要使用了
vif;uvm_component_utils(my_driver)function
null);super.new(name,parent);endfunctionvirtual
phase);super.build_phase(phase);if(!uvm_config_db#(virtual
my_if)::get(this,,vif,vif))uvm_fatal(my_driver,virtual
my_driver::mian_phase(uvm_phase
1b0;while(1)beginseq_item_port.get_next_item(req);drive_one_pkt(req);seq_item_port.item_done();end
my_driver::drive_one_pkt(my_transcation_i
cin;uvm_object_utils_begin(my_transaction_i)uvm_field_int(a,UVM_ALL_ON)uvm_field_int(b,UVM_ALL_ON)uvm_field_int(cin,UVM_ALL_ON)uvm_object_utils_endfunction
my_transaction_i);super.new();endfunction
my_transaction_o)super.new();endfunction
parent);super.new(name,parent);endfunctionuvm_component_utils(my_sequencer)
ap;uvm_component_utils(my_monitor_i)function
null);super.new(name,parent);endfunctionvirtual
phase);super.build_phase(phase);if(!uvm_config_db#(virtual
my_if)::get(this,,vif,vif))uvm_fatal(my_monitor,virtual
my_monitor::main_phase(uvm_phase
begintr.new(tr);collect_one_pkt(tr);ap.write(tr);end
my_monitor::collcet_one_pkt(my_transaction_i
null);super.new(name,parent);endfunctionvirtual
phase);super.build_phase(phase);if(!uvm_config_db#(virtual
my_if)::get(this,,vif,vif))uvm_fatal(my_monitor,virtual
collcet_one_pkt(my_transaction_i
new(tr)collcet_one_pkt(tr);ap.write(tr);end
my_monitor::collcet_one_pkt(my_transction_o
tr);uvm_info(my_monitor_o,begin
vif.cout;uvm_info(my_monitor_o,end
parent);super.new(name,parent);endfunctionextern
phase);uvm_component_utils(my_agent_i)
my_agent_i::build_phase(uvm_phase
phase);super.build_phase(phase);sqr
my_sequencer::type_id::create(sqr,this);drv
my_driver::type_id::create(drv,this);mon_i
my_monitor_i::type_id::create(mon_i,this);
my_agent_i::conncet_phase(uvm_phase
phase);super.conncet_phase(phase);drv_seq_item_port.conncet(sqr.seq_item_export);ap
parent);super.new(name,parent);endfunctionextern
phase);uvm_component_utils(my_agent_o)
my_agent_o::build_phase(uvm_phase
phase);super.build_phase(phase);mon_o
my_monitor_o::type_id::create(mon,this);
my_agent_o::conncet_phase(uvm_phase
phase);super.conncet_phase(phase);ap
uvm_component;uvm_blocking_get_port
phase);uvm_component_utils(my_model)
parent);super.new(name,parent);
my_model::build_phase(uvm_phase
phase);super.build_phase(phase);port
sum_total;super.main_phase(phase);while(1)beginport.get(tr);tr2
sum_total[8];uvm_info(my_model,
UVM_LOW)new_tr.print();ap.write(tr2);end
expect_queue[$];uvm_blocking_get_port
act_port;uvm_component_utils(my_scoreboard)extern
my_scoreboard::build_phase(uvm_phase
phase);super.build_phase(phase);exp_port
my_scoreboard::main_phase(uvm_phase
result;super.main_phase(phase);fork
beginexp_port.get(get_expect);expect_queue.push_back(get_expect);endwhile
beginact_port.get(get_actual);if(expect_queue.size()
expect_queue.pop_front();result
get_actual.compare(tmp_tran);if(result)
is);tmp_tran.print();$display(***
is);get_actual.print();endendelse
null);super.new(name,parent);endfunctionextern
phase);uvm_component_utils(base_test)
base_test::build_phase(uvm_phase
phase);super.build_phase(phase);env
base_test::report_phase(uvm_phase
err_num;super.report_phase(phase);server
server.get_severity_count(UVM_ERROR);if
agt_scb_fifo;uvm_tlm_analysis_fifo
agt_mdl_fifo;uvm_tlm_analysis_fifo
phase);super.build_phase(phase);i_agt
my_agent_i::type_id::create(i_agt,
my_agent_o::type_id::create(o_agt,
my_scoreboard::type_id::create(scb,
phase);uvm_component_utils(my_env)
my_env::connect_phase(uvm_phase
phase);super.connect_phase(phase);i_agt.ap.connect(agt_mdl_fifo.analysis_export);mdl.port.connect(agt_mdl_fifo.blocking_get_export);mdl.ap.connect(mdl_scb_fifo.analysis_export);scb.exp_port.connect(mdl_scb_fifo.blocking_get_export);o_agt.ap.connect(agt_scb_fifo.analysis_export);scb.act_port.connect(agt_scb_fifo.blocking_get_export);
#(my_transaction_i);my_transaction_i
case0_sequence);super.new(name);endfunction
starting_phase.raise_objection(this);repeat
beginuvm_do(m_trans)end#100;if(starting_phase
starting_phase.drop_objection(this);endtaskuvm_object_utils(case0_sequence)
null);super.new(name,parent);endfunction
my_case0::build_phase(uvm_phase
phase);super.build_phase(phase);uvm_config_db#(uvm_object_wrapper)::set(this,
case0_sequence::type_id::get());
.rst_n(rst_n),.a(input_if.a),.b(input_if.b),.cin(input_if.cin),.enable(input_if.enable).sum(output_if.sum),.cout(output_if.cout));initial
input_if);uvm_config_db#(virtual
input_if);uvm_config_db#(virtual
作为专业的SEO优化服务提供商,我们致力于通过科学、系统的搜索引擎优化策略,帮助企业在百度、Google等搜索引擎中获得更高的排名和流量。我们的服务涵盖网站结构优化、内容优化、技术SEO和链接建设等多个维度。
| 服务项目 | 基础套餐 | 标准套餐 | 高级定制 |
|---|---|---|---|
| 关键词优化数量 | 10-20个核心词 | 30-50个核心词+长尾词 | 80-150个全方位覆盖 |
| 内容优化 | 基础页面优化 | 全站内容优化+每月5篇原创 | 个性化内容策略+每月15篇原创 |
| 技术SEO | 基本技术检查 | 全面技术优化+移动适配 | 深度技术重构+性能优化 |
| 外链建设 | 每月5-10条 | 每月20-30条高质量外链 | 每月50+条多渠道外链 |
| 数据报告 | 月度基础报告 | 双周详细报告+分析 | 每周深度报告+策略调整 |
| 效果保障 | 3-6个月见效 | 2-4个月见效 | 1-3个月快速见效 |
我们的SEO优化服务遵循科学严谨的流程,确保每一步都基于数据分析和行业最佳实践:
全面检测网站技术问题、内容质量、竞争对手情况,制定个性化优化方案。
基于用户搜索意图和商业目标,制定全面的关键词矩阵和布局策略。
解决网站技术问题,优化网站结构,提升页面速度和移动端体验。
创作高质量原创内容,优化现有页面,建立内容更新机制。
获取高质量外部链接,建立品牌在线影响力,提升网站权威度。
持续监控排名、流量和转化数据,根据效果调整优化策略。
基于我们服务的客户数据统计,平均优化效果如下:
我们坚信,真正的SEO优化不仅仅是追求排名,而是通过提供优质内容、优化用户体验、建立网站权威,最终实现可持续的业务增长。我们的目标是与客户建立长期合作关系,共同成长。
Demand feedback