OVM & UVM Techniques for On-the-fly Reset

Slides:



Advertisements
Similar presentations
SPL/2010 Test-Driven Development (TDD) 1. SPL/
Advertisements

VERILOG: Synthesis - Combinational Logic Combination logic function can be expressed as: logic_output(t) = f(logic_inputs(t)) Rules Avoid technology dependent.
CS 3850 Lecture 6 Tasks and Functions. 6.1 Tasks and Functions Tasks are like procedures in other programming languages. e. g., tasks may have zero or.
Combinational Logic.
Give qualifications of instructors: DAP
ECE 551 Digital System Design & Synthesis Lecture 09 Synthesis of Common Verilog Constructs.
Spring 20067W. Rhett Davis with minor modifications by Dean Brock ECE 406 at UNASlide 1 ECE 406 Design of Complex Digital Systems Lecture 10: 9: State.
Process Description and Control Chapter 3. Major Requirements of an Operating System Interleave the execution of several processes to maximize processor.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
ELEN 468 Lecture 91 ELEN 468 Advanced Logic Design Lecture 9 Behavioral Descriptions III.
ELEN 468 Lecture 161 ELEN 468 Advanced Logic Design Lecture 16 Synthesis of Language Construct II.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Overview Logistics Last lecture Today HW5 due today
Gaurav Gupta Freescale Semiconductors Adiel Khan, Parag Goel, Amit Sharma, Varun S, Abhisek Verma Synopsys
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
SoC Verification HW #2 TA: Wei-Ting Tu Assignment: 04/12/06
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
CS 346 – Chapter 4 Threads –How they differ from processes –Definition, purpose Threads of the same process share: code, data, open files –Types –Support.
Assertions Jean-Michel Chabloz. Assertions basic Idea We assert that a certain “thing” should be true. –If it is true, fine –If it is false, then we get.
SVA Encapsulation in UVM enabling phase and configuration aware assertions by Mark Litterick Verification Consultant Verilab GmbH, Munich, Germany.
M.Mohajjel. Structured Procedures Two basic structured procedure statements always initial All behavioral statements appear only inside these blocks Each.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
Verilog® HDL Behavioral Modeling (2)
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
1 Chapter 11 Global Properties (Distributed Termination)
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 9: State Machines & Reset Behavior Spring.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Types of shedulars Process.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Verification for Ethernet second/first layer with 10 Gigabit Attachment Interface (XAUI) Matan Kacen Intel, ICG, LAD HW AV June 2005 Dr. Nissim Tsouri.
Structural Description
Gopakumar.G Hardware Design Group
System on Chip Design and Test ECE 715
IAY 0600 Digitaalsüsteemide disain
Last Lecture Talked about combinational logic always statements. e.g.,
Computer Architecture
‘if-else’ & ‘case’ Statements
Introduction to Triggers
IAY 0600 Digital Systems Design
5-High-Performance Embedded Systems using Concurrent Process (cont.)
Stitching UVM Test benches into Integration-Level
Example Best and Median Results
Stitching UVM Test benches into Integration-Level
Operating Systems Chapter 5: Input/Output Management
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
Verification Reuse Simple (relatively) reuse: Difficult reuse
Process Description and Control
SystemVerilog Implementation of GCD
332:437 Lecture 8 Verilog and Finite State Machines
Chapter 4: Behavioral Modeling
Test Fixture (Testbench)
Threads and Concurrency
COE 202 Introduction to Verilog
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Register-Transfer Level Components in Verilog
Lecture 9: Testbench and Division
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
SystemVerilog and Verification
Lecture 4: Continuation of SystemVerilog
ECE 551: Digital System Design & Synthesis
ECE 352 Digital System Fundamentals
Verilog Synthesis & FSMs
Process Description and Control in Unix
332:437 Lecture 8 Verilog and Finite State Machines
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Advanced Computer Architecture Lecture 3
Presentation transcript:

OVM & UVM Techniques for On-the-fly Reset By Muralidhara Ramalingaiah Boobalan Anantharaman Design Engineer Staff Sr. Design Engineer Sr. Cypress Semiconductors

Agenda On-The-Fly Reset What should happen? OVM Reset Techniques Issues with OVM Reset Techniques Solutions for OVM Reset Technique Issues UVM Reset Techniques OVM to UVM migration – Tips for reset Conclusion Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

On-The-Fly Reset When the DUT is reset during normal operation, the testbench must act accordingly and must not behave abnormally or give ambiguous results. Hard Reset Reset through External Reset I/O Soft Reset Reset through Firmware Register Write Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

What should happen? Following things should happen in Test bench Scoreboard variables should get reset Monitor should recognize it and qualify the transactions Coverage update logic should not trigger any transition coverage except reset coverage Driver should recognize it and stop transaction at right time Data Checkers should delete the transactions which are collected in FIFOs or QUEUEs Protocol Checkers should recognize On-the-fly reset Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

OVM Reset Techniques Scoreboard variables get reset by Reset Monitor event(s) Interface OVCs/Agents works independent of reset monitor event(s)   RESET monitor //reset event creation oep = oep.get_global_pool(); is_reset = oep.get("RESET_EVENT"); run() begin forever begin @(negedge rstagent_if_monitor.reset) is_reset.trigger(); end Scoreboard ovm_event_pool oep; ovm_event is_reset; forever begin //{ is_reset.wait_trigger(); register_map.reset(); end //} Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Issues with OVM Reset Techniques Drivers don’t recognize the on-the-fly reset in between transactions Issue 2 Irrespective of the on-the-fly reset, monitor will send data to scoreboard/coverage Issue 3 During on-the-fly reset, it is difficult control the sequencers of the sub-sequences from the virtual_sequence Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Issues with OVM Reset Techniques Contd.. Drivers don’t recognize the on-the-fly reset in between transactions Driver task run(); fork get_and_drive(); reset_signals(); join_none Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Issues with OVM Reset Techniques Contd.. Drive Task task get_and_drive(); @(wait for reset to finish); ovm_report_info(get_type_name(), "RESET DISABLE"); forever begin seq_item_port.get_next_item(req); //or try_next_item $cast(rsp, req.clone()); rsp.set_id_info(req); //If try next item then need to qualify is the item is there?? drive_transfer(rsp); // Advance clock @(posedge intf.cb); send_idle(rsp); seq_item_port.item_done(rsp); end endtask : get_and_drive Reset Task task reset_signals(); ovm_report_info(get_type_name(), "reset_signals ..."); // USER: Add implementation @(wait for reset); ovm_report_info(get_type_name(), "reset_happened ...",OVM_LOW); //Reset value of DAT_out intf.TB.cb.DAT_out <= 'b1; intf.clk_en = 'b0; endtask : reset_signals Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Issues with OVM Reset Techniques Contd.. Irrespective of the on-the-fly reset, monitor will send data to scoreboard/coverage Monitor //FOR Interface OVC MONITOR task run(); fork monitor_transactions(); //Reset Phase is Required to check reset_trascations(); //Reset join_none endtask // run Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Issues with OVM Reset Techniques Contd.. During on-the-fly reset, it is difficult control the sequencers of the sub-sequences from the virtual_sequence Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Agent with qualified clock approach Qualified data from monitor to Scoreboard/Coverage Solution 2 Stopping the sequencer from the sequence Solution 3 State Machine approach Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. Agent with qualified clock approach along with stopping the driver Qualified data from monitor to Scoreboard/Coverage IF block assign qclk = (sig_reset==1) ? clk:0; // Actual Signals // USER: Add interface signals clocking cb @(posedge qclk); DRIVER task run(); fork //Variable or event to say reset is there reset_t = RESET_DE; get_and_drive(); reset_signals(); join_none Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. Drive Task task get_and_drive(); //wait for the RESET event to complete to negedge of reset @(reset) reset_t = RESET_DE; //disable event or varibale fork forever begin seq_item_port.get_next_item(req); ovm_report_info(get_type_name(), "sequencer got next itemM"); drive_transfer(rsp);//Works on qualified clock @(posedge intf.clk);//normal clock seq_item_port.item_done(rsp); end  begin //Block to suspend the driver and say end of transfer(solution) if(reset_t==RESET_EN)begin ovm_report_info(get_type_name(), " FLY ON RESET"); this.end_tr(rsp); reset_t = RESET_DE; //drive_transfer.kill();//Never use this will make to hang drive_transfer.suspend();//Yes but still it will send data after reset end @(posedge intf.clk); end//forever join_none endtask : get_and_drive Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. Monitor  task run(); fork monitor_transactions(); reset_trascations();//To reset all monitor variables join_none endtask // run   Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. Monitor Task task monitor_transactions(); begin //wait for the RESET event to complete to negedge of reset @(Reset event);//From negative to positive  forever begin trans_collected = new(); @(posedge intf.cb); //ensure that wont send any data when there is no clock collect_transfer(); data_trans(); end if (checks_enable) // Check transaction perform_transfer_checks(); if (coverage_enable) // Update coverage perform_transfer_coverage(); // Publish to subscribers item_collected_port.write(trans_collected); endtask // monitor_transactions   task collect_transfer(); void'(this.begin_tr(trans_collected)); trans_collected.trans_kind = WRITE; //DATA1 @(posedge intf.cb);//qualified clock data.push_back(intf.TB.cb.DAT_out); end task Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. Waveform: No data transfer during the reset from agent, by ensuring that no clock in the driver block; but reset driving logic works fine Limitation: During reset, driver wont drive anything. But if the driver has some wait like @posedge of some signals, then driver will run that signals again before suspending the driver task which leads to malfunction of driver/monitor and AP Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. Stopping the sequencer from the sequence Limitation: Verification Engineer should know when to stop the sequencer from the test case Driver task Uart_Irdi_master_driver::run(); fork get_and_drive(); reset_signals(); join_none Sequence/Test Case begin int_agent_seq.start(int_agent_sequencer); end wait(flyonreset); reset_seq.start(reset_agent_sequencer); stop int_agent_sequencer; join Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. State Machine approach Benefit: Makes life easy with additional logic(end transaction logic),very accurate comparing to all above methods, Highly advisable to use this in OVM Limitation: Driver and Monitor code is bound on reset for every clock cycle. Complex Driver code Driver task Uart_Irdi_master_driver::run(); fork get_and_drive(); reset_signals(); join_none task run(); task get_and_drive(); //wait for the RESET event to complete to negedge of reset @(reset) forever begin seq_item_port.get_next_item(req); ovm_report_info(get_type_name(), "sequencer got next itemM"); drive_transfer(rsp);//Works on qualified clock @(posedge intf.cb);//normal clock seq_item_port.item_done(rsp); end endtask : get_and_drive Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. Driver //STATE MACHINE task drive_transfer() begin STATE =IDLE; while(END==TRUE) begin case(STATE) RESET: begin ovm_report_info(get_type_name(), "RESET STATE BYE BYE"); //STOPPING TEST CASE END = FALSE; end IDLE : begin //default values If(if.reset) STATE= RESET; else begin //put next logic STATE = IRDA_DRIVE; IRDA_DRIVE : begin for( number of data) begin end //End of test endcase @(posedge intf.cb);//normal clock endtask Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. Monitor task run(); fork monitor_transactions(); reset_trascations();//To reset all monitor variables join_none endtask // run Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Solutions for OVM Reset Technique Issues Contd.. task collect_transfer(); void'(this.begin_tr(trans_collected)); case(STATE) //State machine to collect data RESET: begin //default values if(if.reset)begin STATE= RESET; trans_collected.state=Reset; trans_collected.data=0; end else begin //put next logic STATE = IRDA_COLLECT; trans_collected.state=STATE; IRDA_COLLECT: begin for( if.data.valid==1) begin if(if.reset) begin trans_collected.state=Reset trans_collected.data=if.data; endcase @(posedge intf.cb);//wait for one normal clk cycle //During reset, Transaction will have reset //information and default values endtask Monitor Tasks  task monitor_transactions(); //wait for the RESET event to complete to negedge of reset @(Reset event);//From negative to positive forever begin trans_collected = new(); @(posedge intf.cb); collect_transfer(); data_trans(); end // Check transaction if (checks_enable) perform_transfer_checks(); // Update coverage if (coverage_enable) perform_transfer_coverage(); // Publish to subscribers item_collected_port.write(trans_collected); endtask // monitor_transactions Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

UVM Reset Techniques UVM Run-time Phases The run-time schedule is the pre-defined phase schedule which runs concurrently to the uvm_run_phase global run phase The run-time phases are executed in specific order Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Pre Reset Phase Typical Uses Wait for power good Components connected to Virtual interfaces should initialize their o/p to X’s or Z’s Initialize the clock signals to a valid value Assign reset signals to X (power-on reset) Wait for reset signal to be asserted if not driven by the Verification environment Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Reset Phase Typical Uses Assert reset signals Components connected to Virtual interfaces should drive their o/p to their specified reset or idle value Components and environments should initialize their state variables Clock generators start generating active edges De-assert the reset signal(s) just before exit Wait for reset signal(s) to be de-asserted Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Post Reset Phase Typical Uses Components should start behavior appropriate for reset being inactive. For example, components may start to transmit idle transactions Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

UVM Reset Techniques UVM Reset_phase Diagram showing how reset_phase propagates from Test or ENV Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

UVM Reset Techniques Contd.. Agent task reset_phase(uvm_phase phase); phase.raise_objection(this, "Resetting agent"); reset_and_suspend(); phase.drop_objection(this); endtask   virtual task reset_and_suspend(); fork drv.reset_and_suspend(); tx_mon.reset_and_suspend(); rx_mon.reset_and_suspend(); join sqr.stop_sequences();//Stop sequences but can’t //stop driver immediately Monitor phase.raise_objection(this, "Resetting driver"); //Clean all local variables end virtual protected task run_phase(uvm_phase phase); forever begin //Call all methods to collect coverage Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

UVM Reset Techniques Contd.. Driver task reset_phase(uvm_phase phase); phase.raise_objection(this, "Resetting driver"); reset_and_suspend(); phase.drop_objection(this); endtask   virtual task reset_and_suspend(); //Drive default values on to the interface Endtask //This will be called from RUN_PHASE task get_and_drive(); //wait for the RESET event to complete to negedge of reset //Wait for reset and suspend forever begin seq_item_port.get_next_item(req); drive_transfer(rsp);//Works on qualified clock @(posedge intf.cb);//normal clock seq_item_port.item_done(rsp); end endtask : get_and_drive virtual protected task run_phase(uvm_phase phase); //Call all methods to start get_and_drive(); Control Reset phase from test case or ENV or Reset Monitor(like below): task main_phase(uvm_phase phase); `uvm_info("TEST", "Jumping back to reset phase", UVM_NONE); phase.jump(uvm_reset_phase::get()) Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Benefits and Limitation Benefits in UVM All components can be controlled from Env/Test Reset_phase of each component is in sync Limitation in UVM Driver will still process the last received item How to overcome above limitation? State machine approach again Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

OVM to UVM migration – Tips for reset Ensure that all the reset logic which is implemented in OVM should move to reset phase in UVM Ensure to move Reset triggering logic in all the places like monitors/drivers to Test or Env in UVM Control reset phases of each components from the Env or Test Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Conclusion State Machine approach is a better one to follow in OVM Test benches comparing to other approaches UVM has the Reset_Phase with which reset logic of all the components can be controlled from Test or Env. To avoid the Driver limitation specified, State Machine approach should be followed in UVM Test benches Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors

Questions? Muralidhara Ramalingaiah, Boobalan Anantharaman, Cypress Semiconductors