J
Jeremy Webb
Guest
John,
I did something similar to this in a Spartan II. I was searching
through a 2^7-1 PRBS pattern (at the output of a SERDES, data bus is
10-bits wide) for the longest string of zeros. Granted the longest
string of zeros in a 2^7-1 PRBS pattern is 6, the idea could be
extrapolated to longer strings like 9 in a 65-bit wide bus.
Here's an example of what I did for searching for 6 zeros in a row.
You'll notice that in my casez statement, I'm actually searching for 6
ones in a row. This is because the BERT that I was using inverted
it's output PRBS pattern.
always @(posedge clock1)
begin
casez (datasi[9:0])
10'b???111111? : Q[9:0] = {datasi[9:8],7'b1111111,datasi[0]};
default : Q[9:0] = datasi[9:0];
endcase
end
Once you find the string that you're looking for, you can do what ever
you'd like.
Hope this helps,
Jeremy
johnhandwork@mail.com (John_H) wrote in message news:<6c803f5f.0310060552.267dc963@posting.google.com>...
I did something similar to this in a Spartan II. I was searching
through a 2^7-1 PRBS pattern (at the output of a SERDES, data bus is
10-bits wide) for the longest string of zeros. Granted the longest
string of zeros in a 2^7-1 PRBS pattern is 6, the idea could be
extrapolated to longer strings like 9 in a 65-bit wide bus.
Here's an example of what I did for searching for 6 zeros in a row.
You'll notice that in my casez statement, I'm actually searching for 6
ones in a row. This is because the BERT that I was using inverted
it's output PRBS pattern.
always @(posedge clock1)
begin
casez (datasi[9:0])
10'b???111111? : Q[9:0] = {datasi[9:8],7'b1111111,datasi[0]};
default : Q[9:0] = datasi[9:0];
endcase
end
Once you find the string that you're looking for, you can do what ever
you'd like.
Hope this helps,
Jeremy
johnhandwork@mail.com (John_H) wrote in message news:<6c803f5f.0310060552.267dc963@posting.google.com>...
"Morten Leikvoll" <m-leik@online.nospam> wrote in message news:<5z9gb.28389$os2.397003@news2.e.nsc.no>...
I just started reading this thread.. Am I correct if you really want to
detect 9 EQUAL bits in a row from a stream?
Could you not do this just with a 4bits counter and a comparator/zero
detector?
Correct, I need "equal" bits, either 9'h000 or 9'h1ff, starting from
0, 8, 16, ... 56.
The input is 65 bits per clock with a fast clock, output from BlockRAM
which was loaded at full width.
Counters require more than one clock.