tpoikela / uvm-python

UVM 1.2 port to Python
Apache License 2.0
234 stars 45 forks source link

It seems there are some problems in starting the sequence by using the way of UVMConfigDb.set(self, "xxx.xxx_vsqr.main_phase", "default_sequence", self.vseq ). #53

Open 717-yq opened 3 weeks ago

717-yq commented 3 weeks ago

Hello, I encountered a problem when starting the sequence using the default_sequence method. The simulation does not execute the body content of the sequence. After inspection, I found that the code if (sv.cast(sbr, rscr, UVMConfigDb)) in the start_phase_sequence of uvm_sequencer_base.py seems to have some issues. Because the transmitted rsrc is of the UVMResource type, this branch is always judged as False, and the sequence cannot be started. If if (sv.cast(sbr, rscr, UVMConfigDb)) is modified to if (sv.cast(sbr, rscr, UVMResource)), the sequence can be mounted and executed, but the objection cannot be dropped. The error location is in the comp.drop(self, source_obj, description, count) within the dropped function of uvm_objection.py. The error message is that comp has no attribute 'dropped'. The print shows that the type of comp is the self.vseq transmitted by UVMConfigDb.set(self, "top_env.v_sqr.main_phase", "default_sequence", self.vseq ), while when starting using the seq.start method, the type of comp here is uvm_test. I wonder if there is a problem with my usage method, or do you have an example of using default_sequence and uvm_do_on_with to specify the start of sqr? Looking forward to your reply. Thank you very much.

UVMConfigDb: 1 self.vseq: 2 top_base_vseq: 4 error info: ![Uploading 3.jpg…]()

717-yq commented 3 weeks ago

error info: 3

717-yq commented 3 weeks ago

error info: 错误信息: 3

This issue has been resolved. After inspection, it was found that the raised/dropped/all_dropped functions were defined in uvm_component, but not in uvm_object. After copying these three functions to uvm_object, objections could be raised and dropped normally. However, I checked the UVM-SV library functions and found that the raised/dropped/all_dropped functions also did not exist in uvm_object. So this solution might only be a superficial fix. I'm very eager to hear your opinion and look forward to your reply. Thank you very much.

tpoikela commented 3 weeks ago

Thanks for reporting and looking into this. There is a missing cast in dropped function in uvm_objection.py, that you can see on line 846 in the original Systemverilog UVM 1.2 version of uvm_objection.sv. I cannot fix it at the moment, but can do it next week.