- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all. Just found out that Quartus does not instantiate hard block multiplier if multiplication is done by a constant. Even if i define multstyle = "dsp", why?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi all. Just found out that Quartus does not instantiate hard block multiplier if multiplication is done by a constant. Even if i define multstyle = "dsp", why? --- Quote End --- what value is your constant?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With a constant there are some sizable reductions that can be done during synthesis to make it more palatable in logic. That being said, if you have a DSP block available, why not use it. Perhaps try keeping the constant, e.g.
(* keep *) wire mult_const; assign mult_const = 16'ha9a9; I'm guessing something like that will get it to synthesize a DSP.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the constant value is 2^n, then the result is simply a bitshift.
Similarly, if it has just a couple of bits set, it may be easier just to create an adder.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanx for fast reply, however it was a simple typo, so now synthesis multstyle works fine :). So not to create one more thread, ill ask here, for example i need to partially connect some modules output (let it be 8 most significant bits of 16). The straightforward solution is:
mult mult_inst(
.a(a_8bit),
.b(b_8bit),
.res(c_16bit)
);
assign c_8bit = c_16bit
May there be more elegant approach (without this intermediate wire) ?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page