Closed veripoolbot closed 2 years ago
Original Redmine Comment Author Name: Alex Reed Original Date: 2015-08-12T12:40:34Z
ACK. I won't be able to look at this for a couple days at least, but I don't think it's a terribly difficult fix.
Original Redmine Comment Author Name: Alex Reed Original Date: 2018-03-26T20:48:30Z
Yeah, I see this too. Unfortunately, I'm not in a great place to dig in to this (again) in the near term, due to looming tape-out schedules. Some of the indentation code is getting untenable (and I'm probably to blame for some of it!). Parsing a grammar as complex as Verilog/SystemVerilog with regexes is pretty ugly.
Whenever I've looked at this, it becomes a slippery slope. Anything that resolves to an elaboration-time constant should be legal for the replication value. That includes $system() functions, user functions/tasks, fancy macro magic, and other arbitrarily complex statements. Nested {} blocks can be found in multi-dimensional arrays, replication statements, and constraint blocks. Figuring out which is which always ends up breaking one of the other parsers, or killing performance.
The current behavior is definitely wrong, but I don't know how to fix it.
Author Name: Wilson Snyder (@wsnyder) Original Redmine Issue: 955 from https://www.veripool.org
Reported via email from Alessandro Contreras-Grassi alcontre@terpmail.umd.edu
Please follow up by CCing him.
Expected behavior: "end" is indented correctly with "if" What happens: the "end" is indented to match with "always", when using the parameter 's' in {s{1'b0}}. If I use the numeric value instead, it indents correcty.
== The code: ==
Emacs : GNU Emacs 24.5.1 (x86_64-apple-darwin14.3.0, NS apple-appkit-1347.57) of 2015-05-27 on alex-mbp.local Package: verilog-mode v2015-06-26-832636e-vpo