1
0
mirror of https://github.com/antonblanchard/chiselwatt.git synced 2026-03-03 18:26:50 +00:00

Add a parameter to control the polarity of reset

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
This commit is contained in:
Anton Blanchard
2020-02-02 09:02:33 +11:00
committed by Anton Blanchard
parent fb166bbfae
commit df3a74798e

View File

@@ -1,4 +1,6 @@
module toplevel(
module toplevel #(
parameter RESET_LOW = 1
) (
input clock,
input reset,
output io_tx,
@@ -32,7 +34,7 @@ reg [21:0] cnt = ~0;
always@(posedge clock)
begin
if (~lock || ~reset)
if (~lock || (reset ^ RESET_LOW))
begin
cnt <= ~0;
end