Main Page | Report this Page
Computers Forum Index  »  Computer Architecture - FPGA  »  Need some help creating a ring oscillator on a...
Page 1 of 1    

Need some help creating a ring oscillator on a...

Author Message
Sam Kerr...
Posted: Mon Nov 02, 2009 7:20 pm
Guest
I'm trying to create a ring oscillator for my FPGA design but I've run
into some problems. Namely, it doesn't seem like any oscillation is
occurring. I've hooked up the output signal to LEDs and the serial port,
but neither of these shows any oscillations.

A few things I think might be happening is that the oscillation is so fast
I just can't see it, the oscillation is too fast for the board, it's
getting optimized out during synthesis, or (probably) my Verilog file is
implemented incorrectly.

Can you help me with this? See below for the Verilog modules I'm using.


module ringoscillator(
input wire stop,
output wire out
);

wire connector;
wire w1, w2, w3, w4;

nandgate inputGate(.i1(stop), .i2(connector), .out(w1));
invertergate inv1(.in(w1), .out(w2));
invertergate inv2(.in(w2), .out(w3));
invertergate inv3(.in(w3), .out(w4));
invertergate inv4(.in(w4), .out(connector));

assign out = connector;

endmodule

module nandgate(
input wire i1, i2,
output wire out);

assign out = ~(i1 & i2);
endmodule

module invertergate(
input wire in,
output wire out);

assign out = ~in;
endmodule


Thanks for any help!
 
austin...
Posted: Mon Nov 02, 2009 7:20 pm
Guest
Sam,

Most synthesis tools optimize out any unnecessary logic, so the
synthesis tool will look at your code, and remove all but one
inverter.

It will then either not oscillate (not enough delay), or it will
oscillate so fast, you will be unable to see anything on an IO pin.

Read through the synthesis manual, and you will find attributes like
"keep" and "save" which direct the tools to not rip things out (you
really wanted to do something that obvious).

The place and route tools also optimize, so this also may be happening
after synthesis.

Austin
 
Antti...
Posted: Mon Nov 02, 2009 7:20 pm
Guest
On Nov 2, 4:20 pm, Sam Kerr <stk... at (no spam) purdue.edu> wrote:
Quote:
I'm trying to create a ring oscillator for my FPGA design but I've run
into some problems. Namely, it doesn't seem like any oscillation is
occurring. I've hooked up the output signal to LEDs and the serial port,
but neither of these shows any oscillations.

A few things I think might be happening is that the oscillation is so fast
I just can't see it, the oscillation is too fast for the board, it's
getting optimized out during synthesis, or (probably) my Verilog file is
implemented incorrectly.

Can you help me with this? See below for the Verilog modules I'm using.

module ringoscillator(
input wire stop,
output wire out
);

wire connector;
wire w1, w2, w3, w4;

nandgate inputGate(.i1(stop), .i2(connector), .out(w1));
invertergate inv1(.in(w1), .out(w2));
invertergate inv2(.in(w2), .out(w3));
invertergate inv3(.in(w3), .out(w4));
invertergate inv4(.in(w4), .out(connector));

assign out = connector;

endmodule

module nandgate(
input wire i1, i2,
output wire out);

assign out = ~(i1 & i2);
endmodule

module invertergate(
input wire in,
output wire out);

assign out = ~in;
endmodule

Thanks for any help!

looks xilinx examples if you dont get it working yourself

there are many ways of doing ring oscillators some work too

se sk freq meter ref design includes ring osc

Antti
 
Gabor...
Posted: Mon Nov 02, 2009 7:20 pm
Guest
On Nov 2, 9:20 am, Sam Kerr <stk... at (no spam) purdue.edu> wrote:
Quote:
I'm trying to create a ring oscillator for my FPGA design but I've run
into some problems. Namely, it doesn't seem like any oscillation is
occurring. I've hooked up the output signal to LEDs and the serial port,
but neither of these shows any oscillations.

A few things I think might be happening is that the oscillation is so fast
I just can't see it, the oscillation is too fast for the board, it's
getting optimized out during synthesis, or (probably) my Verilog file is
implemented incorrectly.

Can you help me with this? See below for the Verilog modules I'm using.

module ringoscillator(
input wire stop,
output wire out
);

wire connector;
wire w1, w2, w3, w4;

nandgate inputGate(.i1(stop), .i2(connector), .out(w1));
invertergate inv1(.in(w1), .out(w2));
invertergate inv2(.in(w2), .out(w3));
invertergate inv3(.in(w3), .out(w4));
invertergate inv4(.in(w4), .out(connector));

assign out = connector;

endmodule

module nandgate(
input wire i1, i2,
output wire out);

assign out = ~(i1 & i2);
endmodule

module invertergate(
input wire in,
output wire out);

assign out = ~in;
endmodule

Thanks for any help!

I'm not sure this works on wires as well as regs, but try:

(* KEEP = "TRUE" *) wire connector; // This wire should be kept
anyway
(* KEEP = "TRUE" *) wire w1, w2, w3, w4; // Some of these would get
ripped out

Older versions of XST would not keep simple gates. The brute force
method
is to take out and dust off the old libraries guide and instantiate a
LUT
with the appropriate INIT functions for your gates. However I think
that
if you're using a relatively recent version of XST the KEEP attribute
should
do the trick.

Regards,
Gabor
 
glen herrmannsfeldt...
Posted: Mon Nov 02, 2009 8:08 pm
Guest
Sam Kerr <stkerr at (no spam) purdue.edu> wrote:

Quote:
I'm trying to create a ring oscillator for my FPGA design but I've run
into some problems. Namely, it doesn't seem like any oscillation is
occurring. I've hooked up the output signal to LEDs and the serial port,
but neither of these shows any oscillations.

A few things I think might be happening is that the oscillation is so fast
I just can't see it, the oscillation is too fast for the board, it's
getting optimized out during synthesis, or (probably) my Verilog file is
implemented incorrectly.

If you really mean "see", I am pretty sure it would be too fast
to see on the LED. In the CD4000 series days, we used to make slower
ones with three inverters and an RC delay. (Or maybe with just one.)
If you do keep all three inverters (no optimizing them away), you
should be in the 100's of MHz range. Run through a 30 bit ripple
counter and then you should be able to see it.

-- glen
 
Rob Gaddi...
Posted: Tue Nov 03, 2009 9:05 pm
Guest
On Mon, 2 Nov 2009 09:20:45 -0500
Sam Kerr <stkerr at (no spam) purdue.edu> wrote:

Quote:
[snip a ring oscillator]

You know, for one pin, a tinylogic schmitt trigger, an R, and a C (sum
total < $0.10 in quantity), you could have a much easier to work with
clock source.

--
Rob Gaddi, Highland Technology
Email address is currently out of order
 
Antti...
Posted: Thu Nov 05, 2009 6:05 pm
Guest
On Nov 5, 7:43 pm, Sam Kerr <stk... at (no spam) purdue.edu> wrote:
Quote:
Agreed, but the design I'm implementing is a Physically Unclonable
Function, which specifically calls for a ring oscillator.

-Sam Kerr



On Tue, 3 Nov 2009, Rob Gaddi wrote:
On Mon, 2 Nov 2009 09:20:45 -0500
Sam Kerr <stk... at (no spam) purdue.edu> wrote:

[snip a ring oscillator]

You know, for one pin, a tinylogic schmitt trigger, an R, and a C (sum
total < $0.10 in quantity), you could have a much easier to work with
clock source.

--
Rob Gaddi, Highland Technology
Email address is currently out of order

wau, a real PUF designer! :)

and how is it looking? There are plenty of tricks possible, but
i bet its not so easy to make it really reliable

Antti
 
Antti...
Posted: Thu Nov 05, 2009 6:48 pm
Guest
On Nov 5, 8:41 pm, "Krzysztof Kepa" <nospam_blond... at (no spam) poczta.fm> wrote:
Quote:
"Sam Kerr" <stk... at (no spam) purdue.edu> wrote in message

news:alpine.WNT.2.00.0911020916180.1072 at (no spam) stkerr-Vista...

I'm trying to create a ring oscillator for my FPGA design but I've run
into some problems. Namely, it doesn't seem like any oscillation is
occurring. I've hooked up the output signal to LEDs and the serial port,
but neither of these shows any oscillations.

Here you might find useful reference design:

A. Maiti, R. Nagesh, A. Reddy, P. Schaumont, "Physical Unclonable Function
and True Random Number Generator: a Compact and Scalable Implementation,"
19th Great Lakes Symposium on VLSI (GLSVLSI 2009), May 2009.http://rijndael.ece.vt.edu/schaum/papers/2009glsvlsi.pdf



A few things I think might be happening is that the oscillation is so fast
I just can't see it, the oscillation is too fast for the board, it's
getting optimized out during synthesis, or (probably) my Verilog file is
implemented incorrectly.

Constraining inverter's output signals with 'KEEP' attribute will do the
job.
Also, the oscillation frequency for 3 INVs can reach 450-500MHz (when
implemented in V5).

Regards,
Krzysztof

I was able to measure ring oscillator frequency of 975MHz in V4 Smile
(but that signal would not travel long in V4 fabric)

Antti
 
Antti...
Posted: Thu Nov 05, 2009 8:27 pm
Guest
On Nov 5, 9:51 pm, "Krzysztof Kepa" <nospam_blond... at (no spam) poczta.fm> wrote:
Quote:
"Antti" <antti.luk... at (no spam) googlemail.com> wrote in message

news:db41b833-0e92-421b-90d8-0ebc9f557571 at (no spam) j4g2000yqe.googlegroups.com...
On Nov 5, 8:41 pm, "Krzysztof Kepa" <nospam_blond... at (no spam) poczta.fm> wrote:

Also, the oscillation frequency for 3 INVs can reach 450-500MHz (when
implemented in V5).

I was able to measure ring oscillator frequency of 975MHz in V4 Smile
(but that signal would not travel long in V4 fabric)

Antti

Nice, was it on purpose?
I mean I'm just curious whether it required manual routing or simply 'just
happened' ?;)

Regards,
Krzysztof

on purpose yes :)

just "fabric" speed measurement experiments, and trying out different
primitives to be used as on-chip oscillators
I think i did use RLOCs at least, the 975mhz travels to closest Flip
flop that divides by two, the clock is otherwise
unuseable in V4, ah yes, this was done when i did write my FPGA
Frequency Meter IP cores and JTAG software
well, that software and IP cores still could be used but as it was
depending on LPT based JTAG adapter so it
not much useful now, well at least not with that mode that it was
used, where it was possible to measure
clocks connected to FPGA without having any known reference (JTAG
timing was used as reference)

Antti
 
Sam Kerr...
Posted: Thu Nov 05, 2009 10:43 pm
Guest
Agreed, but the design I'm implementing is a Physically Unclonable
Function, which specifically calls for a ring oscillator.

-Sam Kerr

On Tue, 3 Nov 2009, Rob Gaddi wrote:

Quote:
On Mon, 2 Nov 2009 09:20:45 -0500
Sam Kerr <stkerr at (no spam) purdue.edu> wrote:

[snip a ring oscillator]

You know, for one pin, a tinylogic schmitt trigger, an R, and a C (sum
total < $0.10 in quantity), you could have a much easier to work with
clock source.

--
Rob Gaddi, Highland Technology
Email address is currently out of order
 
Krzysztof Kepa...
Posted: Thu Nov 05, 2009 11:41 pm
Guest
"Sam Kerr" <stkerr at (no spam) purdue.edu> wrote in message
news:alpine.WNT.2.00.0911020916180.1072 at (no spam) stkerr-Vista...
Quote:
I'm trying to create a ring oscillator for my FPGA design but I've run
into some problems. Namely, it doesn't seem like any oscillation is
occurring. I've hooked up the output signal to LEDs and the serial port,
but neither of these shows any oscillations.


Here you might find useful reference design:

A. Maiti, R. Nagesh, A. Reddy, P. Schaumont, "Physical Unclonable Function
and True Random Number Generator: a Compact and Scalable Implementation,"
19th Great Lakes Symposium on VLSI (GLSVLSI 2009), May 2009.
http://rijndael.ece.vt.edu/schaum/papers/2009glsvlsi.pdf

Quote:

A few things I think might be happening is that the oscillation is so fast
I just can't see it, the oscillation is too fast for the board, it's
getting optimized out during synthesis, or (probably) my Verilog file is
implemented incorrectly.


Constraining inverter's output signals with 'KEEP' attribute will do the
job.
Also, the oscillation frequency for 3 INVs can reach 450-500MHz (when
implemented in V5).

Regards,
Krzysztof
 
Krzysztof Kepa...
Posted: Fri Nov 06, 2009 12:51 am
Guest
"Antti" <antti.lukats at (no spam) googlemail.com> wrote in message
news:db41b833-0e92-421b-90d8-0ebc9f557571 at (no spam) j4g2000yqe.googlegroups.com...
On Nov 5, 8:41 pm, "Krzysztof Kepa" <nospam_blond... at (no spam) poczta.fm> wrote:
Quote:
Also, the oscillation frequency for 3 INVs can reach 450-500MHz (when
implemented in V5).

I was able to measure ring oscillator frequency of 975MHz in V4 Smile
(but that signal would not travel long in V4 fabric)

Antti

Nice, was it on purpose?
I mean I'm just curious whether it required manual routing or simply 'just
happened' ?;)

Regards,
Krzysztof
 
 
Page 1 of 1    
All times are GMT
The time now is Thu Dec 10, 2009 10:49 pm