jeremiah-c-leary / vhdl-style-guide

Style guide enforcement for VHDL
GNU General Public License v3.0
179 stars 38 forks source link

Is there a rule similar to procedure_calL_003 for sequential procedure calls? #1074

Closed JHertz5 closed 7 months ago

JHertz5 commented 7 months ago

What is your question? I would like to enforce the structure of procedure calls within processes, similar to how procedure_calL_003 behaves for concurrent procedures. I haven't been able to find such a rule, does this exist already?

Desired behaviour:

architecture rtl of test is

begin

  proc_call(formal_1 => actual_1,
            formal_2 => actual_2,
            formal_3 => actual_3);

  proc_label : process is
  begin

    proc_call(formal_1 => actual_1,
              formal_2 => actual_2,
              formal_3 => actual_3);

  end process proc_label;

end architecture rtl;

to

architecture rtl of test is

begin

  -- Handled by procedure_call_003
  proc_call(
            formal_1 => actual_1,
            formal_2 => actual_2,
            formal_3 => actual_3
          );

  proc_label : process is
  begin

    -- Not handled by any rule that I can find
    proc_call(
      formal_1 => actual_1,
      formal_2 => actual_2,
      formal_3 => actual_3
    );

  end process proc_label;

end architecture rtl;
jeremiah-c-leary commented 7 months ago

Morning @JHertz5 ,

The rule procedure_call_003 should have also applied to sequential procedure calls. I checked my tests and for some reason the tests were not validating it applied to sequential procedure calls. I updated the tests and rule procedure_call_003 to handle them.

I pushed an update to the issue-1074 branch. When you get a chance could you check it out and let me know if there are any issues?

Thanks,

--Jeremy

JHertz5 commented 7 months ago

Hi @jeremiah-c-leary. That was fast, thanks very much! I've tested your branch with the test case that I described in #1073, and it is working perfectly!

JHertz5 commented 7 months ago

With this change, perhaps the references to "concurrent procedure calls" in the documentation for this rule should be removed, to avoid implying that sequential procedure calls are still excluded. I would be happy to raise a separate issue and make those changes myself.

jeremiah-c-leary commented 7 months ago

Afternoon @JHertz5 ,

I think it would be best to update the documentation as part of this issue. I have pushed some updates, could you check and see if I missed anything?

Thanks,

--Jeremy

JHertz5 commented 7 months ago

Hi @jeremiah-c-leary. That makes sense 👍 It looks good to me, thanks very much!

jeremiah-c-leary commented 7 months ago

Morning @JHertz5 ,

Awesome, I will get this merged to master.

--Jeremy