cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jprice
Scholar
Scholar
609 Views
Registered: ‎01-28-2014

Avoid Unncessary Pipeline Registers

I've got a design that passes a lot of registers contained an object, that is passed to various functions. These functions all use common methods on that object. When a local instance of the method is created, they all create pipeline registers for pipeleining. Normally this is what I would want BUT I know these registers are initialized when I start the HLS function, and remain constant for the remainder of operation. How can I help HLS  understand this so it doesn't waste cycles and resources pipeleining unnecessarily in such cases? 

0 Kudos
2 Replies
u4223374
Advisor
Advisor
544 Views
Registered: ‎04-26-2015

Code example?

 

My guess is that HLS is inserting registers because the register bank you're "passing" is in one physical location on the chip, but the local function instances are spread out. It needs extra registers to cope with the delays in accessing the register bank.

0 Kudos
jprice
Scholar
Scholar
506 Views
Registered: ‎01-28-2014

@u4223374 - I don't believe this is the case. HLS has a particular naming convention that it uses for pipeline registers. 

Very basic mockup code:

 

const Object_c object(init_params); //Contains LOTs of registers
funcA(object, otherstuff);
funcB(object, otherstuff);
funcC(object, otherstuff);
fundD(object, otherstuff);

 

Each of those functions will want to pipeline those registers in object. And I do want the functions to pipeline otherstuff, but to treat object as a constant, similar to the stable directive or ap_stable interface. Do you follow?

0 Kudos