Sha256: b461266bb9eccce5647b9f4df48b62a735355370a5d3572a0a5bc4d7fbfb8f7f

Contents?: true

Size: 1.03 KB

Versions: 80

Compression:

Stored size: 1.03 KB

Contents

# A simple D-FF
system :dff do
    input  :d, :clk, :rst
    output :q

    (q <= d & ~rst).at(clk.posedge)
end

# A benchmark for the dff.
system :dff_bench do
    inner :d, :clk, :rst
    inner :q

    dff(:my_dff).(d,clk,rst,q)

    timed do
        clk <= 0
        rst <= 0
        d   <= _z
        !10.ns
        clk <= 1
        rst <= 0
        d   <= _z
        !10.ns
        clk <= 0
        rst <= 1
        d   <= _z
        !10.ns
        clk <= 1
        rst <= 1
        d   <= _z
        !10.ns
        clk <= 0
        rst <= 0
        d   <= 1
        !10.ns
        clk <= 1
        rst <= 0
        d   <= 1
        !10.ns
        clk <= 0
        rst <= 0
        d   <= 1
        !10.ns
        clk <= 1
        rst <= 0
        d   <= 1
        !10.ns
        clk <= 0
        rst <= 0
        d   <= 0
        !10.ns
        clk <= 1
        rst <= 0
        d   <= 0
        !10.ns
        clk <= 0
        rst <= 0
        d   <= 0
        !10.ns
        clk <= 1
        rst <= 0
        d   <= 0
        !10.ns
    end
end

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
HDLRuby-2.6.2 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.5.1 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.5.0 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.29 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.28 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.27 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.26 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.25 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.22 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.21 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.20 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.19 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.18 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.17 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.15 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.14 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.12 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.11 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.10 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.9 lib/HDLRuby/hdr_samples/dff_bench.rb