Skip to content

Lab3 multipler and adder speed #119

Answered by boledulab
Charlee0207 asked this question in Q&A
Discussion options

You must be logged in to vote

Your coding style is more like HLS. Logic synthesis tool is not capable of doing pipeline partition. I will suggest you write rtl code in a structure way. Otherwise, you really can not control the timing and speed you want.

module mult (a, b, c ) // you may use pipeline multiplier based on the speed you need
assign c = a * b;
endmodule

module add (a, b, c) // you may use pipeline adder based on the speed you need
assign c = a + b;
endmodule

in main module,

// acc = acc + a * b;
mult mult_instance(a, b, d_c);
r_c = d_c @ clock ; // pipe register
add add_instance(acc, r_c, d_acc);
acc = d_acc @ clock; // pipe register

note: if you use pipeline multiplier , adder (# of stages), design the co…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Charlee0207
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Charlee0207
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants