Weird warning

Something to consider. The code pasted below is generated by my build script with an intentional syntax error, to avoid me compiling the same ID in twice. Sigasi reports a warning of "there has to be whitespace before the unit" on the constant initialiser, which I thought was interesting :)


-- This is an autogenerated file!!!
-- synplify_synth.tcl creates a file very similar to this file, runs the synthesis, and then adds the deliberate syntax error below
-- in order that you cannot accidentally use the RUN button.  (The RUN button won't update the compile_id, so we don't want to use that)
library ieee;
use ieee.std_logic_1164.all;
package p_compile_id is
   -- This is the value that was last compiled into an FPGA
   constant compile_id : std_logic_vector(63 downto 0) := 1202281643460F00;  -- <-- weird warning here
end package p_compile_id;

Error recovery

Hi Martin,

this is a consequence of how Sigasi internally works. If Sigasi encounters errors, it tries to recover and make sense of the rest of the file. In this case it recovers by guessing that you intended to use an integer with an (undefined) unit.

Something like:

You see the extra warning because we implemented a linting rule that there should be whitespace between a value and a unit.

I hope that explains the unexpected behavior.

Thanks for your feedback,

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.