Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can i generate a Pulse with a time = 35 ns

Status
Not open for further replies.

yasser_shoukry

Full Member level 4
Joined
May 31, 2006
Messages
233
Helped
25
Reputation
54
Reaction score
5
Trophy points
1,298
Location
Cairo - Egypt
Activity points
2,749
I need an RTL code in verilog or VHDL to generate a pulse with high time = 10 us ?
How can i meet this timing constraint?

Thanks in advance
 

What frequency is your clock?
What triggers the pulse? Is the trigger synchronous to the clock?
What type of FPGA/CPLD are you using?

One simple solution could be to use a 200 MHz clock, and count seven cycles.
 

I am using the Spartan3 starter kit, it has a built in 50 MHz crystal. This module should be triggered when 1 is written to its control register

Added after 2 minutes:

Sorry i have written the high time in my first post 35 nsec while the correct is 10 usec
 

You can generate 10us by counting 500 clocks at 50MHz.
I don't quite understand your control register, but maybe you can use this module.
Comment-out one of the two "count" assignments depending on your desired trigger type.
Code:
module top (clk, in, out);   // detect rising edge, generate 500-clock pulse
  input         clk, in;
  reg     [2:0] delay = 0;   // anti-metastability shift register
  wire          trigger = ~delay[2] & delay[1];   // detect rising edge
  reg     [9:0] count = 0;
  output        out;
  assign        out = count[9];

  always @ (posedge clk) begin
    delay <= {delay,in};
    count <= trigger ? -500 : count ? count + 1 : count;   // retriggerable
  //count <= count ? count + 1 : trigger ? -500 : count;   // non-retriggerable
  end
endmodule
 

How about using a DCM.
 

Easiest method is to use a counter. Just count 500clocks to get the trigger... Decode to write the 1.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top