예제 #1
0
파일: test.py 프로젝트: zfling/uvm-python
 async def run_phase(self, phase):
     phase.raise_objection(self)
     sv.display("%0t: %0s:  start run phase", sv.time("NS"),
                self.get_full_name())
     await Timer(test_duration, "NS")
     sv.display("%0t: %0s:  end run phase", sv.time("NS"),
                self.get_full_name())
     phase.drop_objection(self)
예제 #2
0
파일: test.py 프로젝트: zfling/uvm-python
    async def run_phase(self, phase):
        await Timer(1, "NS")
        p = packet(0)

        while self.data_out.try_put(p):
            sv.display("%0t: put data %0d", sv.time(), p.i)
            await Timer(10, "NS")
            p = packet(p.i + 1)

        sv.display("try_put status return: %0d", p.i)
        sv.display("%0t: do a blocking put", sv.time())
        await self.data_out.put(p)
        sv.display("%0t: blocking put succeeded", sv.time())
예제 #3
0
파일: test.py 프로젝트: zfling/uvm-python
    async def run_phase(self, phase):
        #100;  // fifo will fill up
        await Timer(100, "NS")  # FIFO will fill up
        sv.display("%0t: getting one", sv.time())

        p = []
        await self.data_in.get(p)
        p = p[0]  # Required for python-tlm now
        sv.display("%0t: received data %0d", sv.time(), p.i)
        #100;  // let the blocking put succeed
        p = []
        while self.data_in.try_get(p):
            p = p[0]
            sv.display("%0t: received data %0d", sv.time(), p.i)
            #10
            await Timer(10, "NS")
            p = []
예제 #4
0
파일: test.py 프로젝트: zfling/uvm-python
 def report_phase(self, phase):
     sv.display("%0t: %0s:  report", sv.time("NS"), self.get_full_name())
예제 #5
0
파일: test.py 프로젝트: zfling/uvm-python
 def check_phase(self, phase):
     sv.display("%0t: %0s:  check", sv.time("NS"), self.get_full_name())
예제 #6
0
파일: test.py 프로젝트: zfling/uvm-python
 def extract_phase(self, phase):
     sv.display("%0t: %0s:  extract", sv.time("NS"), self.get_full_name())
예제 #7
0
파일: test.py 프로젝트: zfling/uvm-python
 def start_of_simulation_phase(self, phase):
     sv.display("%0t: %0s:  start_of_simulation", sv.time("NS"),
                self.get_full_name())
예제 #8
0
파일: test.py 프로젝트: zfling/uvm-python
 def end_of_elaboration_phase(self, phase):
     sv.display("%0t: %0s:  end_of_elaboration", sv.time("NS"),
                self.get_full_name())
예제 #9
0
파일: test.py 프로젝트: zfling/uvm-python
 def build_phase(self, phase):
     sv.display("%0t: %0s:  build", sv.time("NS"), self.get_full_name())
예제 #10
0
파일: test.py 프로젝트: zfling/uvm-python
 async def run_phase(self, phase):
     sv.display("%0t: %0s:  start run phase", sv.time("NS"),
                self.get_full_name())
     await Timer(self.delay, "NS")
     sv.display("%0t: %0s:  end run phase", sv.time("NS"),
                self.get_full_name())
예제 #11
0
파일: test.py 프로젝트: zfling/uvm-python
async def print_proc(fifo):
    for i in range(30):
        sv.display("%0t:   FIFO level %0d of %0d", sv.time(), fifo.used(), fifo.size())
        await Timer(10, "NS")