From 400ebbb9aaaf8a580ec5f75e1a8c52cff46e85b2 Mon Sep 17 00:00:00 2001 From: Nam Tran Date: Fri, 23 Oct 2020 14:50:34 -0500 Subject: [PATCH] shift right as well --- fsm/rtl/top.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fsm/rtl/top.v b/fsm/rtl/top.v index 3366aa1..0709da2 100644 --- a/fsm/rtl/top.v +++ b/fsm/rtl/top.v @@ -26,10 +26,11 @@ module top(i_clk, o_led, lcol1); always @(posedge clk_12MHz) {strobe, counter} <= counter + 1'b1; - // shifting bit, to the left + // shifting bit always @(posedge clk_12MHz) if (strobe) - obuf <= {obuf[6:0], obuf[7]}; + obuf <= {obuf[6:0], obuf[7]}; // left shift + // obuf <= {obuf[0], obuf[7:1]}; // right shift always @(*) o_led = ~obuf;