An edge descriptor error

The favorite HDL language in North America

An edge descriptor error

Postby dethmaShine » Mon Aug 02, 2010 1:52 pm

I'm using a PRBS sequence as a clock divider.

the signal q is my new clock. But there's the following error:

ERROR:Xst:904 - "counter_prbs.v" line 57: An edge descriptor must be applied to an expression of size 1.


Following is the code (incomplete - only the required part)

// GSR: Global Clock Set/Reset

Code: Select all
//New clock:
always @ (posedge CLK or posedge GSR)             
   begin
      if(GSR)
         q <= 25'b0;
      else
         q <= (&prbs_25[24:0]) ? !q : q;  //No need of the extra assign statement.
   end
   
//Counter
always   @ (posedge q or posedge GSR) -----------//ERROR
   begin
      if(GSR)
         count_in <= 0;
      else if(dir)
         count_in <= count_in + 1;
      else
         count_in <= count_in - 1;
   end

assign COUNT_OUT = count_in;

dethmaShine
 
Posts: 2
Joined: Mon Aug 02, 2010 1:46 pm

Return to Verilog HDL