data/full_repos/permissive/200650987/project/display/soc_up/rtl/APB_DEV/URT/uart_sync_flops.v
data/verilator_xmls/ce8ddfc8-3a93-4901-95c6-9532e085d5cb.xml
module uart_sync_flops
(
    rst_i,
    clk_i,
    stage1_rst_i,
    stage1_clk_en_i,
    async_dat_i,
    sync_dat_o
);

parameter Tp            = 1;
parameter width         = 1;
parameter init_value    = 1'b0;

input                   rst_i;                  
input                   clk_i;                  
input                   stage1_rst_i;           
input                   stage1_clk_en_i;        
input   [width-1:0]     async_dat_i;            
output  [width-1:0]     sync_dat_o;             

reg     [width-1:0]     sync_dat_o;
reg     [width-1:0]     flop_0;

always @ (posedge clk_i)
begin
    if (rst_i)
        flop_0 <= {width{init_value}};
    else
        flop_0 <= async_dat_i;    
end

always @ (posedge clk_i)
begin
    if (rst_i)
        sync_dat_o <= {width{init_value}};
    else if (stage1_rst_i)
        sync_dat_o <= {width{init_value}};
    else if (stage1_clk_en_i)
        sync_dat_o <= flop_0;       
end

endmodule
module uart_sync_flops
(
    rst_i,
    clk_i,
    stage1_rst_i,
    stage1_clk_en_i,
    async_dat_i,
    sync_dat_o
);


parameter Tp            = 1;
parameter width         = 1;
parameter init_value    = 1'b0;

input                   rst_i;                  
input                   clk_i;                  
input                   stage1_rst_i;           
input                   stage1_clk_en_i;        
input   [width-1:0]     async_dat_i;            
output  [width-1:0]     sync_dat_o;             

reg     [width-1:0]     sync_dat_o;
reg     [width-1:0]     flop_0;

always @ (posedge clk_i)
begin
    if (rst_i)
        flop_0 <= {width{init_value}};
    else
        flop_0 <= async_dat_i;    
end

always @ (posedge clk_i)
begin
    if (rst_i)
        sync_dat_o <= {width{init_value}};
    else if (stage1_rst_i)
        sync_dat_o <= {width{init_value}};
    else if (stage1_clk_en_i)
        sync_dat_o <= flop_0;       
end

endmodule