产生clk jitter的方法

//clk jitter must be smaller than clk width

parameter clk_width = 4000;

parameter clk_jitter_width = 4;

logic clk_base;

int unsigned clk_dly;

initial begin

clk_base = 0;

forever #(clk_width / 2) clk_base = ~clk_base;

end

always @(clk_base) begin

clk_dly = $urandom() % clk_jitter_width;

i2c_intf.scl = #clk_dly clk_base;

end

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s