Sha256: 98d11006ade05e330a989744860539d4a61eee72b45d0306806622c6796a4414

Contents?: true

Size: 664 Bytes

Versions: 41

Compression:

Stored size: 664 Bytes

Contents

require 'std/function_generator.rb'

include HDLRuby::High::Std

# System for testing the function generator standard library.
system :with_function_generator do
    # signed[8].inner :x
    # signed[32].inner :y
    bit[8].inner :x
    signed[8].inner :y

    # function_generator(Math.method(:sin).to_proc,
    #                    signed[8],signed[32],4,-Math::PI..Math::PI,-2..2).
    function_generator(Math.method(:sin).to_proc,
                       bit[8],signed[8],4,-Math::PI..Math::PI,-2..2).
    (:my_sin).(x,y)

    timed do
        # (-128..127).each do |i|
        (0..255).each do |i|
            x <= i
            !10.ns
        end
    end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
HDLRuby-3.4.0 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-3.3.4 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-3.3.3 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-3.3.1 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-3.3.0 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-3.2.0 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-3.1.0 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-3.0.0 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.12 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.11 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.10 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.9 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.8 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.7 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.5 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.4 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.3 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.2 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.11.0 lib/HDLRuby/hdr_samples/with_function_generator.rb
HDLRuby-2.10.5 lib/HDLRuby/hdr_samples/with_function_generator.rb