Altera_Forum
Honored Contributor
10 years agoFunctions, Procedures, Packages, TextIO, and Sign Magnitude Math
Hello,
I need to create a package containing 3 functions and a procedure that will compute the addition, subtraction, multiplication, and division of two signed magnitude binary numbers respectfully. The operands can take any arbitrary length (Some_Value downto 0). I also have to create a text file with the inputs and their corresponding sum, difference, product, and quotient/remainder. I was able to get the addition, subtraction, and multiplication functions to work for a set length value, but I'm having trouble finishing the divide procedure. I'm also not quite sure how to adjust the code to account for the arbitrary input length, or how to get start on the TextIO part. Any help you can give me will be greatly appreciated! Thanks, Mitch The following are the software and hardware I have been using:- Quartus II 13.1
- ModelSim 10.2c
- Cyclone IV E - EP4CE115F29C7