Altera_Forum
Honored Contributor
17 years agoError: Cannot drive signal 'data' of mode IN
Hi,
I am new user to ModelSim and writing VHDL code.. I've got the follwing msg when I compiled a vhdl code "Error controller.vhd(64): Cannot drive signal 'data' of mode IN." First, I want to to know where could I find a place to read about compiler error messages .. Second, I didn't understand what this error means? I have the follwing declarations in my code constant instruction_size :integer:=10; constant operation_size :integer:=4; subtype command_word is unsigned(operation_size-1 downto 0); subtype program_word is unsigned(instruction_size-1 downto 0); data : in program_word; -- in the entity of the controller --the follwing in the structure of the controller alias command: command_word is data (instruction_size-1 downto 6); signal instr : program_word ; type state_type is (S0, S1, S2, S3, S4, S5, S6, S7, S8); signal state: state_type; Then I have this piece of code case state is when S2 => instr<=data; -- Load instruction state <= S3; when S3 => command <= instr (instruction_size-1 downto 6); when I compile this file I got the above mentioned error msg on the last line of code above, i.e " when S3 => ...." I am looking forward to get some help with this problem.. Thank you in advance