Presentation is loading. Please wait.

Presentation is loading. Please wait.

110001011010011110100111011011010011110011 Bitvis Utility Library Concepts and usage Your partner for SW and FPGA www.bitvis.no.

Similar presentations


Presentation on theme: "110001011010011110100111011011010011110011 Bitvis Utility Library Concepts and usage Your partner for SW and FPGA www.bitvis.no."— Presentation transcript:

1 Bitvis Utility Library Concepts and usage Your partner for SW and FPGA

2 Bitvis About Bitvis Leading Vendor Independent Design Centre in Norway Leading Vendor Independent Design Centre in Norway FPGA and Embedded SW services for customers FPGA and Embedded SW services for customers From specification to final product – or any phase in between From specification to final product – or any phase in between Good overview of pitfalls, time wasters and risks Good overview of pitfalls, time wasters and risks Focus on methodology, quality, efficiency and customers Focus on methodology, quality, efficiency and customers Located in Asker outside Oslo Located in Asker outside Oslo Bitvis Utility Library - Concepts and Usage 2

3 Bitvis Products and courses from Bitvis Products from Bitvis Products from Bitvis 'Bitvis Utility Library' (Free and Open source, Directly downloadable) - Currently being used world wide 'Bitvis Utility Library' (Free and Open source, Directly downloadable) - Currently being used world wide 'UVVM' (Universal VHDL Verification Methodology) (UVL for VHDL) To be released 2014, Q4 'UVVM' (Universal VHDL Verification Methodology) (UVL for VHDL) To be released 2014, Q4 'RegisterWizard', For generation of SW, Doc. and VHDL (bus IF, regs, etc.) To be released 2014, Q4 'RegisterWizard', For generation of SW, Doc. and VHDL (bus IF, regs, etc.) To be released 2014, Q4 Courses from Bitvis Courses from Bitvis 'FPGA Development Best Practices' - A two day course - A pragmatic approach to improving quality and efficiency. - So far Denmark, Sweden and Norway. May be held anywhere on request 'FPGA Development Best Practices' - A two day course - A pragmatic approach to improving quality and efficiency. - So far Denmark, Sweden and Norway. May be held anywhere on request See our website for more offers See our website for more offers Bitvis Utility Library - Concepts and Usage 3

4 Bitvis Prerequisites for understanding this presentation This presentation assumes that the audience/reader is familiar with our presentation 'Making a Simple, Structured and Efficient VHDL Testbench, Step-by-step' This presentation assumes that the audience/reader is familiar with our presentation 'Making a Simple, Structured and Efficient VHDL Testbench, Step-by-step' See bitvis.no for link to PPT and Webinar for this. See bitvis.no for link to PPT and Webinar for this. PPT also provided with Bitvis Utility Library download PPT also provided with Bitvis Utility Library download Bitvis Utility Library - Concepts and Usage 4

5 Bitvis Agenda Introduction Introduction Verbosity control and alerts Verbosity control and alerts Checks and awaits Checks and awaits String handling and Randomisation String handling and Randomisation Adaptations Adaptations BFM code and Advanced verbosity control BFM code and Advanced verbosity control Restrictions Restrictions Package hierarchy & Compilation and scripts Package hierarchy & Compilation and scripts Documentation Documentation Modifying the library Modifying the library Maintenance Maintenance Bitvis Utility Library - Concepts and Usage 5

6 Bitvis Scope for Bitvis Utility Library A library to support the most fundamental functionality of any structured VHDL testbench A library to support the most fundamental functionality of any structured VHDL testbench Sufficient for simple testbenches Sufficient for simple testbenches An essential plattform for more advanced TBs An essential plattform for more advanced TBs A library to be used by Bitvis internally and externally (unless otherwise requested by customer) A library to be used by Bitvis internally and externally (unless otherwise requested by customer) An open source library – available to anyone An open source library – available to anyone A library to be used as a platform for A library to be used as a platform for Add-ons like BFMs, Monitors, Analysers, etc Add-ons like BFMs, Monitors, Analysers, etc Assertion libraries Assertion libraries Multi-interface TB systems, using UVM-like methodology Multi-interface TB systems, using UVM-like methodology Bitvis Utility Library - Concepts and Usage 6

7 Bitvis Purpose Standardise and qualify a set of good procedures Standardise and qualify a set of good procedures Improve TB readability, modifiability and extendability Improve TB readability, modifiability and extendability Significantly reduce TB code size Significantly reduce TB code size Allow a more uniform TB methodology Allow a more uniform TB methodology Improve reuse Improve reuse Make it easy to generate good simulation transcripts Make it easy to generate good simulation transcripts Force a more uniform log of events Force a more uniform log of events Promote more single source (and less work) Same code used as e.g.: Promote more single source (and less work) Same code used as e.g.: Verification spec. Verification spec. Testbench comments Testbench comments Transcript to log Transcript to log Improve quality and efficiency Improve quality and efficiency Bitvis Utility Library - Concepts and Usage 7

8 Bitvis Rocket science? This is NOT rocket science, BUT.... This is NOT rocket science, BUT.... This is This is Simple Simple Structured Structured Flexible Flexible A working system A working system A platform A platform Documented Documented Built on a well defined Philosophy Built on a well defined Philosophy Bitvis Utility Library - Concepts and Usage 8

9 Bitvis Philosophy and focus Simplicity is essential Simplicity is essential Possible to use in a very simple way for simple TBs Possible to use in a very simple way for simple TBs Immediately after this course Immediately after this course Just by going through the presentations and QR Just by going through the presentations and QR More advanced usage – after detecting the need More advanced usage – after detecting the need Typically through more parameters Typically through more parameters Possibility for adaptation of layout and behaviour Possibility for adaptation of layout and behaviour Quick Reference (QR) provided as documentation Quick Reference (QR) provided as documentation Bitvis Utility Library - Concepts and Usage 9

10 Bitvis Concepts Three main parts Three main parts Logging mechanism and verbosity control concept Logging mechanism and verbosity control concept Alert handling concept Alert handling concept Methods based on one or both of the above concepts Methods based on one or both of the above concepts Additional features Additional features Randomisation – as simple as possible Randomisation – as simple as possible String handling String handling BFM support BFM support Bitvis Utility Library - Concepts and Usage 10 Concepts are important to fully understand. The various methods are very easy to understand  First focus on concepts Logging mechanism is intended for informative messages that require no attention. Main purpose: Simulation progress reporting Also very good support for debugging, when required. Alerts are intended for messages that need or may need attention. Could be any severity.

11 Bitvis Verbosity control - overview Used directly on all log() methods Used directly on all log() methods Used indirectly via burried log-methods on all provided check-routines Used indirectly via burried log-methods on all provided check-routines Alert switches may also be seen as verbosity control Alert switches may also be seen as verbosity control But is intended as direct alert-control But is intended as direct alert-control Verbosity control is dynamic Verbosity control is dynamic Verbosity control is only allowed from test sequencer Verbosity control is only allowed from test sequencer Bitvis Utility Library - Concepts and Usage 11

12 Bitvis The log method log(msg_id, msg, [scope]) -- Simple version log(ID_HDR, "Check defaults on output ports"); log(ID_BFM, "SBI write is completed"); enable_log_msg(ID_BFM); -- allows message disable_log_msg(ID_BFM); -- blocks message report_msg_id_panel(VOID); -- reports enabling for all IDs ID is mandatory in log method ID is mandatory in log method Scope is an option Scope is an option Predefined, but extendable set of IDs Predefined, but extendable set of IDs Enable/disable work on a predefined, common message ID panel Enable/disable work on a predefined, common message ID panel Panel elements are set to ENABLED or DISABLED Panel elements are set to ENABLED or DISABLED Bitvis Utility Library - Concepts and Usage 12 IRQC TB Log file SBI bfm

13 Bitvis log-method special features May set default ENABLED/DISABLED for all IDs in adaptation package May set default ENABLED/DISABLED for all IDs in adaptation package Layout control via switches in adaptation package Layout control via switches in adaptation package Widths of various fields Widths of various fields Optional fields: Scope and ID Optional fields: Scope and ID Programmable Prefix Programmable Prefix Line wrapping and alignment Line wrapping and alignment All messages are left aligned All messages are left aligned Wrapping is automatic or by linefeed (char 'lf') or '\n' Wrapping is automatic or by linefeed (char 'lf') or '\n' Special purpose IDs Special purpose IDs ID_HDR:Written as a header (blank line, header, underline) ID_HDR:Written as a header (blank line, header, underline) ALL_MESSAGES:enable/disable all messages in one operation ALL_MESSAGES:enable/disable all messages in one operation ID_NEVER: Always disabled. (Typ. used as ID in burried checks) ID_NEVER: Always disabled. (Typ. used as ID in burried checks) Bitvis Utility Library - Concepts and Usage 13

14 Bitvis Alerts and severities alert(severity, msg, [scope]) -- Simple version warning(msg, [scope]); tb_error("address value does not fit target"); Directly initiates an alert Directly initiates an alert Normally not used stand-alone, but as a part of a method Normally not used stand-alone, but as a part of a method Superset of VHDL severities (t_alert_level) Superset of VHDL severities (t_alert_level) note, warning, error, failure, note, warning, error, failure, »Standard severities tb_note, tb_warning, tb_error, tb_failure, tb_note, tb_warning, tb_error, tb_failure, »Use when certain the alert is caused by the TB manual_check manual_check »To indicate that a manual check is required Bitvis Utility Library - Concepts and Usage 14 IRQC TB Log file SBI bfm

15 Bitvis Alert handling and reporting All alert severities are counted separately All alert severities are counted separately Correct counting is assured by using protected variables (2002) Correct counting is assured by using protected variables (2002) set_alert_attention(alert_level, IGNORE|REGARD) set_alert_attention(alert_level, IGNORE|REGARD) Ignored alerts are not shown. Counted as IGNORED only. Ignored alerts are not shown. Counted as IGNORED only. Dynamic & Applies globally (always) Dynamic & Applies globally (always) set_alert_stop_limit(alert_level, N>=0) set_alert_stop_limit(alert_level, N>=0) 0 means no stop 0 means no stop Dynamic & Applies globally (always) Dynamic & Applies globally (always) increment_expected_alerts(alert_level, N) increment_expected_alerts(alert_level, N) counted must equal expected for report_alert_counters() counted must equal expected for report_alert_counters() report_alert_counters(VOID) report_alert_counters(VOID) Bitvis Utility Library - Concepts and Usage 15

16 Bitvis check_value() checks value against expected (or boolean) checks value against expected (or boolean) Mandatory severity and message Mandatory severity and message Triggers alert if fail – and reports mismatch + message Triggers alert if fail – and reports mismatch + message Positive acknowledge depending on verbosity control Positive acknowledge depending on verbosity control Default ID = ID_POS_ACK Default ID = ID_POS_ACK Overloads for sl, slv, u, s, int, bool, time Overloads for sl, slv, u, s, int, bool, time Provided as both a procedure and a function Provided as both a procedure and a function Bitvis Utility Library - Concepts and Usage 16 IRQC TB Log file

17 Bitvis other checks check_value_in_range check_value_in_range minimum <= value <= maximum minimum <= value <= maximum overloads for u, s, int, time, real overloads for u, s, int, time, real check_stable check_stable checks signal stable for minimum the given time checks signal stable for minimum the given time overloads for sl, slv, u, s, bool, int overloads for sl, slv, u, s, bool, int Bitvis Utility Library - Concepts and Usage 17 IRQC TB Log file

18 Bitvis await_* await_change() await_change() expects (and waits for) a change on the given signal expects (and waits for) a change on the given signal »inside the given time window »otherwise timeout a real change (event) is required on the signal a real change (event) is required on the signal await_value() await_value() expects (and waits for) a given value on the signal expects (and waits for) a given value on the signal »inside the given time window »otherwise timeout accepts value if already present and min = 0ns accepts value if already present and min = 0ns Bitvis Utility Library - Concepts and Usage 18 IRQC TB Log file

19 Bitvis string handling justify(string, width, justified, format) justify(string, width, justified, format) Format: AS_IS, TRUNCATE, SKIP_LEADING_SPACE Format: AS_IS, TRUNCATE, SKIP_LEADING_SPACE find_leftmost(char, string) find_leftmost(char, string) find_leftmost_non_zero(string) find_leftmost_non_zero(string) to_upper(string) to_upper(string) fill_string(char, width) fill_string(char, width) replace(string, old char, new char) replace(string, old char, new char) to_string() to_string() for various new types for various new types for missing variants in ieee_proposed for missing variants in ieee_proposed Bitvis Utility Library - Concepts and Usage 19

20 Bitvis randomisation slv:= random(7); slv:= random(7); int:= random(2,8); -- also for real int:= random(2,8); -- also for real procedure: random(seed1, seed2, slv); procedure: random(seed1, seed2, slv); procedure: random(2, 8, seed1, seed2, int); -- +real procedure: random(2, 8, seed1, seed2, int); -- +real procedure: randomize(seed1, seed2); procedure: randomize(seed1, seed2); For more advanced randomisation features we recommend to use OSVVM. Bitvis Utility Library - Concepts and Usage 20

21 Bitvis Bitvis Utility Library - Concepts and Usage 21 Re-cap: Major BFM quality differences Inside a ”normal” BFM » »Pure Read, Write or Check transaction Additionally - Inside some BFMs » »Syncronization of access to the relevant clock Additionally - Inside good BFMs » »Normalisation of inputs » »Sanity-check on inputs » »Configuration of behaviour » »Logging of all accesses – with parameters and result » »User message option for alle BFMs » »Severity control and alert handling » »Verbosity control to potentially suppress log bitvis_vip_sbi sbi_bfm_pkg

22 Bitvis Advanced verbosity control Multiple message ID panels Multiple message ID panels For simple use, a global shared panel is used For simple use, a global shared panel is used »invisible to the user (as a default parameter) For multiple message ID panels For multiple message ID panels »Define new message ID panel in relevant scope »Use log(msg_id, msg, scope, my_msg_id_panel); »Use enable_log_msg(msg_id, my_msg_id_panel); E.g. allows a dedicated panel per process or entity handling an interface. I.e. ID_BFM may be set differently for various BFMs E.g. allows a dedicated panel per process or entity handling an interface. I.e. ID_BFM may be set differently for various BFMs Most methods support a dedicated panel Most methods support a dedicated panel Bitvis Utility Library - Concepts and Usage 22

23 Bitvis Important usage restrictions Recommended: Never use VHDL assert statements  May ruin important parts of alert handling mechanism Recommended: Never use VHDL assert statements  May ruin important parts of alert handling mechanism Recommended: Never use writeline  May ruin important parts of logging and verbosity mechanism Recommended: Never use writeline  May ruin important parts of logging and verbosity mechanism Bitvis Utility Library - Concepts and Usage 23

24 Bitvis Package hierarchy Bitvis Utility Library - Concepts and Usage 24 Library ieee_proposed (needed for VHDL '93 and 2002) standard_additions, standard_textio_additions, std_logic_1164_additions, numeric_std_additions types adaptations string_methods protected_typeslicense_open methods bfm_common

25 Bitvis Compilation and scripts Simulator compatibility Simulator compatibility Compatible with all simulators Compatible with all simulators Separate versions provided for VHDL 93, 2002, 2008 Separate versions provided for VHDL 93, 2002, 2008 Scripts are provided for Modelsim Scripts are provided for Modelsim May use scripts directly May use scripts directly May open provided project files May open provided project files Scripts are hierarchical Scripts are hierarchical For other simulators For other simulators »Compilation order given in Quick Reference »May also look at Modelsim scripts Bitvis Utility Library - Concepts and Usage 25

26 Bitvis Documentation 'Making a simple, structured and efficient...' will be available as PPT and Aldec Webinar 'Making a simple, structured and efficient...' will be available as PPT and Aldec Webinar 'Bitvis Utility Library – Concepts and usage' (This PPT) 'Bitvis Utility Library – Concepts and usage' (This PPT) Quick Reference available as PDF Quick Reference available as PDF Single page overview Single page overview Plus full overview of all methods Plus full overview of all methods Bitvis Utility Library - Concepts and Usage 26

27 Bitvis Modifying Bitvis Utility Library? May modify anything in Bitvis Utility Library – apart from May modify anything in Bitvis Utility Library – apart from Copyright heading Copyright heading License file License file Any call to the license file Any call to the license file Recommended approach Recommended approach Make any change to the adaptation package Make any change to the adaptation package Do not make any changes to the other files Do not make any changes to the other files »Will make future updates more difficult »Try to make modification/amendments outside the library Bitvis Utility Library - Concepts and Usage 27

28 Bitvis Bitvis Utility Library - Maintenance Updates are planned for Updates are planned for More overloads More overloads More functions and procedures More functions and procedures Improving functionality and user friendliness even further Improving functionality and user friendliness even further Updates will also occur Updates will also occur when needed for our projects when needed for our projects on request from customers - if feasible on request from customers - if feasible if bugs are detected if bugs are detected New versions will be released at regular intervals New versions will be released at regular intervals Bitvis Utility Library - Concepts and Usage 28

29 Bitvis Utility Library Concepts and usage The end. Your partner for Embedded SW and FPGA Bitvis Utility Library - Concepts and Usage 29


Download ppt "110001011010011110100111011011010011110011 Bitvis Utility Library Concepts and usage Your partner for SW and FPGA www.bitvis.no."

Similar presentations


Ads by Google