Skip to content

Commit

Permalink
modified decoder.v
Browse files Browse the repository at this point in the history
  • Loading branch information
mountains-high authored and mountains-high committed Nov 1, 2023
2 parents 3a8ae20 + 3b5b539 commit 22de024
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
29 changes: 27 additions & 2 deletions src/decoder.v
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,40 @@
:math:`β` - Membrane potential decay rate
*/

module lif (
modle lif (
input wire [7:0] current,
input wire clk,
input wire rst_n,
output wire spike,
output reg [7:0] state
);

<<<<<<< HEAD

=======
always @(*) begin
case(counter)
// 7654321
0: segments = 7'b0111111;
1: segments = 7'b0000110;
2: segments = 7'b1011011;
3: segments = 7'b1001111;
4: segments = 7'b1100110;
5: segments = 7'b1101101;
6: segments = 7'b1111101;
7: segments = 7'b0000111;
8: segments = 7'b1111111;
9: segments = 7'b1101111;
10: segments = 7'b1110111;
11: segments = 7'b1111100;
12: segments = 7'b0111001;
13: segments = 7'b1011110;
14: segments = 7'b1111001;
15: segments = 7'b1110001;
default:
segments = 7'b0000000;
endcase
end
>>>>>>> origin/main

endmodule

2 changes: 1 addition & 1 deletion src/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from cocotb.triggers import RisingEdge, FallingEdge, Timer, ClockCycles


segments = [ 63, 6, 91, 79, 102, 109, 124, 7, 127, 103 ]
segments = [ 63, 6, 91, 79, 102, 109, 125, 7, 127, 111 ]

@cocotb.test()
async def test_7seg(dut):
Expand Down

0 comments on commit 22de024

Please sign in to comment.