Videos
The Compiler
Introduction to some basic features of the Origen compiler.
Templates
# templates/demo/_layout.txt.erb
This is the header
<%= yield %>
This is the footer
# templates/demo/_sub_example.txt.erb
Hello from the sub template!
The value of argx is: <%= options[:argx] %>
# templates/demo/example1.txt.erb % render "layout.txt" do Hello from template example 1 10 + 10 = 20 % # This is a Ruby comment, it will not appear in the output % 10.times do |i| This is loop <%= i %> % end % if 10 == 20 This is the true case % else This is the false case % end <%= render "templates/demo/sub_example.txt", argx: 100 %> % dut.atd0.regs.each do |name, reg| <%= name %> % end % end
# templates/demo/example2.txt.erb
<%= render "templates/demo/sub_example.txt", argx: 200 %>