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.

[SOLVED] Problem in writing WHEN statement in vhdl

Status
Not open for further replies.

er.akhilkumar

Full Member level 2
Joined
Feb 1, 2011
Messages
120
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Location
Noida
Activity points
2,418
Hello All,

Can we execute two commands in one when statement as following

A <= B WHEN C = '1' ELSE
'0';

In the above code if else condition comes I want that an assertion shall also fire. Can we execute two statements in one when statement. Actually I don't want to use PROCESS for implementing this logic.

Please provide your comments. thanx
 

Why don't you want to use a process? That sounds pretty arbitrary.

You could also use two separate WHEN statements, right?
 

Do you actually mean an assert statement? It don't understand how it's related to the conditional assignment? It woul be placed as an concurrent independent statement.
 

I can write process also...bt I want to write small code...can we write two statements in one WHEN statement?

Consider it as an experiment
 

Why don't you tell the exact WHEN construct you imagine? In my view, the syntax rules for the conditional assignment statement are pretty clear.
 

I can write process also...bt I want to write small code...can we write two statements in one WHEN statement?

Consider it as an experiment

Writing 'small code' has NO bearing on the final output; you're ultimately creating hardware NOT writing software. 'Small code' is usually hard-to-understand code. I think the answer to your question is:


No, you can't have two assignments in a single WHEN statement.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top