本文整理汇总了Python中Ruby.create_vsystem方法的典型用法代码示例。如果您正苦于以下问题:Python Ruby.create_vsystem方法的具体用法?Python Ruby.create_vsystem怎么用?Python Ruby.create_vsystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ruby
的用法示例。
在下文中一共展示了Ruby.create_vsystem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: float
# 需要导入模块: import Ruby [as 别名]
# 或者: from Ruby import create_vsystem [as 别名]
systems[i].cpu[cpu_index].vcpu_start_tick = (
options.vm_context_switch_hyperperiod * cpu_accumulated
- options.vm_context_switch_hyperperiod * float(vmm_cpu_matrix[i][j])
+ options.vm_context_switch_overhead
)
print "hyper period %d" % systems[i].cpu[cpu_index].vcpu_hyperperiod
print "start %d" % systems[i].cpu[cpu_index].vcpu_start_tick
print "stop %d" % systems[i].cpu[cpu_index].vcpu_stop_tick
# assert(systems[i].cpu[cpu_index].vcpu_start_tick < systems[i].cpu[cpu_index].vcpu_stop_tick)
if cpu_accumulated > 0:
cpu_index += 1
# print "cpu index = %d" % cpu_index
# print "before creating ruby"
ruby = Ruby.create_vsystem(options, systems, total_num_cpus, total_mem_size, vm_cpus, vm_mems, vmm_cpu_matrix)
# print "after ruby"
# systems[0].dir_cntrl0.directory.size = options.virtual_mem_size
# system.ruby.mem_size = options.mem_size
k = 0
for j in xrange(num_vms):
for (i, cpu) in enumerate(systems[j].cpu):
#
# Tie the cpu ports to the correct ruby system ports
#
cpu.createInterruptController()
cpu.icache_port = ruby._cpu_ruby_ports[k].slave
cpu.dcache_port = ruby._cpu_ruby_ports[k].slave