Sha256: 5bdc953dc35250a61a443bbe485b7e298f01e846366d767da836410204fbc1b1

Contents?: true

Size: 703 Bytes

Versions: 31

Compression:

Stored size: 703 Bytes

Contents

# Test the comparison operators.

# A benchmark for the adder.
system :adder_bench do
    [8].inner :x, :y
    signed[8].inner :u,:v
    inner :ue, :ult, :ule, :ugt, :uge
    inner :se, :slt, :sle, :sgt, :sge

    par do
        ue  <= (x == y)
        ult <= (x < y)
        ule <= (x <= y)
        ugt <= (x > y)
        uge <= (x >= y)

        se  <= (u == v)
        slt <= (u < v)
        sle <= (u <= v)
        sgt <= (u > v)
        sge <= (u >= v)
    end

    timed do
        x <= 0
        y <= 0
        u <= 0
        v <= 0
        !10.ns
        x <= 1
        u <= 1
        !10.ns
        y <= 2
        v <= 2
        !10.ns
        x <= 2
        u <= -2
        !10.ns
    end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
HDLRuby-3.1.0 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-3.0.0 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.12 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.11 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.10 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.9 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.8 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.7 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.5 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.4 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.3 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.2 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.11.0 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.10.5 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.10.3 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.10.2 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.9.0 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.8.1 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.7.11 lib/HDLRuby/hdr_samples/comparison_bench.rb
HDLRuby-2.7.5 lib/HDLRuby/hdr_samples/comparison_bench.rb