Hi, I have a quit simple question abaut cpld fitting: I'm using a Xilix Coolrunner (XPLA3) CPLD with pin locking and trying to access a SRAM. If I try to fit my code, the following error message is given by the fitter for some pins: WARNING:Cpld:1081 - Cannot assign signal 'sram_data<22>' to location '73=FB16_3'. Not enough control terms. Searching the Xilinx answer data base I came across a posting ( http://university.xilinx.com/xlnx/xil_ans_display.jsp?getPagePath=19477 ) in which this problem was described and the following workaround was presented: Adjust the design to remove unnecessary unique control term usage (for example, use synchronous reset or preset as opposed to asynchronous reset or preset, and use synchronous load as opposed to asynchronous load). Unfortunalty I don't know what a "synchronous reset or preset " means! Does this means that I have to have an synchronous reset for the cpld device (which I have) or does this mean that the macrocell itself should somehow be reseted synchonously? And how do I do that?? Thanks, Stephan Part of my code: --////////////////////////////////////////////////////////////////////////// /////////////// -- -- BEGIN PROCESS MAIN -- --////////////////////////////////////////////////////////////////////////// /////////////// proc_main: process (CLK, RESET_not) is begin --////////////////////////////////////////////////////////////////////////// /////////////// -- -- CLK'event and CLK = '1' -- --////////////////////////////////////////////////////////////////////////// /////////////// if (CLK'event and CLK = '1') then --////////////////////////////////////////////////////////////////////////// /////////////// -- -- synchronous RESET -- --////////////////////////////////////////////////////////////////////////// /////////////// if RESET_not = '0' then -- usb EF_not <= '1'; FF_not <= '1'; --sram sram_adsc_not <= '1'; sig_sram_bw_not <= "1111"; sig_sram_add <= '0'; sram_oe_not <= '0'; -- sram_adsp_not <= '1'; sram_data <= (others => 'Z'); sram_address_sig <= (others => '0'); testpin <= (others => '1'); --testtest -- state <= IDLE; state <= SRAM_FILL_1; -- state <= SRAM_OUT_WAIT; -- state <= GET_LENGTH; -- data_length <= X"0080"; -- command_state <= IDLE; -- command_state <= SRAM_OUT; -- end testtest else case state is --////////////////////////////////////////////////////////////////////////// /////////////// -- -- IDLE -- --////////////////////////////////////////////////////////////////////////// /////////////// when IDLE => testpin( 15 downto 12) <= "0000"; -- test if userset_not = '0' then testpin(0) <= '0'; state <= SRAM_FILL_1; end if; --////////////////////////////////////////////////////////////////////////// /////////////// -- -- USER SRAM DELETE -- --////////////////////////////////////////////////////////////////////////// /////////////// when SRAM_FILL_1 => testpin( 15 downto 12) <= "1001"; testpin(1) <= '0'; -- all Bytes sram_adsc_not <= '0'; sig_sram_bw_not <= "0000"; sram_oe_not <= '1'; sram_address_sig <= sram_address_sig + '1'; sram_data(15 downto 0) <= (others => '0'); --sram_address_sig; sram_data(31 downto 16) <= (others => '0'); --sram_address_sig; state <= SRAM_FILL_2; when SRAM_FILL_2 => -- testpin( 15 downto 12) <= "1010"; -- testpin(2) <= '0'; testpin <= sram_address_sig; -- test --if userset_not = '0' then sram_address_sig <= sram_address_sig + '1'; if sram_address_sig(15) = '1' then -- end testpin(4) <= '1'; state <= IDLE; sram_adsc_not <= '1'; sram_oe_not <= '0'; sig_sram_bw_not <= "1111"; sram_address_sig <= (others => '0'); sram_data <= (others => 'Z'); -- else -- write another word -- sram_data(15 downto 0) <= (others => '1'); --sram_address_sig; -- sram_data(31 downto 16) <= (others => '1'); --sram_address_sig; end if; --end if; --////////////////////////////////////////////////////////////////////////// /////////////// -- -- OTHER States -- --////////////////////////////////////////////////////////////////////////// /////////////// when others => state <= IDLE; end case; end if; end if; end process; --////////////////////////////////////////////////////////////////////////// /////////////// -- -- End PROCESS MAIN -- --////////////////////////////////////////////////////////////////////////// ///////////////
Newbie question: fitting in cpld
Started by ●December 14, 2004
Reply by ●December 14, 20042004-12-14
Stephan Mueller wrote:> Hi, > > I have a quit simple question abaut cpld fitting: > I'm using a Xilix Coolrunner (XPLA3) CPLD with pin locking and tryingto> access a SRAM. > If I try to fit my code, the following error message is given by thefitter> for some pins: > > WARNING:Cpld:1081 - Cannot assign signal 'sram_data<22>' to location > '73=FB16_3'. Not enough control terms. > > Searching the Xilinx answer data base I came across a posting ( >http://university.xilinx.com/xlnx/xil_ans_display.jsp?getPagePath=19477> ) in which this problem was described and the following workaroundwas> presented: > > Adjust the design to remove unnecessary unique control term usage(for> example, use synchronous reset or preset as opposed to asynchronousreset or> preset, and use synchronous load as opposed to asynchronous load). > > Unfortunalty I don't know what a "synchronous reset or preset "means! Does> this means that I have to have an synchronous reset for the cplddevice> (which I have) or does this mean that the macrocell itself shouldsomehow be> reseted synchonously? And how do I do that??Howdy Stephan, They are referring to the reset for the flip-flop in the macrocell. I'm a tad rusty on CPLD design, so I don't know how much it is really hurting you, but it looks like you are inferring latches rather than FF's on a number of your signals. Latches typically require extra feedback, which can chew up extra resources. Since on CPLD"s most of the inputs already feed into the interconnect, this is probably less of an issue, but it still might be pushing you over the edge. To get around this, every signal that has assignment within the reset clause should also have an assignment after the "else" that is associated with your synchronous reset (which I couldn't help but notice is commented in your code). You can do this by either assigning all signals in each and every one of your states, or you can make a default assignment (so you only have to do it once) immedately before the case statement. Have fun, Marc>[...]>--//////////////////////////////////////////////////////////////////////////> /////////////// > > if (CLK'event and CLK = '1') then > >--//////////////////////////////////////////////////////////////////////////> /////////////// > -- > -- synchronous RESET > -- >--//////////////////////////////////////////////////////////////////////////> /////////////// > > if RESET_not = '0' then > -- usb > EF_not <= '1'; > FF_not <= '1'; > > --sram > sram_adsc_not <= '1'; > sig_sram_bw_not <= "1111"; > sig_sram_add <= '0'; > sram_oe_not <= '0'; > -- sram_adsp_not <= '1'; > sram_data <= (others => 'Z'); > sram_address_sig <= (others => '0'); > testpin <= (others => '1'); > --testtest > -- state <= IDLE; > state <= SRAM_FILL_1; > -- state <= SRAM_OUT_WAIT; > -- state <= GET_LENGTH; > -- data_length <= X"0080"; > -- command_state <= IDLE; > -- command_state <= SRAM_OUT; > -- end testtest > > else > > > case state is > >--//////////////////////////////////////////////////////////////////////////> /////////////// > -- > -- IDLE > -- >--//////////////////////////////////////////////////////////////////////////> /////////////// > > when IDLE => > > testpin( 15 downto 12) <= "0000"; > > > -- test > if userset_not = '0' then > testpin(0) <= '0'; > state <= SRAM_FILL_1; > end if; > > > >--//////////////////////////////////////////////////////////////////////////> /////////////// > -- > -- USER SRAM DELETE > -- >--//////////////////////////////////////////////////////////////////////////> /////////////// > > when SRAM_FILL_1 => > > testpin( 15 downto 12) <= "1001"; > testpin(1) <= '0'; > > -- all Bytes > sram_adsc_not <= '0'; > sig_sram_bw_not <= "0000"; > sram_oe_not <= '1'; > sram_address_sig <= sram_address_sig + '1'; > sram_data(15 downto 0) <= (others => '0'); --sram_address_sig; > sram_data(31 downto 16) <= (others => '0'); --sram_address_sig; > > state <= SRAM_FILL_2; > > > when SRAM_FILL_2 => > > -- testpin( 15 downto 12) <= "1010"; > -- testpin(2) <= '0'; > testpin <= sram_address_sig; > -- test > --if userset_not = '0' then > > > sram_address_sig <= sram_address_sig + '1'; > > if sram_address_sig(15) = '1' then > -- end > testpin(4) <= '1'; > state <= IDLE; > sram_adsc_not <= '1'; > sram_oe_not <= '0'; > sig_sram_bw_not <= "1111"; > sram_address_sig <= (others => '0'); > sram_data <= (others => 'Z'); > -- else > -- write another word > -- sram_data(15 downto 0) <= (others => '1'); --sram_address_sig; > -- sram_data(31 downto 16) <= (others => '1');--sram_address_sig;> end if; > > --end if; > > >--//////////////////////////////////////////////////////////////////////////> /////////////// > -- > -- OTHER States > -- >--//////////////////////////////////////////////////////////////////////////> /////////////// > > when others => > state <= IDLE; > > end case; > end if; > > end if; > > end process; > >--//////////////////////////////////////////////////////////////////////////> /////////////// > -- > -- End PROCESS MAIN > -- >--//////////////////////////////////////////////////////////////////////////> ///////////////
Reply by ●December 15, 20042004-12-15
Hi Marc, many thanks for your suggestions! It worked, but afterwards I got some problems with product terms. That's why I switched to buffers now. They can be located anywhere in the CPLD, so that I am not that restricted anymore.. Greetings, Stephan "Marc Randolph" <mrand@my-deja.com> schrieb im Newsbeitrag news:1103027985.683504.75530@f14g2000cwb.googlegroups.com...> Stephan Mueller wrote: > > Hi, > > > > I have a quit simple question abaut cpld fitting: > > I'm using a Xilix Coolrunner (XPLA3) CPLD with pin locking and trying > to > > access a SRAM. > > If I try to fit my code, the following error message is given by the > fitter > > for some pins: > > > > WARNING:Cpld:1081 - Cannot assign signal 'sram_data<22>' to location > > '73=FB16_3'. Not enough control terms. > > > > Searching the Xilinx answer data base I came across a posting ( > > > http://university.xilinx.com/xlnx/xil_ans_display.jsp?getPagePath=19477 > > ) in which this problem was described and the following workaround > was > > presented: > > > > Adjust the design to remove unnecessary unique control term usage > (for > > example, use synchronous reset or preset as opposed to asynchronous > reset or > > preset, and use synchronous load as opposed to asynchronous load). > > > > Unfortunalty I don't know what a "synchronous reset or preset " > means! Does > > this means that I have to have an synchronous reset for the cpld > device > > (which I have) or does this mean that the macrocell itself should > somehow be > > reseted synchonously? And how do I do that?? > > Howdy Stephan, > > They are referring to the reset for the flip-flop in the macrocell. > > I'm a tad rusty on CPLD design, so I don't know how much it is really > hurting you, but it looks like you are inferring latches rather than > FF's on a number of your signals. Latches typically require extra > feedback, which can chew up extra resources. Since on CPLD"s most of > the inputs already feed into the interconnect, this is probably less of > an issue, but it still might be pushing you over the edge. > > To get around this, every signal that has assignment within the reset > clause should also have an assignment after the "else" that is > associated with your synchronous reset (which I couldn't help but > notice is commented in your code). > > You can do this by either assigning all signals in each and every one > of your states, or you can make a default assignment (so you only have > to do it once) immedately before the case statement. > > Have fun, > > Marc > > > > [...] > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > > > if (CLK'event and CLK = '1') then > > > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > -- > > -- synchronous RESET > > -- > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > > > if RESET_not = '0' then > > -- usb > > EF_not <= '1'; > > FF_not <= '1'; > > > > --sram > > sram_adsc_not <= '1'; > > sig_sram_bw_not <= "1111"; > > sig_sram_add <= '0'; > > sram_oe_not <= '0'; > > -- sram_adsp_not <= '1'; > > sram_data <= (others => 'Z'); > > sram_address_sig <= (others => '0'); > > testpin <= (others => '1'); > > --testtest > > -- state <= IDLE; > > state <= SRAM_FILL_1; > > -- state <= SRAM_OUT_WAIT; > > -- state <= GET_LENGTH; > > -- data_length <= X"0080"; > > -- command_state <= IDLE; > > -- command_state <= SRAM_OUT; > > -- end testtest > > > > else > > > > > > case state is > > > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > -- > > -- IDLE > > -- > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > > > when IDLE => > > > > testpin( 15 downto 12) <= "0000"; > > > > > > -- test > > if userset_not = '0' then > > testpin(0) <= '0'; > > state <= SRAM_FILL_1; > > end if; > > > > > > > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > -- > > -- USER SRAM DELETE > > -- > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > > > when SRAM_FILL_1 => > > > > testpin( 15 downto 12) <= "1001"; > > testpin(1) <= '0'; > > > > -- all Bytes > > sram_adsc_not <= '0'; > > sig_sram_bw_not <= "0000"; > > sram_oe_not <= '1'; > > sram_address_sig <= sram_address_sig + '1'; > > sram_data(15 downto 0) <= (others => '0'); --sram_address_sig; > > sram_data(31 downto 16) <= (others => '0'); --sram_address_sig; > > > > state <= SRAM_FILL_2; > > > > > > when SRAM_FILL_2 => > > > > -- testpin( 15 downto 12) <= "1010"; > > -- testpin(2) <= '0'; > > testpin <= sram_address_sig; > > -- test > > --if userset_not = '0' then > > > > > > sram_address_sig <= sram_address_sig + '1'; > > > > if sram_address_sig(15) = '1' then > > -- end > > testpin(4) <= '1'; > > state <= IDLE; > > sram_adsc_not <= '1'; > > sram_oe_not <= '0'; > > sig_sram_bw_not <= "1111"; > > sram_address_sig <= (others => '0'); > > sram_data <= (others => 'Z'); > > -- else > > -- write another word > > -- sram_data(15 downto 0) <= (others => '1'); --sram_address_sig; > > -- sram_data(31 downto 16) <= (others => '1'); > --sram_address_sig; > > end if; > > > > --end if; > > > > > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > -- > > -- OTHER States > > -- > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > > > when others => > > state <= IDLE; > > > > end case; > > end if; > > > > end if; > > > > end process; > > > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// > > -- > > -- End PROCESS MAIN > > -- > > > --//////////////////////////////////////////////////////////////////////////> > /////////////// >