lib/HDLRuby/std/memory.rb in HDLRuby-2.4.10 vs lib/HDLRuby/std/memory.rb in HDLRuby-2.4.11
- old
+ new
@@ -954,11 +954,11 @@
else
rst_name = rst.name
reader_input rst_name
end
# Declares the address counter.
- awidth = size.width-1
+ awidth = (size-1).width
awidth = 1 if awidth == 0
[size.width-1].inner :abus_r
reader_inout :abus_r
# Defines the read procedure at address +addr+
@@ -1046,10 +1046,10 @@
else
rst_name = rst.name
reader_input rst_name
end
# Declares the address counter.
- awidth = size.width - 1
+ awidth = (size-1).width
awidth = 1 if awidth == 0
[size.width-1].inner :abus_r
reader_inout :abus_r
# Defines the read procedure at address +addr+