Sha256: cc6544ac181df2041abd6702912a84dfe9bebd94797eb15ae44790ef267540ba

Contents?: true

Size: 1.16 KB

Versions: 18

Compression:

Stored size: 1.16 KB

Contents

# Some abstract system.
system :sysA do
    input :clk,:rst
    input :d
    output :q
end

# Some inheriting system.
system :sysH, sysA do
    par(clk.posedge, rst.posedge) do
        hprint("sys1\n")
        q <= d & ~rst
    end
end

# Another system that have nothing to see with the others.
# Some abstract system.
system :sysO do
    input :clk,:rst
    input :d
    output :q

    par(clk.posedge, rst.posedge) do
        hprint("sys1\n")
        q <= d & ~rst
    end
end


# A system for testing inheritance and of?
system :with_reconf do
    input :clk,:rst
    input :d
    output :q

    # Instantiate the abstract system.
    sysA(:my_dffA).(clk,rst,d,q)

    # Test the of?
    puts "my_dffA.systemT.of?(sysA)=#{my_dffA.systemT.of?(sysA)}"
    puts "my_dffA.systemT.of?(sysH)=#{my_dffA.systemT.of?(sysH)}"
    puts "my_dffA.systemT.of?(sysO)=#{my_dffA.systemT.of?(sysO)}"

    # Instantiate the inheriting system.
    sysH(:my_dffH).(clk,rst,d,q)

    # Test the of?
    puts "my_dffH.systemT.of?(sysH)=#{my_dffH.systemT.of?(sysH)}"
    puts "my_dffH.systemT.of?(sysA)=#{my_dffH.systemT.of?(sysA)}"
    puts "my_dffH.systemT.of?(sysO)=#{my_dffH.systemT.of?(sysO)}"
end

Version data entries

18 entries across 18 versions & 1 rubygems

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