Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

build fixed point vector from 6 integers

Status
Not open for further replies.

itmr

Member level 3
Joined
Nov 5, 2010
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,750
hi all

i need yours help for some little implementation algorithm in FPGA

i am using uart that gives me 7 bytes of ascii codes , 6 bytes on integers and one byte of point in that way XXX.XXX

i need to create a floating point vector - i mean to sub x"30" from each integer byte and collect the integers to floating point vector/

(after i create this vector i need to comparison 2 follows vectors)

some one have a good logic idea for me - without use any build in multiplier?
 

permute

Advanced Member level 3
Joined
Jul 16, 2010
Messages
923
Helped
294
Reputation
588
Reaction score
267
Trophy points
1,343
Activity points
8,543
Not sure without the multiplier or a division state machine.
you can quickly form 1000x by using y[n] = y[n-1]*8 + y[n-1]*2 + x[n]. where multiplications are power of two and thus shifts. this is applied right to left.
eg, 123456:
6
56
456
3456
23456
123456
at this point, you would need to perform a division by constant 1000. this can also be a multiplication by a constant 0.001. both can be done using multiple cycles in a state machine.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top