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.

comparator with a single input

Status
Not open for further replies.
post some example code, so I get what you mean.
 

Code:
if (enable = '0') then
			data_count <= 0;
			pre_count <= 0;
			pre_count_1 <= 0;
			pre_count_2 <= 0;
		
		elsif (data_sync(1) = '1') then
			
			pre_count <= 0;
		elsif rising_edge(clk) then
			pre_count <= pre_count + 1;
		end if;

say both the elsif statement are true, what will happen ? will both be executed ?
 

no. the code is sequential, so the higher of the elsif's taken, and the other is ignored. It can only take 1 if branch per process iteration, just like in any programming language. This gives an implicit priority in the signals.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top