Error: Cannot assign variable using signal assignment

Hi sigasi team,

Using HDT following code yields to the Error mentioned in subject:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
 
entity testme_2 is
	generic (
		NUM_OF_CHAN			  	 : integer := 1	);
	port (
		Clk	        : in std_logic;
		Enable	  	: out std_logic_vector(NUM_OF_CHAN downto 0)
		);	
end entity testme_2;
 
 
architecture rtl_1 of testme_2 is
	signal channelCnt : unsigned(1 downto 0);
 
	function setColorNextPix(index : in unsigned) return unsigned is
		variable nextIndex : unsigned(index'length-1 downto 0);
	begin
		if index < NUM_OF_CHAN - 1 then
			nextIndex := index + 1;
		else
			nextIndex := (others => '0');
		end if;
		return nextIndex;
	end function setColorNextPix;
begin
	process(Clk)
	begin
		if rising_edge(Clk) then
				Enable(to_integer(setColorNextPix(channelCnt) + 1)) <= '1';
		end if;
	end process;
end architecture rtl_1;

Code compiles with ModelSim and I can't see what's wrong.
Please give me a hint.

THX
Josef

bug found!

Hi Jozef,

Thank you, you have found a bug in our code. I've logged this as ticket:714.

fixed

Hi Jozef,

This issue has been fixed, and will be released in this month's update.

Philippe

Lexer error: Mismatched token

Hi sigasi team,

Using HDT following code yields to the error mentioned in subject:

library ieee;
use ieee.std_logic_1164.ALL;
 
entity test is
	port(
		rst		: in std_logic;
		clk		: in std_logic
		);
end test;
 
 
architecture behave of test is
 
	signal dummy			: std_logic;
 
function andAll (inp : in std_logic_vector)
	return std_logic is
begin
  return '1';
end;
 
 
begin
    dummy <= '0';
end behave;

Any explanation?
Thank You, Michael

no error here.

Hi Michael,

I checked and everything works fine on my side.

Perhaps you have strange non-printable characters (for example end-of-line characters?)

Is this the entire file? Can you mail me the file (not copy-and-paste, so that non-printables are preserved) and your error log?

Thanks.

Philippe

non-ascii character

Hi Michael,

Thanks for sending me your original file. You had an non-ascii character in there, which is not legal VHDL.

I have made a note that we should provide a more helpful error message. (ticket:852)

Thanks for reporting this.

Philippe

ticket:852 fixed

Hi Michael,

The issue you have reported (ticket:852) is fixed in our internal code base. It will be released in our next update.

Philippe

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.