cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Visitor
Visitor
4,359 Views
Registered: ‎09-12-2011

Random Number (subtraction process)

Hello everybody.

My problem is;

 

For Example;

TYPE number_type IS ARRAY (0 to 1) of integer range 0 to 15;
signal number: number_type := (2,8);

 

signal dx : integer;

----

----

dx <= abs(number(0)-number(1));

 

There is no problem... I can subtract these two numbers.

 

But, When I gererate these numbers as a random, It can not subtract numbers, but it can add. I am checking random numbers, they are correct random numbers, there is no problem about random. Subtraction doesnt work.

 

I dont know it is clear? If no, i can send VHDL codes. Thanks for your help.....

 

 

 

0 Kudos
Reply
4 Replies
Teacher
Teacher
4,352 Views
Registered: ‎08-14-2007

Hi,

what error messages do you get from XST?

Are you using the right types? (Casting or conversion needed somewhere?)

 

What about the simulation? Does it work there?

 

Have a nice synthesis

  Eilert

0 Kudos
Reply
Visitor
Visitor
4,350 Views
Registered: ‎09-12-2011

0 Kudos
Reply
Visitor
Visitor
4,342 Views
Registered: ‎09-12-2011

I think I have found solution. Thank you very much....

Tags (1)
0 Kudos
Reply
Historian
Historian
4,325 Views
Registered: ‎02-25-2008


@adtun wrote:

I think I have found solution. Thank you very much....


Please enlighten the rest of us.

----------------------------Yes, I do this for a living.
0 Kudos
Reply