1 / 15

Effective RTL coding rules to avoid Simulation Shoot-thru

Effective RTL coding rules to avoid Simulation Shoot-thru. Udit Kumar 1 , Bhanu Prakash 1 , Olivier Florent 1 , Paras Mal Jain 2, Anshu Malani 2 , Shaker Sarwary 2 1 STMicroelectronics 2 Atrenta Inc. Name, Affiliation and email. Abstract.

fisseha
Download Presentation

Effective RTL coding rules to avoid Simulation Shoot-thru

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Effective RTL coding rules to avoid Simulation Shoot-thru Udit Kumar1, Bhanu Prakash1, Olivier Florent1, Paras Mal Jain2, Anshu Malani2, Shaker Sarwary2 1STMicroelectronics 2Atrenta Inc.

  2. Name, Affiliation and email

  3. Abstract RTL simulations do not consider timing in all aspects and therefore, the results produced by simulation may differ from silicon behavior. Simulation can miss design bugs due to limitations in simulator. These differences are due to incorrect estimation of propagation time between clock and data paths causing data to propagate earlier than in silicon. This problem is known as shoot-thru. We faced a silicon failure which prompted us to understand how shoot-thru situations occur during simulation, identify these situations with higher accuracy of analysis and fix them with minimal impact using simple RTL coding rules. We teamed up with Atrenta to automate efficiently the check of those coding rules.

  4. What is Shoot-thru? • When any signal jumps over an extra register within one clock cycle. • E.g. Input “din” crosses 2 register within one clock cycle. dint din dout D D cint In silicon => gate delay In simulator => events clk Shoot-thru: (events in data path ) <= (events in clock path)

  5. How Simulation Shoot-thru occurs? dint dout din D D Reason : Extra Delta delay in Clock Path clk cint clk 0>1 cint 0>1 0>1 dint dout 0>1 clk cint din Consequence : “dout” same as “din” within single clock dint dout

  6. Will Verilog coding rules help? • blocking assignment in combination blocks and • non-blocking in sequential • Not, always safe…. // Input data sampling always @ (posedge clk, negedge rst_n) begin if (rst_n==1’b0) dint <= din; else dint <= din; end // Capture data on divided clock always @ (posedge cint, negedge rst_n) begin if (rst_n==1’b0) dout <= 1’b0; else dout <= dint; end // Sequentioal clock generation always @ (posedge clk, negedge rst_n) begin if (rst_n==1’b0) cint <= 1’b0; else cint <= !cint; end dout dint din D D clk cint cdiv Extra Delta-delay in Clock Path Non-blocking assignments consume delta delay

  7. Case 1: Verification can miss Shoot-thru • User specification was to transfer “din” to “dout” in 1 cycle • Extra flop was a mistake but not caught by RTL verification. If Simulation has shoot-thru => “din” will be captured at “dout” in 1 cycle => All tests pass as per user specification dint dout D D din cint Silicon fails as “din” will be captured at “dout” in 2 cycles => one cycle extra delay vs. Specification clk • Existence of One extra flop causes silicon failure.

  8. Case 2: Verification can miss Shoot-thru • User specification was to transfer “din” to “dout” in 2 cycle • However, shoot-thru may cause simulation failure • User fixes it by adding an extra flop dout dout din D D Simulation Fails din D D D New Flop clk Simulation Passes after rtl changes clk dout Silicon Fails din D D D clk

  9. Potential Gap in design flow HDL Functional Design Functional Specification Pros: Verification at gate level represents Silicon. Cons: Huge data base and run time. Verification Equivalence check Gates Synthesis N/l Simulation Physical design Gate Level Simulation can detect shoot-thru Silicon Verification

  10. So, How to detect shoot-thru issues? • By doing Gate level simulation? • Yes but it is very costly. • By using robust RTL coding rules? • Yes!  this is easy and efficient (see subsequent slides) • By using an improved simulator? • NO, as root cause of problem is that RTL Simulation has no notion of timing delay & Hold checks.

  11. Rule 1 - Force scheduling of data • Force physical time delay in Sequential data assignments • Signal is delayed in ‘physical time’, instead of ‘delta’ time. Verilog dint <= #1 din ; dint dout VHDL dint<= din after 1 ns; D D din clk cint This adds an extra delay in data path

  12. Rule 2 - No ‘physical delay’ in clock path • Delay on clock paths competes with delay on Data path • Clock vs Data scheduling still un-reliable after 1ns dint dout D D din after 1ns cint clk No unwanted delay on clock path Rule1 + Rule2 ensures no risk of shoot-thru i.e data is updated after clock

  13. Automation with SpyGlass RTL checker Rule 1 – Reports missing needed delay in data path If delta delay is different between launch and capture flop, add delay on launch flop dint dout dout D D D D din din clk clk cint cint Rule 2 – Reports extra delay (Physical) present in clock path Easy to identify shoot-thru prone RTL

  14. Checker catches Real Silicon Issues • Missing delay was causing silicon failure dout dout D D D D Missing delay at source din din Buffer, Clock gating etc. • Unintentional delay in clock path found on another chip • User specified physical delay on source flop - Still problem occurred due to physical delay specified on clock path tck tck clkD logic Extra delay in clock divider

  15. Conclusion • Simulators create events and schedule them, but with no notion of timing checks across data and clock events • Shoot-thru impacts RTL Simulation and may cause false simulation behavior, masking the real issues • Simple RTL coding rules can prevent the problem to occur • Possibly add physical delays on data path to force scheduling • Avoid physical delays on clock path • Spyglass RTL checker can help you to efficiently check those rules and removes need of costly gate level simulations. • Next Steps • Extend the SpyGlass checks to ensure that every output interface is having delayed assignment

More Related