cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
4,360 Views
Registered: ‎08-10-2016

A NOT function vs register assignment

Jump to solution

I'm using ISE 14.7 in order to do a design for Spartan 6. I have the following VHDL code snippet, a and b are std_logic signals and their values can only be either '1' or '0':

 

if (a /= b) then
  a <=b;
end if;
if (a /= b) then
  a <= not a;
end if;

I have to do this kind of assignment many times in different places of my design. Which one is more optimal for XST? The first one I suppose that is only routing a signal. What about the second? I didn't find anything in XST User guide...

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
8,328 Views
Registered: ‎11-09-2015

Re: A NOT function vs register assignment

Jump to solution

Hi fdomingues@ulmaembedded.com,

 

I would expect the same results, using a LUT2 in both cases.

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

2 Replies
Highlighted
Moderator
Moderator
8,329 Views
Registered: ‎11-09-2015

Re: A NOT function vs register assignment

Jump to solution

Hi fdomingues@ulmaembedded.com,

 

I would expect the same results, using a LUT2 in both cases.

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

Highlighted
Scholar
Scholar
4,329 Views
Registered: ‎04-26-2015

Re: A NOT function vs register assignment

Jump to solution

As @florentw has said, they both simplify down to the same logic equation to use for a lookup table - and since Xilinx FPGAs are all based on lookup tables they will therefore produce identical hardware in every way.

 

I suppose that on a CPLD (not based on lookup tables - instead they're programmable interconnects between fixed gates) you could actually produce different hardware for each option. However, since the logic tools will first simplify the logic equation and then implement that, it's very likely that you could only achieve a different behaviour with a great deal of effort.