Problems Compiling in ModelSim

OP (Company: nanyang polytechnic) #4877353
Hi,

I'm having some problems compiling my codes, Im trying to do a 4 bit
adder and im confused as to why my codes cant compile and always giving
me error on my "4bitaddertb" codes:

"No feasible entries for infix operator "=".
"Type error resolving infix expression "=" as type 
std.STANDARD.BOOLEAN."

anyone have any idea on where am i going wrong?

thanks.
Moderator (Company: Titel)
> and always giving me error on my "4bitaddertb" codes:
Related to which line of code?

Beside that minor problem you have a big problem in your code:
1
   if clk="1" then
2
       A_S <= "0000";
3
   elsif (clk='1' AND clk'event) then
4
       A_S <= A_S + "0001";
5
   end if;
Here A_S will be always "0000", except for 0ps (as long as a rising edge 
lasts) it will be "0001".

Reply

A question of your own? This thread is over 9 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.