ENTITY signed_mult18 is
PORT( a : IN SIGNED (17 DOWNTO 0);
b : IN SIGNED (17 DOWNTO 0);
result : OUT SIGNED (35 DOWNTO 0));
ARCHITECTURE rtl OF signed_mult18 IS
result <= a * b;
I need a testbench to tell him the code he can read from the file.
This multiplier should know the date and year of birth in the supplementary code from the file.
Test the 18x18 multiplier created by the translators for sign numbers (numbers
expressed in the supplementary code) and verify the created multiplier by:
a) Numbers A = -RRRR and B = DDMM, where YYYY, MM, DD are the year, month and day of your birth.
b) using another 10 suitably selected sufficiently large input values A, B,
each of which has at least one unit and one zero in the four most significant bits
half of the numbers tested are negative. Entry values must be entered as input
the text file and the accuracy of the results must be automatically verified using testbench
Here in community, no one will provide complete code so user should come with their own code/logic & people in community may help to make it correct/better appropriate.
In this case, I would like to suggest you need to use the STD.textio package that defines routines for reading and writing to
a text file , refer the below old thread ,
Let me know if this has helped resolve the issue you are facing or if you need any further assistance.
(This message was posted on behalf of Intel Corporation)