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];

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];

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

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