Unexpected resources utilization

Jun 11, 2007 2 Replies

I am programing a 8-channel digitizing board based on xc3s400 and I ran into the following situation:



Here are peaces of code that I think might make it easier to understand:



COMPONENT ADC_Channel Port ( CLK : in STD_LOGIC; FX_CLK : in STD_LOGIC; S1WE : in STD_LOGIC; S2WE : in STD_LOGIC; S1Found : out STD_LOGIC; S2Found : out STD_LOGIC; ADC_Raw : in STD_LOGIC_VECTOR (14 downto 0); CurSample : out STD_LOGIC_VECTOR (15 downto 0); FX_IOBUS : inout STD_LOGIC_VECTOR (7 downto 0); FX_ADDR : in STD_LOGIC_VECTOR (15 downto 0); FX_MemSelect: in STD_LOGIC); END COMPONENT;



signal S1Found,S2Found: STD_LOGIC_VECTOR(7 downto 0):="00000000"; signal S1FoundB: STD_LOGIC:='0';



Channel1: ADC_Channel Port Map( CLK => NOT CLKIN, FX_CLK => FX_CLKIN, S1WE => S1WEC1, S2WE => '0', S1Found => S1Found(0), S2Found => S2Found(0), ADC_Raw => ADC_A, CurSample => CurSampleC1, FX_IOBUS => FX_IOBUS, FX_ADDR => FX_ADDR, FX_MemSelect => FX_MemSelect(0) ); . . .... and so on until Channel 8 . Channel8: ADC_Channel Port Map( CLK => CLKIN, FX_CLK => FX_CLKIN, S1WE => S1WEC1, S2WE => '0', S1Found => S1Found(7), S2Found => S2Found(7), ADC_Raw => ADC_D, CurSample => CurSampleC8, FX_IOBUS => FX_IOBUS, FX_ADDR => FX_ADDR, FX_MemSelect => FX_MemSelect(7) );



What is important here is that each channel asserts S1Found or S2Found single bits whenever a specific signal is found. What I want is to stop acquisition on all channels once a signal S1 is found on any of the channels. So I want to create a "global" S1Found. So firstly I placed a single bit check just to see if anything works:



PROCESS(CLKIN) begin if CLKIN = '0' and CLKIN'Event then if (S1Found(0)='1') then S1FoundB


Is it possible that the logic which generates SxFound in the ADC_Channel is being trimmed when it's not being used and when you actually use it, it's using too many resources?

Thank you for such a prompt reply. I was aware that the Xilinx software terminates logic but I never knew to what extant. But I don't think that this is the problem because I did the following.

The SxFound in the ADC_Channel component is generated by:

process (CLK) begin if CLK = '0' and CLK'Event then if (FilterOutputSx > 50) then SxFound

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required