Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by tudor.timi

  1. The section on arrays doesn't mention any array-pseudo methods, similar to what SystemVerilog had. These were particularly useful in constraints to be able to perform more involved operations that either weren't possible using a foreach or required a lot of support code to work. The way e implemented list methods inside constraints was even more powerful, so one could look there as well for inspiration.
  2. Here's example 57: component top { resource R {} pool[4] R R_pool; bind R_pool *; action A { lock r R; } action B {} action C {} action D { lock r R;} action my_test { activity { schedule { {do A; do B;} {do C; do D;} } } } } The description states that the following execution orders are valid: If there were only one resource R, then a, b in parallel with c, d becomes illegal, due to the lock. Would the execution of a, b and c in parallel and d also be legal? Theoretically, this could happen, since there is no locking going on. If it's not legal, from a PSS semantic point of view, is this because of the statement keeping scheduling dependencies within the sets? If so, an explicit note of this fact would be helpful. Also, what would be a compact way to add the behavior I described?
  3. tudor.timi


    You're using 'var' as a variable name, but this is an SV keyword. Try naming your variable something different: fork automatic int idx = i; // ! `uvm_do_on(eseq_inst[var], p_sequencer.master_sequencer[var]) join_none
  4. Why artificially restrict the length of integral expressions at the language body to 64 bits? Why not also provide (separately if preferred) an extra type/function qualifier on the PSS side and the corresponding header on the C/SV/foreign language side to allow passing of arbitrary data lengths?
  5. Cryptographic applications generally use long number arithmetic. I get what you mean, that it's possible to split a key, for example, into an array of words of bus width, since the key has to get into a cryptographic accelerator somehow. In a constrained random TB it would be done via a series of bus transfers and in an SoC context via a series of STORE instructions.
  6. I'm not sure if it's possible to declare an array of variable, but fixed at generation, size. This is really useful when building generic code (e.g. 4 or 8 responses after a request, etc.).
  7. Sizing at generation time was what I had in mind. I didn't notice that this was possible.
  8. tudor.timi

    Array pseudo-methods missing

    Not just reduction methods, but also methods like 'has(...)' that take a condition. Even in SV, looking for an item that satisfies a condition takes multiple lines (declare queue for result, call 'find(...)' on array, use result inside 'if' block).
  9. The definition of the term coverage is given as Coverage, in the context of covspecs, is used in the document to describe test goals instead of a posteriori measurements. The definition should be updated to reflect this.
  10. I don't see the benefit in mentioning the detail namespace at all, since this is an implementation artifact. It's interesting for a user to know what the functions an API consists of, but I don't see the benefit in knowing that scope inherits from detail::ScopeBase, for example.
  11. Having all of these C++ declarations in parallel to the DSL really ruin the flow. I'm not talking about the examples, there I guess it's not so much of an issue. I'm talking about stuff like the PSS_ENUM macro definition which is provided in-line, instead of in some annex. Full declarations of C++ classes for PSS constructs are also provided, instead of stripped down versions.
  12. SystemVerilog had a cool features where it was possible to specify a sequence of enum literals: typedef enum { SOME_LITERAL[10] } some_enum; This would generate an enum with the literals SOME_LITERAL0, SOME_LITERAL1, ..., SOME_LITERAL9. This was pretty useful in building generic code that can deal with a configurable number of states, transfers, whatever. I noticed this feature is missing in the PSS. This could easily be supported in the DSL, but it's probably more difficult (if at all possible) to implement in C++. Is this the reason it's not in there? There are other sections in the document that specifically state that some feature is not available in the DSL/C++ version, so adding it do the DSL and not to C++ would be consistent.
  13. Is it possible to nest if_then_else statements in PSS/C++? The C++ declaration of it is: class if_then_else : public detail::SharedExpr { public: /// Declare if-then-else activity statement if_then_else (const detail::AlgebExpr& cond, const detail::ActivityStmt& true_expr, const detail::ActivityStmt& false_expr ); }; Is an if_then_else compatible with a detail::ActivityStmt?
  14. I noticed that this document also promotes antiquated coding practices, in this case misguided use of Hungarian notation to postfix identifiers with their types. In the age of IDEs, I don't see the benefit of this. In the even more specific case of examples that are a couple of lines long, any benefits one could come up with are even less relevant. It's also used inconsistently throughout the document, which is even worse. For example, the _s suffix is for both structs and states. There is one example in there, where an identifier is called power_state_s, which is just redundant and reads strange.
  15. The use of the term struct for both the PSS construct and in the C++ examples for declaring classes leads to confusion. Let users use struct in their code all they want, but at least make the examples clearer by using class and public.
  16. When I first read example 22 I was confused about the temporal relations between setup and traffic. The semantics are explained later, but a description would be beneficial along with a link to the relevant sections. One thing that I was wondering about is whether traffic and setup would ever be scheduled at the same time, which would lead to the configuration changing during transmission (this would be bad). I think further sections clarify that this isn't possible (i.e. to put them in a parallel block).
  17. The current implementation of labeling is unintuitive, due to the fact that it allows parts of the labeled hierarchy to go unlabeled. Path statements like foo.bar.goo could have a lot more scopes in between which makes it difficult to reason about it's relation with some_scope.some_other_scope.yet_another_scope. Why not just restrict labeling to parts of the hierarchy that were already labeled?
  18. It's mentioned that constraints and randomization mimic SystemVerilog. Randomization as a term is used everywhere, but the hooks are called pre/post_solve(). Why not just call them pre/post_randomize()? The main audience is for this standard will be users with SystemVerilog experience.
  19. Here's example 102: component top { buffer mem_obj { int val; constraint val%2 == 0; // val must be even } action write1 { output mem_obj out_obj; constraint out_obj.val inside [1..5]; } action write2 { output mem_obj out_obj; constraint out_obj.val inside [6..10]; } action read { input mem_obj in_obj; constraint in_obj.val inside [8..12]; } action test { activity { do write1; do read; } } } The description states that Do tools start to introduce actions just to be able to satisfy preconditions? Do I just specify "do this" and the tool figures out how to get there? If so, this is a really cool feature, which isn't immediately obvious from the PSS document or from the DVCon Europe tutorial I went to. I would insist on it and give it a prominent place in the specification. The Brekker motto of "beginning with the end in mind" comes to mind here. The follow-up question is, can a tool generate all possible ways to get to a certain outcome?
  20. I can imagine the need to be able to reuse complicated scheduling schemes, that are more involved than just sequential/parallel/schedule blocks. This would be done with scheduling constraints on a set of actions, where the action types are irrelevant. I didn't notice any any_action type in the DSL or the possibility to pass action references. How would this be achieved? Even if there were an any_action type and the possibility to pass action references, there might still be more involved use cases where not the types of the actions matter, but some fields that they provide need to be referenced. Multiple inheritance or generic extends (that can be used as decorators) aren't possible as far as I could see, but this could be solved via parameterization (similar to how one could do it in SystemVerilog. The standard doesn't provide this either. Such generic programming building blocks would be required to build an ecosystem of reusable libraries for various repetitive tasks.
  21. Inside a coverspec it's possible to specify ignore/illegal constraints, for example inside crosses. It would be nice to also be able to name these constraints. This way the intent of such a constraint is clearer than having to parse its entire expression and understand that.
  22. It's not possible to specify more complex bin expressions, aside from listing them out. SystemVerilog had the with construct, which was really useful to programmatically define bins that had a certain structure.
  23. The second class definition in the example is unclear: import class ext : base { void ext_method(); } Is base a class that is imported? The syntax doesn't suggest this, since the import is before class_ext. Why not force the user to import base separately and inherit from it in a separate declaration?
  24. The chapter on HSI is pretty empty. There were questions as to whether it's even going to make it in the first release of the PSS. HSI seems like a really cool idea and its benefits could extend further than just verification. It could, for example, also be used for firmware development. PSS is a verification-oriented standard and will have this reputation. I would assume it's going to be difficult to market it to firmware folks to use the HSI sub-set. Having HSI as an own standard allows it to evolve to better serve both needs (and many more if identified).
  25. It's easy to see from the examples that the C++ snippets are much longer than the DSL examples. I don't really buy the argument that some people are more accustomed with C++ and would find it easier to work with it. When the announcement was made that a DSL was going to be developed, I wasn't a big fan of the idea: "yet another verification language". I was put off by the time it would take to develop it, but now since the deed is done, I fear it will take more time to move the standard forward with both languages. I would buy into it more if it were possible to specify stuff in C++ and the standard would provide the required library to link into my PSS model in order to compile everything with GCC and get the model in executable form. Back-end tools could take this model and generate verification infrastructure from it. They could also provide a front-end to directly read C++, so that it's easier to set things up. The idea behind using GCC is that it would be easy to build extensions to tools, since the entire model would be traverse-able in user code. I could also build my own little back-end tools without having to build the entire front-end (lexing, parsing, compiling, etc.) if I want to experiment with some new thing. There were some blog posts out there (can't remember where exactly) that mentioned that this won't be the case. It won't be possible to just take a C++ PSS model and put it into GCC, which is kind of a missed opportunity. The PSS library doesn't have to be part of the standard. The current specifications in the standard would suffice and vendors could provide their own libraries that are optimized for traversal speed or whatever else. I would welcome an open-source implementation, though, similar to how UVM has the Accellera SV-BCL. Without this basic ecosystem, I don't see much sense in supporting both languages.