Vengineerの妄想(準備期間)

人生は短いけど、長いです。人生を楽しみましょう!

vmm_vxc_managerクラスの実装(その6)

Verification Engineerの戯言

最後は、エラー無しのときはexecute関数を実行します。
        // Execute only if there are no errors in the testfile
        if (this.log.get_message_count(vmm_log::FATAL_SEV + vmm_log::ERROR_SEV,
                                       "/./", "/./") > 0) begin
            `vmm_fatal(this.log, "Unable to execute testfile because of errors");
        end
        else
            this.execute();
このexecute関数は、次のように定義されています。
いろいろなことをやってはいますが、結局はthis.execute_scenario(current_sc)でシナリオを実行します。
各シナリオ(this.exec_scenarios[i)は、process_cmd関数内のtry_execute関数で登録されます。
    task vmm_xvc_manager::execute();
       //Initialize all event monitors in scenario space
        foreach(this.exec_scenarios[i]) begin
            int index;

            for (int j = this.exec_scenarios[i].events.first(index);
                 j != 0;        
                 j = this.exec_scenarios[i].events.next(index))
                this.exec_scenarios[i].events[index].init();
        end

        //Initialize and schedule all the global events
        // i.,e watching for other event occurences.
        //also start the stoponevent watchers 
        begin
            int index;

            for (int i = this.events.first(index);
                 i != 0;
                 i = this.events.next(index)) begin
               this.events[index].init();
               this.events[index].start();
            end
        end

        //initialize the 'stop-on-event' watch
        this.start_stop_on( this.current_sc );

        //ref vmm_xvc_scenario argument
        fork begin
            //Execute scenarios        
            foreach(this.exec_scenarios[i]) begin
                this.current_sc = this.exec_scenarios[i];
                this.execute_scenario(current_sc);
            end

            //Terminate Stopwatch on all events
            this.terminate_stop_on();

            //Terminate Global events
            begin
                int index;

                for (int i = this.events.first(index);
                     i != 0;
                     i = this.events.next(index)) begin
                         this.events[index].kill();
                     end
            end

            disable execute;
        end join_none

        // Handle forced termination
        @(this.terminate_ex);
        disable execute;
  
    endtask: execute

検証、Verification、SystemVerilog、VMM、Verification Methodology Manual