Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

[SOLVED] Implementation of an algorithm

Status
Not open for further replies.

masoud.malekzadeh

Member level 1
Joined
Jan 22, 2012
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,626
I want to design a processor that one part of which should be like this

W(k)=Pre_W(k)-3*W(k-1)
pre_W(k)=∑x1(i)[x1(i)*W(k-1)+x2(i)*W(k-1)]^3 i=0 to 7

and my arithmetic operations is floating point i should port map them using components .

thanks .
 

good luck to you. do you have a specific question?
 

break this down into a number of operation. then determine the minimum performance required. eg, if you have a 250MHz clock, and need 100k updates, then you have 250000 cycles per update. In such a case, a single FPU might be used along with small BRAMs for instructions/data. If you need 10M updates/second, then you only have 25 cycles. You then need to break the operation up into parallel operations that can be performed by multiple FPU's. In some cases, there will be some common operations and it will make sense to remove the instruction logic and instead use fixed data paths.

one you have a structure in mind, you can start work on a VHDL implementation.

(also, you can investigate alternative representations that might allow fewer multiplications, additions, etc...)
 
Code:
s74:multiplier port map (a =>z1(i),b=>w1(0),clk => clk,result =>pre1(i));
s75:multiplier port map (a =>z2(i),b=>w2(0),clk => clk,result =>pre2(i));
s76:     adder port map (a =>pre1(i),b=>pre2(i),clk => clk,result =>pre3(i));
s77:multiplier port map (a =>pre3(i),b=>pre3(i),clk => clk,result =>pre4(i));
s78:multiplier port map (a =>pre3(i),b=>pre4(i),clk => clk,result =>pre5(i));
s79:multiplier port map (a =>z1(i),b=>pre5(i),clk => clk,result =>pre6(i));
s82:multiplier port map (a =>w1(0),b=>three,clk => clk,result =>nw1(0));
end generate ;

gen13:for i in 0 to 3 generate 
s80:adder port map (a =>pre6(2*i),b=>pre6((2*i)+1),clk => clk,result =>pre7(i));
end generate ;

gen14:for i in 0 to 1 generate 
s81:adder port map (a =>pre7(2*i),b=>pre7((2*i)+1),clk => clk,result =>pre8(i));
end generate ;

--
s83:adder port map (a =>pre8(0),b=>pre8(1),clk => clk,result =>pre9(0));
s84:subtractor port map (a =>pre9(0),b=>nw1(0),clk => clk,result =>w1(1));

In this code i implemented the algorithm that computes only W(1) and the result is ok but to go further W(2),W(3),..... I'm confused ....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top