Sha256: b486c3b3563f63f9f6131661c7fdc88af39c329da3287998b6cc8fd653d82a67
Contents?: true
Size: 1.53 KB
Versions: 6
Compression:
Stored size: 1.53 KB
Contents
# This file is the Ruby side of the bench. require 'rubygems' require 'ruby-vpi' RubyVpi.init_bench :Counter, :xUnit do ## # This block is executed whenever Vpi::simulate is invoked. # # It simulates the design under test. This is typically done # by toggling the clock signal, as demonstrated below. ## ## # We are currently here (marked by the ! signs): # # ! # ! # ! ____ ____ ____ ____ # ___!/ \____/ \____/ \____/ \ # ! # ! # ## Counter.clock.intVal = 1 ## # After setting the clock signal to high, we are here: # # ! # ! # !____ ____ ____ ____ # ____/! \____/ \____/ \____/ \ # ! # ! # ## advance_time ## # After advancing the time, we are here: # # ! # ! # ____! ____ ____ ____ # ____/ !\____/ \____/ \____/ \ # ! # ! # ## Counter.clock.intVal = 0 ## # After setting the clock signal to low, we are here: # # ! # ! # ____ ! ____ ____ ____ # ____/ \!____/ \____/ \____/ \ # ! # ! # ## advance_time ## # After advancing the time, we are here: # # # ! # ! # ____ ! ____ ____ ____ # ____/ \____!/ \____/ \____/ \ # ! # ! # ## ## # This process repeats when Vpi::simulate is invoked again. ## end
Version data entries
6 entries across 6 versions & 1 rubygems