当前位置: 首页>>代码示例>>Python>>正文


Python Simulation.quit方法代码示例

本文整理汇总了Python中myhdl.Simulation.quit方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.quit方法的具体用法?Python Simulation.quit怎么用?Python Simulation.quit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在myhdl.Simulation的用法示例。


在下文中一共展示了Simulation.quit方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: issue_104_multiple_instance

# 需要导入模块: from myhdl import Simulation [as 别名]
# 或者: from myhdl.Simulation import quit [as 别名]
def issue_104_multiple_instance():
    sim1 = Simulation(test())
    sim1.run(1000)
    # sim1 is "puased"

    # try and create a second, third, forth simulation instance
    for ii in range(4):
        with raises_kind(SimulationError, _error.MultipleSim):
              another_sim = Simulation(test())
    # generating more sims should have failed
    sim1.run(1000)
    sim1.quit()
开发者ID:Aravind-Suresh,项目名称:myhdl,代码行数:14,代码来源:test_issue_104.py

示例2: testBackupOutputFile

# 需要导入模块: from myhdl import Simulation [as 别名]
# 或者: from myhdl.Simulation import quit [as 别名]
 def testBackupOutputFile(self, vcd_dir):
     p = "%s.vcd" % fun.__name__
     dut = traceSignals(fun)
     sim = Simulation(dut)
     sim.run(1000, quiet=QUIET)
     sim.quit()
     _simulator._tf.close()
     _simulator._tracing = 0
     size = path.getsize(p)
     pbak = p + '.' + str(path.getmtime(p))
     assert not path.exists(pbak)
     dut = traceSignals(fun)
     _simulator._tf.close()
     _simulator._tracing = 0
     assert path.exists(p)
     assert path.exists(pbak)
     assert path.getsize(pbak) == size
     assert path.getsize(p) < size
开发者ID:Aravind-Suresh,项目名称:myhdl,代码行数:20,代码来源:test_traceSignals.py

示例3: run

# 需要导入模块: from myhdl import Simulation [as 别名]
# 或者: from myhdl.Simulation import quit [as 别名]
    def run(self):
        """ Start the MyHDL Simulation.
        This function will start the myhdl simulator.  The myhdl simulator
        will run in a separate thread (this object).  The outside world will
        interact with the HDL simulator enviroment through the Read/Write
        functions.  These functions will send buffers (lists) to be read or
        written to the simulation enviornment.
        """
        gens = []
        # use the module/function wrapper for tracing
        tb_intf = slave_fifo(self, self.fx2_bus)

        @always(self._stop.posedge)
        def tb_mon():
            raise StopSimulation

        tb_intf.config_sim(trace=self.trace)
        gens = [tb_intf, tb_mon, self.g]
        sim = Simulation(gens)
        sim.run()
        sim.quit()
开发者ID:FelixVi,项目名称:rhea,代码行数:23,代码来源:fx2_model.py

示例4: testTristateTrace

# 需要导入模块: from myhdl import Simulation [as 别名]
# 或者: from myhdl.Simulation import quit [as 别名]
 def testTristateTrace(self, vcd_dir):
     sim = Simulation(topTristate())
     sim.run(100, quiet=QUIET)
     sim.quit()
开发者ID:StudentESE,项目名称:myhdl,代码行数:6,代码来源:test_traceSignals.py

示例5: Signal

# 需要导入模块: from myhdl import Simulation [as 别名]
# 或者: from myhdl.Simulation import quit [as 别名]
    pixel = [1, 0, 0]

    clock = Signal(bool(0))
    clock_drive = clock_driver(clock)

    video_interface = VideoInterface(clock, res)

    @instance
    def test():

        video_interface.reset_cursor()
        video_interface.enable_video()

        # iterating over the frame
        for _ in range(res[0]*res[1]):
            # Sending a pixel
            yield video_interface.write_pixel(pixel), \
                video_interface.read_pixel()
            assert video_interface.get_pixel() == pixel

        video_interface.disable_video()

    return clock_drive, test

test_inst = test_video_interface()

sim = Simulation(test_inst)
sim.run(10000)
sim.quit()

开发者ID:cfelton,项目名称:HDMI-Source-Sink-Modules,代码行数:31,代码来源:test_video_interface.py

示例6: issue_104_quit_method

# 需要导入模块: from myhdl import Simulation [as 别名]
# 或者: from myhdl.Simulation import quit [as 别名]
def issue_104_quit_method():
    sim = Simulation(test())
    sim.run(1000)
    sim.run(500)
    sim.quit()
    return sim._finished
开发者ID:Aravind-Suresh,项目名称:myhdl,代码行数:8,代码来源:test_issue_104.py


注:本文中的myhdl.Simulation.quit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。