Skip to content

Commit e3b25cd

Browse files
shivansh-bhatnagar18Vanshika Fogat
andauthored
docs: better length formatting when the length is conditional (riscv-software-src#935)
Earlier the CSR Attributes had irregular formatting when its value was conditional as in the case <img width="848" height="270" alt="image" src="https://github.com/user-attachments/assets/472362cf-53cb-42ff-b7cb-e88b671ea1c3" /> The commit adds a better fomatting for that specific case when both the values were printed in CSR. fixes riscv-software-src#928 Co-authored-by: Vanshika Fogat <[email protected]>
1 parent 3a30c4f commit e3b25cd

File tree

1 file changed

+4
-4
lines changed
  • tools/ruby-gems/udb/lib/udb/obj

1 file changed

+4
-4
lines changed

tools/ruby-gems/udb/lib/udb/obj/csr.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ def length_pretty(effective_xlen=nil)
373373
end
374374

375375
if effective_xlen.nil?
376-
<<~LENGTH
377-
#{length(32)} when #{cond.sub('%%', '0')}
378-
#{length(64)} when #{cond.sub('%%', '1')}
379-
LENGTH
376+
[
377+
"* #{length(32)} when #{cond.sub('%%', '0')}",
378+
"* #{length(64)} when #{cond.sub('%%', '1')}"
379+
].join("\n")
380380
else
381381
"#{length(effective_xlen)}-bit"
382382
end

0 commit comments

Comments
 (0)