mirror of https://github.com/YosysHQ/picorv32.git
added default clk divider parameter to simpleuart
This commit is contained in:
parent
e308982e18
commit
a7ff70dfb4
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
module simpleuart (
|
||||
module simpleuart #(parameter integer DEFAULT_DIV = 1) (
|
||||
input clk,
|
||||
input resetn,
|
||||
|
||||
|
@ -54,7 +54,7 @@ module simpleuart (
|
|||
|
||||
always @(posedge clk) begin
|
||||
if (!resetn) begin
|
||||
cfg_divider <= 1;
|
||||
cfg_divider <= DEFAULT_DIV;
|
||||
end else begin
|
||||
if (reg_div_we[0]) cfg_divider[ 7: 0] <= reg_div_di[ 7: 0];
|
||||
if (reg_div_we[1]) cfg_divider[15: 8] <= reg_div_di[15: 8];
|
||||
|
|
Loading…
Reference in New Issue