1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-30 02:32:53 +08:00

Simplifying names to make it easier to specify generated clocks

This commit is contained in:
Andreas Olofsson 2016-07-09 20:32:57 -04:00
parent 2c272e7afa
commit 67409dba7a
2 changed files with 14 additions and 14 deletions

View File

@ -91,10 +91,10 @@ module oh_clockdiv
assign clk0_sel[0] = ~(clkdiv[7:0]==8'd0);
oh_clockmux #(.N(2))
iclkmux0 (.clkout(clkout0),
.clk(clk),
.en(clk0_sel[1:0]),
.clkin({clk, clkout0_reg}));
oh_clockmux0 (.clkout(clkout0),
.clk(clk),
.en(clk0_sel[1:0]),
.clkin({clk, clkout0_reg}));
//###########################################
//# CLKOUT1
@ -119,10 +119,10 @@ module oh_clockdiv
assign clk1_sel[0] = |clkdiv[7:1]; // all others
oh_clockmux #(.N(4))
iclkmux1 (.clkout(clkout1),
.clk(clk),
.en( clk1_sel[3:0]),
.clkin({1'b0, clk, clkout1_shift, clkout1_reg}));
oh_clockmux1 (.clkout(clkout1),
.clk(clk),
.en( clk1_sel[3:0]),
.clkin({1'b0, clk, clkout1_shift, clkout1_reg}));
endmodule // oh_clockdiv

View File

@ -16,14 +16,14 @@ module oh_clockmux #(parameter ASIC = `CFG_ASIC, // use ASIC lib
generate
if(ASIC)
begin : asic
asic_clockmux #(.N(N)) imux (.clk(clk),
.clkin(clkin[N-1:0]),
.en(en[N-1:0]),
.clkout(clkout));
begin : g0
asic_clockmux #(.N(N)) asic_clockmux (.clk(clk),
.clkin(clkin[N-1:0]),
.en(en[N-1:0]),
.clkout(clkout));
end
else
begin : generic
begin : g0
reg [N-1:0] en_sh;
always @ (clk or en)
if (!clk)