This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hardware Implementation

hi i created a hardware that calculates the square root of (a^2+b^2 )

i sent the inputs (a and b) with assembly and that was fine however when i tried to send them using c code the hardware take them as inputs calculates a^2 + b^2 but never do the square root

i am really clueless here i couldn't locate the problem

heeeeeeeeeeeeeeelp

Parents
  • as i told M

    Peter Harris

    I don't why my keil can't allocate a memory address with a pointer however i think that the problem is within the def of the "attribute" which allocate a fixed address that can't be reused by another

    i tried to differentiate the output of yd and xd and  when i compiled my code i observed that regdistance take only the value of xd so i defined another address memory to put the yd and when i simulate my hardware behavior i found that now it calculates the a^2+b^2   but not the square root

    if anyone has a suggestion or any idea how can i resolve this prob please help

Reply
  • as i told M

    Peter Harris

    I don't why my keil can't allocate a memory address with a pointer however i think that the problem is within the def of the "attribute" which allocate a fixed address that can't be reused by another

    i tried to differentiate the output of yd and xd and  when i compiled my code i observed that regdistance take only the value of xd so i defined another address memory to put the yd and when i simulate my hardware behavior i found that now it calculates the a^2+b^2   but not the square root

    if anyone has a suggestion or any idea how can i resolve this prob please help

Children