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.4.8 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.6 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.4.1 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.8 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.7 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.6 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.5 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.4 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.3 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.2 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.1 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.3.0 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.2.17 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.2.16 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.2.15 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.2.14 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.2.13 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.2.12 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.2.11 lib/HDLRuby/hdr_samples/dff_bench.rb
HDLRuby-2.2.10 lib/HDLRuby/hdr_samples/dff_bench.rb