Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,457 Views

I need help with the testbench which read from the file.

LIBRARY ieee;

USE ieee.std_logic_1164.ALL;

USE ieee.numeric_std.ALL;

 

ENTITY signed_mult18 is

  PORT( a   : IN SIGNED (17 DOWNTO 0);

      b   : IN SIGNED (17 DOWNTO 0);

      result : OUT SIGNED (35 DOWNTO 0));

END ENTITY;

 

ARCHITECTURE rtl OF signed_mult18 IS

BEGIN

result <= a * b;

END rtl;

 

 

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.

0 Kudos
3 Replies
Highlighted
Novice
2 Views

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

file.

 

0 Kudos
Highlighted
Employee
2 Views

hi,

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 ,

https://forums.intel.com/s/question/0D50P00003yyR8zSAE/vhdl-textio-hread-problem

 

Let me know if this has helped resolve the issue you are facing or if you need any further assistance.

Best Regards

Vikas Jathar 

(This message was posted on behalf of Intel Corporation)

 

 

0 Kudos
Highlighted
Novice
2 Views

Hello,

i already have it done, thank you.

.