Question

I am using Xilinx and trying to compile this code. I am getting this error: ERROR:HDLParsers:808 - "C:/Users/Dell/digi/sm.vhd" Line xx. and can not have such operands in this context. code is here

Was it helpful?

Solution

The problem is you are mixing bit and std_logic types. You should generally pick one or the other (no using both in the same file unless you REALLY know why you need to), most new work is usually done using std_logic. To fix the problem you need to make everything consistent...either change your inputs to bit types, as you did, or change your internal declared signals to std_logic:

signal Q1, Q2, Q3: std_logic;

OTHER TIPS

Changing the declaration of ports from

port(X1,X2,CLK: in STD_LOGIC;

to

port(X1,X2,CLK: in bit;

made it work. Difference between the two

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top