mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-21 20:37:12 -04:00
- Add a technology map for latches (only works with nandgate45 library at the moment) - Add a real latch-based clock gating cell - Update timing path reporting to differentiate between register and latch paths - Update summary results in README to reflect the latch-based numbers, plus add numbers for a micro-riscy-style (RV32EC) config Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
23 lines
452 B
Verilog
23 lines
452 B
Verilog
// Copyright lowRISC contributors.
|
|
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Example clock gating module for yosys synthesis
|
|
|
|
module prim_clock_gating (
|
|
input clk_i,
|
|
input en_i,
|
|
input test_en_i,
|
|
output clk_o
|
|
);
|
|
|
|
reg en_latch;
|
|
|
|
always @* begin
|
|
if (!clk_i) begin
|
|
en_latch = en_i | test_en_i;
|
|
end
|
|
end
|
|
assign clk_o = en_latch & clk_i;
|
|
|
|
endmodule
|