<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet type="text/xsl" href="https://community.cadence.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0"><channel><title>Team Specman Blog</title><link>https://community.cadence.com/search?q=*%3A*&amp;category=blog&amp;users=37305&amp;sort=date%20desc&amp;Redirected=true</link><description></description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Mind reading? Almost. Specman New Typo Error Prediction Feature</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/specman-typo-error-prediction-feature</link><pubDate>Fri, 04 Mar 2022 12:35:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1355232</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/specman-typo-error-prediction-feature</guid><slash:comments>0</slash:comments><description>It is scientifically known that mind reading does not exist, but we try our best. We are happy to present a new addition to Specman syntax error messages – suggestions to fix typos. Starting Specman 21.09, the next time you get a compilation error of the kind “no such variable xxx,” or “ yyy does not have such a field, ” Specman will try to include a suggestion to an existing name. For example: In the following e code, the field name transactions declared in row #3 is misspelled in row #5. 1 Loading this code would result with the following error message, which is now accompanied by a suggestion: *** Error: No such variable &amp;#39;trnsactions&amp;#39;. [Suggestion: Maybe you meant &amp;#39;transactions&amp;#39;] at line 5 in example.e out(trnsactions.is_empty()); So, don’t be alarmed when you see the new messages – we’re just trying to make your life easier and minimize bug-fixing time See you next time! Karen Nativ Specman Team</description></item><item><title>Webinar: Using e Reflection</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/webinar-using-e-reflection</link><pubDate>Sun, 06 Jun 2021 15:23:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1351543</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/webinar-using-e-reflection</guid><slash:comments>0</slash:comments><description>Join Cadence Training and Software Architect Efrat Shneydor for this free technical Training Webinar. Reflection is a unique capability in the e language, providing a deep inspection of the program, going into the verification environment code and structure, and letting you examine defined types, query current values of instances, and more. Reflections are commonly used with macros, and by using them, you’ll increase your verification team’s productivity and enhance the stability of the environment at the same time. This introductory webinar will explain e reflection syntax—along with many code examples. After the webinar, you’ll be able to write queries of the type system. Please Note: If you aren’t familiar with Specman macros, we recommended that you visit the Training Byte webinar recording Extend the Language Using Specman e Macros! Webinar Recording (Video) before attending this webinar. Agenda What is Reflection? The basic Reflection API Many code examples Q&amp;amp;A Date and Time Wednesday, June 16 10:00 BST / 11:00 CEST / 12:00 IST / 14:30 IST (India) / 17:00 CST To register for the “ Using Specman e Reflection! ” webinar, use the REGISTER button below and sign in with your Cadence Support account (email ID and password) to login to the Learning and Support System. Then select “ Enroll ” to register for the session. Once registered, you’ll receive a confirmation email containing all login details. If you don’t have a Cadence Support account, go to Registration Help or Register Now , and complete the requested information. REGISTER For questions and inquiries, or issues with registration, reach out to us: Europe, Middle East, and Africa: eur_training@cadence.com India: Preeti P Gowda China: Cathy Li Japan: Yuji Shimazaki</description></item><item><title>Introduction to Macros – Answers to Your Questions</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/introduction-to-macros-webinar-answers-to-your-questions</link><pubDate>Wed, 12 May 2021 15:44:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1349382</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/introduction-to-macros-webinar-answers-to-your-questions</guid><slash:comments>0</slash:comments><description>Thanks to all the people who attended the webinar Extend the Language! An Introduction to Specman Macros that we had on March the 17 th . If you did not attend, or attended and want to see it again – you can view Extend the Language Using Specman e Macros! Webinar Recording (Video) . The video contains English captions. Many questions were asked during the session, and under limitation of time – not all of them were answered or were answered only briefly. We collected here some of the questions, for your convenience. Defining/referring to variables inside macros The question: When defining macro, suppose I have &amp;#39;var a&amp;#39; in my code and same &amp;#39;var a&amp;#39; in the macro body, if the code in the macro changes &amp;#39;a&amp;#39; - will it change &amp;#39;a&amp;#39; in code as well? &amp;#173; The answer: The macro adds a new inner scope, same as when adding blocks (e.g. ‘if’ blocks). If there are variables of same name defined in the method – then the macro changes only the var defined in the macro itself, and not the one in the outer scope. Macro parameter type – ‘any’ The question: &amp;#173;Is there a better syntactic element than when we need to get a string as a parameter for the macro (top.core.block_name)&amp;#173;? The answer: Depending on the case, perhaps is the right choice. When you decide what syntactic type to use, ask yourself in what context this parameter is used in the macro body. If you are going to use the parameter as an expression – use . Here are few examples of where expressions are used. Arithmetic operators work on expressions + , … Print/out accept expressions print Constraints accept expressions keep == If the body of the macro performs any of these on the parameter – the parameter can be . When to use ? Main guideline of using is to use it if all other syntactic types don’t fit. Spaces &amp;amp; Optional The question: How can I treat multiple whitespaces as one, without using [ ] ?&amp;#173; The answer: Multiple white spaces are treated as one. No need for “[]” So the following macro define &amp;quot;add to &amp;quot; as { .add( ); }; Allows all these: add 1 to my_items; add 2 to my_items; add 3 to my_items; add 4 to my_items; Creating the result of ‘define as computed’ The question: What is the best way to create the result code? The answer: The main ways to construct the result of define as computed are either using append() for creating one string, or to create a list of string and use str_join() to join the list of strings to one string. Personally, I prefer creating list of strings. But this is matter of coding style, and any other way that works for you is fine. For example - define &amp;quot;GOOD MORNING&amp;quot; as computed { result = append (&amp;quot;print sys.time;&amp;quot;); result = append ( result , &amp;quot;print me;&amp;quot;); }; define &amp;quot;GOOD EVENING&amp;quot; as computed { var result_code : list of string ; result_code. add (append(&amp;quot;print sys.time;&amp;quot;)); result_code. add (append(&amp;quot;print me;&amp;quot;)); result = str_join (result_code, &amp;quot;&amp;quot;); }; Macros performance The question: Assume we replace a method with a macro, and the method should have been called in a loop 1000000 times. When using macro which implements same method, will the runtime of the test will be more efficient? The answer: When talking about exp and action macros, every macro call “embeds” the replacement code in place. In some cases, as is described in the question – embedding the code is more efficient. In other cases, when the macro body is very long – using a macro means we add millions of lines of code, and this might affect the performance of parsing. When considering the trade-offs, one cannot say that macro has better or worse performance than method. Sometimes you pay in parsing time, but the run-time will be better than the alternative of using a method. We can say the typically, with macros we have seen – the effect of using macro vs. using method is neglectable. So when choosing whether to use macros or methods – we recommend to have other considerations, rather than performance. See some guidelines in https://community.cadence.com/cadence_blogs_8/b/fv/posts/tips-on-using-e-macros-to-raise-abstraction-amp-facilitate-reuse Debugging macros The question #1: The first question about macro debug, is about the challenge of defining the macro pattern. Sometimes you are not sure what syntactic elements to use, sometimes you are not sure whether the pattern will recognize all the expressions it has to, and only them. The answer: There are multiple tools that can help understanding whether the pattern will recognize the pieces of code you plan to support, and only them. The main tool is the show macro command. With show macro you can see how lines in the code are parsed, and also you can provide a string and check if it is matched by the macro and what the replacement code is. For example, assume this macro: define &amp;quot;add to &amp;quot; as { .add( ); }; To see what lines are recognized by this macro, we call show macro , passing the string we want to try - var values := {1;2;3} show macro &amp;quot;add 7 to values&amp;quot; -macro= If the string does not match the macro pattern, show macro will print that the match FAILED The match failed, because the macro expects a num , and “val” is not a number (rather – it is a variable). Using show macro , you can also try out the macro pattern, before writing any e code. For example, this command will show if the planned pattern recognizes the code “add 7 to values” show macro &amp;quot;add 7 to values&amp;quot; -mexp= &amp;quot;add to &amp;quot; The question #2: The second question about macro debug, is debugging the macro body (the replacement code). The answer: When the macro is of , then debugging the macro code is like debugging methods – you can set a break point , and debug step by step in the source browser. Documentation The question: Where are macros documented? There was a side question, about documentation of reflection. The answer: Macros are documented in the Specman e Language Reference. Search for ‘ macros ’ or for ‘ define as ’. The show macro command is documented in Specman Command Reference. Search for ‘ show macro ’ The reflection is documented in the Specman e Language Reference. This section is being enhanced, more usage examples are added. The reflection is documented using eDoc, and can be viewed on any browser directly from the installation. Code examples are available, beside the CadenceHelp, also on github - https://github.com/efratcdn/reflection_examples . Tips of writing and debugging macros, are provided also in some blogs, for example - https://community.cadence.com/cadence_blogs_8/b/fv/posts/tips-on-using-e-macros-to-raise-abstraction-amp-facilitate-r https://community.cadence.com/cadence_blogs_8/b/fv/posts/macro-debugging https://community.cadence.com/cadence_blogs_8/b/fv/posts/tips-on-writing-macros-in-e https://community.cadence.com/cadence_blogs_8/b/fv/posts/getting-source-information-on-macros And, as said in the webinar, don’t hesitate submitting questions on stackoverflow (where answers come not only from Cadence), or send to Specman support, or even directly to me – efrat@cadence.com . I will make sure the right person will get the question.</description></item><item><title>Webinar: Extend the Language Using Specman e Macros!</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/webinar-extend-the-language</link><pubDate>Sun, 28 Feb 2021 17:09:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1348222</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/webinar-extend-the-language</guid><slash:comments>0</slash:comments><description>Using Cadence &amp;#174; Specman &amp;#174; Elite macros lets you extend the e language ─ i.e. invent your own syntax. Today, every verification environment contains multiple macros. Some are simple “syntax sugaring” and some are very advanced utilities implementing sophisticated methodologies. With macros, you can replace long complex user code with much shorter and simpler code. And, as we know – the shorter the code is, the less bugs it contains and it is easier to maintain. Extending the e Language is a section in Specman Advance Training, explaining macros and reflection. Now we decided to create a more basic version of this session, that does not require long experience with e . As this is more basic than the advance training, it shows only macros, without reflection. If you know e , even entry level – you are welcome to join this webinar and learn what macros are and how you can use them. After the webinar – you will be able to write your own macros! Think of what syntax you miss in the language, where you would like the code to be more elegant, what code repetitions do you see and want to avoid. The webinar will explain the e macros syntax, with many code examples. Agenda ‘define as’ macro syntax ‘define as computed’ macros Many code examples Q&amp;amp;A Date and Time Wednesday, March 17 09:00 GMT / 10:00 CET / 11:00 IST / 14:30 IST (India) / 17:00 CST To register for the “Extend the Language Using Specman e Macros!” webinar, use the REGISTER button below and sign in with your Cadence Support account (email ID and password) to login to the Learning and Support System. Then select “Enroll” to register for the session. Once registered, you’ll receive a confirmation email containing all login details. If you don’t have a Cadence Support account, go to Registration Help or Register Now , and complete the requested information. REGISTER For questions and inquiries, or issues with registration, reach out to us: Europe, Middle East, and Africa: eur_training@cadence.com North America: Lena Robledo India: Preeti P Gowda Want to stay up to date on webinars and courses? Subscribe to Cadence Training emails. Hungry for Training? Choose the Cadence Training Menu that’s right for you. To view our complete training offerings, visit the Cadence Training website .</description></item><item><title>Have You Ever Wanted to Learn Specman/e and Did Not Know How?</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/have-you-ever-wanted-to-learn-specman-e-and-did-not-know-how</link><pubDate>Wed, 11 Nov 2020 09:00:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1345983</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/have-you-ever-wanted-to-learn-specman-e-and-did-not-know-how</guid><slash:comments>0</slash:comments><description>As a verification engineer, you want your toolbox to be varied and rich. It looks trivial, but if we really ask ourselves why, there are several reasons. First , when you look for your next exciting verification position, the more HVL you know, the more options you have. In addition, you reflect yourself as a knowledgeable person for potential employers. Secondly , familiarity with several HVL, makes you a better verification engineer since you know there are multiple ways to achieve your goals. In particular, Specman/e is a language designed for verification, thus by learning it, you expand your knowledge of high quality verification. Third , e is a real cool language. Are you curious to see what it is about? Try out its state-of-the-art constraint solver. Up until now, you usually had to work for a company that uses Specman, or study in universities who teach Specman, in order to be able to experiment with the e language. However, this has changed. Cadence just announced the launching of Specman on the Cloud available for everyone . This includes: Access to Specman Fundamental course Access to Specman on the cloud where you can try Specman out and also run the course labs The course provides an introduction to the e language in the context of the Coverage-Driven Verification (CDV) methodology. You use the standard Universal Verification Methodology (UVM- e ) to build a reusable verification environment. In this course, you create a block-level verification environment: Understand the differences between directed tests and Coverage-Driven Verification (CDV) Write and debug regular methods and time-consuming methods (TCMs) Use Specman &amp;#174; and SimVision ™ debugging features Define, collect, and analyze functional coverage information Create reusable verification components (UVCs) that comply with the UVM methodology Control stimulus generation using sequences and virtual sequences Use assertions and scoreboarding to perform data checks Implement reset and end-of-test methodologies Upon successful completion of the course you will receive a virtual badge that you can add to your resume of experience. What do you need to do in order to get this? Just send an email to SpecmanCloud@cadence.com with your full name and one sentence describing your goal. We will then send you all the information you need.</description></item><item><title>Ouch that’s Hot! Register Access Heatmap</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/ouch-that-s-hot-register-access-heatmap</link><pubDate>Mon, 19 Oct 2020 04:12:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1345935</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/ouch-that-s-hot-register-access-heatmap</guid><slash:comments>0</slash:comments><description>We’re proud to see that many expert verification teams exploit the powers of UVM vr_ad, in implementing intricate verification environments in e . The vr_ad is an open source package, part of UVM- e . It provides means to access the DUT registers and memory, monitor the accesses and check the DUT registers behavior. It is indeed a flexible powerful utility. But with power comes responsibility. During the verification process, it’s important to know what registers are accessed in the memory and how much. The vr_ad utility is an excellent tool that provides this information. However, as the famous quote says: “The brain processes visual information 60,000 times faster than text” - 3M Corporation, 2001. Whether this statistic is precise or not, there are cases in which visual presentation indeed is useful. For this reason, we present a new addition on top of the vr_ad utility – the Register Access Heatmap. The Register Access Heatmap displays the read/write access amounts to registers in a heatmap. The following is an example in Gradient mode: I’d like to see the accesses in a precise format, how would I do that? To see the exact value in the graph, you can hover over the relevant area. In addition there is an option on top of the graph which enables switching between Gradient and Sharp modes. The Sharp mode displays the exact shades in the heatmap, as following: The inner workings of the tool: The tool is made up of python files and an e file, which are connected using the neat python interface for e (make sure you are familiar with Specman Python interface: python interface blog post ): @import_python ( module_name =&amp;quot;create_heatmap&amp;quot;, python_name =&amp;quot;heatmap_from_reg_use&amp;quot;) heatmap_from_reg_use (…) is imported ; The e file extends from the vr_ad utility and extracts all accesses to registers: extend vr_ad_sequence_driver { send_to_bfm (ad_item: vr_ad_operation) @clock is also { // Save register name and access type }; }; From there the data flows through the tubes of the python interface to the python files, which display it in the heatmap. Running the tool: The tool is open-source(!) and accessible on GitHub: Register Access Heatmap GitHub . The README attached to the file provides examples of running the tool on files in the vr_ad utility. You are welcome to try them out. Happy visualizing! Karen Nativ Specman Team</description></item><item><title>Improving Tests Efficiency Using Coverage Callback (part 2)</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/improving-tests-efficiency-using-coverage-callback-part-2</link><pubDate>Sun, 28 Jun 2020 15:34:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1343598</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/improving-tests-efficiency-using-coverage-callback-part-2</guid><slash:comments>0</slash:comments><description>In recent blogs - specman-callback-coverage-api and improving-tests-efficiency-using-coverage-callback - we shared some ideas about how to employ the new Coverage Callback API for increasing the tests efficiency. This blog shows two more ideas for improving tests, using runtime coverage information. Stop the Run After the Goal Is Reached The basic concept of Coverage Driven Verification is running many random tests, and every once in a while analyze the coverage report, and if there are holes – write tests directed at this hole. These new tests have a very specific goal, hitting the coverage hole, a specific cover item bucket is expected to be sampled. You write constraints and sequences that are expected to steer the test to the uncovered area and after the test ends you look at the coverage report and see if you succeeded. Wouldn’t it be nice to be notified during the run when the test reaches its goal? You can decide to stop the test, you can also decide to add extra checks or messages at that point. If the goal is “get the out_of_mem event to be emitted”, it’s easy to add code waiting for this event, no need for new features. But if the goal is defined as a combination of multiple attributes, it gets harder to implement a code waiting for this combination. In addition – it would require writing this code for each new test aiming at a different combination. But there is no need to write new code, you already have it – it is defined in the coverage model, using crosses and transitions. Assume this coverage definition – cover cover_me is { item legal : bool = cur_trans.legal; item kind : kind_t = cur_trans.kind; item address : uint (bits : 16) = cur_trans.address using ranges = { range([0..10], &amp;quot;low_address&amp;quot;); range([11..0xfff0], &amp;quot;mid_address&amp;quot;); range([0xfff1..0xffff], &amp;quot;high_address&amp;quot;); }; cross legal, kind, address; }; }; And assume that the coverage analysis indicates that we never had a legal transaction of type D with its address in the high_address range. In terms of coverage, it means that we want the test hits the bucket TRUE_D_high_address of the cross item. Using the Coverage Callback API we can query the coverage sampling and notify when this bucket is hit. struct cb_notify_cover_hit like cover_sampling_callback { event bucket_hit; do_callback() is only { var cr : rf_cover_group = get_current_cover_group(); var item_value : string; for each (item) in cr. get_all_items() { if item is a rf_cross_cover_item (cross_item) { if cross_item.get_name() == &amp;quot;cross__legal__kind__address&amp;quot; { item_value = str_join( get_simple_cross_sampled_bucket_name ( cross_item), &amp;quot;__&amp;quot;); if item_value == &amp;quot;TRUE__D__high_address&amp;quot; { message( LOW, &amp;quot;Sampled desired value - item &amp;quot;, item.get_name() , &amp;quot; == &amp;quot;, item_value ); }; emit bucket_hit; }; }; }; }; }; // For example, one can stop the run after // getting the bucket_hit event extend env { on my_cb.bucket_hit { start stop_after_delay(); }; stop_after_delay() @clock is { wait [drain_time] * cycle; stop_run(); }; }; Note that if the coverage model definition is changed, for example – the ranges are defined in a different way, and “high_address” is defined with different values – no need to re-edit the callback code. This is a very tailored piece of code, as it looks for a very specific bucket name. The open source on github, cover_cb_report_hit , implements a reusable utility that you can download and use. In this utility, one can register the name/s of the bucket/s in interest – and the do_callback() checks whether the sampled item is in the list of items of interest. If it is – it checks the bucket name.</description></item><item><title>Improving Tests Efficiency Using Coverage Callback</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/improving-tests-efficiency-using-coverage-callback</link><pubDate>Sun, 31 May 2020 21:34:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1343572</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/improving-tests-efficiency-using-coverage-callback</guid><slash:comments>0</slash:comments><description>When you go to the store, you walk until you get there, stop, get your groceries, and go back home. You do not start circling around the block for few rounds. You do not say “if I walk around the block really fast, I can save time”. It is clear that if you avoid circling the block at first place – you will save even more time. Why don’t we adopt the same rationale in the verification process? Instead of thinking just about how to run faster, try to see if we can run less. If, for example, the test executes 10 million transactions in 10 hours, then instead (or in addition) of getting these transactions executed faster – let’s try to understand if we really need to run so many transactions. Perhaps the first 1 million got us to our goal. You might say that with verification, unlike the shopping situation, there is no big “Grocery” sign telling me I arrived at my destination. Well, there isn’t such a sign, but there are ways to know that you reached your goal. What is the goal? With Coverage Driven Verification methodology, we define the goal with coverage. Inquiring the coverage model during the run might reveal such “you reached your goal” sign. In a recent blog Specman Coverage Callback we introduced the new Coverage Callback API, which allows querying the coverage model whenever a coverage group is being sampled. That is – you can have full vision about were you stand regarding your coverage goal, during the test. In this blog we give some more details about various options you can use the coverage runtime information in order to improve the tests efficiency. The full code of the examples shown below is on github , next to other e utilities and examples. Analyze coverage progress throughout the test The coverage report we view at the end of the run gives us information about the coverage groups grade. It does not tell us how efficient we were in our journey – did we stop when we reached the goal, or did we continue circling around it. Using the Coverage Callback API, you can get the information during the test. This means we know the relative contribution of different segments of the test to the coverage. A past blog, analyze-your-coverage-with-python-plot , showed how such information can be used to produce plots showing the coverage progress. The plot below was created in a test in which the coverage of data items (blue line) reached almost to its maximum around the first third of the test. We can say that in term of data coverage – the test was very efficient in the first 200 cycles, and not very efficient after that. That blog was using the old Coverage Scan API. Using the new Coverage Callback API, we can get same reports, but with no performance penalties. Here is the code doing this: struct cover_cb_send_to_plot like cover_sampling_callback { do_callback() is only { if is_currently_per_type() { var cur_grade : real = get_current_group_grade() ; // Pass the name and grade to the plotter sys.send_to_graph( get_current_cover_group().get_name() , cur_grade); }; }; }; Sending the data to the plot app adds a nice touch, but it is not a must. You can also write to a text file. Here is, for example, a table created during one test, showing the coverage progress of three coverage groups. Note that each grade is recorded when the relevant group is being sampled, so not all samples are at same time. in_data_cov time 5 | 111 | 123 | 450 | 838 | 1062 | 1069 | 7924 | 53735 | 55560 | 66194 | 1018680 grade 14 | 29 | 37 | 38 | 38 | 38 | 38 | 38 | 41 | 41 | 43 | 44 power_cov time 0 | 0 | 89 | 30038 | 132124 grade 37 | 37 | 37 | 37 | 38 fsm time 0 | 0 | 0 | 0 | 0 | 8 | 14 | 45 | 939 | 20479 | 31278 | 67907 grade 5 | 5 | 5 | 5 | 5 | 5 | 14 | 14 | 16 | 16 | 40 | 40 After analyzing the reports, based on what you learn from the behavior of the past test, you can decide how to continue. You might decide, for example, to improve the tests that seem to run “full gas in neutral” by changing the constraints. Take run time decisions, based on coverage progress In the previous example, we talked about analyzing the coverage progress after the test (or the full regression) ends. But you also can take runtime decisions. One decision you can decide to take is to stop the test once you estimate that the test does not seem to add anything to the coverage; “if it didn’t get to any new area in the last two hours, most likely that it will not get any better if it continues”. The following code implements a cover_sampling_callback struct, that compares the current coverage grade to the previous grade. If there is no change in the grade for more than X samples – it emits an event. The user of this utility can decide what to do upon this event, for example – to gracefully stop the run. Another decision might be to change something in the generation hoping that it will exercise area that were not exercised before. The following is a snippet of the utility, that can be downloaded from cover_cb_report_progress . struct cb_notify_no_progress like cover_sampling_callback { do_callback() is only { var cr_name := get_current_cover_group().get_name() ; var group_info := items_of_interest.first(.group_name == cr_name); if group_info != NULL { if group_info.last_grade == get_current_group_grade() { group_info.samples_with_no_change += 1; } else { group_info.last_grade = get_current_group_grade() ; group_info.samples_with_no_change = 0; }; if group_info.samples_with_no_change &amp;gt; group_info.max_samples_wo_progress { message(LOW, &amp;quot;The cover group &amp;quot;, cr_name, &amp;quot; grade was not changed in the last &amp;quot;, group_info.samples_with_no_change, &amp;quot; samples &amp;quot; ); // Notify of no progress emit no_cover_progress; }; }; }; }; // User code: when there is no progress, change the weight of // illegal transactions. // Note that the legal_weight field is static, so – can be written // from one place, such as from the env unit. No need to accessing // a specific instance of a transaction &amp;lt;&amp;#39; struct transaction { legal : bool; // By default – most transactions are to be legal static legal_weight : uint = 90; keep soft legal == select { value (legal_weight) : TRUE; 100 - value (legal_weight) : FALSE; }; }; extend env { on cb.no_cover_progress { // Modify the static fields. From now on – all // transactions will have 50% probability to be illegal transaction::legal_weight = 50; }; }; We hope these examples intrigue your imagination. Stay tuned – next blog will show some more ideas for improving tests efficiency using Coverage Callback.</description></item><item><title>Specman’s Callback Coverage API</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/specman-s-callback-coverage-api</link><pubDate>Thu, 30 Apr 2020 14:30:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1342496</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/specman-s-callback-coverage-api</guid><slash:comments>0</slash:comments><description>Our customers’ tests have become more complex, longer, and consume more resources than before. This increases the need to optimize the regression while not compromising on coverage. Some advanced customers of Specman use Machine Learning based solutions to optimize the regressions while some use simpler solutions. Based on a request of an advanced customer, we added a new Coverage API in Specman 19.09 called Coverage Callback . In 20.03, we have further enhanced this API by adding more options. Now there are two Coverage APIs that provide coverage information during the run (the old scan_cover API and this new Callback API). This blog presents these two APIs and compares between them while focusing on the newer one. Before we get into the specifics of each API, let’s discuss what is common between these APIs and why we need them. Typically, people observe the coverage model after the test ends, and get to know the overall contribution of the test to the coverage. With these two APIs, you can observe the coverage model during the test, and hence, get more insight into the test progress. Are you wondering about what you can do with this information? Let’s look at some examples. Recognize cases when the test continues to run long after it already reached its coverage goal. View the performance of the coverage curve. If a test is “stuck” at the same grade for a long time, this might indicate that the test is not very good and is just a waste of resource. These analyses can be performed in the test itself, and then a test can decide to either stop the run, or change something in it configuration, or – post run. You can also present them visually for some analysis, as shown in the blog: Analyze Your Coverage with Python . scan_cover API (or “Scanning the Coverage Model”) With this API you can get the current status for any cover group or item you are interested in at any point in time during the test (by calling scan_cover()). It is very simple to use; however it has performance penalty. For getting the coverage grade of any cover group during the test, you should 1. Trigger the scan_cover at any time when you want the coverage model to be scanned. 2. Implement the scan_cover related methods, such as start_item() and end_bucket(). In these methods, you can query the current grade of group/item/bucket. The blog mentioned earlier: Analyze Your Coverage with Python describes the details and provides an example. Callback API The Callback API enables you to get a callback for a desired cover group(s), whenever it is sampled. This API also provides various query methods for getting coverage related information such as what the current sampled value is. So, in essence, it is similar to scan_cover API, but as the phrase says: “same same but different”: Callback API has almost no performance penalty while scan_cover API does. Callback API contains a richer set of query methods that provide a lot of information about the current sampled value (vs just the grade with scan_cover). Using scan_cover API, you decide when you want to query the coverage information (you call scan_cover), while with the Callback API you query the coverage information when the coverage is sampled (from do_callback). So, scan_cover gives you more flexibility, but you do need to find the right timing for this call. There is no absolute advantage of either of these APIs, this only depends on what you want to do. Callback API details The Callback API is based on a predefined struct called: cover_sampling_callback. In order to use this API, you need to: Define a struct inheriting cover_sampling_callback ( cover_cb_save_data below) Extend the predefined do_callback () method. This method is a hook being called whenever any of the cover groups that are registered to the cover_sampling_callback instance is being sampled. From do_callback () you can access coverage data by using queries such as: is_currently_per_type (), get_current_group_grade () and get_current_cover_group () (as in the example below) and many more such as: get_relevant_group_layers() and get_simple_cross_sampled_bucket_name(). Register the desired cover group(s) to this struct instance using the register () method. Take a look at the following code: // Define a coverage callback. // Its behavior – print to screen the current grade. struct cover_cb_save_data like cover_sampling_callback { do_callback () is only { // In this example, we care only about the per_type grade, and not per_instance if is_currently_per_type () { var cur_grade : real = get_current_group_grade (); sys.save_data ( get_current_cover_group ().get_name(), cur_grade); };//if };//do_callback() };// cover_cb_send_data extend sys { !cb : cover_cb_save_data; // Instantiate the coverage callback, and register to it two of my coverage groups run() is also { cb = new with { var gr1:=rf_manager.get_struct_by_name(&amp;quot;packet&amp;quot;).get_cover_group(&amp;quot;packet_cover&amp;quot;); . register (gr1); var gr2:=rf_manager.get_struct_by_name(&amp;quot;sys&amp;quot;).get_cover_group(&amp;quot;mem_cover&amp;quot;); . register (gr2); };//new };//run() save_data(group_name : string, group_grade : real) is { //here you either print the values to the screen, update a graph you show or save to a db };// save_data };//sys In the blog Analyze Your Coverage with Python mentioned above, we show an example of how you can use the scan_cover API to extract coverage information during the run, and then use the Specman-Python API to display the coverage interactively during the run (using plotting Python library - matplotlib). If you find this usage interesting and you want to use the same example, by the Callback API instead of the scan_cover API, you can download the full example from GIT from here: https://github.com/efratcdn/cover_callback . Specman Team</description></item><item><title>A Specman/e Syntax for Sublime Text 3</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/a-specman-e-syntax-for-sublime-text-3</link><pubDate>Wed, 05 Feb 2020 17:01:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1342285</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/a-specman-e-syntax-for-sublime-text-3</guid><slash:comments>0</slash:comments><description>We&amp;#39;re happy to have guest blogger Thorsten Dworzak, Principal Consultant at Verilab GmbH, describe how he added Specman/e syntax to Sublime Text 3: According to the 2018 StackOverflow Developer Survey , the popularity of development environments (IDEs, Text Editors) among software developers shows the following ranking: Visual Studio Code 34.9% Visual Studio 34.3% Notepad++ 34.2% Sublime Text 28.9% Vim 25.8% IntelliJ 24.9% Android Studio 19.3% (DVT) Eclipse 18.9% … Emacs 4.1% Of these, only Vim, (DVT) Eclipse, and Emacs support editing in e -language (at least, last time I checked). Kate, which comes with KDE and also has a Specman mode, is not on this list. I started using Sublime Text 3 some time ago. It offers packages that support a number of programming languages. Though there is an e -language syntax available from Tsvi Mostovicz, it is unfinished work, and there are many syntactic constructs are missing. So, I created a fork of his project and finished it (it will eventually be merged back here ). It is a never-ending task because my code base for testing is limited and e is still undergoing development. The project is available through ST3&amp;#39;s Package Control and you can contribute to it via Github . I am eagerly waiting for your pull requests and/or comments and contributions!</description></item><item><title>Specman: Analyze Your Coverage with Python</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/specman-analyze-your-coverage-with-python</link><pubDate>Wed, 06 Nov 2019 13:31:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1342122</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/specman-analyze-your-coverage-with-python</guid><slash:comments>0</slash:comments><description>In the former blog about Python and Specman: Specman: Python Is here! , we described the technical information around Specman-Python integration. Since Python provides so many easy to use existing libraries in various fields, it is very tempting to leverage these cool Python apps. Coverage has always been the center of the verification methodology, however in the last few years it gets even more focus as people develop advanced utilities, usually using Machine Learning aids. Anyhow, any attempt to leverage your coverage usually starts with some analysis of the behavior and trends of some typical tests. Visualizing the data makes it easier to understand, analyze, and communicate. Fortunately, Python has many Visualization libraries. In this blog, we show an example of how you can use the plotting Python library ( matplotlib ) to easily display coverage information during a run. In this blog, we use the Specman Coverage API to extract coverage data, and a Python module to display coverage grades interactively during a single run and the way to connect both. Before we look at the example, if you have read the former blog about Specman and Python and were concerned about the fact that python3 is not supported, we are glad to update that in Specman 19.09, Python3 is now supported (in addition to Python2). The Testcase Let’s say I have a stable verification environment and I want to make it more efficient. For example: I want to check whether I can make the tests shorter while hardly harming the coverage. I am not sure exactly how to attack this task, so a good place to start is to visually analyze the behavior of the coverage on some typical test I chose. The first thing we need to do is to extract the coverage information of the interesting entities. This can be done using the old Coverage API. Coverage API Coverage API is a simple interface to extract coverage information at a certain point. It is implemented through a predefined struct type named user_cover_struct . To use it, you need to do the following: Define a child of user_cover_struct using like inheritance ( my_cover_struct below). Extend its relevant methods (in our example we extend only the end_group () method) and access the relevant members (you can read about the other available methods and members in cdnshelp). Create an instance of the user_cover_struct child and call the predefined scan_cover () method whenever you want to query the data (even in every cycle). Calling this method will result in calling the methods you extended in step 2. The code example below demonstrates these three steps. We chose to extend the end_group () method and we keep the group grade in some local variable. Note that we divide it by 100,000,000 to get a number between 0 to 1 since the grade in this API is an integer from 0 to 100,000,000. struct my_cover_struct like user_cover_struct { !cur_group_grade:real; //Here we extend user_cover_struct methods end_group () is also { cur_group_grade = group_grade/100000000; } }; extend sys{ !cover_info : my_cover_struct; run() is also { start monitor_cover (); }; monitor_cover() @any is { cover_info = new; while(TRUE) { // wait some delay, for example – wait [10000] * cycles; // scan the packet.packet_cover cover group compute cover_info. scan_cover (&amp;quot;packet.packet_cover&amp;quot;); };//while };// monitor_cover };//sys Pass the Data to a Python Module After we have extracted the group grade, we need to pass the grade along with the cycle and the coverage group name (assuming there are a few) to a Python module. We will take a look at the Python module itself later. For now, we will first take a look at how to pass the information from the e code to Python. Note that in addition to passing the grade at certain points ( addVal method), we need an initialization method ( init_plot ) with the number of cycles, so that the X axis can be drawn at the beginning, and end_plot () to mark interesting points on the plot at the end. But to begin with, let’s have empty methods on the Python side and make sure we can just call them from the e code. # plot_i.py def init_plot(numCycles): print (numCycles) def addVal(groupName,cycle,grade): print (groupName,cycle,grade) def end_plot(): print (&amp;quot;end_plot&amp;quot;) And add the calls from e code: struct my_cover_struct like user_cover_struct { @import_python(module_name=&amp;quot;plot_i&amp;quot;, python_name=&amp;quot;addVal&amp;quot;) addVal(groupName:string, cycle:int,grade:real) is imported; !cur_group_grade:real; //Here we extend user_cover_struct methods end_group() is also { cur_group_grade = group_grade/100000000; //Pass the values to the Python module addVal(group_name,sys.time, cur_group_grade); } //end_group };// user_cover_struct extend sys{ @import_python(module_name=&amp;quot;plot_i&amp;quot;, python_name=&amp;quot;init_plot&amp;quot; init_plot(numCycles:int) is imported; @import_python(module_name=&amp;quot;plot_i&amp;quot;, python_name=&amp;quot;end_plot&amp;quot;) end_plot() is imported; !cover_info : my_cover_struct; run() is also { start scenario(); }; scenario() @any is { //initialize the plot in python init_plot(numCycles); while(sys.time self.firstMaxGrade: self.firstMaxGrade=grade self.firstMaxCycle=cycle self.line_Object.set_xdata(self.XCycles) self.line_Object.set_ydata(self.YGrades) plt.legend(shadow=True) fig.canvas.draw() #Holds all the data of all cover groups class CData : groupsList=[] def add (self,groupName,cycle,grade): found=0 for group in self.groupsList: if groupName in group.name: group.add(cycle,grade) found=1 break if found==0: obj=CGroup(groupName,cycle,grade) self.groupsList.append(obj) def drawFirstMaxGrade(self): for group in self.groupsList: left, right = plt.xlim() x=group.firstMaxCycle y=group.firstMaxGrade #draw arrow #ax.annotate(&amp;quot;first\nmaximum\ngrade&amp;quot;, xy=(x,y), #xytext=(right-50, 0.4),arrowprops=dict(facecolor=&amp;#39;blue&amp;#39;, shrink=0.05),) #mark the points on the plot plt.scatter(group.firstMaxCycle, group.firstMaxGrade,color=group.line_Object.get_color()) #Add text next to the point text=&amp;#39;cycle:&amp;#39;+str(x)+&amp;#39;\ngrade:&amp;#39;+str(y) plt.text(x+3, y-0.1, text, fontsize=9, bbox=dict(boxstyle=&amp;#39;round4&amp;#39;,color=group.line_Object.get_color())) #Global data myData=CData() #Initialize the plot, should be called once def init_plot(numCycles): plt.xlabel(&amp;#39;cycles&amp;#39;) plt.ylabel(&amp;#39;grade&amp;#39;) plt.title(&amp;#39;Grade over time&amp;#39;) plt.ylim(0,1) plt.xlim(0,numCycles) #Add values to the plot def addVal(groupName,cycle,grade): myData.add(groupName,cycle,grade) #Mark interesting points on the plot and keep it shown def end_plot(): plt.ioff(); myData.drawFirstMaxGrade(); #Make sure the plot is being shown plt.show(); #uncomment the following lines to run this script with simple example to make sure #it runs properly regardless of the Specman interaction #init_plot(300) #addVal(&amp;quot;xx&amp;quot;,1,0) #addVal(&amp;quot;yy&amp;quot;,1,0) #addVal(&amp;quot;xx&amp;quot;,50,0.3) #addVal(&amp;quot;yy&amp;quot;,60,0.4) #addVal(&amp;quot;xx&amp;quot;,100,0.8) #addVal(&amp;quot;xx&amp;quot;,120,0.8) #addVal(&amp;quot;xx&amp;quot;,180,0.8) #addVal(&amp;quot;yy&amp;quot;,200,0.9) #addVal(&amp;quot;yy&amp;quot;,210,0.9) #addVal(&amp;quot;yy&amp;quot;,290,0.9) #end_plot() In the example we used, we had two interesting entities: packet and state_machine, thus we had two equivalent coverage groups. When running our example connecting to the Python module, we get the following graph which is displayed interactively during the run. When analyzing this specific example, we can see two things. First, packet gets to a high coverage quite fast and significant part of the run does not contribute to its coverage. On the other hand, something interesting happens relating to state_machine around cycle 700 which suddenly boosts its coverage. The next step would be to try to dump graphic information relating to other entities and see if something noticeable happens around cycle 700. To run a complete example, you can download the files from: https://github.com/okirsh/Specman-Python/ Do you feel like analyzing the coverage behavior in your environment? We will be happy to hear about your outcomes and other usages of the Python interface. Orit Kirshenberg Specman team</description></item><item><title>Master of ‘e’? Now You Can Prove It!</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/master-of-e-now-you-can-prove-it</link><pubDate>Wed, 19 Jun 2019 19:59:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341783</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/master-of-e-now-you-can-prove-it</guid><slash:comments>0</slash:comments><description>The knowledge and experience of using Specman/ e tells everyone that you have acquired profound verification methodology. But how do you showcase this knowledge to your company, colleagues, and perspective employers? To help you showcase your expertise, Cadence Training Services now offers Cadence Digital Badging . A certification test was created for some technologies (including Specman). When you pass the certification test, you get a digital badge for the selected technology. The certification test for Specman is available at the end of the Specman course (which is available free for Specman customers). After you pass the certification test, you get a Specman Digital Badge via email in few days. Then you can add it to your Linkedin page, your CV or to your email signature. Here is an example of a question from the test. The test includes 50 questions, you need to have 48 right answers to pass the exam. What if you are already an experienced e user and you just want to take the exam and receive the digital badge? Then, you can enroll in the badge exam directly. Challenge yourself!! Take the certification test and show your manager and a potential employer that you are a master of e . You can read more about it at How to Show You’re a Verification Engineer?</description></item><item><title>Specman: Python Is here!</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/specman-python</link><pubDate>Wed, 12 Jun 2019 12:28:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341759</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/specman-python</guid><slash:comments>0</slash:comments><description>Do you know from where Python technology gets its name? It is not from the snake, it is named after the Monty Python comedy group. And indeed, one of the main guidelines behind it is to be fun to use (check out the Zen of Python ). Therefore, Python is intuitive, readable, and easy to learn - all of these make it not only fun to use but also highly productive. Does this sound familiar? If you are an e user, it should. Apparently, e and Python share many common characteristics. Why supporting Python? Specman has already interfaces with C and SystemVerilog DPI. However, if you want to extract data during Specman’s runs, analyze it for either debugging or machine learning modules- Python might be the right language since there are many open source libraries for graphs, mathematical calculations, machine learning, etc. Can I connect to Python with old Specman? Yes, you can. Both Specman and Python have interface to C. Therefore, you can write a C glue code to bridge the two. However, this is not trivial, and it means you need to get familiar with Python Interpreter. Since e like Python is mainly about usability and productivity - having an easy way to connect e code to Python code seems almost a MUST. What are we adding in 19.05? In 19.05, all C glue code is generated behind the scenes by Specman during the run. In your e code, you just need to specify that the methods you are calling should be invoked from external Python module (a Python module is a file containing Python definitions and statements). What is the syntax? To define a method that is imported from Python, you need do two things: Add “ is imported ” as part of the method signature. This means that the method can be imported from either C (basic or FLI), SystemVerilog DPI or Python. (If you are already familiar with a different syntax to connect to C or DPI, note that we are adding a new syntax for all external languages, but this is a subject for a different blog). Annotate this line of code with the predefined annotation: import_python (if you are not familiar with e annotations, you can read about them here ). Let’s look at the following simple example: ‘ In this example, every call to setVal calls the Python setVal method defined in pyModuleEx.py: # pyModuleEx.py def setVal(val): print(val) Do I need to add any configuration? You need to define two environment variables for Specman: SPECMAN_PYTHON_INCLUDE_DIR and SPECMAN_PYTHON_LIB_DIR which point to the location of include and lib directories under your Python installation directory. You should ensure that the location of all Python modules you are referring to form your e code are included in Python search path environment variable: PYTHONPATH. Can I pass a struct from e to Python? Yes, you can pass a struct from e to Python as shown in the following example: extend monitor { @import_python ( module_name =&amp;quot;exStruct&amp;quot;, python_name =&amp;quot;calc&amp;quot;) calc(p:packet):int is imported ; get_packet(p : packet) is also { check that calc(p) == 1; }; }; #exStruct.py class packet: def __init__(self,a,b,c,d): self.a = a self.b = b self.c = c self.d = d def calc(p): print str(p.a) + &amp;quot; &amp;quot; + str(p.b) + &amp;quot; &amp;quot; + str(p.c)+ &amp;quot; &amp;quot; + str(p.d) return 1; Are there limitations? In 19.05, only Python 2 is supported and exporting e methods (calling e methods from Python) is not supported yet. These limitations will be removed in future versions. What’s next? There are many things you can do now that you have an easy way to export data during the run to improve your verification environment. It might be a call for you to think of using Machine Learning knowledge to make your verification a state of the art. We will publish few examples soon, stay tuned! We fully recommend to stay up to date for more examples and updates by joining the Specman Users Groups in Linkedin or Team Specman in Facebook. Orit Kirshenberg Specman Team</description></item><item><title>Concurrent Actions in Specman: Part 2</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/concurrent-actions-in-specman-part-2</link><pubDate>Wed, 08 May 2019 12:01:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341672</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/concurrent-actions-in-specman-part-2</guid><slash:comments>0</slash:comments><description>In the previous blog: Concurrent Actions in Specman , we discussed the existing options: all of ( which awaits completion of all branches) and first of (which terminates at the first completion of any branch). In 19.03 we added enhancement on top of these existing options, we made them more dynamic. In all the examples in the previous blog, the number of branches was constant (all the examples used 2 branches). What if we need the number of branches to be dynamic and be determined only in run time? Let’s take for example an agent that has a TCM named send_data () and the environment has a list of agents. It needs to execute the send_data () TCM of each item in agents and wait until all are done. If we use for each on agents, the TCMs will run in sequel, one after the other. If we use the concurrency action all o f , we must explicitly define the actions so we cannot use it on list items (assuming the size is unknown). What we need is the combination of both. Starting from Specman 19.03, we have a new capability, the concurrent actions can be dynamic. Meaning, we can put all of or first of next to the for each in list statement as demonstrated in the following examples. We will go back to the examples we used in the previous blog – we used the daily task of feeding a child. Look at the child unit. unit child { eat() @sys.any is { message(LOW, &amp;quot;Child started eating the food&amp;quot;); wait [90] * cycle; message(LOW, &amp;quot;Child finished eating all the food&amp;quot;); }; }; Example 1: all of next to each in list items (using ‘for each’ syntax) Let’s first start with an example that does not need this dynamic. Let’s assume I want to have a dinner with my kids and I want to know when they are all done. I have no problem (even with older versions of Specman) - assuming I have 3 kids for example, I can use all of in the following way : all of{ children[0].eat(); children[1].eat(); children[3].eat(); }; But on weekends we sometimes have guests we want to feed as well and the number of kids coming over is changing. What we need to do is to use the new capability by using all of next to for each : unit familyVisit { children : list of child is instance; eat() @sys.any is { all of for each in children { it.eat(); }; message(LOW, &amp;quot;All children are fed.&amp;quot;); }; }; This is the result of running this code. As you can see we have 5 children that are having dinner concurrently. Note that if we remove the all of that is before the “ for each ” statement, the children will eat one after the other serially. Running the test ... [0] child-@1: Child started eating the food [0] child-@2: Child started eating the food [0] child-@3: Child started eating the food [0] child-@4: Child started eating the food [0] child-@5: Child started eating the food [90] child-@1: Child finished eating all the food [90] child-@2: Child finished eating all the food [90] child-@3: Child finished eating all the food [90] child-@4: Child finished eating all the food [90] child-@5: Child finished eating all the food [90] familyVisit-@6: All children are fed. Last specman tick - stop_run() was called Example 2: first of for list items (using ‘for each’ syntax) Let’s assume that I want to also serve deserts and have some contest- I will serve deserts until one of the children is finished, then deserts are over! We will use first of : extend child{ have_desert()@sys.any is { message(LOW, &amp;quot;Child started eating ate his desert.&amp;quot;); wait [100] * cycle; message(LOW, &amp;quot;Child finished eating his desert.&amp;quot;); }; }; extend familyVisit{ have_desert() @sys.any is{ first of for each in children{ it.have_desert(); }; message(LOW, &amp;quot;One child finished his desert, deserts are over!.&amp;quot;); }; }; This is the result of running this code: [0] child-@1: Child started eating ate his desert. [0] child-@2: Child started eating ate his desert. [0] child-@3: Child started eating ate his desert. [0] child-@4: Child started eating ate his desert. [0] child-@5: Child started eating ate his desert. [100] child-@1: Child finished eating his desert. [100] familyVisit-@6: One child finished his desert, deserts are over! . Last specman tick - stop_run() was called Example 3: first of for list items (using ‘for i from x to y’ syntax) In the two examples we have seen, we were using the “for each” syntax. Note that you can also iterate over list items and activate concurrent actions using the ‘for i from x to y&amp;#39; syntax. In our example, let’s assume that we have only 3 deserts and we want to give them only to the second, third and fourth children around the table: extend familyVisit{ few_have_desert() @sys.any is{ all of for i from 2 to 4{ children[i].have_desert(); }; message(LOW, &amp;quot;The 3 children finished their deserts.&amp;quot;); }; }; This is the result of running this code: [0] child-@1: Child started eating ate his desert. [0] child-@2: Child started eating ate his desert. [0] child-@3: Child started eating ate his desert. [100] child-@1: Child finished eating his desert. [100] child-@2: Child finished eating his desert. [100] child-@3: Child finished eating his desert. [100] familyVisit-@4: The 3 children finished their deserts. Enjoy your concurrent actions! Orit Kirshenberg Specman team</description></item><item><title>Specman Linting and the all_unique Method</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/specman-linting-and-the-all_5f00_unique-method-632610595</link><pubDate>Mon, 29 Apr 2019 13:07:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341650</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/specman-linting-and-the-all_5f00_unique-method-632610595</guid><slash:comments>0</slash:comments><description>Sorting according to pointers- why? One of the best practices that you need to follow when using Specman or any other tool is to use a linting tool on a regular basis to catch bugs early. In Specman, we frequently add additional e checks to HAL (Cadence linting tool) based on the customer issues that can be avoided or caught during linting. For instance, in 19.03, among few other linting checks, we planned to add a check that alerts the user when the list pseudo method sort is performed according to pointers. This can happen when for example you have a list of structs and you sort according to the list items (which means sorting according to their pointers) instead of each item’s field as shown in the given example: s truct transfer{ … }; var myTransfers: list of transfer; … myTransfers. sort ( it ); This linting check was planned following a case in which one of our users wrote “it” as the parameter to sort instead of “it.address”. In this case, it took the customer a while to find the issue, and so, we decided to add a linting check to make it easier to catch such bugs. At the beginning we assumed that this sorting according to pointers was not the actual intention, as the results may vary in different runs. However, after talking to some customers, we found a situation in which this was indeed the user intention. This involves the unique list pseudo method. The unique pseudo method The list pseudo method unique unifies identical items in a list into one so each item in the list is unique but only for consecutive items. This means that if I have a list with the following values and I call the unique method: var myList: list of int = {3;6;3; 5;5 ; 6;6;6 ;8;5}; var uniqueList: list of int ; uniqueList=myList. unique ( it ); print uniqueList; This is the output: uniqueList = 3 6 3 5 6 8 5 As you can see, only the consecutive items were united. Therefore, to have my list being unique, I should have first called the sort method to make sure all identical items are next to one another as shown in the following example: var myList: list of int = {3; 6 ;3; 5;5 ; 6;6;6 ;8; 5 }; var uniqueList: list of int ; uniqueList=myList. sort ( it ). unique ( it ); print uniqueList; This is the output: uniqueList = 3 5 6 8 Now, I really have a list with unique items. If I have a list of structs and I just want to ensure I do not have two identical actual structs then, yes, I had a legit reason to call the sort method according to pointers. The new all_unique pseudo method This made us think that it is time we provide a unique method which also supports non-consecutive items so that it is not needed to call the sort method first (regardless if it relates to pointers or not). It is better from the performance perspective and now we can add the linting check in HAL regarding sorting according to pointers since there is no justification to do it anymore. Therefore, unique method stays as is, however, in 19.03 we introduced an additional pseudo-method called all_unique . To better understand all_unique , let’s consider the following example: var myList: list of int = {3; 6 ;3; 5;5 ; 6;6;6 ;8; 5 }; var uniqueList: list of int ; uniqueList=myList. all_unique ( it ); print uniqueList; This is the output: uniqueList = 3 6 5 8 Note that we did not sort the list first so 6 is before 5 as it was in the original list. However, what if my list is already sorted anyway and now I want to make sure that all items are unique, which pseudo method should I call? In this specific case, it is advised to call unique rather than all_unique since the performance will be better. The HAL check for sorting according to pointers Now, we could add the lint check we wanted initially. In the following example we have a list of packets that we sort according to the list item ( it ) which is a struct, so basically, we sort it according to pointers. When I run HAL (from 19.03) on this code, I now get the following new error: The HAL check for calling sort and unique for non-pointers However now for cases in which sort is called before unique for non-pointers, we want to suggest replacing it with this new pseudo method: all_unique so the performance is better, and the code is clearer. Therefore, in 19.03, HAL will display the given note for the following code: var myList: list of int = {3;6;3;5;5;6;6;6;8;5}; var uniqueList: list of int ; uniqueList=myList. sort ( it ). unique ( it ); To sum it up, we have few points: If you do not use HAL or any other linting tool, it is about time that you start using it. If you are used to calling sort before you call unique , you can now call all_unique instead. If your list is already sorted and you want to make it unique, call unique for best performance. If you have your own linting tool, add the following checks: Warn in case sort is activated according to pointers Detect the cases in which sort is called before unique and suggest replacing it with all_unique Orit Kirshenberg Specman team</description></item><item><title>Concurrent Actions in Specman</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/concurrent-actions-in-specman</link><pubDate>Mon, 25 Mar 2019 11:55:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341575</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/concurrent-actions-in-specman</guid><slash:comments>0</slash:comments><description>Lately we have been asked by several customers about the concurrency options in Specman (some refer to it as “What are the Specman options similar to fork…join?”). Apparently, things that are in Specman for ages are likely to be missed. Therefore, this blog describes Specman concurrent actions (existing for years). Specman has two actions controlling concurrent execution: all of and first of. Both actions create parallel branches which might start or call TCMs: all of awaits completion of all branches (similar to the Verilog fork…join). first of terminates at the first completion of any branch (similar to the SystemVerilog fork…join_any). For demonstrating the various concurrency options, let’s take an example of a simple task of feeding a child. We usually give children both food and milk for dinner. This can be represented as: unit child { eat() @sys.any is { wait [90] * cycle; message(LOW, &amp;quot;Child ate all the food&amp;quot;); }; drink() @sys.any is { wait [40] * cycle; message(LOW, &amp;quot;Child drank all the milk&amp;quot;); }; }; Now, let’s do both the tasks of giving food and milk in parallel. Example 1: Using first of The first example is of a tired father. He will be happy if the child either finishes the food or the milk. He doesn’t expect the child to finish both the food and the milk. In this case, he will use first of . extend child { have_dinne r() @sys.any is { first of { { eat ()}; { drink ()}; }; message(LOW,&amp;quot;Child either finished eating or drinking, anyway dinner is finished&amp;quot;); }; }; And, here is the result of running this code. As you can see – this dinner is finished after the child finishes the milk. The eat() TCM never ends. Running the test ... [40] child-@1: Child drank all the milk [40] child-@1: Child either finished eating or drinking, anyway the meal is finished Last specman tick - stop_run() was called Example 2: Using all of On the weekend, father has more patience. So, he decides to wait until the child finishes both the food and the milk. So now he uses all of . The all off action will finish only after both eat() and drink() are completed. extend child { have_weekend_dinner () @sys.any is { all of { { eat ()}; { drink()}; }; message(LOW, &amp;quot;Child finished both eating and drinking, dinner is finished &amp;quot;); }; }; And, here is the result of running this code. As you can see – the meal finishes only after both TCMs ended. Running the test ... [40] child-@1: Child drank all the milk [90] child-@1: Child ate all the food [90] child-@1: Child finished both eating and drinking, dinner is finished Last specman tick - stop_run() was called Example 3: Using all of while starting a TCM The third example is of a father who is in a real hurry and needs to work while giving the child dinner. He gives the child dinner but does not wait to see if the child finishes it. In terms of coding, this busy father start the TCM, rather than calling it. extend child { have_dinner_father_working() @sys.any is { all of { { start eat()}; { start drink()}; };//all message(LOW, &amp;quot;Child started eating and drinking, father needs to work &amp;quot;); }; }; And, the outcome of running this TCM: [0] child-@1: Child started eating and drinking, father needs to work [40] child-@1: Child drank all the milk [90] child-@1: Child ate all the food Last specman tick - stop_run() was called We hope these examples will help you better understand concurrent options and you will enjoy using these options! Also, note that we are working on some enhancements around these areas. So, stay tuned!!! Orit Kirshenberg Specman team</description></item><item><title>Verification of ML IP and Specman—Our Hackathon Project</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/hackathon18</link><pubDate>Tue, 15 Jan 2019 15:21:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341423</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/hackathon18</guid><slash:comments>0</slash:comments><description>If you are lucky enough and your company spends a few working days each year on a Hackathon, you must know that it is usually a lot of fun. The latest 2018 Hackathon in Cadence was all about Machine Learning. We, in Specman R&amp;amp;D, debated a bit around how to approach the topic since Machine Learning means a lot of different things in our industry. Take a look at the following interesting article: Where ML works best in which Anirudh Devgan, president of Cadence, describes few main areas. When you talk about verification and Machine Learning, usually two main things come in mind: Using Machine Learning in Verification: We encountered multiple teams which use Specman for implementing machine learning techniques to optimize their regression. We have been getting different requests for more notifications and hooks, especially around coverage. And, we already have some of these requests on our roadmap. Verification of Machine Learning IPs: For any team working on machine learning IP or chip, verification is a critical and a challenging task and if done right, it can get you a leading edge. This usually involves a significant large dataset, which means you need to carefully decide which samples to test, pick up the good corner cases, and get to sufficient coverage fast.It is a well-known fact that Specman is the best verification engine- it has the best constraint solver and the easiest aids to define coverage model. Therefore, we decided to challenge our tool and see it in action in a Machine Learning (ML) environment. This blog describes our small Hackathon project that few of us from the Specman team were working on. This project presents Specman strengths in an ML IP verification environment. What model are we verifying? We decided that in favor of the Hackathon project, we are the verification team of a company that produces an IP of a weighted trained Neural Network (NN). We have decided to take a black box verification approach, meaning we are not verifying the NN internals but rather its outputs. Therefore, the exact usage of the NN was not that important for us but since image recognition is so useful and popular, we decided to go with it. In addition, we wanted to take advantage of the knowledge of the Machine Learning experts in Cadence. These experts provided us with a Convolutional NN (CNN) comprising 1 input-layer, 5 hidden-layers, and 1 fully-connected layer written in Python on top of Tensorflow. In addition, they provided us with a dataset called mnist-fashion containing small images of 10 different types of clothing items (shirt, dress etc.). In our Hackathon project, we aimed that our IP should be able to identify these clothing items. To make it more interesting, we decided that our IP will be used for identifying clothing items in an image constructed of 4 different clothing items (for example Shirt-Dress-Sandals-Trouser). Now, three things needed to happen: The Python SW model should be trained with a set of images. Our Machine Learning experts divided the dataset of images into a training set and a classification set and started training the CNN with the training set. The SW model should be converted into HDL model , defiantly a challenging and interesting task. However, since this is a time-consuming task and our main focus is on verification, we skipped this stage and decided to use some “dummy” HDL. The verification of this HDL model - is the focus of this Hackathon project. The verification In our little project, we want to perform black box verification to the HDL model . This means that without knowing its inner implementation and algorithms we just want to verify whether it is doing what it was designed to do- in our case identify clothing items in an image of 4 items. The Python SW model will be used as the reference model. Though in the real world there should be differences between what the HDL model is able to do as compared to the Python SW model , but this only makes the verification effort more important and challenging. What kind of images we want to use for the verification? Now, we have what we previously called the “classification dataset” of images that we wanted to use to verify that our trained dummy HDL Model can identify just as our Python SW model . As decided earlier, we need to identify images composed of 4 different clothing items and also need to verify all 10 possible clothing items. However, there are also other important factors such as the position in the image, and moreover, if there are specific types it is important to verify while they are next to one another? etc. Well, this requires defining a model including a few constraints which is quite natural to do with e . Let’s take the following constraints for example in which ‘items’ is a list containing 4 cloth types: // each combined image should have 4 different cloth types keep soft items. all_different (it.cloth_type); // have many coats keep soft cloth_type == select { 30 : Coat; 70 : others; }; // never have an image containing both dress and skirt keep (skirt not in cloth) or (dress not in cloth); How will we construct this image of 4 different items? Remember, we have a dataset of single clothing items and we want to use Specman generation to pick up these specific 4 small images and their positions, but “who” will construct this full image? Logically, the right thing to do instead of inventing the wheel is to use some existing Python API. We found the Python algorithm, ComputerVision (thanks again to our ML guys). Now we were left with the question of how to activate it from Specman. Python has a C interface . Specman has two flavors of C interface, a basic one and an advanced one which is called FLI . The basic C interface is easy to use and is sufficient for our project, so we decided to use it. We defined the method that constructs an image out of 4 small images in e as a C function. In the C implementation, we had to write some code to call the Python API. Once we found the Python algorithm, ComputerVision, it took one of our team members few hours to get it working. How do we activate the reference model? Our CNN was written in Python using Tensorflow. Once we were already using Python API for constructing the image, we just needed to do the same for calling the Python SW model . Calling Python from e the second time was obviously easier and faster. How would we know which images and combinations were tested? Naturally, we want to know whether we have covered all types, what combinations were covered and what we did not cover etc. while there are a few different interesting combinations. The fastest way for us to do so was to use Defined As Macro to generate the different coverage items. Using a coverage cross item would have been a more elegant and robust solution but we assumed that using the macro was the fastest way. Running the verification Now that we had all the parts working, we only needed to push the simulation “play” button and all the parts came into life as shown in the following workflow in a loop: Specman picks a combination of 4 items according to the defined constraints. Specman calls the ComputerVision API to construct a new image. Specman calls the Python SW model with this new constructed image and gets a result of 4 items identified. Specman sends this image also to the HDL Model and gets a result (hmmm… not really, as we said at the beginning, we used some dummy HDL model that usually produces the same result as the Python SW model, except in a few odd cases). Specman “checks” the two results and compares them. When the test ended, we were left with the result of the passed and failed cases and our coverage model. For those of you who were using TensorFlow in a parallel mode, yes, we might have been able to do things more productively in TensorFlow, but remember that this is a short project and we had time constraints… How did the coverage report look like? All 10 clothing types were covered. For the different combinations, you can see that we have never had the combination of: Dress- Sandal- Sneaker-T-shirt. Since we defined 20 as the “at_least” value for each combination, you can see that we got 4 Dress-Sandal-T-shirt-Trouser (second line: 20%). Summary First things first, as a team we had a lot of fun- the whole exercise was exciting and very different compared to what we usually do in our daily work. Moreover, it was very fulfilling to see Specman’s strengths in action in a relatively new domain. It is well known that Specman is the best verification engine, but it seems that as a tool it can especially shine in a domain which involves massive amount of data, where you need to pick the most important pieces of data and monitor them. Furthermore, SW engineers may find these capabilities useful for validating their SW and can use Specman as a stand along application without the simulator. More information will come later, stay tuned… Orit Kirshenberg Specman team</description></item><item><title>Specman 18.09: Avoiding the Small Annoying Mistakes</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/specman-18-09-avoiding-the-small-annoying-mistakes</link><pubDate>Mon, 08 Oct 2018 22:41:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341253</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/specman-18-09-avoiding-the-small-annoying-mistakes</guid><slash:comments>0</slash:comments><description>Specman 18.09: Avoiding the Small Annoying Mistakes In almost every industry, one has the potential of making a small mistake that may cost hours or days to find. The following interesting article takes the small mistakes to the extreme and mentions a few cases of small mistakes that had a huge effect: Messing up big time: 10 tiny mistakes that have caused HUGE problems . How is it relevant to Specman? As a verification engineer, you want to avoid silly mistakes (mistakes that may occur regardless of how smart you are). True, usually these mistakes may not result in a catastrophe like in the article, but might cost you hours of debugging and loads of frustration that ends with saying “I do not believe I have spent the whole day looking for this careless mistake” or something like “Who is this guy that messed the order of these values? Ha… it was me...”. This blog is about trying to avoid errors around equivalent enums in HDL and the testbench. It is a very common requirement to create an enumeration in e to drive (with a port) an equivalent HDL enum. For example, assume you have System Verilog object of type: typedef enum { M_IDLE = 2&amp;#39;b00 , M_DATA = 2&amp;#39;b10 , M_ADDR = 2&amp;#39;b01 , M_END = 2&amp;#39;b11 } rcvstate; Then you need to define in e the following type: type rcvstate [ M_IDLE = 2&amp;#39;b00 , M_DATA = 2&amp;#39;b10 , M_ADDR = 2&amp;#39;b01 , M_END = 2&amp;#39;b11 ]; In Specman 18.03 , we added the set e2hdl checks command . This command compares two enum existing definitions (in HDL and in the Test bench) to ensure that they are compatible. The purpose of this command is to ensure that if someone changes one of these enums, assuming that you have this command running on a regular basis, you will get to know about it right away and it will save you the time that you may have used in debugging to understand what went wrong. You can read more about this in the blog: Enum compatibility error in Specman . In Specman 18.09 , we took this functionality one step further by adding a new command, write type_map . This command saves you the time to define the enum in the testbench in the first place. It extracts the HDL data and creates the equivalent enum in e for each enum in the design. The write type_map command gets the snapshot as an input and creates an e package files with all the e enumerators. Naturally, this means that you can use this command only after elaboration. Let’s take an example. Let’s assume that we have a DUT with SV module called types that includes the following enums: typedef enum integer {IDLE=0, GNT0=1, GNT1=2} state ; typedef enum int {ADD = 1,SUBTRACT = 3,MULTIPLY = 7} cmd ; typedef enum bit [3:0] {bronze=&amp;#39;h1, silver, gold=&amp;#39;h5} newMedal ; When we elaborate the design and run the command: xrun -elaborate top.sv specman -c &amp;quot; write type_map worklib.top:sv” An e file called top.e is created with the following content: This way we are eliminating the option of making an error while defining the enums (most likely with the order of the enum values). This command has few options you can use. You can read about it in cdnshelp. We strongly recommend that you have a look at all the new features of Specman 18.09 in “What’s new in the Xcelium 18.09”. Orit Kirshenberg Specman Team</description></item><item><title>Adding a Patch Just in Time! — Or Can You Really Allow Yourself to Waste So Much Time?</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/adding-a-patch-just-in-time-or-can-you-really-allow-yourself-to-waste-so-much-time</link><pubDate>Thu, 30 Aug 2018 14:02:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341064</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/adding-a-patch-just-in-time-or-can-you-really-allow-yourself-to-waste-so-much-time</guid><slash:comments>0</slash:comments><description>One animation video - Patch Like The Wind - is worth a thousand words :) If you don’t use Specman or don’t use Specman correctly, you spend most of your time waiting for compilation to finish. One of the most frustrating (and common…) scenarios is when you know more or less what the fix should be (such as, “wait additional cycle before sending” or “the variable should be int and not uint”) and the fix can be done in a matter of minutes. However, you are forced to spend hours waiting for the compilation to end in order to analyze the results and decide if you are satisfied with the fix. While fixing the code, usually you do not write the exact right code the first time. So, you adjust your code – another matter of few minutes – and then you have few more hours to wait for compilation. Horrifying. But not if you use Specman. With Specman, you can fix a file loaded on top of the compiled environment. Here, you don’t need to wait for hours of compilation. You can create a small ‘patch’ file, in which you implement the changes, and then you can load this patch file on top of the compiled environment. Once you are happy with the changes you made – you can move the fixed code to the relevant file/s and compile. Loading one or two files instead of compiling the whole environment can save you hours, if not days, for every fix of your code. If you want to save some more time – don’t run the test from the start. Save the test before the interesting point (before sending the item, when calling the checker), and dynamic load the fixed file. The capability to modify the testbench with code loaded on top is also very helpful when it comes to getting fixes from other teams/companies. Instead of waiting for the VIP or any other tool provider to create a fixed version – they send you one e file which you can load on top. Even Specman, as it is written in e , can be extended with patches. No need to wait for an official hot fix - you can get a patch file from the Support team with the required fix. Yes, this is no news to Specman users. In meetings with Specman users, asking them “What is your favorite feature?”, one of the top answers is “the Great Patching Capability”. Next time you are asked “Are you still using Specman?”, you can reply “Sure, and are you still compiling?”</description></item><item><title>UVM-ML- Managers’ Freedom of Choice</title><link>https://community.cadence.com/cadence_blogs_8/b/fv/posts/uvm-ml--managers-freedom-of-choice</link><pubDate>Thu, 28 Jun 2018 14:30:00 GMT</pubDate><guid isPermaLink="false">75bcbcf9-38a3-4e2e-b84b-26c8c46a9500:1341027</guid><dc:creator>teamspecman</dc:creator><guid>/cadence_blogs_8/b/fv/posts/uvm-ml--managers-freedom-of-choice</guid><slash:comments>0</slash:comments><description>Freedom of choice is a term we hear a lot, especially in the last 10 years. It is defined in wikipedia as “an individual&amp;#39;s opportunity and autonomy to perform an action selected from at least two available options…”. Is having many choices always a good thing? Well, usually it is- who would not want to live in a world where s/he has options and can make choices? However, there are also downsides to having multiple options. In the TED lecture, The paradox of choice , Barry Schwartz discusses the negative aspects of having too many choices. For example, in the healthcare world- in some cases, your physician might present you with a few options and let you make the right medical choice for yourself. Is it necessarily a good thing? Do you always feel you have the tools to make this choice?... Freedom of Choice is discussed a lot in the context of many fields such as, law, economics, and well being. But, what does freedom of choice mean in the context of verification? Among other things, it is the freedom to choose the right verification language for your project. The world today is much more complex than it used to be a few years ago. Situations like acquisitions, mergers, remote-sites, and purchased third-party VIPs might create few challenging situations, especially for the managers who need to make choices. Let’s talk about two common scenarios, integrating existing UVCs and choosing a language for new projects. Integrating Existing UVCs This is a very common scenario as a result of acquisitions. What would you do if you need to have an existing UVM-SV UVC interact with an existing UVM- e UVC? Will you rewrite one of them with the other language? Naturally, rewriting a UVC is a huge effort. Fortunately, with UVM-ML you can reuse these existing UVCs and have them co-exist and communicate with the right topology) discussed in the following sections). As a manager, it saves you the effort of rewriting a UVC and if you want each team to continue working with the language it is used to, you can do this with UVM-ML. Choosing a Language for New Projects You might find yourself in a similar situation (as described above) even for a new project. For example, if you have two teams, and each team is used to working with a different language. Here, you can either select the best language for all the teams or let each team continue working with the language it is used to. In principle, the former option is preferred. Firstly, regardless of the power of UVM-ML, it is always easier having everything written in the same language. Secondly, you would prefer having all your people working with the language providing the best quality and productivity. So, what is the best verification language? Anyone who has worked with both e and SV knows by experience that e is much superior because of several reasons, but this is a subject for a different blog. It is true that Xcelium bypasses many limitations of the System Verilog LRM, however, still using e as the verification language is easier and more effective. So, the best option would be to have everyone work with e , however, it is not always possible. In reality, there might be other factors and considerations. For example, you might have a team pressuring to continue with the language it is used to. In such a situation, as a manager you might decide to let each team select its preferred language. This is the flexibility you get with UVM-ML, this means you have a choice and you can have each team make its own choice. So what is UVM-ML exactly? UVM-ML library enables you to connect different UVCs written with UVM- e , UVM-SV, and UVM-SC. While we, as the R&amp;amp;D, are aware of its importance as the glue in several leading companies, it is always exciting to hear customers appreciate its capabilities. In 2018 US DVCon, HP Enterprise won the best poster titled: “Is e still relevant?”. In addition to the fact that the answer in the poster is “yes”, in this poster (and its relating paper), HP Enterprise describes UVM-ML as the enabler for both reuse of the existing projects written in different languages and selecting the right language for each project (frankly speaking, we could not say it better…). Figure 1:HP Enterprise poster that won best poster in 2018 US DVCon This poster and the paper include case studies and learnings from projects within the Silicon Design Lab (SDL) of HP Enterprise. They are saying: “UVM-ML has a proven track record within SDL. It has been used for several years, spanning numerous projects… Through these projects, SDL has been able to take advantage of many of the advanced testing features available in Specman/e while utilizing a variety of UVMSV content from internally developed VCs to externally purchased Verification IPs.”. UVM-ML was developed with AMD as an open source library provided in Accellera site. Since Incisive 15.2 it is provided also within incisive and Xcelium. We encourage our customers to use the version provided within Xcelium since it has an enhanced integration with Xcelium, however, there are some cases in which customers choose to use the open source version (you can always consult with the UVM-ML support team: support_uvm_ml@cadence.com). UVM-ML supports multiple topologies according to the user environment. In a side-by-side hierarchy (parallel trees), the environment contains multiple tops, each top containing the components of a single language. In Unified hierarchy (single tree)- each component is instantiated in its logical location in the hierarchy. For simplicity, the two examples contain two languages, however can be extended to three. Figure 2: Side by side example Figure 3: unified hierarchy example How does the magic work? UVM-ML contains an inner backplane, services, etc. but the main part that is relevant to the user’s point of view is the adapter which has an API for connecting your UVC to the UVM-ML library. The API of each adapter is provided in the native language of the framework that is being connected, meaning there is a UVM- e adapter, a UVM-SV adapter, and a UVM-C adapter. This means that when you connect your UVC to the library, you do it with the language you are familiar with. Figure 4: UVM-ML inner blocks There is a lot of material out there about UVM-ML. You can read more about UVM-ML in the reference and user manuals in cdnshelp. If you want to quickly get started, it is recommended to read the following blogs: Multi-Language Verification Environment—Getting First Run in Few Minutes Multi-Language Verification Environment (#2) – Passing Items on TLM Ports, Using UVM ML Multi-Language Verification Environment (#3) – Connecting UVM Scoreboard to a Multi-Language Environment Multi-Language Verification Environment (#4)—Multi-Language Hierarchy To wrap up, enjoy our multi choices world of verification!!! Orit Kirshenberg Specman team</description></item></channel></rss>