HOME       UP       PREV       FURTHER NOTES       NEXT (Folding, Retiming & Recoding)  

Structural Hazards in RTL Continued

A holding register is commonly manually inserted to overcome a structural hazard.

   always @(posedge clk) begin
      pc = !pc;
      if (!pc) holding <= Foo[x];
      if (pc) ans <= holding + Foo[y];
      end

For greater manual control we could express the design using a behavioural style if we are allowed to pause the thread.

   always @(posedge clk) begin
      holding <= Foo[x];
      @(posedge clk) ;
      ans <= holding + Foo[y];
      end

In the future, better to use tools that automatically balance the load on structural components?


31: (C) 2008-11, DJ Greaves, University of Cambridge, Computer Laboratory.