latch and shift 15 bits.

Nov 06, 2003 5 Replies

Hello all



I am trying to implement the following logic in a xilinx XCS05xl FPGA.



I have a 15 bit binary counter. I need to store its count value on the occurrence of an event. Some time later I need to shift the stored counter value out of the FPGA in a serial fashion under the control of a clock.



What I currently have is:



----------------------------------------------------------------------- input clear; reg clear;



input ACB_Decade_Count_Enable;



input ACB_Read_Trigger_Address_Clk;



output ACB_Trigger_Address_Output; reg ACB_Trigger_Address_Output;



reg [14:0] Store_Trigger_Acquisition_Count; // Storage for counter count.


// Store the count value when ACB_Decade_Count_Enable is high. always @ (ACB_Decade_Count_Enable) begin if(ACB_Decade_Count_Enable) // event happened input is high. Store_Trigger_Acquisition_Count


Hi,

You do have multiple drivers to Store_Trigger_Acquisition_Count. One source is Out_acquisition_count and the other is the bit from Store_Trigger_Acquisition_Count you are trying to shift. You need a mux for each bit of register. I hope it helps.

The problem is that you have assigned signal Store_Trigger_Acquisition_Count in two processes. One possible solution is the following ;

always @ (ACB_Decade_Count_Enable or OUT_Acquisition_Count) begin if(ACB_Decade_Count_Enable) // event happened input is high. Store_Trigger_Acquisition_Count

Hi Chuck Many thanks for your input on my question. I have used your code and it leaves me with just one problem in my simulator that you may be able to advise me on. It is a warning that Net "/clear" does not set/reset "/".../Store_trigger_Acquisition_Count_reg all other bits for Store_trigger_Acquisition_Count get the same warning. The result is that the synthesis tool warns that no global set/reset (GSR) net could be used in the design as there is not a unique net that sets or resets all the sequential cells. I have modified your code to include the use of the clear signal to set Store_Trigger_Acquisition_Count to 0. This has had no effect. Any suggestions? always @ (ACB_Decade_Count_Enable or OUT_Acquisition_Count or clear) if(clear) Store_Trigger_Acquisition_Count in two processes.

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required