shift right as well
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user