07-03-2014 02:39 AM
I've been programming in VHDL for Spartan-6 for a couple of years in high-end projects. Seeing as the project complexity has grown exponentially in the last month, I've ended up by using all available BUFG resources.
My proposed solution is to implement one module in a clock region in order to use HCLK routing resources through BUFH. My problem is the module doesn't fit in only one clock region but it occupies two consecutives of them. The VHDL for the module is more than 1000 lines length and it has 25 different processes, making it difficult to change each process clock into the regional clocks, besides it would be a less optimal implementation. My question is: how can I easily change my VHDL so the mapper infers as many BUFH as necessary to implement the module in two consecutive clock regions?
07-03-2014 03:58 AM
07-03-2014 04:18 AM
I was trying to avoid modifying the VHDL from this:
PRC1 : Process( clk ) Begin ..... End PRC2 : Process( clk ) Begin ..... End PRC3 : Process( clk ) Begin ..... End
... to this:
CLK_RG0 : BUFH( I => clk, O => clk_RG0);
CLK_RG1 : BUFH( I => clk, O => clk_RG1);
PRC1 : Process( clk_RG0 ) Begin ..... End PRC2 : Process( clk_RG0 ) Begin ..... End PRC3 : Process( clk_RG1 ) Begin ..... End
By doing this, it's very likely I will not be separating logic between clock regions optimally, so maybe the design will occupy more slices and won't ft in the FPGA.
Thanks very much for your answer, smarell.
07-03-2014 05:16 AM
07-03-2014 05:28 AM
Yes, I also added UCF constraints to ensure each process is placed in a different clock region:
INST "MODULE/PRC1" AREA_GROUP = "CLKAG_PRC1" ; AREA_GROUP "CLKAG_PRC1" RANGE = CLOCKREGION_X1Y4 ;
INST "MODULE/PRC2" AREA_GROUP = "CLKAG_PRC2" ;
AREA_GROUP "CLKAG_PRC2" RANGE = CLOCKREGION_X1Y4 ;
INST "MODULE/PRC3" AREA_GROUP = "CLKAG_PRC3" ;
AREA_GROUP "CLKAG_PRC3" RANGE = CLOCKREGION_X1Y5 ;
That is a bit tedious, so my question was about whether there was a way to do it easily or not.
If it could be as easy as this, it would be great:
INST "MODULE/*" AREA_GROUP = "CLKAG_MODULE" ; AREA_GROUP "CLKAG_MODULE" RANGE = CLOCKREGION_X1Y4 : CLOCKREGION_X1Y5;
Thanks again for your interest.
INST "PRC1" AREA_GROUP = "CLKAG_PRC1" ;
AREA_GROUP "CLKAG_PRC1" RANGE = CLOCKREGION_X1Y4 ;