Method: CPU#read

Defined in:
lib/HDLRuby/hdr_samples/sw_encrypt_cpu_bench.rb,
lib/HDLRuby/hdr_samples/sw_encrypt_cpusim_bench.rb
more...

#read(sig, &ruby_block) ⇒ Object

Generates a read of sig executing +ruby_block+ on the result.

[View source]

89
90
91
92
93
94
95
96
97
98
99
# File 'lib/HDLRuby/hdr_samples/sw_encrypt_cpu_bench.rb', line 89

def read(sig,&ruby_block)
    addr = @allocator.get(sig)
    hif(ack == 0) do
        @abus <= addr
        @rwb <= 1
        @req <= 1
    helse
        @req <= 0
        ruby_block.call(@dbus)
    end
end