mirror of https://github.com/YosysHQ/picorv32.git
Merge pull request #158 from rxrbln/uart
added default clk divider parameter to simpleuart
This commit is contained in:
commit
824a5c8011
|
@ -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