Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- Why not just have unsigned/signed data types on the entity in the first place? std_logic_vector is meant to represent a bus, not arithmatic. --- Quote End --- Trick, I probably wasn't clear: Quartus generates the entity with std_logic_vectors when I create a multiplier: https://www.alteraforum.com/forum/attachment.php?attachmentid=14099 I completely agree it would make more sense if the generated code used signed/unsigned, but I don't control it. --- Quote Start --- And then another option - why even bother using componenets at all? have you ever tried direct entity instantiation, which is been possible for nearly 25 years? it saves having to create all those components and will give you missmatch errors at the compile stage (usually occurs within seconds) rather than at the map stage (which can take several minutes). --- Quote End --- As near as I can tell, all the megafunction components (eg altera_mf_components.vhd) use std_logic_vector for everything. Are you saying there is way to directly instantiate say a multiplier with the proper types for each argument. That would be really helpful.