OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [rtl/] [verilog/] [omsp_clock_mux.v] - Diff between revs 134 and 202

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 134 Rev 202
Line 49... Line 49...
// INPUTs
// INPUTs
    clk_in0,                   // Clock input 0
    clk_in0,                   // Clock input 0
    clk_in1,                   // Clock input 1
    clk_in1,                   // Clock input 1
    reset,                     // Reset
    reset,                     // Reset
    scan_mode,                 // Scan mode (clk_in0 is selected in scan mode)
    scan_mode,                 // Scan mode (clk_in0 is selected in scan mode)
    select                     // Clock selection
    select_in                  // Clock selection
);
);
 
 
// OUTPUTs
// OUTPUTs
//=========
//=========
output         clk_out;        // Clock output
output         clk_out;        // Clock output
Line 62... Line 62...
//=========
//=========
input          clk_in0;        // Clock input 0
input          clk_in0;        // Clock input 0
input          clk_in1;        // Clock input 1
input          clk_in1;        // Clock input 1
input          reset;          // Reset
input          reset;          // Reset
input          scan_mode;      // Scan mode (clk_in0 is selected in scan mode)
input          scan_mode;      // Scan mode (clk_in0 is selected in scan mode)
input          select;         // Clock selection
input          select_in;      // Clock selection
 
 
 
 
//===========================================================================================================================//
//===========================================================================================================================//
// 1)  CLOCK MUX                                                                                                             //
// 1)  CLOCK MUX                                                                                                             //
//===========================================================================================================================//
//===========================================================================================================================//
Line 75... Line 75...
//                                                                                                                           //
//                                                                                                                           //
//                                                                                                                           //
//                                                                                                                           //
//                                                                                                                           //
//                                                                                                                           //
//                                                                                                                           //
//                                                                                                                           //
//                                   +-----.     +--------+   +--------+                                                     //
//                                   +-----.     +--------+   +--------+                                                     //
//       select >>----+-------------O|      \    |        |   |        |          +-----.                                    //
//    select_in >>----+-------------O|      \    |        |   |        |          +-----.                                    //
//                    |              |       |---| D    Q |---| D    Q |--+-------|      \                                   //
//                    |              |       |---| D    Q |---| D    Q |--+-------|      \                                   //
//                    |     +-------O|      /    |        |   |        |  |       |       |O-+                               //
//                    |     +-------O|      /    |        |   |        |  |       |       |O-+                               //
//                    |     |        +-----'     |        |   |        |  |   +--O|      /   |                               //
//                    |     |        +-----'     |        |   |        |  |   +--O|      /   |                               //
//                    |     |                    |   /\   |   |   /\   |  |   |   +-----'    |                               //
//                    |     |                    |   /\   |   |   /\   |  |   |   +-----'    |                               //
//                    |     |                    +--+--+--+   +--+--+--+  |   |              |                               //
//                    |     |                    +--+--+--+   +--+--+--+  |   |              |                               //
Line 127... Line 127...
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// CLK_IN0 Selection
// CLK_IN0 Selection
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
 
 
assign in0_select = ~select & ~in1_select_ss;
assign in0_select = ~select_in & ~in1_select_ss;
 
 
always @ (posedge clk_in0_inv or posedge reset)
always @ (posedge clk_in0_inv or posedge reset)
  if (reset) in0_select_s  <=  1'b1;
  if (reset) in0_select_s  <=  1'b1;
  else       in0_select_s  <=  in0_select;
  else       in0_select_s  <=  in0_select;
 
 
Line 144... Line 144...
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// CLK_IN1 Selection
// CLK_IN1 Selection
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
 
 
assign in1_select =  select & ~in0_select_ss;
assign in1_select =  select_in & ~in0_select_ss;
 
 
always @ (posedge clk_in1_inv or posedge reset)
always @ (posedge clk_in1_inv or posedge reset)
  if (reset) in1_select_s  <=  1'b0;
  if (reset) in1_select_s  <=  1'b0;
  else       in1_select_s  <=  in1_select;
  else       in1_select_s  <=  in1_select;
 
 
Line 186... Line 186...
 
 
 
 
 
 
endmodule // omsp_clock_gate
endmodule // omsp_clock_gate
 
 
 
 
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.