1
0
mirror of https://github.com/olofk/serv.git synced 2026-02-03 06:50:17 +00:00

Fix bugs and missing resets to pass formal

This commit is contained in:
Olof Kindgren
2018-12-11 22:05:32 +01:00
parent af1d4da8bf
commit 09bb05071e
9 changed files with 57 additions and 22 deletions

View File

@@ -3,6 +3,7 @@ module shift_reg
parameter INIT = 0)
(
input wire clk,
input wire i_rst,
input wire i_en,
input wire i_d,
output wire o_q,
@@ -12,6 +13,8 @@ module shift_reg
assign o_q = data[0];
assign o_par = data[LEN-1:1];
always @(posedge clk)
if (i_en)
if (i_rst)
data <= INIT;
else if (i_en)
data <= {i_d, data[LEN-1:1]};
endmodule