433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
|
# File 'lib/origen_sim/simulator.rb', line 433
def view_wave_command
cmd = nil
case config[:vendor]
when :icarus
edir = Pathname.new(wave_config_dir).relative_path_from(Pathname.pwd)
cmd = "cd #{edir} && "
cmd += configuration[:gtkwave] || 'gtkwave'
dir = Pathname.new(wave_dir).relative_path_from(edir.expand_path)
cmd += " #{dir}/#{wave_file_basename}/dump.vcd "
f = Pathname.new(wave_config_file).relative_path_from(edir.expand_path)
cmd += " --save #{f} &"
when :cadence
edir = Pathname.new(wave_config_dir).relative_path_from(Pathname.pwd)
cmd = "cd #{edir} && "
cmd += configuration[:simvision] || 'simvision'
dir = Pathname.new(wave_dir).relative_path_from(edir.expand_path)
cmd += " #{dir}/#{wave_file_basename}/#{wave_file_basename}.dsn #{dir}/#{wave_file_basename}/#{wave_file_basename}.trn"
f = Pathname.new(wave_config_file).relative_path_from(edir.expand_path)
cmd += " -input #{f} &"
when :synopsys
edir = Pathname.new(wave_config_dir).relative_path_from(Pathname.pwd)
cmd = "cd #{edir} && "
if configuration[:verdi]
unless ENV['VCS_HOME']
Origen.log.warning "Your environment doesn't define VCS_HOME, you will probably need that to run Verdi"
end
edir = Pathname.new(wave_config_dir).relative_path_from(Pathname.pwd)
cmd = "cd #{edir} && "
cmd += configuration[:verdi] || 'verdi'
dir = Pathname.new(wave_dir).relative_path_from(edir.expand_path)
cmd += " -ssz -dbdir #{Origen.root}/simulation/#{id}/synopsys/simv.daidir/ -ssf #{dir}/#{wave_file_basename}.fsdb"
f = Pathname.new(wave_config_file).relative_path_from(edir.expand_path)
cmd += " -sswr #{f}"
cmd += ' &'
else
cmd += configuration[:dve] || 'dve'
dir = Pathname.new(wave_dir).relative_path_from(edir.expand_path)
cmd += " -vpd #{dir}/#{wave_file_basename}.vpd"
f = Pathname.new(wave_config_file).relative_path_from(edir.expand_path)
cmd += " -session #{f}"
cmd += ' &'
end
when :generic
if config[:view_waveform_cmd]
cmd = config[:view_waveform_cmd]
else
Origen.log.warn 'OrigenSim cannot provide a view-waveform command for a :generic vendor.'
Origen.log.warn 'Please supply a view-waveform command though the :view_waveform_cmd option during the OrigenSim::Generic instantiation.'
end
else
Origen.log.warn "OrigenSim does not know the command to view waveforms for vendor :#{config[:vendor]}!"
end
cmd
end
|