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.

Two comparators in ISE synthesis report

Status
Not open for further replies.

hithesh123

Full Member level 6
Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Visit site
Activity points
3,548
I have a 4bit counter in my vhdl code. when the count<8, I load data to a MS 8-bits of a registers and when the count>8, I load data to LS 8-bits of the register.
In the synthesis report, why are 2 5-bit comparators inferred - one for less than and the other for greater/equal.
 

Wait. You have a 4-bit counter but a 16-bit register? Without your code it's impossible to tell what's going on here.
 

I have a 4bit counter in my vhdl code. when the count<8, I load data to a MS 8-bits of a registers and when the count>8, I load data to LS 8-bits of the register.
In the synthesis report, why are 2 5-bit comparators inferred - one for less than and the other for greater/equal.

I bet one meeeelion dollahs that you actually have behavioral code for two comparators in there. Combine that with the fact that sometimes the synth tools are not all that clever and ta-da! two comparators.

Generally speaking, what you could do is make a signal, and assign that the value of ONE of the comparison functions. Then you use that as the input of a mux that selects between the values.

Specifically speaking: 4-bit counter, 8 is a threshold value. Oh whatever shall we do? Hey look, the most significant bit of the counter. It wants some attention, I wonder why that is...

Get it? that's a hint. several times! About 2^3 times.

;)
 

I bet one meeeelion dollahs that you actually have behavioral code for two comparators in there. Combine that with the fact that sometimes the synth tools are not all that clever and ta-da! two comparators.

Generally speaking, what you could do is make a signal, and assign that the value of ONE of the comparison functions. Then you use that as the input of a mux that selects between the values.

Specifically speaking: 4-bit counter, 8 is a threshold value. Oh whatever shall we do? Hey look, the most significant bit of the counter. It wants some attention, I wonder why that is...

Get it? that's a hint. several times! About 2^3 times.

;)

Are you saying, just check for the MSbit. If its '0' then (count<8), if it's '1' then (count>8)
In this case how do I make the count=0, after it reaches 0xF.
 

Are you saying, just check for the MSbit. If its '0' then (count<8), if it's '1' then (count>8)
No. I am saying, just check for the MSbit. If its '0' then (count<8), if it's '1' then (count>=8)

In this case how do I make the count=0, after it reaches 0xF.
As what bit sequence is 0xF + 1 represented on a 4-bit counter?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top