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.

Need Verilog code for 1 signal for 1 period after 16 clock cycle

Status
Not open for further replies.

ravindra kalla

Junior Member level 2
Joined
Aug 3, 2005
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,519
take


hi
i m writing a verilog code on that 1 controle signal should be there which will active after 16 clock cycle and only for one clock period.This control signal is used for select line of MUX.So that MUX
will select value from x(suppose) up to 16 clock cycle after that it will select value from y.SO how can i write code for this procedure.One more thing is that i will use this processing element latter in my architecture.it is one part of my architecture
 

verilog code(urgent)

You can use a 16 bit shift register. Feed a pulse into the input, then sixteen clocks later it appears at the output.
 

Re: verilog code(urgent)

here is one example how you can do that!

Code:
module cntrl(/*AUTOARG*/
   // Outputs
   mux_sel, 
   // Inputs
   clk, reset_n
   );
   input clk, reset_n;
   output      mux_sel;
   reg [4:0]   control;

   assign      mux_sel = &control;

   always @(posedge clk or negedge reset_n)
     if (!reset_n)
       control <= 0;
     else
       control <= control + 1'b1;
endmodule // cntrl
 

verilog code(urgent)

I agree with nand_gates
,maybe a counter is better!!
 

verilog code(urgent)

A counter would be smaller.
A shift register would support multi-pulse pipelining.
We don't know which feature is more important to the project.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top