EmbDev.net

Forum: FPGA, VHDL & Verilog Problems Compiling in ModelSim


von Afkar O. (Company: nanyang polytechnic) (afkarsosman)



Rate this post
useful
not useful
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.

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
> 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".

von Kest (Guest)


Rate this post
useful
not useful
Lothar M. wrote:
> Related to which line of code?

 if clk="1" then

here it is:

 if clk='1' then

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.