generated from TinyTapeout/tt06-verilog-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major rewrites of nearly all modules
- Loading branch information
Showing
7 changed files
with
135 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) 2024 Fabio Ramirez Stern | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
`define default_netname none | ||
|
||
module SPI_driver ( | ||
input wire clk, | ||
input wire [2:0] min_X0, // minutes | ||
input wire [3:0] min_0X, | ||
input wire [2:0] sec_X0, // seconds | ||
input wire [3:0] sec_0X, | ||
input wire [3:0] ces_X0, // centiseconds (100th) | ||
input wire [3:0] ces_0X, | ||
output wire clk_SPI, | ||
output wire MOSI | ||
); | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2024 Fabio Ramirez Stern | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
`define default_netname none | ||
|
||
module controller ( | ||
input wire res, // reset, active low | ||
input wire start_stop, // impulse toggles counter_enable | ||
input wire lap_time, // impulse toggles display_enable | ||
output reg counter_enable, // | ||
output reg display_enable // | ||
); | ||
|
||
always @(posedge start_stop or negedge res) begin | ||
if (!res) | ||
counter_enable <= 0; | ||
else | ||
counter_enable <= ~counter_enable; | ||
end | ||
|
||
always @(posedge lap_time or negedge res) begin | ||
if (!res) | ||
display_enable <= 1; | ||
else | ||
display_enable <= ~display_enable; | ||
end | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (c) 2024 Fabio Ramirez Stern | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
`define default_netname none | ||
|
||
module counter_chain ( | ||
input wire clk, | ||
output wire [2:0] min_X0, // minutes | ||
output wire [3:0] min_0X, | ||
output wire [2:0] sec_X0, // seconds | ||
output wire [3:0] sec_0X, | ||
output wire [3:0] ces_X0, // centiseconds (100th) | ||
output wire [3:0] ces_0X | ||
); | ||
|
||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters