EmbDev.net

Forum: FPGA, VHDL & Verilog Vhdl on FPGA, need to understand a syntax


von Hakon V. (Company: Student) (patiknot)


Rate this post
useful
not useful
Hi!

I'm working on getting a single cycle arm processor to work on a FPGA 
chip.
but I have a problem with just one line to get it work.

I'm a beginner in vhdl and I'm just putting together prewritten 
code(from school).

here is my problem:

Y:  std_logic
A:  std_logic_vector(3 downto 0)
B:  std_logic
C:  std_logic

Y <= ((and A) and B) or C;

I dont understand what I'm anding A with. If I can get an understanding 
of the line, i can write a equivalent code to get it to work.

-Håkon

von .... (Guest)


Rate this post
useful
not useful

von Hakon V. (Company: Student) (patiknot)


Rate this post
useful
not useful
thanks!

I solved my problem.

the solution was: Y<=((A(3) and A(2) and A(1) and A(0)) and B) or C

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


Rate this post
useful
not useful
You can kick away some of the brackets:
Y <= A(3) and A(2) and A(1) and A(0) and B   or  C;

: Edited by Moderator
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.