cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
8,473 Views
Registered: ‎01-24-2014

can the synthesized circuit of blocking assignment be parallel

Jump to solution

Hi everyone,

Assume there’s code as following:

 always@* begin
        rin_A= r_A;
        rin_B=r_B;
        rin_C=r_C;
        if(A) begin
          rin_A=A+B;
          rin_B=C*D;
          rin_C=E-F;
        end
end

So my question is, though this code is blocking assignment, since rin_A, rin_B and rin_C are independent, the synthesize results will be parallel, that the assignment of rin_A, rin_B and rin_C will be executed in parallel, right? I think the compiler will do optimization to shorten the critical path.

Thank you very much.

Best Regards,

chen

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Guide
Guide
16,489 Views
Registered: ‎01-23-2009

You need to think hardware.

 

When this is synthesized the tool will matcch the functionality of your RTL.

 

For rin_A, this will be the output of a MUX, whose inputs are r_A or A+B (an adder).

 

For rin_B, it will be a MUX whose inputs ar r_B or C*D (a multiplier).

 

etc...

 

There really isn't any choice from the hardware point of view; these are independent sub-circuits and hence will be implemented as such, regardless of whether they were written in the same combinatorial always block, or different always blocks, or (say) assign statements

 

assign rin_A = A ? A + B : r_A; // Note: this one is a bit odd since A is both the condition and an operand...

assign rin_B = A ? C * D : r_B;

assign rin_C = A ? E-F : r_C;

 

All of these will synthesize to essentially the same circuit.

 

Avrum

 

View solution in original post

Tags (1)
0 Kudos
1 Reply
Highlighted
Guide
Guide
16,490 Views
Registered: ‎01-23-2009

You need to think hardware.

 

When this is synthesized the tool will matcch the functionality of your RTL.

 

For rin_A, this will be the output of a MUX, whose inputs are r_A or A+B (an adder).

 

For rin_B, it will be a MUX whose inputs ar r_B or C*D (a multiplier).

 

etc...

 

There really isn't any choice from the hardware point of view; these are independent sub-circuits and hence will be implemented as such, regardless of whether they were written in the same combinatorial always block, or different always blocks, or (say) assign statements

 

assign rin_A = A ? A + B : r_A; // Note: this one is a bit odd since A is both the condition and an operand...

assign rin_B = A ? C * D : r_B;

assign rin_C = A ? E-F : r_C;

 

All of these will synthesize to essentially the same circuit.

 

Avrum

 

View solution in original post

Tags (1)
0 Kudos