Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Latest commit

 

History

History
45 lines (35 loc) · 1.6 KB

ClockDivider.md

File metadata and controls

45 lines (35 loc) · 1.6 KB

Verilog blackbox of clock divider. Utilizing the Chisel2 compatability layer.


class ClockDivider2

Blockbox of dividing clock by 2.

module ClockDivider2 (output reg clk_out, input clk_in);
   initial clk_out = 1'b0;
   always @(posedge clk_in) begin
      clk_out = ~clk_out; // Must use =, NOT <=
   end
endmodule // ClockDivider2

class Pow2ClockDivider

A configurable clock divider.

class Pow2ClockDivider(pow2: Int) extends Module
  • I/O, type and Paramter
name type direction description
pow2 Int param set divide ratio to 2^pow2
clock_out Clock O divided clock




Last updated: 09/07/2017
CC BY-NC-SA 4.0, © (2017) Wei Song
Apache 2.0, © (2016-2017) SiFive, Inc
BSD, © (2012-2014, 2016) The Regents of the University of California (Regents)