Sha256: 2e27cd04b10760ff95212f338571f4477694e61b1436fbd09dc667df979b00c3
Contents?: true
Size: 1.14 KB
Versions: 19
Compression:
Stored size: 1.14 KB
Contents
## # A simple system for testing hw print and strings. ###################################################### system :with_print do input :clk, :rst [4].output :counter seq(clk.posedge) do hif(rst) do counter <= 0 end helse do counter <= counter + 1 hprint("In '#{__FILE__}' line #{__LINE__}: ") hprint("Counter=", counter, "\n") end end end # A benchmark for the dff. system :with_print_bench do inner :clk, :rst [4].inner :counter with_print(:my_print).(clk,rst,counter) timed do clk <= 0 rst <= 0 !10.ns clk <= 1 rst <= 0 !10.ns clk <= 0 rst <= 1 !10.ns clk <= 1 rst <= 1 !10.ns clk <= 0 rst <= 0 !10.ns clk <= 1 !10.ns clk <= 0 !10.ns clk <= 1 !10.ns clk <= 0 !10.ns clk <= 1 !10.ns clk <= 0 !10.ns clk <= 1 !10.ns end # cur_system.properties[:pre_driver] = "drivers/hw_print.rb", :hw_print_generator end
Version data entries
19 entries across 19 versions & 1 rubygems