How to reduce required clock multiplier (oversampling) in VHDL code generation.
2 次查看(过去 30 天)
显示 更早的评论
A routine compiles into VHDL fine and runs in the simulation, however, it requires the clock to run at a high multiplier:
##MESSAGE: The design requires 9 times faster clock with respect to the base rate = 1.
I tracked this down to the following lines of code:
...
c = mod(ndx,4096)+1;
buf1(c) = buf1(c) + sample * w4;
buf1(c+4096) = buf1(c+4096) + sample * w3;
buf1(c+8192) = buf1(c+8192) + sample * w2;
buf1(c+12288) = buf1(c+12288) + sample * w1;
...
The first add-mult ads 3 to the clock multiplier and every subsequent ones add another 2 and we get to 1x3+3x2=9 times.
Our constraint is to be no more than 2x. No matter what I do, I cannot get below 9x. I tried things like hdlcfg.EnableRate = "DUTBaseRate"; and similar options to no avail:
My questions:
- The 4 add-mult statements are all independent and should be perfectly parallelizable in hardware. Why is this not happening and how can I make it happen?
- what are some general principles to keep these multipliers under control?
2 个评论
Bharath Venkataraman
2022-12-19
Are you able to share the files here or through MathWorks support?
The higher clock request is typically due to a resource sharing request.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!