Method: HDLRuby::Viz::Node#fill_place_matrix
- Defined in:
- lib/HDLRuby/hruby_viz.rb
#fill_place_matrix(matrix, stmnt, r, c, w, h) ⇒ Object
Fill the place matrix with statement +stmnt+ at position +r+,+c+ stretched by +w+,+h+
3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 |
# File 'lib/HDLRuby/hruby_viz.rb', line 3364 def fill_place_matrix(matrix,stmnt,r,c,w,h) puts "fill_place_matrix for stmnt=#{stmnt.name} at r=#{r} c=#{c} w=#{w} h=#{h}" h.times do |y| while matrix.size <= r+y do # Need to increase the size of the matrix on y. matrix << ([nil] * matrix[0].size) end w.times do |x| while matrix[r+y].size <= c+x do # Need to increase the size of the matrix on x. matrix.each {|row| row << nil } end # Fill in. matrix[r+y][c+x] = stmnt end end end |