Forum Discussion
Altera_Forum
Honored Contributor
9 years agoI see, what if I want to port map the sfixed to an lpm_mult or some other arithmatic block? I hope that can be done. I guess then it will not "automatically" tell me what the output is going to be like.
Oh...wait...... I guess I can just calculate on paper what Q format the output will have and then portmap that in place of an std_logic_vector at the output. Is that correct? In this way, it will be easier to read the interpret the code (by humans). By the way, is writing my_fixed * my_fixed2 really a good idea since I am not sure if it will infer a DSP block or some other kind of multiplier, and if it does infer a DSP block then I do not know how much pipeline latency it will have e.t.c?? I think that one should instantiate the specific hardware that is required for the multiplier or divider or whatever function it is. I only use the + and - operators since a counter is relatively straight forward. Thanks Tricky and everyone :)