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.10.3 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.10.2 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.9.0 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.8.1 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.7.11 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.7.5 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.7.1 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.25 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.24 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.23 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.22 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.19 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.18 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.16 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.15 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.10 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.8 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.5 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.4 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.6.3 lib/HDLRuby/hdr_samples/dff_bench.rb