FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-10-2007, 12:29 AM
Guest
 
Posts: n/a
Default Minimize power consumption

Hi.
I have a question.
I have a special y=f(x) function. It takes 32 bit at input and it have
something at output. Function is unrolled, it computes result alsmost
"immediately", and it doesn't contain any memory cells and flip-flops,
it is what called "combinatorial".
I need to fill a table of all possible x's and function results. If x
is 32-bit, I just make 32-bit counter connected to the block which
compute the result and collect results.
As yet it all simple.
But I feel that by rewiring bus between counter and f(x) block, I can
reduce the number of gates changed its state at each counter's
iteration, and vice versa. Thus to reduce power consumption.
(I may have x in any order, my task is just to have all possible
values of x at some moment).
So, is there any tool that can take my f(x) in form of Verilog or VHDL
and tell me what is the most optimal wiring scheme?

Reply With Quote
  #2 (permalink)  
Old 09-10-2007, 01:42 AM
John_H
Guest
 
Posts: n/a
Default Re: Minimize power consumption

[email protected] wrote:
> Hi.
> I have a question.
> I have a special y=f(x) function. It takes 32 bit at input and it have
> something at output. Function is unrolled, it computes result alsmost
> "immediately", and it doesn't contain any memory cells and flip-flops,
> it is what called "combinatorial".
> I need to fill a table of all possible x's and function results. If x
> is 32-bit, I just make 32-bit counter connected to the block which
> compute the result and collect results.
> As yet it all simple.
> But I feel that by rewiring bus between counter and f(x) block, I can
> reduce the number of gates changed its state at each counter's
> iteration, and vice versa. Thus to reduce power consumption.
> (I may have x in any order, my task is just to have all possible
> values of x at some moment).
> So, is there any tool that can take my f(x) in form of Verilog or VHDL
> and tell me what is the most optimal wiring scheme?


For a dedicated once-only purpose, why are you concerned about power?
Are you a student who only has so many Joules allotted for use this
semester?

I know of no tools that could optimize this in a way that would make you
happy.

However, since changing one bit usually has fewer dynamic consequences
than changing many bits, consider a Gray code counter. The Gray code
counters only change one bit per increment. If you know which of your
32 bits typically uses less power when changing the logic through your
f(x), you could assign those to the LSbits of the Gray counter and leave
the "swich everything" x bits to the MSbits of the Gray counter.

If you don't know what a Gray counter is, there are many resources on
the web. A simple registered XOR of a binary counter would give you the
one bit change.

binCnt <= binCnt + 32'h1;
GrayCnt <= binCnt[31:0] ^ {1'b0,binCnt[31:1]};

Good luck.
Reply With Quote
  #3 (permalink)  
Old 09-10-2007, 01:54 AM
Guest
 
Posts: n/a
Default Re: Minimize power consumption

> However, since changing one bit usually has fewer dynamic consequences
> than changing many bits, consider a Gray code counter. The Gray code
> counters only change one bit per increment. If you know which of your
> 32 bits typically uses less power when changing the logic through your
> f(x), you could assign those to the LSbits of the Gray counter and leave
> the "swich everything" x bits to the MSbits of the Gray counter.


Thanks, I know what Gray counter is. But the problem is, that on bus
between counter and f(x) I can make increment in manner of Gray
counter, but I never now that this property of Gray counter will
reflect to each point of f(x) block. I mean that I'm not sure that
Gray counter is simple solution.

Reply With Quote
  #4 (permalink)  
Old 09-10-2007, 02:47 AM
Jim Granville
Guest
 
Posts: n/a
Default Re: Minimize power consumption

[email protected] wrote:
>>However, since changing one bit usually has fewer dynamic consequences
>>than changing many bits, consider a Gray code counter. The Gray code
>>counters only change one bit per increment. If you know which of your
>>32 bits typically uses less power when changing the logic through your
>>f(x), you could assign those to the LSbits of the Gray counter and leave
>>the "swich everything" x bits to the MSbits of the Gray counter.


Besides Binary, and Gray, we have also used Triangle counters (up/Down
binary) where that made better table-mapping sense.

>
> Thanks, I know what Gray counter is. But the problem is, that on bus
> between counter and f(x) I can make increment in manner of Gray
> counter, but I never now that this property of Gray counter will
> reflect to each point of f(x) block. I mean that I'm not sure that
> Gray counter is simple solution.


Since you presumably already have mapping software, to create your
table, then you could modify that to do transistion calculations.

So, you could easily do ALL counter candidates, and run
both an edge count in your own SW, and then also the FPGA tools to
given another power comparison on the candidate designs.

-jg


Reply With Quote
  #5 (permalink)  
Old 09-10-2007, 03:05 AM
Guest
 
Posts: n/a
Default Re: Minimize power consumption

> So, you could easily do ALL counter candidates, and run
> both an edge count in your own SW, and then also the FPGA tools to
> given another power comparison on the candidate designs.


If counter is 32-bit, then 32!=263130836933693530167218012160000000
This is a number of possible rewiring variants.
I'm not feel myself as pioneer, so that's why I think that there must
be some automated way...

Reply With Quote
  #6 (permalink)  
Old 09-10-2007, 03:31 AM
Jim Granville
Guest
 
Posts: n/a
Default Re: Minimize power consumption

[email protected] wrote:

>>So, you could easily do ALL counter candidates, and run
>>both an edge count in your own SW, and then also the FPGA tools to
>>given another power comparison on the candidate designs.

>
>
> If counter is 32-bit, then 32!=263130836933693530167218012160000000
> This is a number of possible rewiring variants.
> I'm not feel myself as pioneer, so that's why I think that there must
> be some automated way...


That's a strange number - do you not have any idea what your f(x) might be ?
Is this a real problem, or an academic one ?

-jg

Reply With Quote
  #7 (permalink)  
Old 09-10-2007, 02:03 PM
John_H
Guest
 
Posts: n/a
Default Re: Minimize power consumption

[email protected] wrote:
>> So, you could easily do ALL counter candidates, and run
>> both an edge count in your own SW, and then also the FPGA tools to
>> given another power comparison on the candidate designs.

>
> If counter is 32-bit, then 32!=263130836933693530167218012160000000
> This is a number of possible rewiring variants.
> I'm not feel myself as pioneer, so that's why I think that there must
> be some automated way...


Your desire is too specific and never a concern in mainstream design so
there simply is no automated way.
Reply With Quote
  #8 (permalink)  
Old 09-10-2007, 02:08 PM
Guest
 
Posts: n/a
Default Re: Minimize power consumption

On Sep 10, 4:03 pm, John_H <[email protected]> wrote:
> [email protected] wrote:
> >> So, you could easily do ALL counter candidates, and run
> >> both an edge count in your own SW, and then also the FPGA tools to
> >> given another power comparison on the candidate designs.

>
> > If counter is 32-bit, then 32!=263130836933693530167218012160000000
> > This is a number of possible rewiring variants.
> > I'm not feel myself as pioneer, so that's why I think that there must
> > be some automated way...

>
> Your desire is too specific and never a concern in mainstream design so
> there simply is no automated way.


Well... I'll try to simplify my desire. Is there any tool that can
show me gates count switched if I preset previous state of inputs and
next state?

Reply With Quote
  #9 (permalink)  
Old 09-10-2007, 04:33 PM
John_H
Guest
 
Posts: n/a
Default Re: Minimize power consumption

You never did answer the question:


"John_H" <[email protected]> wrote in message
news:[email protected]
>
> For a dedicated once-only purpose, why are you concerned about power? Are
> you a student who only has so many Joules allotted for use this semester?



Reply With Quote
  #10 (permalink)  
Old 09-11-2007, 06:43 AM
glen herrmannsfeldt
Guest
 
Posts: n/a
Default Re: Minimize power consumption

[email protected] wrote:

> I have a special y=f(x) function. It takes 32 bit at input and it have
> something at output. Function is unrolled, it computes result alsmost
> "immediately", and it doesn't contain any memory cells and flip-flops,
> it is what called "combinatorial".
> I need to fill a table of all possible x's and function results. If x
> is 32-bit, I just make 32-bit counter connected to the block which
> compute the result and collect results.


> But I feel that by rewiring bus between counter and f(x) block, I can
> reduce the number of gates changed its state at each counter's
> iteration, and vice versa. Thus to reduce power consumption.
> (I may have x in any order, my task is just to have all possible
> values of x at some moment).
> So, is there any tool that can take my f(x) in form of Verilog or VHDL
> and tell me what is the most optimal wiring scheme?


In general, I would say no. If the design is in structural
verilog (or the VHDL equivalent), directly instantiating gate
level primitives then it might be possible. (Synthesis from
behavioral verilog is likely not unique.)

It might be that the design can't have any loops.
(They aren't necessarily excluded from combinatorial logic,
as long as they are guaranteed to resolve.) Then iterate through
the design computing how many gate changes are caused by changes
in the inputs for a given set of other inputs. It would seem
likely that gray code (one input changing at a time) is the best
choice, but that isn't guaranteed.

-- glen

Reply With Quote
  #11 (permalink)  
Old 09-11-2007, 07:06 PM
Guest
 
Posts: n/a
Default Re: Minimize power consumption

> In general, I would say no. If the design is in structural
> verilog (or the VHDL equivalent), directly instantiating gate
> level primitives then it might be possible. (Synthesis from
> behavioral verilog is likely not unique.)


Well, what if to switch to lower level, some RTL? If so, there're will
be any existing tool to answer my question?

Reply With Quote
  #12 (permalink)  
Old 09-11-2007, 08:31 PM
John_H
Guest
 
Posts: n/a
Default Re: Minimize power consumption

<[email protected]> wrote in message
news:[email protected] ups.com...
>> In general, I would say no. If the design is in structural
>> verilog (or the VHDL equivalent), directly instantiating gate
>> level primitives then it might be possible. (Synthesis from
>> behavioral verilog is likely not unique.)

>
> Well, what if to switch to lower level, some RTL? If so, there're will
> be any existing tool to answer my question?


No tool beyond your own knowledge. By instantiating gate level primitives,
you have the chance to know through your design how many LUTs you're
affecting with any one input signal change. There is no tool that will
summarize the number of gates changed by the change of an input. There is
no tool that will provide the per-bit level of power usage.

Again: why is this important to you? You have the task of building one
table. The assumption we can make is that it doesn't have to be powered by
a hand crank or button-cell batteries. There are no tools that will provide
you with the microscopic scale of power consumption you desire.


Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Power consumption problem [email protected] FPGA 4 06-17-2007 12:27 AM
Virtex 4 Power consumption jason.stubbs FPGA 19 05-04-2005 04:32 PM
Synchronous design and power consumption Klaus Schleisiek FPGA 7 01-06-2005 09:31 AM
virtex2p power consumption praveen FPGA 1 09-26-2003 07:47 PM


All times are GMT +1. The time now is 03:59 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved