Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL question about using the internal if

Status
Not open for further replies.

cippalippa

Member level 2
Joined
Jan 25, 2005
Messages
44
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,286
Activity points
374
Hello,

I have a question about vhdl, I have the following process:


signal contarow,minline,maxline: integer range 0 to 289;
signal vwina, vwin,rdenable,rd_rst2: std_logic;

v_VINDOW: process(contarow,minline,maxline,rdenable,rd_rst2)
begin
if ((rdenable and (not rd_rst2)) = '0') then
if ((contarow < minline) or (contarow > maxline)) then
vwin <= '1'; else vwin <= '0';
end if;
if ((contarow < minline+3) or (contarow > maxline-1)) then
vwina <= '1'; else vwina <= '0';
end if;
end if;
end process;

I would like to know if is possible to write the internal 'if' like verilog:

...
vwin <= ((contarow < minline) || (contarow > maxline));
...

so operation without the 'if' operator.
Thanks

D
 

Re: VHDL question

You cant write it like in Verilog, but you can use the WHEN..ELSE statements in VHDL to write that since it is not a sequential clocked process.
 

Re: VHDL question

Yes, you can write in verilog style, but then you will have to use, the variable/signal which is being assigned as a 'boolean' type.
Say for example

signal myboolean : boolean;

myboolean <= (value1 > value2)

you can do you won expression in the above style.
Hope it helps,
kr,
Avi
http://www.vlsiip.com
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top